瀏覽代碼

审批消息推送

kaick 2 年之前
父節點
當前提交
bdd4266d80

+ 2 - 0
src/main/java/com/caimei/modules/archive/service/CmProductArchiveContentService.java

@@ -153,6 +153,7 @@ public class CmProductArchiveContentService extends CrudService<CmProductArchive
 		String contentType = OssArchiveUtil.getContentType(fileAllName);
 		try {
 			//保存本地
+			logger.info("开始>>>" );
 			File file = OssArchiveUtil.ossUpload(multipartFile);
 			logger.info("默认路径>>>" + file.getAbsolutePath());
 			String contentDispositon = "pdf".equals(fileType) ? "inline" : "attachment";
@@ -187,6 +188,7 @@ public class CmProductArchiveContentService extends CrudService<CmProductArchive
         }
         return map;
 
+
     }
 
 

+ 9 - 5
src/main/java/com/caimei/modules/baike/service/CmBaikeProductService.java

@@ -284,20 +284,24 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
         StringBuilder map = new StringBuilder("{ \"code\": \"WEB_INSIDE_MESSAGE\"," +
                 "\"mqInfo\": {\"topic\": \"MessageLine\",\"delay\": 3,\"async\":0}," +
                 "\"info\": ");
-        map.append("{ \"content\": \"" + model.info().content() +
-                "\",\"shopId\": " + model.info().shopId() +
+        map.append("{ \"content\": \"" + model.info().content() + "\"" +
+                ",\"shopMessType\":" + model.info().shopMessType() +
                 ",\"userType\":" + model.info().userType() +
                 ",\"messageType\":" + model.info().messageType());
-        if (null != model.info().shopMessType()) {
-            map.append(",\"shopMessType\":" + model.info().shopMessType());
+        if (6 == model.info().shopMessType()) {
+            map.append(",\"shopId\": " + model.info().shopId());
         } else {
             map.append(",\"reasonContent\":\"" + model.info().reasonContent() + "\"");
         }
         map.append("}}");
         try {
-            System.out.println(RequestUtil.httpPost(Global.getConfig("caimei.core")+"/tools/message/send", String.valueOf(map)));
+            String post = RequestUtil.httpPost(Global.getConfig("caimei.core") + "/tools/message/send", String.valueOf(map));
+            if (null==post){
+                throw new Exception();
+            }
         } catch (Exception e) {
             e.printStackTrace();
+            logger.error("审批消息推送失败>>>"+e);
         }
     }
 

+ 9 - 5
src/main/java/com/caimei/modules/info/service/InfoService.java

@@ -231,20 +231,24 @@ public class InfoService extends CrudService<InfoDao, Info> {
         StringBuilder map = new StringBuilder("{ \"code\": \"WEB_INSIDE_MESSAGE\"," +
                 "\"mqInfo\": {\"topic\": \"MessageLine\",\"delay\": 3,\"async\":0}," +
                 "\"info\": ");
-        map.append("{ \"content\": \"" + model.info().content() +
-                "\",\"shopId\": " + model.info().shopId() +
+        map.append("{ \"content\": \"" + model.info().content() + "\"" +
+                ",\"shopMessType\":" + model.info().shopMessType() +
                 ",\"userType\":" + model.info().userType() +
                 ",\"messageType\":" + model.info().messageType());
-        if (null != model.info().shopMessType()) {
-            map.append(",\"shopMessType\":" + model.info().shopMessType());
+        if (8 == model.info().shopMessType()) {
+            map.append(",\"shopId\": " + model.info().shopId());
         } else {
             map.append(",\"reasonContent\":\"" + model.info().reasonContent() + "\"");
         }
         map.append("}}");
         try {
-            System.out.println(RequestUtil.httpPost(Global.getConfig("caimei.core")+"/tools/message/send", String.valueOf(map)));
+            String post = RequestUtil.httpPost(Global.getConfig("caimei.core") + "/tools/message/send", String.valueOf(map));
+            if (null==post){
+                throw new Exception();
+            }
         } catch (Exception e) {
             e.printStackTrace();
+            logger.error("审批消息推送失败>>>"+e);
         }
     }
 

+ 6 - 6
src/main/resources/config/dev/caimei.properties

@@ -12,14 +12,14 @@
 #mysql database setting
 jdbc.type=mysql
 jdbc.driver=com.mysql.cj.jdbc.Driver
-#jdbc.url=jdbc:mysql://120.79.25.27:3306/caimei?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-#jdbc.username=developer
-#jdbc.password=J5p3tgOVazNl4ydf
+jdbc.url=jdbc:mysql://120.79.25.27:3306/caimei?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+jdbc.username=developer
+jdbc.password=J5p3tgOVazNl4ydf
 
 
-jdbc.url=jdbc:mysql://192.168.2.100:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
-jdbc.username=developer
-jdbc.password=05bZ/OxTB:X+yd%1
+#jdbc.url=jdbc:mysql://192.168.2.100:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
+#jdbc.username=developer
+#jdbc.password=05bZ/OxTB:X+yd%1
 
 #jdbc.url=jdbc:mysql://119.29.0.46:3306/caimei?useUnicode=true&characterEncoding=utf-8
 #jdbc.username=root

+ 10 - 10
src/main/resources/config/prod/caimei.properties

@@ -148,43 +148,43 @@ user.mails=2088892826@qq.com,512431995@qq.com
 #\u7528\u6237\u5546\u54C1\u4EF7\u683C\u8FC7\u5C0F\u90AE\u4EF6\u63D0\u793A
 #user.mails=2088892826@qq.com,512431995@qq.com
 
-#易宝分账
+#\u6613\u5B9D\u5206\u8D26
 yeepay.appkey=BM12345678902069
 yeepay.secretKey=OH6huQqihk0ZfGzWgR1WcQ==
 yeepay.secretRoot=https://openapi.yeepay.com/yop-center
 yeepay.divideCallback=http://admin.caimei365.com/a/order/newShouldPay/divideCallback
 yeepay.mails=jun.li@caimei365.com,718478952@qq.com,472492267@qq.com
 
-#微信公众号功信息
+#\u5FAE\u4FE1\u516C\u4F17\u53F7\u529F\u4FE1\u606F
 appId=wx91c4152b60ca91a3
 appSecret=a563dd2c07c9c815a4e697c8b6cb73dc
 token=caimei
 encryptMessage=false
 encodingAesKey=wJWhhXuWAByeBPA8NicwFGraVhjKqWBUm94sOKN3s66
-#微信获取文章配置
+#\u5FAE\u4FE1\u83B7\u53D6\u6587\u7AE0\u914D\u7F6E
 wx.getToken=https\://api.weixin.qq.com/cgi-bin/token
 wx.getMaterial=https\://api.weixin.qq.com/cgi-bin/material/batchget_material
 wx.getMaterialCount=https\://api.weixin.qq.com/cgi-bin/material/get_materialcount
 
-#运费商品默认ID
+#\u8FD0\u8D39\u5546\u54C1\u9ED8\u8BA4ID
 freightProductID=999
 
 cm.config=product
-#线上直接读取服务器位置文件
+#\u7EBF\u4E0A\u76F4\u63A5\u8BFB\u53D6\u670D\u52A1\u5668\u4F4D\u7F6E\u6587\u4EF6
 export.template=/mnt/newdatadrive/data/custom/manager-export-template
 
-# SPI-server(CKEditor5图片上传API,搜索更新索引)
+# SPI-server\uFF08CKEditor5\u56FE\u7247\u4E0A\u4F20API\uFF0C\u641C\u7D22\u66F4\u65B0\u7D22\u5F15\uFF09
 caimei.spi=https://spi.caimei365.com
 caimei.core=https://core.caimei365.com
 caimei.manager=https://manager.caimei365.com
 
-#阿里云oss存储
+#\u963F\u91CC\u4E91oss\u5B58\u50A8
 aliyun.accessKeyId=LTAI4GBL3o4YkWnbKYgf2Xia
 aliyun.accessKeySecret=dBjAXqbYiEPP6Ukuk2ZsXQeET7FVkK
 aliyun.bucketName=caimei-oss
 aliyun.endpoint=https://oss-cn-shenzhen.aliyuncs.com
 
-#商品资料库文件临时路径
-archive.tempPath=/mnt/newdatadrive/data/runtime/tomcat-instance/manager/tempFile/
-#ffmpeg路径
+#\u5546\u54C1\u8D44\u6599\u5E93\u6587\u4EF6\u4E34\u65F6\u8DEF\u5F84
+  archive.tempPath=/mnt/newdatadrive/data/runtime/tomcat-instance/manager/tempFile/
+#ffmpeg\u8DEF\u5F84
 ffmpeg.path=/mnt/newdatadrive/apps/ffmpeg/ffmpeg-master/bin/ffmpeg