From 3503b1a50476e5bcab85765e4ae6c71fea6dfea5 Mon Sep 17 00:00:00 2001 From: admin <1094254749@qq.com> Date: Wed, 15 Jan 2025 14:46:49 +0800 Subject: [PATCH] =?UTF-8?q?daijiajun=20=E7=94=A8=E6=88=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=B8=AD=E5=B7=B2=E7=99=BB=E5=BD=95=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8A=9F=E8=83=BD=EF=BC=8C=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=87=BA=E5=88=9D=E5=A7=8B=E5=8C=96=EF=BC=8C=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=B8=AD=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=BA=BA=E5=91=98?= =?UTF-8?q?=EF=BC=8C=E9=A1=B9=E7=9B=AE=E6=A8=A1=E7=89=88=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Department/DepartmentController.java | 2 +- .../Usersecret/UsersecretController.java | 4 +- .../organizeassets/OFourColumController.java | 2 +- .../ProjectTemplateTypeController.java | 42 +++ .../htey/controller/user/UserController.java | 242 +++++++++++++++++- .../projectTemplate/ProjectTemplateType.java | 39 +++ .../com/keyware/htey/entity/user/User.java | 1 + .../{Usersecret.java => UserSecret.java} | 2 +- .../htey/mybatis/itf/UserRoleMapper.java | 2 +- .../htey/mybatis/itf/UsersecretMapper.java | 10 +- .../itf/number/NumberBuilderMapper.java | 2 +- .../ProjectTemplateTypeMapper.java | 25 ++ .../impl/NumberBuilderServiceImpl.java | 2 +- .../service/impl/UsersecretServiceImpl.java | 15 +- .../ProjectTemplateServiceImpl.java | 28 ++ .../htey/service/itf/UsersecretService.java | 10 +- .../itf/number/NumberBuilderService.java | 2 +- .../ProjectTemplateService.java | 22 ++ .../java/com/keyware/htey/utli/Constant.java | 2 +- .../com/keyware/htey/utli/EncryptUtil.java | 2 +- .../com/keyware/htey/utli/ExcelUtils.java | 2 +- .../keyware/htey/utli/IdComposeListUtil.java | 2 +- .../com/keyware/htey/utli/IdGenerator.java | 2 +- .../java/com/keyware/htey/utli/IpUtil.java | 2 +- .../java/com/keyware/htey/utli/JsonUtils.java | 2 +- src/main/resources/mapper/UserMapper.xml | 16 +- .../resources/mapper/UsersecretMapper.xml | 19 +- .../ProjectTemplateTypeMapper.xml | 31 +++ 28 files changed, 495 insertions(+), 37 deletions(-) create mode 100644 src/main/java/com/keyware/htey/controller/projectTemplate/ProjectTemplateTypeController.java create mode 100644 src/main/java/com/keyware/htey/entity/projectTemplate/ProjectTemplateType.java rename src/main/java/com/keyware/htey/entity/usersecret/{Usersecret.java => UserSecret.java} (89%) create mode 100644 src/main/java/com/keyware/htey/mybatis/itf/projectTemplate/ProjectTemplateTypeMapper.java create mode 100644 src/main/java/com/keyware/htey/service/impl/projectTemplate/ProjectTemplateServiceImpl.java create mode 100644 src/main/java/com/keyware/htey/service/itf/projectTemplate/ProjectTemplateService.java create mode 100644 src/main/resources/mapper/projectTemplate/ProjectTemplateTypeMapper.xml diff --git a/src/main/java/com/keyware/htey/controller/Department/DepartmentController.java b/src/main/java/com/keyware/htey/controller/Department/DepartmentController.java index 2f0242a..e4c18c9 100644 --- a/src/main/java/com/keyware/htey/controller/Department/DepartmentController.java +++ b/src/main/java/com/keyware/htey/controller/Department/DepartmentController.java @@ -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 diff --git a/src/main/java/com/keyware/htey/controller/Usersecret/UsersecretController.java b/src/main/java/com/keyware/htey/controller/Usersecret/UsersecretController.java index 95f5c8b..ca801b3 100644 --- a/src/main/java/com/keyware/htey/controller/Usersecret/UsersecretController.java +++ b/src/main/java/com/keyware/htey/controller/Usersecret/UsersecretController.java @@ -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); } } diff --git a/src/main/java/com/keyware/htey/controller/organizeassets/OFourColumController.java b/src/main/java/com/keyware/htey/controller/organizeassets/OFourColumController.java index 97e10eb..9b65272 100644 --- a/src/main/java/com/keyware/htey/controller/organizeassets/OFourColumController.java +++ b/src/main/java/com/keyware/htey/controller/organizeassets/OFourColumController.java @@ -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 diff --git a/src/main/java/com/keyware/htey/controller/projectTemplate/ProjectTemplateTypeController.java b/src/main/java/com/keyware/htey/controller/projectTemplate/ProjectTemplateTypeController.java new file mode 100644 index 0000000..bca6e68 --- /dev/null +++ b/src/main/java/com/keyware/htey/controller/projectTemplate/ProjectTemplateTypeController.java @@ -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); + } +} diff --git a/src/main/java/com/keyware/htey/controller/user/UserController.java b/src/main/java/com/keyware/htey/controller/user/UserController.java index c4538da..385af9b 100644 --- a/src/main/java/com/keyware/htey/controller/user/UserController.java +++ b/src/main/java/com/keyware/htey/controller/user/UserController.java @@ -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 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 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; + } } diff --git a/src/main/java/com/keyware/htey/entity/projectTemplate/ProjectTemplateType.java b/src/main/java/com/keyware/htey/entity/projectTemplate/ProjectTemplateType.java new file mode 100644 index 0000000..8b0b6d4 --- /dev/null +++ b/src/main/java/com/keyware/htey/entity/projectTemplate/ProjectTemplateType.java @@ -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; + +} diff --git a/src/main/java/com/keyware/htey/entity/user/User.java b/src/main/java/com/keyware/htey/entity/user/User.java index 6809c7a..4489ef0 100644 --- a/src/main/java/com/keyware/htey/entity/user/User.java +++ b/src/main/java/com/keyware/htey/entity/user/User.java @@ -58,4 +58,5 @@ public class User implements Serializable { private int pageNum; @TableField(exist = false) private int pageSize; + private byte[] imgData; } diff --git a/src/main/java/com/keyware/htey/entity/usersecret/Usersecret.java b/src/main/java/com/keyware/htey/entity/usersecret/UserSecret.java similarity index 89% rename from src/main/java/com/keyware/htey/entity/usersecret/Usersecret.java rename to src/main/java/com/keyware/htey/entity/usersecret/UserSecret.java index ee3e96d..3e49d63 100644 --- a/src/main/java/com/keyware/htey/entity/usersecret/Usersecret.java +++ b/src/main/java/com/keyware/htey/entity/usersecret/UserSecret.java @@ -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; diff --git a/src/main/java/com/keyware/htey/mybatis/itf/UserRoleMapper.java b/src/main/java/com/keyware/htey/mybatis/itf/UserRoleMapper.java index 8319617..83e2f23 100644 --- a/src/main/java/com/keyware/htey/mybatis/itf/UserRoleMapper.java +++ b/src/main/java/com/keyware/htey/mybatis/itf/UserRoleMapper.java @@ -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 diff --git a/src/main/java/com/keyware/htey/mybatis/itf/UsersecretMapper.java b/src/main/java/com/keyware/htey/mybatis/itf/UsersecretMapper.java index e1cf37d..b8b3943 100644 --- a/src/main/java/com/keyware/htey/mybatis/itf/UsersecretMapper.java +++ b/src/main/java/com/keyware/htey/mybatis/itf/UsersecretMapper.java @@ -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 { - int insertSelective(Usersecret var1); +public interface UsersecretMapper extends BaseMapper { + int insertSelective(UserSecret var1); void deleteByPrimaryKey(List var1); + + int updateByPrimaryKey(UserSecret var1); + + UserSecret selectByPrimaryKey(String var1); } diff --git a/src/main/java/com/keyware/htey/mybatis/itf/number/NumberBuilderMapper.java b/src/main/java/com/keyware/htey/mybatis/itf/number/NumberBuilderMapper.java index 18d6196..6f28855 100644 --- a/src/main/java/com/keyware/htey/mybatis/itf/number/NumberBuilderMapper.java +++ b/src/main/java/com/keyware/htey/mybatis/itf/number/NumberBuilderMapper.java @@ -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 diff --git a/src/main/java/com/keyware/htey/mybatis/itf/projectTemplate/ProjectTemplateTypeMapper.java b/src/main/java/com/keyware/htey/mybatis/itf/projectTemplate/ProjectTemplateTypeMapper.java new file mode 100644 index 0000000..40c6d03 --- /dev/null +++ b/src/main/java/com/keyware/htey/mybatis/itf/projectTemplate/ProjectTemplateTypeMapper.java @@ -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 { + + /** + * @param string + * @return + * @return int + * @Title: updateByPrimaryUserName + * @Description: 根据userId修改名称 + * @author daijiajun + */ + int updateByPrimaryUserName(ProjectTemplateType record); +} diff --git a/src/main/java/com/keyware/htey/service/impl/NumberBuilderServiceImpl.java b/src/main/java/com/keyware/htey/service/impl/NumberBuilderServiceImpl.java index c1be230..833f43a 100644 --- a/src/main/java/com/keyware/htey/service/impl/NumberBuilderServiceImpl.java +++ b/src/main/java/com/keyware/htey/service/impl/NumberBuilderServiceImpl.java @@ -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 diff --git a/src/main/java/com/keyware/htey/service/impl/UsersecretServiceImpl.java b/src/main/java/com/keyware/htey/service/impl/UsersecretServiceImpl.java index 476f035..b203300 100644 --- a/src/main/java/com/keyware/htey/service/impl/UsersecretServiceImpl.java +++ b/src/main/java/com/keyware/htey/service/impl/UsersecretServiceImpl.java @@ -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 implements UsersecretService { +public class UsersecretServiceImpl extends ServiceImpl 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 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); + } } diff --git a/src/main/java/com/keyware/htey/service/impl/projectTemplate/ProjectTemplateServiceImpl.java b/src/main/java/com/keyware/htey/service/impl/projectTemplate/ProjectTemplateServiceImpl.java new file mode 100644 index 0000000..7fbae56 --- /dev/null +++ b/src/main/java/com/keyware/htey/service/impl/projectTemplate/ProjectTemplateServiceImpl.java @@ -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 implements + ProjectTemplateService { + @Autowired + private ProjectTemplateTypeMapper projectTemplateTypeMapper; + + @Override + public int updateByPrimaryUserName(ProjectTemplateType record) { + return projectTemplateTypeMapper.updateByPrimaryUserName(record); + } +} diff --git a/src/main/java/com/keyware/htey/service/itf/UsersecretService.java b/src/main/java/com/keyware/htey/service/itf/UsersecretService.java index 615e23b..a2aee70 100644 --- a/src/main/java/com/keyware/htey/service/itf/UsersecretService.java +++ b/src/main/java/com/keyware/htey/service/itf/UsersecretService.java @@ -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 { - int insertSelective(Usersecret var1); +public interface UsersecretService extends IService { + int insertSelective(UserSecret var1); void deleteByPrimaryKey(List var1); + + int updateByPrimaryKey(UserSecret var1); + + UserSecret selectByPrimaryKey(String var1); } diff --git a/src/main/java/com/keyware/htey/service/itf/number/NumberBuilderService.java b/src/main/java/com/keyware/htey/service/itf/number/NumberBuilderService.java index 94c6d7b..88efc70 100644 --- a/src/main/java/com/keyware/htey/service/itf/number/NumberBuilderService.java +++ b/src/main/java/com/keyware/htey/service/itf/number/NumberBuilderService.java @@ -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 diff --git a/src/main/java/com/keyware/htey/service/itf/projectTemplate/ProjectTemplateService.java b/src/main/java/com/keyware/htey/service/itf/projectTemplate/ProjectTemplateService.java new file mode 100644 index 0000000..8d971bc --- /dev/null +++ b/src/main/java/com/keyware/htey/service/itf/projectTemplate/ProjectTemplateService.java @@ -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 { + /** + * @param string + * @return + * @return int + * @Title: updateByPrimaryUserName + * @Description: 根据userId修改名称 + * @author daijiajun + */ + int updateByPrimaryUserName(ProjectTemplateType record); +} diff --git a/src/main/java/com/keyware/htey/utli/Constant.java b/src/main/java/com/keyware/htey/utli/Constant.java index 49a533e..24ba21d 100644 --- a/src/main/java/com/keyware/htey/utli/Constant.java +++ b/src/main/java/com/keyware/htey/utli/Constant.java @@ -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 diff --git a/src/main/java/com/keyware/htey/utli/EncryptUtil.java b/src/main/java/com/keyware/htey/utli/EncryptUtil.java index 52d1d9d..fd0378f 100644 --- a/src/main/java/com/keyware/htey/utli/EncryptUtil.java +++ b/src/main/java/com/keyware/htey/utli/EncryptUtil.java @@ -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 diff --git a/src/main/java/com/keyware/htey/utli/ExcelUtils.java b/src/main/java/com/keyware/htey/utli/ExcelUtils.java index 3232b63..9745894 100644 --- a/src/main/java/com/keyware/htey/utli/ExcelUtils.java +++ b/src/main/java/com/keyware/htey/utli/ExcelUtils.java @@ -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 diff --git a/src/main/java/com/keyware/htey/utli/IdComposeListUtil.java b/src/main/java/com/keyware/htey/utli/IdComposeListUtil.java index 4b87d89..cb91e6a 100644 --- a/src/main/java/com/keyware/htey/utli/IdComposeListUtil.java +++ b/src/main/java/com/keyware/htey/utli/IdComposeListUtil.java @@ -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 diff --git a/src/main/java/com/keyware/htey/utli/IdGenerator.java b/src/main/java/com/keyware/htey/utli/IdGenerator.java index 08e73f4..a814544 100644 --- a/src/main/java/com/keyware/htey/utli/IdGenerator.java +++ b/src/main/java/com/keyware/htey/utli/IdGenerator.java @@ -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 diff --git a/src/main/java/com/keyware/htey/utli/IpUtil.java b/src/main/java/com/keyware/htey/utli/IpUtil.java index 41c4b49..2b95733 100644 --- a/src/main/java/com/keyware/htey/utli/IpUtil.java +++ b/src/main/java/com/keyware/htey/utli/IpUtil.java @@ -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 diff --git a/src/main/java/com/keyware/htey/utli/JsonUtils.java b/src/main/java/com/keyware/htey/utli/JsonUtils.java index 0d7796d..db76acb 100644 --- a/src/main/java/com/keyware/htey/utli/JsonUtils.java +++ b/src/main/java/com/keyware/htey/utli/JsonUtils.java @@ -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 diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml index 6245f7d..0469ca9 100644 --- a/src/main/resources/mapper/UserMapper.xml +++ b/src/main/resources/mapper/UserMapper.xml @@ -32,6 +32,7 @@ + @@ -143,6 +144,9 @@ UESR_RANK_ID = #{uesrRankId,jdbcType=VARCHAR}, + + IMG_DATA = #{imgData,jdbcType=VARCHAR}, + where ID = #{id,jdbcType=VARCHAR} @@ -277,6 +281,9 @@ UESR_RANK_ID, + + IMG_DATA, + @@ -363,6 +370,9 @@ #{uesrRankId,jdbcType=VARCHAR}, + + #{imgData,jdbcType=BLOB}, + @@ -406,9 +416,11 @@ + select * + from USERSECRET + where ID = #{id,jdbcType=VARCHAR} + + diff --git a/src/main/resources/mapper/projectTemplate/ProjectTemplateTypeMapper.xml b/src/main/resources/mapper/projectTemplate/ProjectTemplateTypeMapper.xml new file mode 100644 index 0000000..6583d7f --- /dev/null +++ b/src/main/resources/mapper/projectTemplate/ProjectTemplateTypeMapper.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + ID + , PROJECT_TEMPLATE_NAME, APPLICATION_SCOPE, STYLE_SET_TEMPLATE, STYLE_OUT_TEMPLATE, + TEMPLATE_DOCUMENT_ID,EDITER,SERIAL ,EDITER_ID,CREATE_DATE,USERID + + + + update PROJECT_TEMPLATE_TYPE + set EDITER =#{editer,jdbcType=VARCHAR} + where USERID = #{userId,jdbcType=VARCHAR} + + +