daijiajun 用户管理中已登录用户页面功能,页面出初始化,条件查询

用户管理中用户列表页面功能,修改人员,项目模版类型
main
admin 4 days ago
parent e6c5bb000a
commit 3503b1a504
  1. 2
      src/main/java/com/keyware/htey/controller/Department/DepartmentController.java
  2. 4
      src/main/java/com/keyware/htey/controller/Usersecret/UsersecretController.java
  3. 2
      src/main/java/com/keyware/htey/controller/organizeassets/OFourColumController.java
  4. 42
      src/main/java/com/keyware/htey/controller/projectTemplate/ProjectTemplateTypeController.java
  5. 242
      src/main/java/com/keyware/htey/controller/user/UserController.java
  6. 39
      src/main/java/com/keyware/htey/entity/projectTemplate/ProjectTemplateType.java
  7. 1
      src/main/java/com/keyware/htey/entity/user/User.java
  8. 2
      src/main/java/com/keyware/htey/entity/usersecret/UserSecret.java
  9. 2
      src/main/java/com/keyware/htey/mybatis/itf/UserRoleMapper.java
  10. 10
      src/main/java/com/keyware/htey/mybatis/itf/UsersecretMapper.java
  11. 2
      src/main/java/com/keyware/htey/mybatis/itf/number/NumberBuilderMapper.java
  12. 25
      src/main/java/com/keyware/htey/mybatis/itf/projectTemplate/ProjectTemplateTypeMapper.java
  13. 2
      src/main/java/com/keyware/htey/service/impl/NumberBuilderServiceImpl.java
  14. 15
      src/main/java/com/keyware/htey/service/impl/UsersecretServiceImpl.java
  15. 28
      src/main/java/com/keyware/htey/service/impl/projectTemplate/ProjectTemplateServiceImpl.java
  16. 10
      src/main/java/com/keyware/htey/service/itf/UsersecretService.java
  17. 2
      src/main/java/com/keyware/htey/service/itf/number/NumberBuilderService.java
  18. 22
      src/main/java/com/keyware/htey/service/itf/projectTemplate/ProjectTemplateService.java
  19. 2
      src/main/java/com/keyware/htey/utli/Constant.java
  20. 2
      src/main/java/com/keyware/htey/utli/EncryptUtil.java
  21. 2
      src/main/java/com/keyware/htey/utli/ExcelUtils.java
  22. 2
      src/main/java/com/keyware/htey/utli/IdComposeListUtil.java
  23. 2
      src/main/java/com/keyware/htey/utli/IdGenerator.java
  24. 2
      src/main/java/com/keyware/htey/utli/IpUtil.java
  25. 2
      src/main/java/com/keyware/htey/utli/JsonUtils.java
  26. 16
      src/main/resources/mapper/UserMapper.xml
  27. 17
      src/main/resources/mapper/UsersecretMapper.xml
  28. 31
      src/main/resources/mapper/projectTemplate/ProjectTemplateTypeMapper.xml

@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @description 组织资产4列的所有数据
* @Package com.keyware.htey.controller.user

