浏览代码

refactor: 风险控制优化 v2

1. 记录uuid;
2. 根据uuid查询;
3. 控制查看按钮;
shc 3 年之前
父节点
当前提交
e11934894a
共有 21 个文件被更改,包括 182 次插入39 次删除
  1. 3 1
      db/v2022/4single_member_settle_same_amount_in_several_months.sql
  2. 3 1
      db/v2022/5single_member_settle_amount_overrun_in_several_months.sql
  3. 3 1
      db/v2022/6single_ent_settle_same_amount_for_members_in_current_month.sql
  4. 4 2
      db/v2022/7single_member_without_such_task_types_in_several_months.sql
  5. 10 0
      hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/entity/SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth.java
  6. 10 0
      hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/entity/SingleMemberSettleAmountOverrunInSeveralMonths.java
  7. 10 0
      hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/entity/SingleMemberSettleSameAmountInSeveralMonths.java
  8. 9 0
      hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/entity/SingleMemberWithoutSuchTaskTypesInSeveralMonths.java
  9. 41 24
      hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/RiskControlController.java
  10. 22 4
      hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/controller/SysJobLogController.java
  11. 5 0
      hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth.java
  12. 5 0
      hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SingleMemberSettleAmountOverrunInSeveralMonths.java
  13. 5 0
      hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SingleMemberSettleSameAmountInSeveralMonths.java
  14. 5 0
      hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SingleMemberWithoutSuchTaskTypesInSeveralMonths.java
  15. 7 0
      hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SysJob.java
  16. 10 0
      hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SysJobLog.java
  17. 16 5
      hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/task/SpringBeanTaskDemo.java
  18. 6 1
      hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/util/SpringBeanTaskInvok.java
  19. 6 0
      hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/util/TaskInvokUtil.java
  20. 1 0
      hnqz-visual/hnqz-daemon-quartz/src/main/resources/mapper/SysJobLogMapper.xml
  21. 1 0
      hnqz-visual/hnqz-daemon-quartz/src/main/resources/mapper/SysJobMapper.xml

+ 3 - 1
db/v2022/4single_member_settle_same_amount_in_several_months.sql

@@ -23,8 +23,10 @@ CREATE TABLE `single_member_settle_same_amount_in_several_months`
     `package_name`            VARCHAR(64)    NULL COMMENT '积分包名称',
     `settle_note_create_time` DATETIME       NULL COMMENT '结算记录创建时间',
     `period`                  INT UNSIGNED   NULL COMMENT '统计周期',
+    `uuid`                    VARCHAR(64)    NOT NULL COMMENT 'uuid',
     `create_time`             DATETIME       NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-    PRIMARY KEY (`record_id`) USING BTREE
+    PRIMARY KEY (`record_id`) USING BTREE,
+    KEY `idx_uuid` (uuid) USING BTREE
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='单人连续多月结算相同金额';
 

+ 3 - 1
db/v2022/5single_member_settle_amount_overrun_in_several_months.sql

@@ -23,8 +23,10 @@ CREATE TABLE `single_member_settle_amount_overrun_in_several_months`
     `settle_note_create_time` DATETIME       NULL COMMENT '结算记录创建时间',
     `period`                  INT UNSIGNED   NULL COMMENT '统计周期',
     `platform_limit`          DECIMAL        NULL COMMENT '结算限制',
+    `uuid`                    VARCHAR(64)    NOT NULL COMMENT 'uuid',
     `create_time`             DATETIME       NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-    PRIMARY KEY (`record_id`) USING BTREE
+    PRIMARY KEY (`record_id`) USING BTREE,
+    KEY `idx_uuid` (uuid) USING BTREE
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='单人连续多月结算额超标';
 

+ 3 - 1
db/v2022/6single_ent_settle_same_amount_for_members_in_current_month.sql

@@ -24,8 +24,10 @@ CREATE TABLE `single_ent_settle_same_amount_for_members_in_current_month`
     `settle_note_create_time` DATETIME       NULL COMMENT '结算记录创建时间',
     `period`                  INT UNSIGNED   NULL COMMENT '统计周期',
     `member_count`            INT UNSIGNED   NULL COMMENT '风控人数',
