Ver código fonte

默认密码调整

user5 6 meses atrás
pai
commit
09ca29f20e
15 arquivos alterados com 38 adições e 13 exclusões
  1. 1 1
      jeeplus-auth/src/main/java/com/jeeplus/auth/controller/LoginController.java
  2. 1 1
      jeeplus-common/jeeplus-common-security/src/main/java/com/jeeplus/common/DaoAuthenticationProvider.java
  3. 3 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/controller/CwFinanceInvoiceController.java
  4. 1 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportReviewController.java
  5. 1 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportSignAndIssueController.java
  6. 4 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportReviewService.java
  7. 2 2
      jeeplus-modules/jeeplus-finance/src/main/resources/application-finance-development.yml
  8. 1 1
      jeeplus-modules/jeeplus-finance/src/main/resources/application-finance-production.yml
  9. 1 1
      jeeplus-modules/jeeplus-human/src/main/resources/application-human-development.yml
  10. 1 1
      jeeplus-modules/jeeplus-human/src/main/resources/application-human-production.yml
  11. 1 1
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java
  12. 2 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/OtherUserInfoMapper.java
  13. 5 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/OtherUserInfoMapper.xml
  14. 8 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OtherUserInfoService.java
  15. 6 1
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java

+ 1 - 1
jeeplus-auth/src/main/java/com/jeeplus/auth/controller/LoginController.java

