Browse Source

Merge remote-tracking branch 'origin/master'

zouxuan 4 years ago
parent
commit
5e00a4afe8

+ 7 - 7
mec-web/src/main/java/com/ym/mec/web/controller/ReplacementInstrumentActivityController.java

@@ -2,16 +2,14 @@ package com.ym.mec.web.controller;
 
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dao.EmployeeDao;
-import com.ym.mec.biz.dal.dao.ReplacementInstrumentActivityDao;
-import com.ym.mec.biz.dal.dao.ReplacementInstrumentDao;
-import com.ym.mec.biz.dal.dao.SysConfigDao;
+import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.ReplacementInstrumentActivityStatDto;
 import com.ym.mec.biz.dal.dto.StudentInstrumentExportDto;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.MessageTypeEnum;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.page.ReplacementInstrumentActivityQueryInfo;
+import com.ym.mec.biz.service.GoodsService;
 import com.ym.mec.biz.service.ReplacementInstrumentActivityService;
 import com.ym.mec.biz.service.ReplacementInstrumentCooperationService;
 import com.ym.mec.biz.service.SysMessageService;
@@ -60,6 +58,8 @@ public class ReplacementInstrumentActivityController extends BaseController {
     private SysConfigDao sysConfigDao;
     @Autowired
     private SysMessageService sysMessageService;
+    @Autowired
+    private GoodsService goodsService;
 
     @ApiOperation(value = "分页查询列表")
     @GetMapping("/queryPage")
@@ -107,7 +107,7 @@ public class ReplacementInstrumentActivityController extends BaseController {
 
         ReplacementInstrumentCooperation byCooperationId = replacementInstrumentCooperationService.get(oldReplacementInstrumentActivity.getReplacementInstrumentCooperationId());
         if (byCooperationId.getOpenPay().equals(YesOrNoEnum.YES) && oldReplacementInstrumentActivity.getInstrumentsId() == null && replacementInstrumentActivity.getInstrumentsId() != null) {
-            ReplacementInstrument replacementInstrument = replacementInstrumentDao.get(replacementInstrumentActivity.getInstrumentsId());
+            Goods goods = goodsService.get(replacementInstrumentActivity.getInstrumentsId());
             Map<Integer, String> userMap = new HashMap<>();
             Map<Integer, String> userPhoneMap = new HashMap<>();
             Integer userId = oldReplacementInstrumentActivity.getUserId();
@@ -115,11 +115,11 @@ public class ReplacementInstrumentActivityController extends BaseController {
             String pushUrl = baseApiUrl + "/#/questionGoodsSale?id=";
             userMap.put(userId, userId.toString());
             sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.REPLACEMENT_PAY_PUSH,
-                    userMap, null, 0, "5?" + pushUrl + replacementInstrumentActivity.getId(), "STUDENT", replacementInstrument.getBrand(), "");
+                    userMap, null, 0, "5?" + pushUrl + replacementInstrumentActivity.getId(), "STUDENT", goods.getBrand(), "");
 
             userPhoneMap.put(userId, oldReplacementInstrumentActivity.getMobileNo());
             sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, MessageTypeEnum.REPLACEMENT_PAY_PUSH,
-                    userPhoneMap, null, 0, null, "STUDENT", replacementInstrument.getBrand(), HttpUtil.getSortUrl(pushUrl + replacementInstrumentActivity.getId()));
+                    userPhoneMap, null, 0, null, "STUDENT", goods.getBrand(), HttpUtil.getSortUrl(pushUrl + replacementInstrumentActivity.getId()));
         }
 
         oldReplacementInstrumentActivity.setSubjectId(replacementInstrumentActivity.getSubjectId());