Browse Source

定时任务 SLS日志 区域补全9位

tags/24080901
PoffyZhang 1 year ago
parent
commit
166681134b
2 changed files with 4 additions and 1 deletions
  1. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/common/constant/RegionConst.java
  2. +2
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java

+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/common/constant/RegionConst.java View File

@@ -43,6 +43,8 @@ public interface RegionConst {
*/
String RC_ZJ = "330000";

String NINE_CODE_LAST = "000";

//----------------------------------------地区父级ID(缩写PID)---------------------------------------------------------

long PID_CHINA = 0;


+ 2
- 1
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java View File

@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.log.mapper.OptLogMapper;
import com.ningdatech.log.model.domain.OptLog;
import com.ningdatech.pmapi.common.constant.BizConst;
import com.ningdatech.pmapi.common.constant.RegionConst;
import com.ningdatech.pmapi.organization.mapper.DingEmployeeInfoMapper;
import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo;
import com.ningdatech.pmapi.scheduler.task.model.CommonLog;
@@ -89,7 +90,7 @@ public class CommonLogTask {
commonLog.setUserId(String.valueOf(userInfo.getId()));
}
commonLog.setUserRole("政府工作人员");
commonLog.setAreaCode(userInfo.getRegionCode());
commonLog.setAreaCode(userInfo.getRegionCode() + RegionConst.NINE_CODE_LAST);
String description = optLog.getDescription();
if ("用户登录".equals(description)){
commonLog.setActionType(1);


Loading…
Cancel
Save