|
@@ -6,6 +6,7 @@ import com.iotechn.unimall.admin.config.SendWxMsg;
|
|
import com.iotechn.unimall.admin.config.WebSocket;
|
|
import com.iotechn.unimall.admin.config.WebSocket;
|
|
import com.iotechn.unimall.admin.utils.DateUtils;
|
|
import com.iotechn.unimall.admin.utils.DateUtils;
|
|
import com.iotechn.unimall.biz.service.user.UserBizService;
|
|
import com.iotechn.unimall.biz.service.user.UserBizService;
|
|
|
|
+import com.iotechn.unimall.biz.utils.GeTuiUtils;
|
|
import com.iotechn.unimall.biz.utils.SendUtils;
|
|
import com.iotechn.unimall.biz.utils.SendUtils;
|
|
import com.iotechn.unimall.core.exception.AdminServiceException;
|
|
import com.iotechn.unimall.core.exception.AdminServiceException;
|
|
import com.iotechn.unimall.core.exception.AppServiceException;
|
|
import com.iotechn.unimall.core.exception.AppServiceException;
|
|
@@ -40,6 +41,8 @@ public class TradeServiceImpl implements TradeService {
|
|
@Autowired
|
|
@Autowired
|
|
private SendUtils sendUtils;
|
|
private SendUtils sendUtils;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private GeTuiUtils geTuiUtils;
|
|
|
|
+ @Autowired
|
|
private TradeMapper tradeMapper;
|
|
private TradeMapper tradeMapper;
|
|
@Autowired
|
|
@Autowired
|
|
private SaleReportMapper saleReportMapper;
|
|
private SaleReportMapper saleReportMapper;
|
|
@@ -333,7 +336,7 @@ public class TradeServiceImpl implements TradeService {
|
|
}
|
|
}
|
|
if (tradeDO.getType() == 1) {
|
|
if (tradeDO.getType() == 1) {
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
- map.put("header", "你的合同" + tradeDO.getTradeContractNo() + "已通过审核,请及时发货");
|
|
|
|
|
|
+ map.put("header", "您的合同:" + tradeDO.getTradeContractNo() + "已通过审核,请及时发货");
|
|
map.put("userName", tradeDO.getSeller());
|
|
map.put("userName", tradeDO.getSeller());
|
|
map.put("value", "已通过");
|
|
map.put("value", "已通过");
|
|
map.put("valueOne", DateUtils.formatDate(new Date(), DateUtils.DATE_FMT_YYYYMMDDHH_MM_SS));
|
|
map.put("valueOne", DateUtils.formatDate(new Date(), DateUtils.DATE_FMT_YYYYMMDDHH_MM_SS));
|
|
@@ -342,6 +345,8 @@ public class TradeServiceImpl implements TradeService {
|
|
map.put("userId", tradeDO.getUserId());
|
|
map.put("userId", tradeDO.getUserId());
|
|
map.put("remark", "点击进入小程序进行发车作业");
|
|
map.put("remark", "点击进入小程序进行发车作业");
|
|
sendUtils.sendMessageForDeliver(map);
|
|
sendUtils.sendMessageForDeliver(map);
|
|
|
|
+
|
|
|
|
+ geTuiUtils.pushByCid("发货提醒","您的合同:" + tradeDO.getTradeContractNo() + "已通过审核,请及时发货",tradeDO.getUserId());
|
|
} else {
|
|
} else {
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
map.put("header", "交易审核信息");
|
|
map.put("header", "交易审核信息");
|
|
@@ -352,6 +357,7 @@ public class TradeServiceImpl implements TradeService {
|
|
map.put("templateId", "8t4RKKFczLf16eeaaZK489u7BNuQXKwXEC6kQAN4xDU");
|
|
map.put("templateId", "8t4RKKFczLf16eeaaZK489u7BNuQXKwXEC6kQAN4xDU");
|
|
map.put("userId", tradeDO.getUserId());
|
|
map.put("userId", tradeDO.getUserId());
|
|
sendUtils.sendMessage(map);
|
|
sendUtils.sendMessage(map);
|
|
|
|
+ geTuiUtils.pushByCid("审核通过","您申请的交易已审核通过",tradeDO.getUserId());
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
throw new AppServiceException(ExceptionDefinition.APP_UNKNOWN_EXCEPTION);
|
|
throw new AppServiceException(ExceptionDefinition.APP_UNKNOWN_EXCEPTION);
|
|
@@ -443,6 +449,7 @@ public class TradeServiceImpl implements TradeService {
|
|
map.put("userId", tradeDO.getUserId());
|
|
map.put("userId", tradeDO.getUserId());
|
|
map.put("remark", "点击进入小程序进行查看");
|
|
map.put("remark", "点击进入小程序进行查看");
|
|
sendUtils.sendMessageForNotice(map);
|
|
sendUtils.sendMessageForNotice(map);
|
|
|
|
+ geTuiUtils.pushByCid("成交通知","您申请的销售交易已经成交",tradeDO.getUserId());
|
|
} else {
|
|
} else {
|
|
// SendWxMsg.sendSubscribeMessageTZ(tradeDO.getOrderNo(),tradeDO.getBuyer(),"交易成交信息",userDO,userBizService.getWxMiniAccessToken());
|
|
// SendWxMsg.sendSubscribeMessageTZ(tradeDO.getOrderNo(),tradeDO.getBuyer(),"交易成交信息",userDO,userBizService.getWxMiniAccessToken());
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
@@ -456,6 +463,7 @@ public class TradeServiceImpl implements TradeService {
|
|
map.put("userId", tradeDO.getUserId());
|
|
map.put("userId", tradeDO.getUserId());
|
|
map.put("remark", "点击进入小程序进行查看");
|
|
map.put("remark", "点击进入小程序进行查看");
|
|
sendUtils.sendMessageForNotice(map);
|
|
sendUtils.sendMessageForNotice(map);
|
|
|
|
+ geTuiUtils.pushByCid("成交通知","您申请的采购交易已经成交",tradeDO.getUserId());
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -569,6 +577,7 @@ public class TradeServiceImpl implements TradeService {
|
|
map.put("userId", tradeDO.getUserId());
|
|
map.put("userId", tradeDO.getUserId());
|
|
map.put("remark", "平仓数量:"+flatTotal+"请到小程序查看");
|
|
map.put("remark", "平仓数量:"+flatTotal+"请到小程序查看");
|
|
sendUtils.sendMessageForNotice(map);
|
|
sendUtils.sendMessageForNotice(map);
|
|
|
|
+ geTuiUtils.pushByCid("平仓通知","您的合同:" + tradeDO.getTradeContractNo() + " 平仓成功,累计平仓数量:"+flatTotal+"吨",tradeDO.getUserId());
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
Wrapper wrapper1 = new EntityWrapper();
|
|
Wrapper wrapper1 = new EntityWrapper();
|
|
@@ -613,6 +622,7 @@ public class TradeServiceImpl implements TradeService {
|
|
map.put("userId", tradeDO.getUserId());
|
|
map.put("userId", tradeDO.getUserId());
|
|
map.put("remark", "平仓数量:"+flatTotal+"请到小程序查看");
|
|
map.put("remark", "平仓数量:"+flatTotal+"请到小程序查看");
|
|
sendUtils.sendMessageForNotice(map);
|
|
sendUtils.sendMessageForNotice(map);
|
|
|
|
+ geTuiUtils.pushByCid("平仓通知","您的合同:" + tradeDO.getTradeContractNo() + " 平仓成功,累计平仓数量:"+flatTotal+"吨",tradeDO.getUserId());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|