he2802 2 年之前
父节点
当前提交
25bdbdc663

+ 8 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/user/UserController.java

@@ -7,9 +7,11 @@ import com.zhongzheng.common.core.controller.BaseController;
 import com.zhongzheng.common.core.domain.AjaxResult;
 import com.zhongzheng.common.core.page.TableDataInfo;
 import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.poi.ExcelUtil;
 import com.zhongzheng.modules.alisms.service.IAliSmsService;
 import com.zhongzheng.modules.user.bo.*;
+import com.zhongzheng.modules.user.entity.ClientLoginUser;
 import com.zhongzheng.modules.user.service.IUserService;
 import com.zhongzheng.modules.user.vo.UserIdCardBatchVo;
 import com.zhongzheng.modules.user.vo.UserStatstVo;
@@ -201,4 +203,10 @@ public class UserController extends BaseController {
     {
         return AjaxResult.success(iUserService.batchUserId(list));
     }
+
+    @ApiOperation("修改客户端用户密码")
+    @PostMapping("/updatePwd")
+    public AjaxResult<Void> updatePwd(@RequestBody UserAppUpdatePwdBo bo) {
+        return toAjax(iUserService.updatePwdByClient(bo)? 1 : 0);
+    }
 }

+ 10 - 0
zhongzheng-common/src/main/java/com/zhongzheng/common/utils/ToolsUtils.java

@@ -360,6 +360,16 @@ public class ToolsUtils {
         return result;
     }
 
+    public static boolean verifEasyPwd(String passWord) {
+        if(Validator.isEmpty(passWord)){
+            return false;
+        }
+        if(passWord.length()<6||passWord.length()>18){
+            return false;
+        }
+        return true;
+    }
+
     public static boolean verifPwd(String passWord) {
         if(Validator.isEmpty(passWord)){
             return false;

+ 20 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -887,6 +887,26 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         return true;
     }
 
+    @Override
+    public Boolean updatePwdByClient(UserAppUpdatePwdBo bo) {
+        User user = getOne(new LambdaQueryWrapper<User>().eq(User::getUserId, bo.getUserId()));
+        if(Validator.isEmpty(user)){
+            throw new BaseException("用户信息错误");
+        }
+        if (Validator.isEmpty(bo.getNewPwd()))
+        {
+            throw new BaseException("新密码格式错误");
+        }
+        if(!ToolsUtils.verifEasyPwd(bo.getNewPwd())){
+            throw new CustomException("密码应由6-18位组成");
+        }
+        user.setPassword(SecurityUtils.encryptPassword(bo.getNewPwd()));
+        user.setPwdTime(DateUtils.getNowTime());
+        user.setUpdateTime(DateUtils.getNowTime());
+        updateById(user);
+        return true;
+    }
+
     @Override
     public List<UserIdCardBatchVo> batchUserId(List<UserIdCardAddBo> list) {
         List<UserIdCardBatchVo> list1 = new ArrayList<>();

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/financial/service/ITopInformRemindService.java

@@ -1,6 +1,7 @@
 package com.zhongzheng.modules.top.financial.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhongzheng.modules.inform.vo.InformRemindVo;
 import com.zhongzheng.modules.top.financial.bo.TopInformRemindAddBo;
 import com.zhongzheng.modules.top.financial.bo.TopInformRemindEditBo;
 import com.zhongzheng.modules.top.financial.bo.TopInformRemindQueryBo;
@@ -49,4 +50,7 @@ public interface ITopInformRemindService extends IService<TopInformRemind> {
 	 * @return
 	 */
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    InformRemindVo queryByName(String name);
+
 }

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/financial/service/impl/TopInformRemindServiceImpl.java

@@ -3,6 +3,9 @@ package com.zhongzheng.modules.top.financial.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
 import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.modules.inform.domain.InformRemind;
+import com.zhongzheng.modules.inform.vo.InformRemindBusinessVo;
+import com.zhongzheng.modules.inform.vo.InformRemindVo;
 import com.zhongzheng.modules.top.financial.bo.TopInformRemindAddBo;
 import com.zhongzheng.modules.top.financial.bo.TopInformRemindEditBo;
 import com.zhongzheng.modules.top.financial.bo.TopInformRemindQueryBo;
@@ -105,4 +108,11 @@ public class TopInformRemindServiceImpl extends ServiceImpl<TopInformRemindMappe
         }
         return this.removeByIds(ids);
     }