@ -1,6 +1,6 @@
package com.keyware.htey.controller.Usersecret;
import com.keyware.htey.entity.usersecret.Usersecret;
import com.keyware.htey.entity.usersecret.UserSecret;
import com.keyware.htey.service.itf.UsersecretService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@ -35,7 +35,7 @@ public class UsersecretController {
@ResponseBody
@Operation(summary = "根据id查询秘密", description = "返回查询秘密信息")
@ApiResponse(responseCode = "200", description = "成功获取用户信息")
public Usersecret selectById(@RequestParam String id) {
public UserSecret selectById(@RequestParam String id) {
return usersecretService.getById(id);
}
}

@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @description 组织资产4列的所有数据
* @Package com.keyware.htey.controller.user

@ -0,0 +1,42 @@
package com.keyware.htey.controller.projectTemplate;
import javax.annotation.Resource;
import com.keyware.htey.entity.projectTemplate.ProjectTemplateType;
import com.keyware.htey.service.itf.projectTemplate.ProjectTemplateService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.projectTemplate
* @date 2025/1/15 11:01
*/
@Controller
@RequestMapping(value = "/projectTemplateTypeController")
@Tag(name = "PROJECT_TEMPLATE_TYPE API", description = "项目模版类型所有数据接口")
@Slf4j
public class ProjectTemplateTypeController {
@Resource
private ProjectTemplateService projectTemplateService;
@RequestMapping(
value = {"/updateProjectTemplate"},
method = {RequestMethod.POST},
produces = {"application/json; charset=utf-8"}
)
@ResponseBody
@Operation(summary = "修改项目模版类型信息", description = "返回修改项目模版类型信息")
@ApiResponse(responseCode = "200", description = "成功修改项目模版类型信息")
public void updateProjectTemplate(@RequestBody ProjectTemplateType projectTemplateType) {
projectTemplateService.updateByPrimaryUserName(projectTemplateType);
}
}

@ -1,15 +1,17 @@
package com.keyware.htey.controller.user;
import java.util.Collections;
import java.util.Base64;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.keyware.htey.entity.department.Department;
import com.keyware.htey.entity.user.AuditLog;
import com.keyware.htey.entity.user.User;
import com.keyware.htey.entity.usersecret.Usersecret;
import com.keyware.htey.entity.usersecret.UserSecret;
import com.keyware.htey.service.itf.AuditLogService;
import com.keyware.htey.service.itf.DepartmentService;
import com.keyware.htey.service.itf.UserService;
@ -35,6 +37,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.util.WebUtils;
/**
* @author yangmengchuan
@ -201,7 +206,7 @@ public class UserController {
// .getId(), "", "0", "K");
//}
//if (numCode != null && (numCode.equals("siyuan17suo") || numCode.equals("guiyangshiyuan"))) {
Usersecret userSecret = new Usersecret();
UserSecret userSecret = new UserSecret();
userSecret.setId(user.getId());
userSecret.setSecret(user.getSecret());
this.usersecretService.insertSelective(userSecret);
@ -463,7 +468,7 @@ public class UserController {
/**
* @return null
* @description 密码重置
* @Author daijj8
* @Author daijiajun
* @Date 2025/1/13 17:50
**/
@GetMapping("/PwdReset")
@ -512,7 +517,7 @@ public class UserController {
* 注销用户列表
*
* @return null
* @Author daijj8
* @Author daijiajun
* @Date 2025/1/15 10:03
**/
@GetMapping("/selectLogOutUser")
@ -582,7 +587,7 @@ public class UserController {
/**
* @return null
* @description 删除用户
* @Author daijj8
* @Author daijiajun
* @Date 2025/1/13 17:50
**/
@RequestMapping(
@ -593,7 +598,7 @@ public class UserController {
@ResponseBody
@Operation(summary = "删除用户", description = "返回删除用户信息")
@ApiResponse(responseCode = "200", description = "删除用户成功")
public String delPwdResetList(@RequestParam String userIds) {
public String delPwdResetList(@RequestParam String userIds, HttpServletRequest request) {
try {
List<String> listId = IdComposeListUtil.listId(userIds);
String userNames = "";
@ -632,4 +637,227 @@ public class UserController {
return Constant.ERROE_MESSAGE;
}
}
@RequestMapping(
value = {"/edit"},
method = {RequestMethod.POST},
produces = {"application/json; charset=utf-8"}
)
@ResponseBody
@Operation(summary = "修改人员", description = "返回修改人员信息")
@ApiResponse(responseCode = "200", description = "修改人员成功")
public AjaxMessage edit(@RequestBody User user, HttpServletRequest request) {
AjaxMessage ajaxMessage = new AjaxMessage();
User oldUser = this.userService.selectByPrimaryKey(user.getId());
byte[] fileData = null;
AuditLog auditLog = new AuditLog();
try {
List<User> selectByUserNumber = this.userService.selectByUserNumber(user.getUserNumber());
if (selectByUserNumber.size() > 0) {
if (selectByUserNumber.size() != 1) {
ajaxMessage.setCode("0");
ajaxMessage.setMessage("员工编号已存在");
return ajaxMessage;
}
User user2 = (User)selectByUserNumber.get(0);
if (!user2.getId().equals(user.getId())) {
ajaxMessage.setCode("0");
ajaxMessage.setMessage("员工编号已存在");
return ajaxMessage;
}
String contentType = request.getContentType();
String comments;
if (contentType != null && contentType.toLowerCase().startsWith("multipart/")) {
MultipartHttpServletRequest multipartRequest
= (MultipartHttpServletRequest)WebUtils.getNativeRequest(request,
MultipartHttpServletRequest.class);
MultipartFile file = multipartRequest.getFile("multipartfile");
comments = request.getParameter("changeFlg");
if (comments.equals("1")) {
if (file != null) {
fileData = file.getBytes();
} else {
String signatureUrl = request.getParameter("signatureUrl");
Base64.Decoder decoder = Base64.getDecoder();
signatureUrl = signatureUrl.substring(signatureUrl.indexOf(",", 1) + 1,
signatureUrl.length());
fileData = decoder.decode(signatureUrl);
for (int i = 0; i < fileData.length; ++i) {
if (fileData[i] < 0) {
fileData[i] = (byte)(fileData[i] + 256);
}
}
}
user.setImgData(fileData);
}
}
this.userService.updateByPrimaryKey(user);
StringBuilder info = new StringBuilder();
if (oldUser.getUserNumber() == null) {
oldUser.setUserNumber("");
}
if (!oldUser.getUserNumber().equals(user.getUserNumber())) {
info.append("员工编号从" + oldUser.getUserNumber() + "修改为" + user.getUserNumber() + ";");
}
if (oldUser.getUserName() == null) {
oldUser.setUserName("");
}
if (!oldUser.getUserName().equals(user.getUserName())) {
info.append("姓名从" + oldUser.getUserName() + "修改为" + user.getUserName() + ";");
}
if (oldUser.getIdCard() == null) {
oldUser.setIdCard("");
}
if (!oldUser.getIdCard().equals(user.getIdCard())) {
info.append("身份证号码从" + oldUser.getUserNumber() + "修改为" + user.getUserNumber() + ";");
}
if (oldUser.getEmail() == null) {
oldUser.setEmail("");
}
if (!oldUser.getEmail().equals(user.getEmail())) {
info.append("电子邮件从" + oldUser.getUserNumber() + "修改为" + user.getUserNumber() + ";");
}
if (oldUser.getDepartId() == null) {
oldUser.setDepartId("");
}
if (!oldUser.getDepartId().equals(user.getDepartId())) {
Department department;
if (org.springframework.util.StringUtils.hasText(oldUser.getDepartId())
&& org.springframework.util.StringUtils.hasText(user.getDepartId())) {
department = this.departmentService.selectByPrimaryKey(oldUser.getDepartId());
Department department1 = this.departmentService.selectByPrimaryKey(user.getDepartId());
if (department != null && department1 != null) {
info.append(
"所属部门从" + department.getDeptName() + "修改为" + department1.getDeptName() + ";");
}
} else if (!org.springframework.util.StringUtils.hasText(oldUser.getDepartId())
&& org.springframework.util.StringUtils.hasText(user.getDepartId())) {
department = this.departmentService.selectByPrimaryKey(user.getDepartId());
if (department != null) {
info.append("所属部门从空修改为" + department.getDeptName() + ";");
}
} else if (
org.springframework.util.StringUtils.hasText(oldUser.getDepartId())
&& !org.springframework.util.StringUtils.hasText(user.getDepartId())) {
department = this.departmentService.selectByPrimaryKey(oldUser.getDepartId());
if (department != null) {
info.append("所属部门从" + department.getDeptName() + "修改为空;");
}
}
}
if (oldUser.getSex() == null) {
oldUser.setSex(0L);
}
String oldUserRankId;
String userRankId;
if (!oldUser.getSex().equals(user.getSex())) {
oldUserRankId = "女";
userRankId = "女";
if ("0".equals(oldUser.getSex())) {
oldUserRankId = "男";
}
if ("0".equals(user.getSex())) {
userRankId = "男";
}
info.append("性别从" + oldUserRankId + "修改为" + userRankId + ";");
}
if (oldUser.getMobilePhone() == null) {
oldUser.setMobilePhone("");
}
if (!oldUser.getMobilePhone().equals(user.getMobilePhone())) {
info.append("手机从" + oldUser.getMobilePhone() + "修改为" + user.getMobilePhone() + ";");
}
if (oldUser.getOfficeTelephone() == null) {
oldUser.setOfficeTelephone("");
}
if (!oldUser.getOfficeTelephone().equals(user.getOfficeTelephone())) {
info.append(
"办公电话从" + oldUser.getOfficeTelephone() + "修改为" + user.getOfficeTelephone() + ";");
}
if (oldUser.getHomePhone() == null) {
oldUser.setHomePhone("");
}
if (!oldUser.getHomePhone().equals(user.getHomePhone())) {
info.append("家庭电话从" + oldUser.getHomePhone() + "修改为" + user.getHomePhone() + ";");
}
if (oldUser.getUesrRankId() == null) {
oldUser.setUesrRankId("");
}
if (!oldUser.getUesrRankId().equals(user.getUesrRankId())) {
oldUserRankId = "普通";
userRankId = "普通";
if ("d453bf52e571451996a8f5c251f7eb8d".equals(oldUser.getUesrRankId())) {
oldUserRankId = "秘密";
}
if ("d453bf52e571451996a8f5c251f7eb8d".equals(user.getUesrRankId())) {
userRankId = "秘密";
}
info.append("密码密级从" + oldUserRankId + "修改为" + userRankId + ";");
}
oldUserRankId = user.getSecret();
info.append("人员密级设置为" + oldUserRankId);
String logName = "修改人员";
String logNameType = "用户列表";
//todo 登录人的用户名 userName
//String comments = userName + "修改了用户" + user.getUserName() + "的信息";
comments = "修改了用户" + user.getUserName() + "的信息";
auditLog.setLogName(logName);
auditLog.setLogNameType(logNameType);
auditLog.setComments(comments + ";" + info);
auditLogService.addAuditLog(auditLog);
//todo 添加MESSAGE_TABLE表
//if (userRankId != null && userRankId.equals("tianjin712suo")) {
// User safeUser = this.userService.selectUserByUserId("safesecret");
// this.messageService.insertMessage("修改用户" + user.getUserName() + "", "用户管理", (String)null,
// safeUser.getId(), "", "0", "K");
//}
//todo customCode从Session中获取进行判断
//if (userRankId != null && (userRankId.equals("siyuan17suo") || userRankId.equals("guiyangshiyuan"))) {
UserSecret userSecret = this.usersecretService.selectByPrimaryKey(user.getId());
if (userSecret == null) {
UserSecret secret = new UserSecret();
secret.setId(user.getId());
secret.setSecret(user.getSecret());
this.usersecretService.insertSelective(secret);
} else {
userSecret.setSecret(user.getSecret());
this.usersecretService.updateByPrimaryKey(userSecret);
}
//}
ajaxMessage.setCode("1");
ajaxMessage.setMessage("保存成功");
}
} catch (Exception var16) {
log.error("修改用户失败", var16);
ajaxMessage.setCode("0");
ajaxMessage.setMessage(Constant.ERROE_MESSAGE);
}
return ajaxMessage;
}
}

@ -0,0 +1,39 @@
package com.keyware.htey.entity.projectTemplate;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("PROJECT_TEMPLATE_TYPE")
public class ProjectTemplateType {
protected String id;
private String projectTemplateName;
private String applicationScope;
private String styleSetTemplate;
private String styleOutTemplate;
private String templateDocumentId;
private String editer;
private Integer serial;
private String editerId;
private String createDate;
private String userId;
private String user_id;
private String user_name;
}

@ -58,4 +58,5 @@ public class User implements Serializable {
private int pageNum;
@TableField(exist = false)
private int pageSize;
private byte[] imgData;
}

@ -11,7 +11,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
@TableName("USERSECRET")
public class Usersecret implements Serializable {
public class UserSecret implements Serializable {
private static final long serialVersionUID = -1292417487409772488L;
private String id;
private String secret;

@ -5,7 +5,7 @@ import com.keyware.htey.entity.user.UserRole;
import org.apache.ibatis.annotations.Mapper;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.mybatis.itf
* @date 2025/1/14 17:11

@ -3,7 +3,7 @@ package com.keyware.htey.mybatis.itf;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.keyware.htey.entity.usersecret.Usersecret;
import com.keyware.htey.entity.usersecret.UserSecret;
import org.apache.ibatis.annotations.Mapper;
/**
@ -12,8 +12,12 @@ import org.apache.ibatis.annotations.Mapper;
* @description 用户与数据库交互
*/
@Mapper
public interface UsersecretMapper extends BaseMapper<Usersecret> {
int insertSelective(Usersecret var1);
public interface UsersecretMapper extends BaseMapper<UserSecret> {
int insertSelective(UserSecret var1);
void deleteByPrimaryKey(List<String> var1);
int updateByPrimaryKey(UserSecret var1);
UserSecret selectByPrimaryKey(String var1);
}

@ -5,7 +5,7 @@ import com.keyware.htey.entity.number.NumberBuilder;
import org.apache.ibatis.annotations.Mapper;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.mybatis.itf.number
* @date 2025/1/14 9:32

@ -0,0 +1,25 @@
package com.keyware.htey.mybatis.itf.projectTemplate;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.keyware.htey.entity.projectTemplate.ProjectTemplateType;
import org.apache.ibatis.annotations.Mapper;
/**
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.mybatis.itf.projectTemplate
* @date 2025/1/15 11:09
*/
@Mapper
public interface ProjectTemplateTypeMapper extends BaseMapper<ProjectTemplateType> {
/**
* @param string
* @return
* @return int
* @Title: updateByPrimaryUserName
* @Description: 根据userId修改名称
* @author daijiajun
*/
int updateByPrimaryUserName(ProjectTemplateType record);
}

@ -8,7 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.service.impl
* @date 2025/1/14 9:24

@ -3,7 +3,7 @@ package com.keyware.htey.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.keyware.htey.entity.usersecret.Usersecret;
import com.keyware.htey.entity.usersecret.UserSecret;
import com.keyware.htey.mybatis.itf.UsersecretMapper;
import com.keyware.htey.service.itf.UsersecretService;
import lombok.extern.slf4j.Slf4j;
@ -12,12 +12,12 @@ import org.springframework.stereotype.Service;
@Service
@Slf4j
public class UsersecretServiceImpl extends ServiceImpl<UsersecretMapper, Usersecret> implements UsersecretService {
public class UsersecretServiceImpl extends ServiceImpl<UsersecretMapper, UserSecret> implements UsersecretService {
@Autowired
private UsersecretMapper usersecretMapper;
@Override
public int insertSelective(Usersecret userSecret) {
public int insertSelective(UserSecret userSecret) {
return this.usersecretMapper.insertSelective(userSecret);
}
@ -25,4 +25,13 @@ public class UsersecretServiceImpl extends ServiceImpl<UsersecretMapper, Usersec
public void deleteByPrimaryKey(List<String> id) {
this.usersecretMapper.deleteByPrimaryKey(id);
}
@Override
public int updateByPrimaryKey(UserSecret userSecret) {
return this.usersecretMapper.updateByPrimaryKey(userSecret);
}
public UserSecret selectByPrimaryKey(String id) {
return this.usersecretMapper.selectByPrimaryKey(id);
}
}

@ -0,0 +1,28 @@
package com.keyware.htey.service.impl.projectTemplate;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.keyware.htey.entity.projectTemplate.ProjectTemplateType;
import com.keyware.htey.mybatis.itf.projectTemplate.ProjectTemplateTypeMapper;
import com.keyware.htey.service.itf.projectTemplate.ProjectTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.service.impl.projectTemplate
* @date 2025/1/15 11:07
*/
@Service(value = "projectTemplateService")
@Slf4j
public class ProjectTemplateServiceImpl extends ServiceImpl<ProjectTemplateTypeMapper, ProjectTemplateType> implements
ProjectTemplateService {
@Autowired
private ProjectTemplateTypeMapper projectTemplateTypeMapper;
@Override
public int updateByPrimaryUserName(ProjectTemplateType record) {
return projectTemplateTypeMapper.updateByPrimaryUserName(record);
}
}

@ -3,10 +3,14 @@ package com.keyware.htey.service.itf;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.keyware.htey.entity.usersecret.Usersecret;
import com.keyware.htey.entity.usersecret.UserSecret;
public interface UsersecretService extends IService<Usersecret> {
int insertSelective(Usersecret var1);
public interface UsersecretService extends IService<UserSecret> {
int insertSelective(UserSecret var1);
void deleteByPrimaryKey(List<String> var1);
int updateByPrimaryKey(UserSecret var1);
UserSecret selectByPrimaryKey(String var1);
}

@ -1,7 +1,7 @@
package com.keyware.htey.service.itf.number;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.service.itf.number
* @date 2025/1/14 9:23

@ -0,0 +1,22 @@
package com.keyware.htey.service.itf.projectTemplate;
import com.baomidou.mybatisplus.extension.service.IService;
import com.keyware.htey.entity.projectTemplate.ProjectTemplateType;
/**
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.service.itf.projectTemplate
* @date 2025/1/15 11:06
*/
public interface ProjectTemplateService extends IService<ProjectTemplateType> {
/**
* @param string
* @return
* @return int
* @Title: updateByPrimaryUserName
* @Description: 根据userId修改名称
* @author daijiajun
*/
int updateByPrimaryUserName(ProjectTemplateType record);
}

@ -1,7 +1,7 @@
package com.keyware.htey.utli;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.utli
* @date 2025/1/13 14:54

@ -5,7 +5,7 @@ import java.security.MessageDigest;
import lombok.extern.slf4j.Slf4j;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.utli
* @date 2025/1/13 16:46

@ -22,7 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.utli
* @date 2025/1/14 8:51

@ -7,7 +7,7 @@ import java.util.stream.Collectors;
import com.keyware.htey.entity.user.User;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.utli
* @date 2025/1/13 17:15

@ -4,7 +4,7 @@ import java.security.SecureRandom;
import java.util.UUID;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.utli
* @date 2025/1/13 14:56

@ -5,7 +5,7 @@ import java.net.InetAddress;
import lombok.extern.slf4j.Slf4j;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.utli
* @date 2025/1/13 13:56

@ -16,7 +16,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
/**
* @author daijj8
* @author daijiajun
* @version V1.0
* @Package com.keyware.htey.utli
* @date 2025/1/13 15:29

@ -32,6 +32,7 @@
<result column="secret" property="secret" jdbcType="VARCHAR"/>
<result column="pageNum" property="pageNum" jdbcType="INTEGER"/>
<result column="pageSize" property="pageSize" jdbcType="INTEGER"/>
<result column="IMG_DATA" property="imgData" jdbcType="BLOB"/>
</resultMap>
<sql id="Base_Column_List">
@ -143,6 +144,9 @@
<if test="uesrRankId != null">
UESR_RANK_ID = #{uesrRankId,jdbcType=VARCHAR},
</if>
<if test="imgData != null">
IMG_DATA = #{imgData,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=VARCHAR}
</update>
@ -277,6 +281,9 @@
<if test="uesrRankId != null">
UESR_RANK_ID,
</if>
<if test="imgData != null">
IMG_DATA,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -363,6 +370,9 @@
<if test="uesrRankId != null">
#{uesrRankId,jdbcType=VARCHAR},
</if>
<if test="imgData != null">
#{imgData,jdbcType=BLOB},
</if>
</trim>
</insert>
@ -406,9 +416,11 @@
</delete>
<select id="pwdResetList" resultMap="BaseResultMap" parameterType="java.lang.String">
select KU.ID, KU.USER_ID, KU.USER_NAME,KU.PASSWORD, KU.DEPART_ID, KU.USER_CREATION_TIME,KU.USER_PWD_MODIF_TIME, KU.USER_STATUS, KU.USER_LOCK,
select KU.ID, KU.USER_ID, KU.USER_NAME,KU.PASSWORD, KU.DEPART_ID, KU.USER_CREATION_TIME,KU.USER_PWD_MODIF_TIME,
KU.USER_STATUS, KU.USER_LOCK,
KU.USER_PWD_ERROR, KU.USER_PWD_ERROR_DATE,KU.EXIT_TIME,KU.PASSWORD_OLD,
KU.POST, KU.EMAIL, KU.OFFICE_TELEPHONE, KU.USER_NUMBER, KU.ID_CARD, KU.MOBILE_PHONE, KU.SEX, KU.HOME_PHONE,KU.LOGOUT,KU.INIT_PWD_TIME,
KU.POST, KU.EMAIL, KU.OFFICE_TELEPHONE, KU.USER_NUMBER, KU.ID_CARD, KU.MOBILE_PHONE, KU.SEX,
KU.HOME_PHONE,KU.LOGOUT,KU.INIT_PWD_TIME,
DEP.DEPT_NAME as deptName
from K_USER KU
LEFT JOIN DEPARTMENT DEP ON KU.DEPART_ID = DEP.ID

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.keyware.htey.mybatis.itf.UsersecretMapper">
<resultMap id="BaseResultMap" type="com.keyware.htey.entity.usersecret.Usersecret">
<resultMap id="BaseResultMap" type="com.keyware.htey.entity.usersecret.UserSecret">
<id column="ID" property="id" jdbcType="VARCHAR"/>
<result column="SECRET" property="secret" jdbcType="VARCHAR"/>
</resultMap>
<insert id="insertSelective" parameterType="com.keyware.htey.entity.usersecret.Usersecret">
<insert id="insertSelective" parameterType="com.keyware.htey.entity.usersecret.UserSecret">
insert into USERSECRET (ID, SECRET)
values (#{id,jdbcType=VARCHAR}, #{secret,jdbcType=VARCHAR})
</insert>
@ -16,4 +16,17 @@
#{item}
</foreach>
</delete>
<update id="updateByPrimaryKey" parameterType="com.keyware.htey.entity.usersecret.UserSecret">
update USERSECRET
set SECRET = #{secret,jdbcType=VARCHAR}
where ID = #{id,jdbcType=VARCHAR}
</update>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
select *
from USERSECRET
where ID = #{id,jdbcType=VARCHAR}
</select>
</mapper>

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.keyware.htey.mybatis.itf.projectTemplate.ProjectTemplateTypeMapper">
<resultMap id="BaseResultMap" type="com.keyware.htey.entity.projectTemplate.ProjectTemplateType">
<id column="ID" property="id" jdbcType="VARCHAR"/>
<result column="PROJECT_TEMPLATE_NAME" property="projectTemplateName" jdbcType="VARCHAR"/>
<result column="APPLICATION_SCOPE" property="applicationScope" jdbcType="VARCHAR"/>
<result column="STYLE_SET_TEMPLATE" property="styleSetTemplate" jdbcType="VARCHAR"/>
<result column="STYLE_OUT_TEMPLATE" property="styleOutTemplate" jdbcType="VARCHAR"/>
<result column="TEMPLATE_DOCUMENT_ID" property="templateDocumentId" jdbcType="VARCHAR"/>
<result column="EDITER" property="editer" jdbcType="VARCHAR"/>
<result column="SERIAL" property="serial" jdbcType="DECIMAL"/>
<result column="EDITER_ID" property="editerId" jdbcType="VARCHAR"/>
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR"/>
<result column="USERID" property="userId" jdbcType="VARCHAR"/>
<result column="USER_ID" property="user_id" jdbcType="VARCHAR"/>
<result column="USER_NAME" property="user_name" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
ID
, PROJECT_TEMPLATE_NAME, APPLICATION_SCOPE, STYLE_SET_TEMPLATE, STYLE_OUT_TEMPLATE,
TEMPLATE_DOCUMENT_ID,EDITER,SERIAL ,EDITER_ID,CREATE_DATE,USERID
</sql>
<update id="updateByPrimaryUserName" parameterType="com.keyware.htey.entity.projectTemplate.ProjectTemplateType">
update PROJECT_TEMPLATE_TYPE
set EDITER =#{editer,jdbcType=VARCHAR}
where USERID = #{userId,jdbcType=VARCHAR}
</update>
</mapper>
Loading…
Cancel
Save