广州市综治平台后端
xusd
2025-07-03 816a94329760fce38f528db32d4c7003a335be2c
Merge branch 'feature/login_test' into gzdyh_H5_prod
7 files modified
74 ■■■■ changed files
dyh-service/dyh-base/src/main/java/cn/huge/module/sys/constant/GridEnum.java 1 ●●●● patch | view | raw | blame | history
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtAccount.java 2 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java 38 ●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseInfoWebController.java 3 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseTaskService.java 26 ●●●● patch | view | raw | blame | history
dyh-service/dyh-sys/src/main/resources/config/application-prod.yml 2 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-sys/src/main/resources/config/application-test.yml 2 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-base/src/main/java/cn/huge/module/sys/constant/GridEnum.java
@@ -6,6 +6,7 @@
    GRID_OBJECT_TYPE_3("13", "待受理矛调工单"),
    GRID_OBJECT_TYPE_4("14", "待审核矛调工单"),
    GRID_TODO_TYPE_5("5", "矛盾纠纷"),
    GRID_TODO_TYPE_6("6", "专项治理"),
    /**
     * 网格通知类型,1:待分派,2:待受理,3:化解中,4:已结案,5:已归档,6:不予受理
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtAccount.java
@@ -98,5 +98,7 @@
    */
    @TableField(value = "update_time")
    private Date updateTime;
    @TableField(value = "pwd_error_count")
    private Integer pwdErrorCount;
}
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java
@@ -29,10 +29,7 @@
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
 * @author liyj