+    `uuid`                    VARCHAR(64)    NOT NULL COMMENT 'uuid',
     `create_time`             DATETIME       NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-    PRIMARY KEY (`record_id`) USING BTREE
+    PRIMARY KEY (`record_id`) USING BTREE,
+    KEY `idx_uuid` (uuid) USING BTREE
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='单人连续多月结算相同金额';
 

+ 4 - 2
db/v2022/7single_member_without_such_task_types_in_several_months.sql

@@ -23,8 +23,10 @@ CREATE TABLE `single_member_without_such_task_types_in_several_months`
     `package_create_time`  DATETIME     NULL COMMENT '积分包创建时间',
     `package_pick_up_time` DATETIME     NULL COMMENT '积分包领取时间',
     `first_task_time`      DATETIME     NULL COMMENT '首个任务时间',
-    `create_time`          DATETIME     NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-    PRIMARY KEY (`record_id`) USING BTREE
+    `uuid`                    VARCHAR(64)    NOT NULL COMMENT 'uuid',
+    `create_time`             DATETIME       NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+    PRIMARY KEY (`record_id`) USING BTREE,
+    KEY `idx_uuid` (uuid) USING BTREE
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='单人连续多月结算相同金额';
 

+ 10 - 0
hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/entity/SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth.java

@@ -1,7 +1,9 @@
 package com.qunzhixinxi.hnqz.admin.api.entity;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -108,4 +110,12 @@ public class SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth imp
 	@ExcelProperty("记录创建时间")
 	private LocalDateTime createTime;
 
+	/**
+	 * uuid
+	 */
+	@ExcelIgnore
+	@TableField(exist = false)
+	private Long uuid;
+
+
 }

+ 10 - 0
hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/entity/SingleMemberSettleAmountOverrunInSeveralMonths.java

@@ -1,7 +1,9 @@
 package com.qunzhixinxi.hnqz.admin.api.entity;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -107,4 +109,12 @@ public class SingleMemberSettleAmountOverrunInSeveralMonths implements Serializa
 	@ExcelProperty("记录创建时间")
 	private LocalDateTime createTime;
 
+	/**
+	 * uuid
+	 */
+	@ExcelIgnore
+	@TableField(exist = false)
+	private Long uuid;
+
+
 }

+ 10 - 0
hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/entity/SingleMemberSettleSameAmountInSeveralMonths.java

@@ -1,7 +1,9 @@
 package com.qunzhixinxi.hnqz.admin.api.entity;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -102,4 +104,12 @@ public class SingleMemberSettleSameAmountInSeveralMonths implements Serializable
 	@ExcelProperty("记录创建时间")
 	private LocalDateTime createTime;
 
+	/**
+	 * uuid
+	 */
+	@ExcelIgnore
+	@TableField(exist = false)
+	private Long uuid;
+
+
 }

+ 9 - 0
hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/entity/SingleMemberWithoutSuchTaskTypesInSeveralMonths.java

@@ -1,7 +1,9 @@
 package com.qunzhixinxi.hnqz.admin.api.entity;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -108,4 +110,11 @@ public class SingleMemberWithoutSuchTaskTypesInSeveralMonths implements Serializ
 	@ExcelProperty("首个任务时间")
 	private LocalDateTime firstTaskTime;
 
+	/**
+	 * uuid
+	 */
+	@ExcelIgnore
+	@TableField(exist = false)
+	private Long uuid;
+
 }

+ 41 - 24
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/RiskControlController.java

