| | |
| | | from lims_laboratory.product |
| | | where state = 1 |
| | | and specifications_id = #{specificationsId} |
| | | ORDER BY product.`create_time` DESC |
| | | and version = #{version} |
| | | ORDER BY product.`create_time` DESC |
| | | </select> |
| | | |
| | | <select id="deleteList"> |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.clients.UserLoginUtils; |
| | | import com.yuanchu.limslaboratory.pojo.User; |
| | | import com.yuanchu.limslaboratory.service.RoleManagerService; |
| | | import com.yuanchu.limslaboratory.service.UserService; |
| | | import com.yuanchu.limslaboratory.shiro.realm.ShiroRealm; |
| | | import com.yuanchu.limslaboratory.utils.JackSonUtil; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private UserService userService; |
| | | |
| | | @Autowired |
| | | private RoleManagerService roleManagerService; |
| | | |
| | | @ApiOperation("ç¨æ·ç»å½") |
| | | @ApiImplicitParams(value = { |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("æ°å¢ç¨æ·è·åè§è²æéä¿¡æ¯") |
| | | @GetMapping("/list") |
| | | public Result<?> getUserListRole(){ |
| | | List<Map<String,Object>> data = roleManagerService.getUserListRole(); |
| | | return Result.success(data); |
| | | } |
| | | |
| | | @ApiOperation("ç»å½-->è·åç¨æ·ä¿¡æ¯") |
| | | @GetMapping("/info") |
| | | public Result<?> getUserInfo(@RequestHeader("X-Token") String token){ |
| | |
| | | int deleteRoleMenuByRoleId(Long id); |
| | | |
| | | RoleAndMenuDto selectAllRoleAndMenuByRoleId(Long roleId); |
| | | |
| | | List<Map<String, Object>> getUserListRole(); |
| | | } |
| | |
| | | private String account; |
| | | |
| | | @ApiModelProperty(value = "0ï¼æ æéï¼1ï¼ææé", example = "1", required = true) |
| | | private Integer roleId; |
| | | private Long roleId; |
| | | |
| | | @ApiModelProperty(value = "å¹´é¾", example = "23") |
| | | private Integer age; |
| | |
| | | private String account; |
| | | |
| | | @ApiModelProperty(value = "0ï¼æ æéï¼1ï¼ææé", example = "1", required = true) |
| | | private Long role_id; |
| | | private Long roleId; |
| | | |
| | | @ApiModelProperty(value = "å
³è ä¼ä¸id") |
| | | private Integer enterpriseId; |
| | | |
| | | @ApiModelProperty(value = "å¹´é¾", example = "23") |
| | | private Integer age; |
| | |
| | | @ApiModelProperty(value = "é®ç®±", example = "12345678@qq.com") |
| | | private String email; |
| | | |
| | | @ApiModelProperty(value = "ç»ç»æ¶æId", example = "2") |
| | | private Integer organizationId; |
| | | |
| | | @ApiModelProperty(value = "å¨èç¶æ æ£å¸¸>=1,离è<=0", example = "0") |
| | | private Integer jobState; |
| | | |
| | |
| | | boolean updateRoleMenu(UpdateRoleMenuDto dto); |
| | | |
| | | RoleAndMenuDto getRoleAndMenuByRole(Long roleId); |
| | | |
| | | List<Map<String, Object>> getUserListRole(); |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.IdUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.yuanchu.limslaboratory.pojo.dto.UpdateRoleMenuDto; |
| | | import com.yuanchu.limslaboratory.service.RoleManagerService; |
| | | import com.yuanchu.limslaboratory.utils.JsonUtil; |
| | | import com.yuanchu.limslaboratory.utils.MyUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | return roleManageMapper.selectAllRoleAndMenuByRoleId(roleId); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getUserListRole() { |
| | | return roleManageMapper.getUserListRole(); |
| | | } |
| | | |
| | | |
| | | private List<Menu> getEnumChildren(Menu root, List<Menu> all) { |
| | | return all.stream() |
| | |
| | | |
| | | @Override |
| | | public Integer updateNewPersonnel(UpdatePersonnelVo updatePersonnelVo) { |
| | | User user = new User() |
| | | .setName(updatePersonnelVo.getName()) |
| | | .setAccount(updatePersonnelVo.getAccount()) |
| | | .setAge(String.valueOf(updatePersonnelVo.getAge())) |
| | | .setPhone(updatePersonnelVo.getPhone()) |
| | | .setEmail(updatePersonnelVo.getEmail()) |
| | | .setRoleId(updatePersonnelVo.getRole_id()) |
| | | .setPassword(updatePersonnelVo.getPassword()) |
| | | .setJobState(updatePersonnelVo.getJobState()); |
| | | try { |
| | | MyUtil.PrintLog(updatePersonnelVo.toString()); |
| | | User unmarshal = JackSonUtil.unmarshal(JackSonUtil.marshal(updatePersonnelVo), User.class); |
| | | |
| | | LambdaUpdateWrapper<User> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.eq(User::getId, updatePersonnelVo.getId()); |
| | | return userMapper.update(user, updateWrapper); |
| | | return userMapper.update(unmarshal, updateWrapper); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getNewPersonnelPage(String name, Page page, Integer status) { |
| | | MyUtil.PrintLog(name + status + "============="); |
| | | return userMapper.getNewPersonnelPage(name, page, status); |
| | | } |
| | | |
| | |
| | | and r.id=#{roleId} |
| | | </select> |
| | | |
| | | <select id="getUserListRole" resultType="map"> |
| | | SELECT CONCAT(r.`id`, '') id, r.`name` |
| | | FROM role r |
| | | </select> |
| | | <resultMap id="roleAndMenuById" type="com.yuanchu.limslaboratory.pojo.dto.RoleAndMenuDto"> |
| | | <result property="roleName" column="roleName"/> |
| | | <result property="createTime" column="createTime"/> |