修改bug
This commit is contained in:
parent
8663d3ca31
commit
370239bc0f
|
|
@ -316,10 +316,16 @@ public class EmployeesApplyController extends JeecgController<EmployeesApply, IE
|
|||
employeesApply.setApplyType("0");
|
||||
employeesApplyService.save(employeesApply);
|
||||
|
||||
|
||||
|
||||
//告诉管理平台 像员工-机构关系表nu_biz_employees_org 增加数据
|
||||
EmployeesApplyMQDto mqdto = new EmployeesApplyMQDto();
|
||||
BeanUtils.copyProperties(employeesApply, mqdto);
|
||||
mqdto.setId(null);
|
||||
mqdto.setOrgCode(orgCode);
|
||||
mqdto.setStatus("1");
|
||||
mqdto.setDelFlag("0");
|
||||
mqdto.setApplyType("0");
|
||||
rabbitMQUtil.sendToExchange("hldy.employees", "hldy.employees.invide", mqdto);
|
||||
|
||||
return Result.OK("邀请成功!");
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<select id="pageList" resultMap="ConfigServiceDirectiveResultMap" parameterType="map">
|
||||
<select id="pageList" resultType="com.nu.modules.config.servicedirective.entity.ConfigServiceDirective" parameterType="map">
|
||||
SELECT
|
||||
c.id,
|
||||
c.category_id,
|
||||
|
|
@ -100,13 +100,20 @@
|
|||
and c.iz_enabled = #{directive.izEnabled}
|
||||
</if>
|
||||
<if test="directive !=null and directive.notId != null and directive.notId != ''">
|
||||
c.id not IN
|
||||
<foreach collection="directive.notId" item="item" open="(" separator="," close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
<choose>
|
||||
<when test='directive.notId.contains(",")'>
|
||||
AND c.id NOT IN
|
||||
<foreach collection='directive.notId.split(",")' item="notId" open="(" separator="," close=")">
|
||||
#{notId}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
AND c.id != #{directive.notId}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY c.category_id ASC, c.type_id ASC, c.instruction_tag_id ASC,c.create_time desc
|
||||
ORDER BY c.category_id ASC, c.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="queryDirectiveIdByBodyTagIds"
|
||||
|
|
|
|||
|
|
@ -86,16 +86,16 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
|||
}
|
||||
// configServiceDirective.setIzEnabled("Y");
|
||||
List<ConfigServiceDirective> list = baseMapper.pageList(configServiceDirective, list_.getRecords());
|
||||
//处理服务标签字段
|
||||
if (list != null && !list.isEmpty()) {
|
||||
list.stream().forEach(record -> {
|
||||
List<DirectiveBodyTag> bodyTagList = record.getBodyTagList();
|
||||
record.setBodyTags(bodyTagList.stream().map(DirectiveBodyTag::getId).collect(Collectors.joining(",")));
|
||||
|
||||
List<DirectiveEmotionTag> emotionTagList = record.getEmotionTagList();
|
||||
record.setEmotionTags(emotionTagList.stream().map(DirectiveEmotionTag::getId).collect(Collectors.joining(",")));
|
||||
});
|
||||
}
|
||||
// //处理服务标签字段
|
||||
// if (list != null && !list.isEmpty()) {
|
||||
// list.stream().forEach(record -> {
|
||||
// List<DirectiveBodyTag> bodyTagList = record.getBodyTagList();
|
||||
// record.setBodyTags(bodyTagList.stream().map(DirectiveBodyTag::getId).collect(Collectors.joining(",")));
|
||||
//
|
||||
// List<DirectiveEmotionTag> emotionTagList = record.getEmotionTagList();
|
||||
// record.setEmotionTags(emotionTagList.stream().map(DirectiveEmotionTag::getId).collect(Collectors.joining(",")));
|
||||
// });
|
||||
// }
|
||||
//处理单元格合并所需数据
|
||||
// merge(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.modules.IEmployeesInfoApi;
|
||||
import org.jeecg.common.constant.CacheConstant;
|
||||
import org.jeecg.modules.system.entity.*;
|
||||
import org.jeecg.modules.system.model.DepartIdModel;
|
||||
import org.jeecg.modules.system.model.SysUserSysDepartModel;
|
||||
|
|
@ -41,8 +42,10 @@ import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
|
@ -635,9 +638,9 @@ public class SysUserController {
|
|||
/**
|
||||
* 首页用户重置密码
|
||||
*/
|
||||
@RequiresPermissions("system:user:updatepwd")
|
||||
@RequestMapping(value = "/updatePassword", method = RequestMethod.PUT)
|
||||
public Result<?> updatePassword(@RequestBody JSONObject json) {
|
||||
@CacheEvict(value={CacheConstant.SYS_USERS_CACHE}, allEntries=true)
|
||||
public Result<?> updatePassword(@RequestBody JSONObject json,HttpServletRequest request) {
|
||||
String username = json.getString("username");
|
||||
String oldpassword = json.getString("oldpassword");
|
||||
String password = json.getString("password");
|
||||
|
|
@ -653,10 +656,35 @@ public class SysUserController {
|
|||
//update-begin---author:wangshuai ---date:20220316 for:[VUEN-234]修改密码添加敏感日志------------
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
baseCommonService.addLog("修改密码,username: " +loginUser.getUsername() ,CommonConstant.LOG_TYPE_2, 2);
|
||||
|
||||
|
||||
Result<?> result = sysUserService.resetPassword(username,oldpassword,password,confirmpassword);
|
||||
SysUser sysUser2 = sysUserService.getById(user.getId());
|
||||
|
||||
setUserInfo(request, sysUser2, result);
|
||||
//update-end---author:wangshuai ---date:20220316 for:[VUEN-234]修改密码添加敏感日志------------
|
||||
return sysUserService.resetPassword(username,oldpassword,password,confirmpassword);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private void setUserInfo(HttpServletRequest request, SysUser sysUser, Result<?> result) {
|
||||
String username = sysUser.getUsername();
|
||||
String syspassword = sysUser.getPassword();
|
||||
// 获取用户部门信息
|
||||
JSONObject obj = new JSONObject(new LinkedHashMap<>());
|
||||
|
||||
//1.生成token
|
||||
String token = JwtUtil.sign(username, syspassword);
|
||||
// 设置token缓存有效时间
|
||||
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
|
||||
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME * 2 / 1000);
|
||||
obj.put("token", token);
|
||||
|
||||
//3.设置登录用户信息
|
||||
obj.put("userInfo", sysUser);
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/userRoleList", method = RequestMethod.GET)
|
||||
public Result<IPage<SysUser>> userRoleList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) {
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ public class SysUser implements Serializable {
|
|||
* 员工id
|
||||
*/
|
||||
private String employeesId;
|
||||
private String passwordType;
|
||||
|
||||
@Dict(dicCode = "login_type")
|
||||
private String loginType;
|
||||
|
|
|
|||
|
|
@ -253,11 +253,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||
return Result.error("两次输入密码不一致!");
|
||||
}
|
||||
String password = PasswordUtil.encrypt(username, newpassword, user.getSalt());
|
||||
this.userMapper.update(new SysUser().setPassword(password), new LambdaQueryWrapper<SysUser>().eq(SysUser::getId, user.getId()));
|
||||
this.userMapper.update(new SysUser().setPassword(password).setPasswordType("1"), new LambdaQueryWrapper<SysUser>().eq(SysUser::getId, user.getId()));
|
||||
SysUserMQDto sysUserMQDto = new SysUserMQDto();
|
||||
sysUserMQDto.setId(user.getId());
|
||||
sysUserMQDto.setPassword(password);
|
||||
rabbitMQUtil.sendToExchange("hldy.employees.rpw.fanout", "", sysUserMQDto);
|
||||
|
||||
return Result.ok("密码重置成功!");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue