|
@@ -230,6 +230,7 @@ public class WxController extends ApiBaseController {
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
private String getOrderFormat(String order, String customerName){
|
|
|
String templeDetail = configService.selectConfigByKey("wx.notification.order.detail");
|
|
|
|
|
@@ -604,4 +605,60 @@ public class WxController extends ApiBaseController {
|
|
|
return AjaxResult.success().putKV("sysUser",user).putKV("callbackUrl", callbackUrl);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "用户取消自提预约通知",
|
|
|
+ notes = "" )
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "params" , paramType = "body")
|
|
|
+ })
|
|
|
+ @PostMapping("sendUserSelfCancelOrderMessage")
|
|
|
+ public Object sendUserSelfCancelOrderMessage() {
|
|
|
+
|
|
|
+ ParameterObject obj = getParameterObject();
|
|
|
+ obj.checkParameterNotNull("chain,order,day");
|
|
|
+ String chain = obj.getString("chain");
|
|
|
+ String order = obj.getString("order");
|
|
|
+ String day = obj.getString("day");
|
|
|
+ String temple = configService.selectConfigByKey("wx.notification.selfOrder.userCancel");
|
|
|
+ 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, "2000");
|
|
|
+ }
|
|
|
+ return AjaxResult.success();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "系统取消自提预约通知",
|
|
|
+ notes = "" )
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "params" , paramType = "body")
|
|
|
+ })
|
|
|
+ @PostMapping("sendSystemSelfCancelOrderMessage")
|
|
|
+ public Object sendSystemSelfCancelOrderMessage() {
|
|
|
+
|
|
|
+ ParameterObject obj = getParameterObject();
|
|
|
+ obj.checkParameterNotNull("chain,order,day");
|
|
|
+ String chain = obj.getString("chain");
|
|
|
+ String order = obj.getString("order");
|
|
|
+ String day = obj.getString("day");
|
|
|
+ String temple = configService.selectConfigByKey("wx.notification.selfOrder.systemCancel");
|
|
|
+ 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, "2000");
|
|
|
+ }
|
|
|
+ return AjaxResult.success();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|