From d6a6513dd8ff55449844264b24a3051c683febb7 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 22 一月 2024 10:03:34 +0800
Subject: [PATCH] 开发业务接口

---
 server/service/src/main/java/com/doumee/dao/business/model/ApplyLog.java                     |   17 ++++++++++++++++-
 server/service/src/main/java/com/doumee/core/utils/Constants.java                            |    2 +-
 server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java |    8 +++++++-
 3 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/server/service/src/main/java/com/doumee/core/utils/Constants.java b/server/service/src/main/java/com/doumee/core/utils/Constants.java
index 820e961..c11fbce 100644
--- a/server/service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -610,7 +610,7 @@
 
     public  enum ApplyLogType {
         UPLOAD(0, "鎻愪氦鎶曚繚","鎻愪氦鎰忚锛�${param}"),
-        PLATFORM_RETURN(1, "鐢宠閫�鍥�","鎻愪氦鎰忚锛�${param}"),
+        PLATFORM_RETURN(1, "瀹℃牳涓嶉�氳繃","鎻愪氦鎰忚锛�${param}"),
         WAIT_SIGNATURE(2, "涓婁紶鎶曚繚鍗�","鎻愪氦鎰忚锛�${param}"),
         SIGNATURE(3, "浼佷笟绛剧珷",""),
         FAIL_RETURN(4, "淇濆崟鍑哄叿澶辫触閫�鍥�","鎻愪氦鎰忚锛�${param}"),
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/ApplyLog.java b/server/service/src/main/java/com/doumee/dao/business/model/ApplyLog.java
index 48b027a..745881f 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/ApplyLog.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/ApplyLog.java
@@ -20,6 +20,21 @@
 @ApiModel("鎶曚繚鐢宠鎿嶄綔鍘嗗彶琛�")
 @TableName("`apply_log`")
 public class ApplyLog {
+    public ApplyLog(){
+
+    }
+    public ApplyLog(InsuranceApply apply,String title,String content,Integer objId,Integer objType, String before,String after){
+        this.title =title;
+        this.content=content;
+        this.applyId = apply.getId();
+        this.createDate =apply.getEditDate();
+        this.editor =apply.getEditor();
+        this.status = apply.getStatus();
+        this.objId=objId;
+        this.objType = objType;
+        this.beforeContent=before;
+        this.afterContent=after;
+    }
 
     @TableId(type = IdType.AUTO)
     @ApiModelProperty(value = "涓婚敭", example = "1")
@@ -70,7 +85,7 @@
 
     @ApiModelProperty(value = "鍏宠仈瀵硅薄缂栫爜")
     @ExcelColumn(name="鍏宠仈瀵硅薄缂栫爜")
-    private String objId;
+    private Integer objId;
 
     @ApiModelProperty(value = "鎿嶄綔鍓嶅唴瀹�")
     @ExcelColumn(name="鎿嶄綔鍓嶅唴瀹�")
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
index fd91573..115644b 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -91,9 +91,15 @@
         update.setId(model.getId());
         insuranceApplyMapper.updateById(update);
 
+        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.PLATFORM_RETURN;
+        String info =applyLogType.getInfo();
+        info = info.replace("${param}", update.getCheckInfo());
+        ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(),null,null);
+        applyLogMapper.insert(log);
         return  null;
 
     }
+
     @Override
     @Transactional(rollbackFor = {Exception.class,BusinessException.class})
     public Integer uploadBaoxiandan(InsuranceApply insuranceApply) {
@@ -223,7 +229,7 @@
         applyLog.setTitle(insuranceApplyStatus.getName());
         applyLog.setContent(content);
         applyLog.setObjType(insuranceApplyStatus.getKey());
-        applyLog.setObjId(Integer.toString(insuranceApply.getId()));
+        applyLog.setObjId( insuranceApply.getId());
         applyLog.setStatus(insuranceApply.getStatus());
         applyLogMapper.insert(applyLog);
     }

--
Gitblit v1.9.3