@@ -201,7 +198,7 @@
    public Boolean checkCredential(String cipher, CtAccount ctAccount) {
        String credentialMd5 = DigestUtils.md5DigestAsHex(cipher.getBytes());
        log.info("xsd:{}", credentialMd5);
        if (StringUtils.equals(credentialMd5, ctAccount.getCipher())) {
        if (StringUtils.equals(cipher, ctAccount.getCipher())) {
            return true;
        } else {
//            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
@@ -235,9 +232,9 @@
            // 判断账号是否存在
            CtAccount ctAccount = this.getByAccAndType(ctAccountLoginDTO.getAcc(), UserBaseConsts.ACC_TYPE_1);
            if (ObjectUtils.isNotEmpty(ctAccount)) {
                Date nowDate = new Date();
                // 判断账号是否被锁定
                if (ObjectUtils.isNotEmpty(ctAccount.getLimitTime())) {
                    Date nowDate = new Date();
                    if (nowDate.before(ctAccount.getLimitTime())) {
                        SimpleDateFormat sdf = new SimpleDateFormat("HH点mm分");
                        return ReturnFailUtils.getRepInfo("账号已锁定,请于" + sdf.format(ctAccount.getLimitTime()) + "后重试,或者请联系管理员解锁!");
@@ -245,6 +242,13 @@
                }
                // 判断密码是否正确
                if (checkCredential(ctAccountLoginDTO.getCipher(), ctAccount)) {
                    // 密码正确:重置错误次数
                    UpdateWrapper<CtAccount> resetPwdErr = new UpdateWrapper<>();
                    resetPwdErr.set("pwd_error_count", 0)
                            .set("limit_time", null)
                            .set("login_time", DateUtils.getNowDate())
                            .eq("id", ctAccount.getId());
                    this.update(resetPwdErr);
                    //返回结果
                    UserLoginDTO userLoginDTO = new UserLoginDTO();
                    CtUser ctUser = ctUserService.getById(ctAccount.getUserId());
@@ -307,7 +311,25 @@
                    this.update(accountUpdateWrapper);
                    return ReturnSucUtils.getRepInfo(userLoginDTO);
                } else {
                    return ReturnFailUtils.getRepInfo("账号或密码错误,请确认后重试!");
                    // 密码错误:增加错误次数,必要时冻结
                    int currentErrCount = ctAccount.getPwdErrorCount() == null ? 0 : ctAccount.getPwdErrorCount();
                    currentErrCount++;
                    UpdateWrapper<CtAccount> updateWrapper = new UpdateWrapper<>();
                    updateWrapper.set("pwd_error_count", currentErrCount).eq("id", ctAccount.getId());
                    if (currentErrCount >= 5) {
                        // 冻结5分钟
                        Calendar cal = Calendar.getInstance();
                        cal.setTime(nowDate);
                        cal.add(Calendar.MINUTE, 5);
                        updateWrapper.set("limit_time", cal.getTime());
                        this.update(updateWrapper);
                        return ReturnFailUtils.getRepInfo("密码错误已达5次,账号已锁定5分钟,请稍后再试!");
                    } else {
                        this.update(updateWrapper);
                        return ReturnFailUtils.getRepInfo("账号或密码错误,请确认后重试!(" + currentErrCount + "/5)");
                    }
                }
            } else {
                return ReturnFailUtils.getRepInfo("账号或密码错误,请确认后重试!");
@@ -497,8 +519,10 @@
                CtUnit ctUnit = ctUnitService.selectUnitByGridId(userRoleDTO.getOrgId());
                if (ctUnit != null) {
                    userLoginDTO.setUnit(ctUnit.getUnitName());
                    userLoginDTO.setUnitType(ctUnit.getUnitType());
                    ctUser.setUnitName(ctUnit.getUnitName());
                    ctUser.setUnitId(ctUnit.getId());
                    ctUserService.updateCtUser(ctUser);
                } else {
                    int grade = userRoleDTO.getGrade() - 1;
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseInfoWebController.java
@@ -1208,6 +1208,9 @@
    @GetMapping("/pagePerson")
    public Object pagePerson(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size, @RequestParam(value = "certiNo") String certiNo) {
        try {
            if(StringUtils.isEmpty(certiNo)){
                return ReturnFailUtils.getRepInfo("请输入身份证号");
            }
            Map<String, Object> terms = getParameterAll();
            Sort sort = null;
            String sortName = null;
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseTaskService.java
@@ -411,6 +411,7 @@
                        caseTaskPO.setReadUserName(loginUser.getTrueName());
                        mapper.updateCaseTask(caseTaskPO);
                    }
                    CtUnitDTO ctUnitDTO = custClient.getUnitByUserId(userId);
                    // 待分派节点
                    if (FlowNodeEnum.FLOW_NODE_ZJ_DFP.getIndex().equals(caseTask.getNodeId())
                            || FlowNodeEnum.FLOW_NODE_QJ_DFP.getIndex().equals(caseTask.getNodeId())
@@ -421,7 +422,7 @@
                        buttonList.add(sl);
                        buttonList.add(jb);
                        buttonList.add(xqcl);
                        CtUnitDTO ctUnitDTO = custClient.getUnitByUserId(userId);
                        if (UserBaseConsts.UNIT_GRADE_1 != ctUnitDTO.getUnitGrade()) {
                            buttonList.add(sb);
                        }
@@ -431,6 +432,9 @@
                            if (UserBaseConsts.UNIT_GRADE_2 == ctUnitDTO.getUnitGrade()) {
                                buttonList.add(bysl);
                            }
                        }
                        if(ctUnitDTO.getUnitType()!=null &ctUnitDTO.getUnitType()==101){
                            buttonList.add(db);
                        }
                    }
                    // 待受理节点
@@ -442,6 +446,9 @@
                        buttonList.add(sl);
                        buttonList.add(ht);
                        buttonList.add(xqcl);
                        if(ctUnitDTO.getUnitType()!=null &ctUnitDTO.getUnitType()==101){
                            buttonList.add(db);
                        }
                    }
                    // 回退审核节点
                    if (FlowNodeEnum.FLOW_NODE_ZJ_HTSH.getIndex().equals(caseTask.getNodeId())
@@ -474,7 +481,6 @@
                            buttonList.add(lhczsq);
                            buttonList.add(jasq);
                            buttonList.add(tabcl);
                            CtUnitDTO ctUnitDTO = custClient.getUnitByUserId(userId);
                            if (ObjectUtils.isNotEmpty(ctUnitDTO)) {
                                if (GzRegionBaseEnum.AREA_7.getIndex().equals(ctUnitDTO.getArea())) {
                                    buttonList.add(yytj);
@@ -488,6 +494,9 @@
                            buttonList.add(tjbljl);
                            buttonList.add(tabcl);
                        }
                        if(ctUnitDTO.getUnitType()!=null &ctUnitDTO.getUnitType()==101){
                            buttonList.add(db);
                        }
                    }
                    // 结案审核节点
                    if (FlowNodeEnum.FLOW_NODE_JASH.getIndex().equals(caseTask.getNodeId())
@@ -498,6 +507,9 @@
                        tabList.add(jash);
                        buttonList.add(tabcl);
                        if(ctUnitDTO.getUnitType()!=null &ctUnitDTO.getUnitType()==101){
                            buttonList.add(db);
                        }
                    }
                    // 当事人评价节点
                    if (FlowNodeEnum.FLOW_NODE_DSRPJ.getIndex().equals(caseTask.getNodeId())) {
@@ -516,6 +528,9 @@
                        buttonList.add(sl);
                        buttonList.add(ht);
                        buttonList.add(tabcl);
                        if(ctUnitDTO.getUnitType()!=null &ctUnitDTO.getUnitType()==101){
                            buttonList.add(db);
                        }
                    }
                }
                //司法确认
@@ -4159,7 +4174,12 @@
            gridToDoBacthVo.setYzyContent("");
            gridToDoBacthVo.setObjTag("");
            gridToDoBacthVo.setMobile("18607214221");
            gridToDoBacthVo.setTodoType(GridEnum.GRID_TODO_TYPE_5.getIndex());
            if(StringUtils.isNotEmpty(caseInfo.getCanalSecond())&&caseInfo.getCanalSecond().equals("22_00003-7")){
                gridToDoBacthVo.setTodoType(GridEnum.GRID_TODO_TYPE_6.getIndex());
            }else {
                gridToDoBacthVo.setTodoType(GridEnum.GRID_TODO_TYPE_5.getIndex());
            }
            String title = "";
            title += noticeTypeName;
            if (StringUtils.isNotBlank(caseInfo.getPlaintiffs())) {
dyh-service/dyh-sys/src/main/resources/config/application-prod.yml
@@ -16,6 +16,8 @@
    driver-class-name: dm.jdbc.driver.DmDriver
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      stat-view-servlet:
        enabled: false
      test-while-idle: true
      min-idle: 10
      initial-size: 10
dyh-service/dyh-sys/src/main/resources/config/application-test.yml
@@ -16,6 +16,8 @@
    driver-class-name: dm.jdbc.driver.DmDriver
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      stat-view-servlet:
        enabled: false
      test-while-idle: true
      min-idle: 10
      initial-size: 10