Explorar el Código

系统取消要货通知

njs hace 8 meses
padre
commit
6a100549c4

+ 36 - 0
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/WxController.java

@@ -661,4 +661,40 @@ public class WxController extends ApiBaseController {
 
     }
 
+    @ApiOperation(value = "系统取消要货通知",
+            notes = "" )
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params" , paramType = "body")
+    })
+    @PostMapping("sendSystemSelfDeliveryMessage")
+    public Object sendSystemSelfDeliveryMessage() {
+
+        ParameterObject obj = getParameterObject();
+        obj.checkParameterNotNull("chain,order,day");
+        String chain = obj.getString("chain");
+        String order = obj.getString("order");
+        String day = obj.getString("day");
+        String sendType = obj.getString("messageType");
+        String temple="";
+        if("0".equals(sendType)){
+             temple = configService.selectConfigByKey("wx.notification.selfDelivery.systemMessage");
+        }else if("1".equals(sendType)){
+            temple = configService.selectConfigByKey("wx.notification.selfDelivery.sendMessage");
+        }
+        String message = String.format(temple, order,day);
+        //发给经销商
+        Set<String> customerCodes = new HashSet<>();
+        customerCodes.add(chain);
+        logger.info("收到需要通知的经销商组织代码:"+chain);
+        Map<String,Map<String,Object>> maps = sysUserService.selectLoginNamesByCostumerCode(customerCodes);
+        //消息
+        if(customerCodes.size()>0){
+            qyWxSendMessageUtil.sendMsgToCustomer(customerCodes,maps,message, "2002");
+        }
+        return AjaxResult.success();
+
+    }
+
+
+
 }