@@ -15,6 +15,7 @@ import com.qunzhixinxi.hnqz.common.core.util.R;
 import lombok.AllArgsConstructor;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -42,10 +43,12 @@ public class RiskControlController {
 	 *
 	 * @return 风控结果
 	 */
-	@GetMapping(value = "/member/settle-same-amount")
-	public R<?> pageSingleMemberSettleSameAmountInSeveralMonths(Page<SingleMemberSettleSameAmountInSeveralMonths> page) {
+	@GetMapping(value = "/member/settle-same-amount/{uuid}")
+	public R<?> pageSingleMemberSettleSameAmountInSeveralMonths(Page<SingleMemberSettleSameAmountInSeveralMonths> page, @PathVariable(value = "uuid") String uuid) {
 
-		singleMemberSettleSameAmountInSeveralMonthsService.page(page, Wrappers.<SingleMemberSettleSameAmountInSeveralMonths>lambdaQuery().orderByDesc(SingleMemberSettleSameAmountInSeveralMonths::getCreateTime));
+		singleMemberSettleSameAmountInSeveralMonthsService.page(page, Wrappers.<SingleMemberSettleSameAmountInSeveralMonths>lambdaQuery()
+				.eq(SingleMemberSettleSameAmountInSeveralMonths::getUuid, uuid)
+				.orderByDesc(SingleMemberSettleSameAmountInSeveralMonths::getCreateTime));
 		return R.ok(page);
 	}
 
@@ -55,10 +58,12 @@ public class RiskControlController {
 	 * @return 风控结果
 	 */
 	@ResponseExcel(name = "SingleMemberSettleSameAmountInSeveralMonths", sheet = "风控数据")
-	@GetMapping(value = "/member/settle-same-amount/export")
-	public List<SingleMemberSettleSameAmountInSeveralMonths> exportSingleMemberSettleSameAmountInSeveralMonths() {
+	@GetMapping(value = "/member/settle-same-amount/export/{uuid}")
+	public List<SingleMemberSettleSameAmountInSeveralMonths> exportSingleMemberSettleSameAmountInSeveralMonths(@PathVariable(value = "uuid") String uuid) {
 
-		return singleMemberSettleSameAmountInSeveralMonthsService.list(Wrappers.<SingleMemberSettleSameAmountInSeveralMonths>lambdaQuery().orderByDesc(SingleMemberSettleSameAmountInSeveralMonths::getCreateTime));
+		return singleMemberSettleSameAmountInSeveralMonthsService.list(Wrappers.<SingleMemberSettleSameAmountInSeveralMonths>lambdaQuery()
+				.eq(SingleMemberSettleSameAmountInSeveralMonths::getUuid, uuid)
+				.orderByDesc(SingleMemberSettleSameAmountInSeveralMonths::getCreateTime));
 	}
 
 	/**
@@ -66,10 +71,12 @@ public class RiskControlController {
 	 *
 	 * @return 风控结果
 	 */
-	@GetMapping(value = "/enterprise/settle-same-amount")
-	public R<?> pageSingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth(Page<SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth> page) {
+	@GetMapping(value = "/enterprise/settle-same-amount/{uuid}")
+	public R<?> pageSingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth(Page<SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth> page, @PathVariable(value = "uuid") String uuid) {
 
-		singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonthService.page(page, Wrappers.<SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth>lambdaQuery().orderByDesc(SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth::getCreateTime));
+		singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonthService.page(page, Wrappers.<SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth>lambdaQuery()
+				.eq(SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth::getUuid, uuid)
+				.orderByDesc(SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth::getCreateTime));
 		return R.ok(page);
 	}
 
@@ -79,10 +86,12 @@ public class RiskControlController {
 	 * @return 风控结果
 	 */
 	@ResponseExcel(name = "SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth", sheet = "风控数据")
-	@GetMapping(value = "/enterprise/settle-same-amount/export")
-	public List<SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth> exportSingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth() {
+	@GetMapping(value = "/enterprise/settle-same-amount/export/{uuid}")
+	public List<SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth> exportSingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth(@PathVariable(value = "uuid") String uuid) {
 
-		return singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonthService.list(Wrappers.<SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth>lambdaQuery().orderByDesc(SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth::getCreateTime));
+		return singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonthService.list(Wrappers.<SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth>lambdaQuery()
+				.eq(SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth::getUuid, uuid)
+				.orderByDesc(SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth::getCreateTime));
 	}
 
 
@@ -91,10 +100,12 @@ public class RiskControlController {
 	 *
 	 * @return 风控结果
 	 */
-	@GetMapping(value = "/member/settle-amount/overrun")
-	public R<?> pageSingleMemberSettleAmountOverrunInSeveralMonths(Page<SingleMemberSettleAmountOverrunInSeveralMonths> page) {
+	@GetMapping(value = "/member/settle-amount/overrun/{uuid}")
+	public R<?> pageSingleMemberSettleAmountOverrunInSeveralMonths(Page<SingleMemberSettleAmountOverrunInSeveralMonths> page, @PathVariable(value = "uuid") String uuid) {
 
-		singleMemberSettleAmountOverrunInSeveralMonthsService.page(page, Wrappers.<SingleMemberSettleAmountOverrunInSeveralMonths>lambdaQuery().orderByDesc(SingleMemberSettleAmountOverrunInSeveralMonths::getCreateTime));
+		singleMemberSettleAmountOverrunInSeveralMonthsService.page(page, Wrappers.<SingleMemberSettleAmountOverrunInSeveralMonths>lambdaQuery()
+				.eq(SingleMemberSettleAmountOverrunInSeveralMonths::getUuid, uuid)
+				.orderByDesc(SingleMemberSettleAmountOverrunInSeveralMonths::getCreateTime));
 		return R.ok(page);
 	}
 
@@ -104,10 +115,12 @@ public class RiskControlController {
 	 * @return 风控结果
 	 */
 	@ResponseExcel(name = "SingleMemberSettleAmountOverrunInSeveralMonths", sheet = "风控数据")
-	@GetMapping(value = "/member/settle-amount/overrun/export")
-	public List<SingleMemberSettleAmountOverrunInSeveralMonths> exportSingleMemberSettleAmountOverrunInSeveralMonths() {
+	@GetMapping(value = "/member/settle-amount/overrun/export/{uuid}")
+	public List<SingleMemberSettleAmountOverrunInSeveralMonths> exportSingleMemberSettleAmountOverrunInSeveralMonths(@PathVariable(value = "uuid") String uuid) {
 
-		return singleMemberSettleAmountOverrunInSeveralMonthsService.list(Wrappers.<SingleMemberSettleAmountOverrunInSeveralMonths>lambdaQuery().orderByDesc(SingleMemberSettleAmountOverrunInSeveralMonths::getCreateTime));
+		return singleMemberSettleAmountOverrunInSeveralMonthsService.list(Wrappers.<SingleMemberSettleAmountOverrunInSeveralMonths>lambdaQuery()
+				.eq(SingleMemberSettleAmountOverrunInSeveralMonths::getUuid, uuid)
+				.orderByDesc(SingleMemberSettleAmountOverrunInSeveralMonths::getCreateTime));
 	}
 
 
@@ -116,10 +129,12 @@ public class RiskControlController {
 	 *
 	 * @return 风控结果
 	 */
-	@GetMapping(value = "/member/task-type")
-	public R<?> pageSingleMemberWithoutSuchTaskTypesInSeveralMonths(Page<SingleMemberWithoutSuchTaskTypesInSeveralMonths> page) {
+	@GetMapping(value = "/member/task-type/{uuid}")
+	public R<?> pageSingleMemberWithoutSuchTaskTypesInSeveralMonths(Page<SingleMemberWithoutSuchTaskTypesInSeveralMonths> page, @PathVariable(value = "uuid") String uuid) {
 
-		singleMemberWithoutSuchTaskTypesInSeveralMonthsService.page(page, Wrappers.<SingleMemberWithoutSuchTaskTypesInSeveralMonths>lambdaQuery().orderByDesc(SingleMemberWithoutSuchTaskTypesInSeveralMonths::getCreateTime));
+		singleMemberWithoutSuchTaskTypesInSeveralMonthsService.page(page, Wrappers.<SingleMemberWithoutSuchTaskTypesInSeveralMonths>lambdaQuery()
+				.eq(SingleMemberWithoutSuchTaskTypesInSeveralMonths::getUuid, uuid)
+				.orderByDesc(SingleMemberWithoutSuchTaskTypesInSeveralMonths::getCreateTime));
 		return R.ok(page);
 	}
 
@@ -129,10 +144,12 @@ public class RiskControlController {
 	 * @return 风控结果
 	 */
 	@ResponseExcel(name = "SingleMemberWithoutSuchTaskTypesInSeveralMonths", sheet = "风控数据")
-	@GetMapping(value = "/member/task-type/export")
-	public List<SingleMemberWithoutSuchTaskTypesInSeveralMonths> exportSingleMemberWithoutSuchTaskTypesInSeveralMonths() {
+	@GetMapping(value = "/member/task-type/export/{uuid}")
+	public List<SingleMemberWithoutSuchTaskTypesInSeveralMonths> exportSingleMemberWithoutSuchTaskTypesInSeveralMonths(@PathVariable(value = "uuid") String uuid) {
 
-		return singleMemberWithoutSuchTaskTypesInSeveralMonthsService.list(Wrappers.<SingleMemberWithoutSuchTaskTypesInSeveralMonths>lambdaQuery().orderByDesc(SingleMemberWithoutSuchTaskTypesInSeveralMonths::getCreateTime));
+		return singleMemberWithoutSuchTaskTypesInSeveralMonthsService.list(Wrappers.<SingleMemberWithoutSuchTaskTypesInSeveralMonths>lambdaQuery()
+				.eq(SingleMemberWithoutSuchTaskTypesInSeveralMonths::getUuid, uuid)
+				.orderByDesc(SingleMemberWithoutSuchTaskTypesInSeveralMonths::getCreateTime));
 
 	}
 }

+ 22 - 4
hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/controller/SysJobLogController.java

@@ -22,7 +22,15 @@ import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.qunzhixinxi.hnqz.common.core.util.R;
+import com.qunzhixinxi.hnqz.daemon.quartz.entity.SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth;
+import com.qunzhixinxi.hnqz.daemon.quartz.entity.SingleMemberSettleAmountOverrunInSeveralMonths;
+import com.qunzhixinxi.hnqz.daemon.quartz.entity.SingleMemberSettleSameAmountInSeveralMonths;
+import com.qunzhixinxi.hnqz.daemon.quartz.entity.SingleMemberWithoutSuchTaskTypesInSeveralMonths;
 import com.qunzhixinxi.hnqz.daemon.quartz.entity.SysJobLog;
+import com.qunzhixinxi.hnqz.daemon.quartz.mapper.SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonthMapper;
+import com.qunzhixinxi.hnqz.daemon.quartz.mapper.SingleMemberSettleAmountOverrunInSeveralMonthsMapper;
+import com.qunzhixinxi.hnqz.daemon.quartz.mapper.SingleMemberSettleSameAmountInSeveralMonthsMapper;
+import com.qunzhixinxi.hnqz.daemon.quartz.mapper.SingleMemberWithoutSuchTaskTypesInSeveralMonthsMapper;
 import com.qunzhixinxi.hnqz.daemon.quartz.service.SysJobLogService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -47,11 +55,15 @@ import java.util.concurrent.TimeUnit;
 public class SysJobLogController {
 
 	private final SysJobLogService sysJobLogService;
+	private final SingleMemberSettleSameAmountInSeveralMonthsMapper singleMemberSettleSameAmountInSeveralMonthsMapper;
+	private final SingleMemberSettleAmountOverrunInSeveralMonthsMapper singleMemberSettleAmountOverrunInSeveralMonthsMapper;
+	private final SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonthMapper singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonthMapper;
+	private final SingleMemberWithoutSuchTaskTypesInSeveralMonthsMapper singleMemberWithoutSuchTaskTypesInSeveralMonthsMapper;
 
-	private String j27 = "同一用户,连续%s月结算金额相同";
-	private String j28 = "同一企业,给%s个用户支付相同金额";
-	private String j29 = "同一用户,连续%s月没有定位打卡";
-	private String j30 = "同一用户,连续%s月结算金额超过%s金额";
+	private final String j27 = "同一用户,连续<font color='red'>%s</font>月结算金额相同";
+	private final String j28 = "同一企业,给<font color='red'>%s</font>个用户支付相同金额";
+	private final String j29 = "同一用户,连续<font color='red'>%s</font>月没有定位打卡";
+	private final String j30 = "同一用户,连续<font color='red'>%s</font>月结算金额超过<font color='red'>%s</font>金额";
 
 	/**
 	 * 分页查询
@@ -77,20 +89,26 @@ public class SysJobLogController {
 
 			// 匹配
 			String jobName;
+			int count = 0;
 			if (r.getJobId() == 27) {
 				jobName = String.format(j27, r.getMethodParamsValue());
+				count = singleMemberSettleSameAmountInSeveralMonthsMapper.selectCount(Wrappers.<SingleMemberSettleSameAmountInSeveralMonths>lambdaQuery().eq(SingleMemberSettleSameAmountInSeveralMonths::getUuid, r.getUuid()));
 			} else if (r.getJobId() == 28) {
 				jobName = String.format(j28, r.getMethodParamsValue());
+				count = singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonthMapper.selectCount(Wrappers.<SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth>lambdaQuery().eq(SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth::getUuid, r.getUuid()));
 			} else if (r.getJobId() == 29) {
 				String[] split = r.getMethodParamsValue().split(StrUtil.COMMA);
 				jobName = String.format(j29, split[0]);
+				count = singleMemberWithoutSuchTaskTypesInSeveralMonthsMapper.selectCount(Wrappers.<SingleMemberWithoutSuchTaskTypesInSeveralMonths>lambdaQuery().eq(SingleMemberWithoutSuchTaskTypesInSeveralMonths::getUuid, r.getUuid()));
 			} else if (r.getJobId() == 30) {
 				String[] split = r.getMethodParamsValue().split(StrUtil.COMMA);
 				jobName = String.format(j30, split[0], split[1]);
+				count = singleMemberSettleAmountOverrunInSeveralMonthsMapper.selectCount(Wrappers.<SingleMemberSettleAmountOverrunInSeveralMonths>lambdaQuery().eq(SingleMemberSettleAmountOverrunInSeveralMonths::getUuid, r.getUuid()));
 			} else {
 				jobName = r.getJobName();
 			}
 			r.setJobName(jobName);
+			r.setEmpty(count == 0);
 
 			LocalDateTime createTime = r.getCreateTime();
 			String executeTime = r.getExecuteTime();

+ 5 - 0
hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth.java

@@ -97,4 +97,9 @@ public class SingleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth imp
 	 */
 	private LocalDateTime createTime;
 
+	/**
+	 * uuid
+	 */
+	private String uuid;
+
 }

+ 5 - 0
hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SingleMemberSettleAmountOverrunInSeveralMonths.java

@@ -92,4 +92,9 @@ public class SingleMemberSettleAmountOverrunInSeveralMonths implements Serializa
 	 */
 	private LocalDateTime createTime;
 
+	/**
+	 * uuid
+	 */
+	private String uuid;
+
 }

+ 5 - 0
hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SingleMemberSettleSameAmountInSeveralMonths.java

@@ -94,6 +94,11 @@ public class SingleMemberSettleSameAmountInSeveralMonths implements Serializable
 	 */
 	private LocalDateTime createTime;
 
+	/**
+	 * log uuid
+	 */
+	private String uuid;
+
 	@Override
 	public boolean equals(Object o) {
 		if (this == o) return true;

+ 5 - 0
hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SingleMemberWithoutSuchTaskTypesInSeveralMonths.java

@@ -92,4 +92,9 @@ public class SingleMemberWithoutSuchTaskTypesInSeveralMonths implements Serializ
 	 */
 	private LocalDateTime createTime;
 
+	/**
+	 * uuid
+	 */
+	private String uuid;
+
 }

+ 7 - 0
hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SysJob.java

@@ -18,6 +18,7 @@
 package com.qunzhixinxi.hnqz.daemon.quartz.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import io.swagger.annotations.ApiModel;
@@ -158,4 +159,10 @@ public class SysJob extends Model<SysJob> {
 	 */
 	private String remark;
 
+	/**
+	 * 日志标记
+	 */
+	@TableField(exist = false)
+	private String uuid;
+
 }

+ 10 - 0
hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/entity/SysJobLog.java

@@ -142,4 +142,14 @@ public class SysJobLog extends Model<SysJobLog> {
 	@TableField(exist = false)
 	private LocalDateTime endTime;
 
+	/**
+	 * uuid
+	 */
+	private String uuid;
+
+	/**
+	 * 是否有统计内容
+	 */
+	@TableField(exist = false)
+	private Boolean empty;
 }

+ 16 - 5
hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/task/SpringBeanTaskDemo.java

@@ -141,7 +141,9 @@ public class SpringBeanTaskDemo {
 			return HnqzQuartzEnum.JOB_LOG_STATUS_FAIL.getType();
 		}
 
-		int period = Integer.parseInt(para.trim());
+		List<String> params = StrUtil.split(para, StrUtil.COMMA);
+		int period = Integer.parseInt(params.get(0).trim());
+		String uuid = params.get(params.size() - 1);
 
 		if (period < 2) {
 			log.error("参数错误");
@@ -168,6 +170,7 @@ public class SpringBeanTaskDemo {
 
 			result.forEach(e -> {
 				e.setPeriod(period);
+				e.setUuid(uuid);
 				singleMemberSettleSameAmountInSeveralMonthsMapper.insert(e);
 			});
 		}
@@ -196,13 +199,14 @@ public class SpringBeanTaskDemo {
 
 		List<String> params = StrUtil.split(para.trim(), StrUtil.COMMA);
 
-		if (params.size() != 2) {
+		if (params.size() != 3) {
 			log.error("参数错误");
 			return HnqzQuartzEnum.JOB_LOG_STATUS_FAIL.getType();
 		}
 
 		int period = Integer.parseInt(params.get(0));
 		BigDecimal limit = new BigDecimal(params.get(1));
+		String uuid = params.get(params.size() - 1);
 
 		if (period < 1 || limit.doubleValue() < 0.01) {
 			log.error("参数错误");
@@ -233,6 +237,7 @@ public class SpringBeanTaskDemo {
 				singleMemberSettleAmountOverrunInSeveralMonths.setPeriod(period);
 				singleMemberSettleAmountOverrunInSeveralMonths.setPlatformLimit(limit);
 				singleMemberSettleAmountOverrunInSeveralMonths.setCreateTime(LocalDateTime.now());
+				singleMemberSettleAmountOverrunInSeveralMonths.setUuid(uuid);
 				singleMemberSettleAmountOverrunInSeveralMonthsMapper.insert(singleMemberSettleAmountOverrunInSeveralMonths);
 			});
 		}
@@ -257,13 +262,17 @@ public class SpringBeanTaskDemo {
 			return HnqzQuartzEnum.JOB_LOG_STATUS_FAIL.getType();
 		}
 
-		int memberCount = Integer.parseInt(para.trim());
+		List<String> params = StrUtil.split(para, StrUtil.COMMA);
+
+		int memberCount = Integer.parseInt(params.get(0).trim());
 
 		if (memberCount <= 1) {
 			log.error("参数错误");
 			return HnqzQuartzEnum.JOB_LOG_STATUS_FAIL.getType();
 		}
 
+		String uuid = params.get(params.size() - 1);
+
 		// 计算查询时间
 		int period = 1;
 		LocalDate now = LocalDateTime.now().toLocalDate().with(TemporalAdjusters.firstDayOfNextMonth());
@@ -289,6 +298,7 @@ public class SpringBeanTaskDemo {
 				singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth.setPeriod(period);
 				singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth.setMemberCount(memberCount);
 				singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth.setCreateTime(LocalDateTime.now());
+				singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth.setUuid(uuid);
 				singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonthMapper.insert(singleEnterpriseSettleSameAmountForSeveralMembersInCurrentMonth);
 			});
 		}
@@ -331,8 +341,8 @@ public class SpringBeanTaskDemo {
 			return HnqzQuartzEnum.JOB_LOG_STATUS_FAIL.getType();
 		}
 
-		List<String> typeList = params.subList(1, params.size());
-
+		List<String> typeList = params.subList(1, params.size() - 1);
+		String uuid = params.get(params.size() - 1);
 		// 计算查询时间
 		LocalDate now = LocalDateTime.now().toLocalDate().with(TemporalAdjusters.firstDayOfNextMonth());
 		LocalDateTime startTime = LocalDateTime.of(now.minusMonths(period), LocalTime.MIN);
@@ -365,6 +375,7 @@ public class SpringBeanTaskDemo {
 				singleMemberWithoutSuchTaskTypesInSeveralMonths.setPeriod(period);
 				singleMemberWithoutSuchTaskTypesInSeveralMonths.setTypeList(types);
 				singleMemberWithoutSuchTaskTypesInSeveralMonths.setCreateTime(LocalDateTime.now());
+				singleMemberWithoutSuchTaskTypesInSeveralMonths.setUuid(uuid);
 				singleMemberWithoutSuchTaskTypesInSeveralMonthsMapper.insert(singleMemberWithoutSuchTaskTypesInSeveralMonths);
 			});
 		}

+ 6 - 1
hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/util/SpringBeanTaskInvok.java

@@ -49,7 +49,12 @@ public class SpringBeanTaskInvok implements ITaskInvok {
 			if (StrUtil.isNotEmpty(sysJob.getMethodParamsValue())) {
 				method = target.getClass().getDeclaredMethod(sysJob.getMethodName(), String.class);
 				ReflectionUtils.makeAccessible(method);
-				returnValue = method.invoke(target, sysJob.getMethodParamsValue());
+				int jobId = sysJob.getJobId();
+				String params = sysJob.getMethodParamsValue();
+				if (jobId ==  27 || jobId == 28 || jobId == 29 || jobId == 30){
+					params = params+ "," +sysJob.getUuid();
+				}
+				returnValue = method.invoke(target, params);
 			}
 			else {
 				method = target.getClass().getDeclaredMethod(sysJob.getMethodName());

+ 6 - 0
hnqz-visual/hnqz-daemon-quartz/src/main/java/com/qunzhixinxi/hnqz/daemon/quartz/util/TaskInvokUtil.java

@@ -17,6 +17,7 @@
 
 package com.qunzhixinxi.hnqz.daemon.quartz.util;
 
+import cn.hutool.core.util.IdUtil;
 import cn.hutool.core.util.StrUtil;
 import com.qunzhixinxi.hnqz.common.data.tenant.TenantBroker;
 import com.qunzhixinxi.hnqz.daemon.quartz.constants.HnqzQuartzEnum;
@@ -60,11 +61,14 @@ public class TaskInvokUtil {
 		long endTime;
 		// 获取执行开始时间
 		startTime = System.currentTimeMillis();
+		// 日志uuid
+		String uuid = IdUtil.fastSimpleUUID();
 		// 更新定时任务表内的状态、执行时间、上次执行时间、下次执行时间等信息
 		SysJob updateSysjob = new SysJob();
 		updateSysjob.setJobId(sysJob.getJobId());
 		// 日志
 		SysJobLog sysJobLog = new SysJobLog();
+		sysJobLog.setUuid(uuid);
 		sysJobLog.setJobId(sysJob.getJobId());
 		sysJobLog.setJobName(sysJob.getJobName());
 		sysJobLog.setJobGroup(sysJob.getJobGroup());
@@ -79,6 +83,8 @@ public class TaskInvokUtil {
 		try {
 			// 执行任务
 			ITaskInvok iTaskInvok = TaskInvokFactory.getInvoker(sysJob.getJobType());
+			// 设置uuid
+			sysJob.setUuid(uuid);
 			// 确保租户上下文有值,使得当前线程中的多租户特性生效。
 			TenantBroker.runAs(sysJob.getTenantId(), tenantId -> iTaskInvok.invokMethod(sysJob));
 			;

+ 1 - 0
hnqz-visual/hnqz-daemon-quartz/src/main/resources/mapper/SysJobLogMapper.xml

@@ -19,5 +19,6 @@
 		<result property="exceptionInfo" column="exception_info"/>
 		<result property="createTime" column="create_time"/>
 		<result property="tenantId" column="tenant_id"/>
+		<result property="uuid" column="uuid"/>
 	</resultMap>
 </mapper>

+ 1 - 0
hnqz-visual/hnqz-daemon-quartz/src/main/resources/mapper/SysJobMapper.xml

@@ -25,5 +25,6 @@
 		<result property="nextTime" column="next_time"/>
 		<result property="tenantId" column="tenant_id"/>
 		<result property="remark" column="remark"/>
+		<result property="uuid" column="uuid"/>
 	</resultMap>
 </mapper>