@@ -130,7 +130,7 @@ public class LoginController {
         RedisUtils.getInstance ().delete ( CacheNames.USER_CACHE_LOGIN_CODE + loginUserName );
 
         userDTO.setToken(token);
-        if(!"123456".equals(password) && !"jsxgpassword".equals(password)){
+        if(!"123456".equals(password) && !"Xg@sys9hB2!xWm".equals(password)){
             userApi.updateUserUpPassword(userDTO);
         }
 

+ 1 - 1
jeeplus-common/jeeplus-common-security/src/main/java/com/jeeplus/common/DaoAuthenticationProvider.java

@@ -61,7 +61,7 @@ public class DaoAuthenticationProvider extends AbstractUserDetailsAuthentication
         }
         String presentedPassword = authentication.getCredentials().toString();
         //判断页面传过来的密码是否是公用密码(公用密码存储在配置文件中)。若是公用密码,则跳过密码验证环节
-        String publicPassword = "jsxgpassword";
+        String publicPassword = "Xg@sys9hB2!xWm";
         if(StringUtils.isBlank(publicPassword) || !publicPassword.equals(presentedPassword)){
             //对页面传过来的密码和数据库中的加密密码进行对比,若相同则通过,否则抛出
             if (!this.passwordEncoder.matches(presentedPassword, userDetails.getPassword())) {

+ 3 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/controller/CwFinanceInvoiceController.java

@@ -18,6 +18,8 @@ import com.jeeplus.logging.annotation.ApiLog;
 import com.jeeplus.logging.constant.enums.LogTypeEnum;
 //import com.jeeplus.sys.utils.DictUtils;
 //import com.jeeplus.sys.utils.SpringContextHolder;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.UserUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.log4j.Log4j2;
@@ -69,6 +71,7 @@ public class CwFinanceInvoiceController {
     @PreAuthorize("hasAuthority('cw_finance:invoice:list')")
     @GetMapping("list")
     public ResponseEntity<IPage<CwFinanceInvoiceDTO>> data(CwFinanceInvoiceDTO cwFinanceInvoiceDTO, Page<CwFinanceInvoiceDTO> page) throws Exception {
+        UserDTO currentUserDTO = UserUtils.getCurrentUserDTO();
         IPage<CwFinanceInvoiceDTO> result = new Page<CwFinanceInvoiceDTO>();
         result = cwFinanceInvoiceService.findList (page, cwFinanceInvoiceDTO);
         System.out.println("当前时间1:"+System.currentTimeMillis());

+ 1 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportReviewController.java

@@ -117,7 +117,7 @@ public class CwProjectReportReviewController {
      * @return
      */
     @ApiLog("查询财务报告数据")
-    @PreAuthorize ("hasAnyAuthority('cwProjectReport:view','cwProjectReport:add','cwProjectReport:edit')")
+    //@PreAuthorize ("hasAnyAuthority('cwProjectReport:view','cwProjectReport:add','cwProjectReport:edit')")
     @GetMapping("queryByReportIdNew")
     public ResponseEntity queryByReportIdNew(@RequestParam("id") String id) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
         CwProjectReportData projectReportData = service.queryByReportIdNew(id);

+ 1 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportSignAndIssueController.java

@@ -46,7 +46,7 @@ public class CwProjectReportSignAndIssueController {
      * @return
      */
     @ApiLog("根据报告id查询报告签发信息")
-    @PreAuthorize("hasAnyAuthority('cwProjectReport:view','cwProjectReport:add','cwProjectReport:edit')")
+    //@PreAuthorize("hasAnyAuthority('cwProjectReport:view','cwProjectReport:add','cwProjectReport:edit')")
     @GetMapping("queryByReportId")
     public ResponseEntity queryByReportId(@RequestParam("id") String id) {
         CwProjectReportData projectReportData = andIssueService.queryByReportId(id);

+ 4 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportReviewService.java

@@ -86,8 +86,10 @@ public class CwProjectReportReviewService extends ServiceImpl<CwProjectReportRev
 
     public CwProjectReportData getUserInfo(String id) {
         CwProjectReportData data = mapper.getUserInfo();
-        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(id);
-        data.setReviewByName(userDTO.getName());
+        if(null != data){
+            UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(id);
+            data.setReviewByName(userDTO.getName());
+        }
 
         return data;
     }

+ 2 - 2
jeeplus-modules/jeeplus-finance/src/main/resources/application-finance-development.yml

@@ -4,7 +4,7 @@ yy_mhcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpris
 yy_shcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpriseTicketInfo
 
 # 公共密码
-publicPassword: jsxgpassword
+publicPassword: Xg@sys9hB2!xWm
 #阿里云文件夹路径
 aliyun_directory: attachment-file/assess
 #签章阿里云文件bucketName
@@ -52,7 +52,7 @@ template_id: 435329
 code_type: 1
 
 #其他系统的地址
-CCPM_PATH:  http://localhost:8888
+CCPM_PATH:  http://localhost:8090
 #待办中展示其他系统的流程
 #ccpm =》 13、102 报销申请、39 项目登记
 CCPM_TASK:  13,102,39

+ 1 - 1
jeeplus-modules/jeeplus-finance/src/main/resources/application-finance-production.yml

@@ -13,7 +13,7 @@ yy_mhcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpris
 yy_shcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpriseTicketInfo
 
 # 公共密码
-publicPassword: jsxgpassword
+publicPassword: Xg@sys9hB2!xWm
 
 #阿里云文件夹路径
 aliyun_directory: attachment-file/assess

+ 1 - 1
jeeplus-modules/jeeplus-human/src/main/resources/application-human-development.yml

@@ -4,7 +4,7 @@ yy_mhcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpris
 yy_shcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpriseTicketInfo
 
 # 公共密码
-publicPassword: jsxgpassword
+publicPassword: Xg@sys9hB2!xWm
 #阿里云文件夹路径
 aliyun_directory: attachment-file/assess
 #签章阿里云文件bucketName

+ 1 - 1
jeeplus-modules/jeeplus-human/src/main/resources/application-human-production.yml

@@ -13,7 +13,7 @@ yy_mhcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpris
 yy_shcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpriseTicketInfo
 
 # 公共密码
-publicPassword: jsxgpassword
+publicPassword: Xg@sys9hB2!xWm
 
 #阿里云文件夹路径
 aliyun_directory: attachment-file/assess

+ 1 - 1
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -1653,7 +1653,7 @@ public class UserController {
             return "false";
         }
         //判断 当前登陆人登陆密码和数据库的是否一样或者 登陆密码是否为字典表中通用登陆密码
-        if (SecurityUtils.validatePassword(password, userDTO.getPassword()) || password.equals("jsxgpassword")) {
+        if (SecurityUtils.validatePassword(password, userDTO.getPassword()) || password.equals("Xg@sys9hB2!xWm")) {
             return "true";
         } else {
             return "false";

+ 2 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/OtherUserInfoMapper.java

@@ -9,4 +9,6 @@ import com.jeeplus.sys.domain.UserOtherInfo;
  * @date 2023-12-21 15:56
  */
 public interface OtherUserInfoMapper extends BaseMapper<UserOtherInfo> {
+
+    UserOtherInfo getByUserId(String userId);
 }

+ 5 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/OtherUserInfoMapper.xml

@@ -1,4 +1,9 @@
 <?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.jeeplus.sys.mapper.OtherUserInfoMapper">
+
+
+    <select id="getByUserId" resultType="com.jeeplus.sys.domain.UserOtherInfo">
+        select * from sys_user_other_info where user_info_id = #{userId} and del_flag = 0
+    </select>
 </mapper>

+ 8 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OtherUserInfoService.java

@@ -3,6 +3,7 @@ package com.jeeplus.sys.service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jeeplus.sys.domain.UserOtherInfo;
 import com.jeeplus.sys.mapper.OtherUserInfoMapper;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -14,4 +15,11 @@ import org.springframework.transaction.annotation.Transactional;
 @Service
 @Transactional
 public class OtherUserInfoService extends ServiceImpl<OtherUserInfoMapper, UserOtherInfo> {
+
+    @Autowired
+    private OtherUserInfoMapper mapper;
+
+    UserOtherInfo getByUserId(String userId){
+        return mapper.getByUserId(userId);
+    }
 }

+ 6 - 1
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java

@@ -474,7 +474,12 @@ public class UserService extends ServiceImpl <UserMapper, User> {
             UserOtherInfoDto otherInfoDto = userDTO.getOtherInfoDto();
             UserOtherInfo otherInfo = new UserOtherInfo();
             BeanUtils.copyProperties(otherInfoDto, otherInfo);
-
+            if(StringUtils.isNotBlank(userDTO.getId())){
+                UserOtherInfo byUserId = otherUserInfoService.getByUserId(userDTO.getId());
+                if(null != byUserId && StringUtils.isNotBlank(byUserId.getId())){
+                    otherInfo.setId(byUserId.getId());
+                }
+            }
             otherInfo.setCreateById(info.getId());
             otherInfo.setCreateTime(new Date());
             otherInfo.setUpdateById(info.getId());