+
+    @Override
+    public InformRemindVo queryByName(String name) {
+        TopInformRemind db = getOne(new LambdaQueryWrapper<TopInformRemind>().eq(TopInformRemind::getRemind, name).last("limit 1"));
+        InformRemindVo informRemindVo = BeanUtil.toBean(db, InformRemindVo.class);
+        return informRemindVo;
+    }
 }

+ 17 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/goods/service/impl/TopOldOrderServiceImpl.java

@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
 import com.zhongzheng.common.core.domain.entity.SysUser;
+import com.zhongzheng.common.core.domain.entity.TopSysUser;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.type.EncryptHandler;
 import com.zhongzheng.common.utils.DateUtils;
@@ -118,6 +119,15 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
     @Autowired
     private IClassGradeUserService classGradeUserService;
 
+    @Autowired
+    private ITopInformRemindRelevanceService topInformRemindRelevanceService;
+
+    @Autowired
+    private ITopInformRemindService topInformRemindService;
+
+    @Autowired
+    private ITopInformSysUserService topInformSysUserService;
+
     @Autowired
     private IInformRemindRelevanceService informRemindRelevanceService;
 
@@ -1639,18 +1649,18 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
     @Override
     public void informRemindOrderCheck(String result) {
         //订单审核结果通知
-        List<InformRemindRelevance> remindRelevances = informRemindRelevanceService.list(new LambdaQueryWrapper<InformRemindRelevance>().eq(InformRemindRelevance::getType, 2));
+        List<TopInformRemindRelevance> remindRelevances = topInformRemindRelevanceService.list(new LambdaQueryWrapper<TopInformRemindRelevance>().eq(TopInformRemindRelevance::getType, 2));
         if (CollectionUtils.isEmpty(remindRelevances)){
             return;
         }
-        InformRemindVo informRemindVo = informRemindService.queryByName("订单审核结果通知");
-        for (InformRemindRelevance remindVo : remindRelevances) {
-            SysUser sysUser = sysUserService.getById(remindVo.getRelevanceId());
+        InformRemindVo informRemindVo = topInformRemindService.queryByName("订单审核结果通知");
+        for (TopInformRemindRelevance remindVo : remindRelevances) {
+            TopSysUser sysUser = topSysUserService.getById(remindVo.getRelevanceId());
             if (ObjectUtil.isNull(sysUser)) {
                 continue;
             }
             if (informRemindVo.getWayStatus().equals(1)) {
-                InformSysUserAddBo informUserAddBo = new InformSysUserAddBo();
+                TopInformSysUserAddBo informUserAddBo = new TopInformSysUserAddBo();
                 informUserAddBo.setUserId(sysUser.getUserId());
                 informUserAddBo.setSendStatus(1);
                 informUserAddBo.setSendTime(DateUtils.getNowTime());
@@ -1660,7 +1670,7 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
                 informUserAddBo.setSystemStatus(1);
                 informUserAddBo.setRemind("订单审核结果通知");
                 informUserAddBo.setText(String.format("订单审核结果通知:%s", result));
-                informSysUserService.insertByAddBo(informUserAddBo);
+                topInformSysUserService.insertByAddBo(informUserAddBo);
             }
             if (informRemindVo.getNoteStatus().equals(1) && StringUtils.isNotBlank(sysUser.getPhonenumber())) {
                 //短信提醒
@@ -2184,7 +2194,7 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
                 topOldOrderCheckLogService.updateById(check);
             }
             //消息通知
-            informRemindOrderCheck(String.format("【%s】订单已通过【%s】审核",bo.getOrderSn(),bo.getCheckRoleName()));
+            informRemindOrderCheck(String.format("【%s】订单已通过【%s】审核",bo.getOrderSn(),bo.getLoginName()));
         }
         TopOldOrder oldOrder = baseMapper.getOrderBySn(bo.getOrderSn());
         if (oldOrder.getOrderFrom() != 1){

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserService.java

@@ -111,6 +111,8 @@ public interface IUserService extends IService<User> {
 
 	Boolean updatePwd(UserAppUpdatePwdBo bo);
 
+	Boolean updatePwdByClient(UserAppUpdatePwdBo bo);
+
 	List<UserIdCardBatchVo> batchUserId(List<UserIdCardAddBo> list);
 
 	boolean editShareActivityCode(UserEditBo bo);

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/top/TopCostTpMapper.xml

@@ -31,6 +31,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="tpName != null and tpName != ''">
             AND ct.tp_name  like concat('%', #{tpName}, '%')
         </if>
+        <if test="tenantId != null and tenantId != ''">
+            AND ct.tenant_id  = #{tenantId}
+        </if>
         <if test="tenantSort != null and tenantSort == 1">
             ORDER BY ct.tenant_id
         </if>