|
|
@@ -16,8 +16,10 @@ import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
|
import com.ym.mec.biz.dal.page.RepairStudentQueryInfo;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.dto.BrandDto;
|
|
|
+import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.common.page.PageInfo;
|
|
|
import com.ym.mec.common.page.QueryInfo;
|
|
|
@@ -31,13 +33,14 @@ import org.apache.commons.lang.math.NumberUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.util.*;
|
|
|
@@ -46,58 +49,59 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.ym.mec.biz.dal.enums.CouponDetailTypeEnum.ACCESSORIES;
|
|
|
import static com.ym.mec.biz.dal.enums.CouponDetailTypeEnum.MUSICAL;
|
|
|
-import static com.ym.mec.biz.dal.enums.DealStatusEnum.*;
|
|
|
+import static com.ym.mec.biz.dal.enums.DealStatusEnum.ING;
|
|
|
+import static com.ym.mec.biz.dal.enums.DealStatusEnum.SUCCESS;
|
|
|
|
|
|
@Service
|
|
|
public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRepair> implements StudentRepairService {
|
|
|
private static final Logger log = LoggerFactory.getLogger(StudentRepairServiceImpl.class);
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private StudentRepairDao studentRepairDao;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private PayService payService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private IdGeneratorService idGeneratorService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private SysConfigDao sysConfigDao;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private StudentPaymentOrderService studentPaymentOrderService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private StudentPaymentOrderDetailService studentPaymentOrderDetailService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private MusicGroupDao musicGroupDao;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private SysUserCashAccountService sysUserCashAccountService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private SysUserCashAccountDetailService sysUserCashAccountDetailService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private SysMessageService sysMessageService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private StudentService studentService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private StudentPaymentRouteOrderService studentPaymentRouteOrderService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private SellOrderService sellOrderService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private StudentGoodsSellDao studentGoodsSellDao;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private StudentPaymentOrderAddressService studentPaymentOrderAddressService;
|
|
|
|
|
|
@Lazy
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private ContractService contractService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private GoodsService goodsService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private StudentInstrumentService studentInstrumentService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private StudentGoodsSellService studentGoodsSellService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private SysCouponCodeService sysCouponCodeService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private TeacherService teacherService;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private MallFeignService mallFeignService;
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
@@ -157,7 +161,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
|
- public Map addGoodsSellOrder(StudentGoodsSell studentGoodsSell) throws Exception {
|
|
|
+ public HttpResponseResult addGoodsSellOrder(StudentGoodsSell studentGoodsSell) throws Exception {
|
|
|
//关闭老订单
|
|
|
StudentPaymentOrderAddress studentPaymentOrderAddress = null;
|
|
|
if (StringUtils.isNotBlank(studentGoodsSell.getAddress())) {
|
|
|
@@ -169,7 +173,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
|
|
|
if (StringUtils.isNotEmpty(studentGoodsSell.getOrderNo())) {
|
|
|
StudentPaymentOrder orderByOrderNo = studentPaymentOrderService.findOrderByOrderNo(studentGoodsSell.getOrderNo());
|
|
|
- if (orderByOrderNo.getBalancePaymentAmount() != null && orderByOrderNo.getBalancePaymentAmount().longValue() != 0l) {
|
|
|
+ if (orderByOrderNo.getBalancePaymentAmount() != null && orderByOrderNo.getBalancePaymentAmount().longValue() != 0L) {
|
|
|
studentGoodsSell.setIsUseBalancePayment(true);
|
|
|
} else {
|
|
|
studentGoodsSell.setIsUseBalancePayment(false);
|
|
|
@@ -178,15 +182,19 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
if (orderByOrderNo.getStatus() == SUCCESS) {
|
|
|
throw new BizException("您已支付请勿重复提交");
|
|
|
} else if (orderByOrderNo.getStatus() == ING) {
|
|
|
+ HttpResponseResult result = studentPaymentOrderService.checkRepeatPay(orderByOrderNo, true);
|
|
|
+ if (result.getCode() != 200) {
|
|
|
+ return result;
|
|
|
+ }
|
|
|
|
|
|
// 查询订单状态
|
|
|
- PayStatus payStatus = studentPaymentOrderService.queryPayStatus(orderByOrderNo);
|
|
|
+ /*PayStatus payStatus = studentPaymentOrderService.queryPayStatus(orderByOrderNo);
|
|
|
if (payStatus != PayStatus.FAILED) {
|
|
|
if (payStatus == PayStatus.SUCCESSED) {
|
|
|
throw new BizException("订单已支付成功,请勿重复支付");
|
|
|
- }/*else if(payStatus == PayStatus.PAYING){
|
|
|
+ }*//*else if(payStatus == PayStatus.PAYING){
|
|
|
throw new BizException("订单还在交易中,请稍后重试");
|
|
|
- }*/
|
|
|
+ }*//*
|
|
|
}
|
|
|
|
|
|
orderByOrderNo.setStatus(CLOSE);
|
|
|
@@ -200,7 +208,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
Date nowDate = new Date();
|
|
|
//增加商品库存
|
|
|
List<StudentPaymentOrderDetail> studentPaymentOrderDetailList = studentPaymentOrderDetailService.queryOrderDetail(orderByOrderNo.getId());
|
|
|
- String goodsIds = studentPaymentOrderDetailList.stream().filter(t -> StringUtils.isNotBlank(t.getMinuendStockGoodsIdList())).map(t -> t.getMinuendStockGoodsIdList()).collect(Collectors.joining(","));
|
|
|
+ String goodsIds = studentPaymentOrderDetailList.stream().map(StudentPaymentOrderDetail::getMinuendStockGoodsIdList).filter(StringUtils::isNotBlank).collect(Collectors.joining(","));
|
|
|
if (StringUtils.isNotBlank(goodsIds)) {
|
|
|
// GoodsProcurement goodsProcurement = null;
|
|
|
List<Goods> goodsList = goodsService.getGoodsWithLocked(goodsIds);
|
|
|
@@ -224,7 +232,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
batchUpdateGoodsMap.put(goods.getId(), goods);
|
|
|
|
|
|
// 进货清单
|
|
|
- /*goodsProcurement = goodsProcurementDao.getWithStockSurplusProcurement(goods.getId());
|
|
|
+ *//*goodsProcurement = goodsProcurementDao.getWithStockSurplusProcurement(goods.getId());
|
|
|
if (goodsProcurement != null) {
|
|
|
if (goodsProcurementMap.get(goodsProcurement.getId()) != null) {
|
|
|
goodsProcurement = goodsProcurementMap.get(goodsProcurement.getId());
|
|
|
@@ -232,18 +240,18 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
goodsProcurement.setStockSoldNum(new AtomicInteger(goodsProcurement.getStockSoldNum()).decrementAndGet());
|
|
|
goodsProcurement.setUpdateTime(nowDate);
|
|
|
goodsProcurementMap.put(goodsProcurement.getId(), goodsProcurement);
|
|
|
- }*/
|
|
|
+ }*//*
|
|
|
|
|
|
}
|
|
|
|
|
|
- /*if (goodsProcurementMap.size() > 0) {
|
|
|
+ *//*if (goodsProcurementMap.size() > 0) {
|
|
|
goodsProcurementDao.batchUpdate(new ArrayList<GoodsProcurement>(goodsProcurementMap.values()));
|
|
|
- }*/
|
|
|
+ }*//*
|
|
|
|
|
|
if (batchUpdateGoodsMap.size() > 0) {
|
|
|
goodsService.batchUpdate(new ArrayList<Goods>(batchUpdateGoodsMap.values()));
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
StudentGoodsSell byOrderNo = studentGoodsSellDao.findByOrderNo(studentGoodsSell.getOrderNo());
|
|
|
if (byOrderNo != null) {
|
|
|
@@ -326,7 +334,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
String orderNo = idGeneratorService.generatorId("payment") + "";
|
|
|
studentGoodsSell.setOrderNo(orderNo);
|
|
|
List<Integer> couponIdList = studentGoodsSell.getCouponIdList();
|
|
|
- if (couponIdList != null && couponIdList.size() > 0) {
|
|
|
+ if (CollectionUtils.isNotEmpty(couponIdList)) {
|
|
|
studentGoodsSell.setCouponIds(StringUtils.join(couponIdList, ","));
|
|
|
}
|
|
|
studentGoodsSell.setTenantId(student.getTenantId());
|
|
|
@@ -339,7 +347,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
if (studentGoodsSell.getType() == 1) {
|
|
|
Map<String, Object> repairInfoMap = new HashMap<>();
|
|
|
MapUtil.populateMap(repairInfoMap, studentGoodsSell);
|
|
|
- return repairInfoMap;
|
|
|
+ return BaseController.succeed(repairInfoMap);
|
|
|
}
|
|
|
|
|
|
studentPaymentOrder.setUserId(studentId);
|
|
|
@@ -380,7 +388,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
notifyMap.put("merOrderNo", studentPaymentOrder.getOrderNo());
|
|
|
studentPaymentOrderService.updateOrder(notifyMap);
|
|
|
notifyMap.put("orderNo", orderNo);
|
|
|
- return notifyMap;
|
|
|
+ return BaseController.failed(HttpStatus.CREATED, notifyMap,"恭喜您,购买成功!");
|
|
|
}
|
|
|
|
|
|
String baseApiUrl = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
|
@@ -399,18 +407,18 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));
|
|
|
studentPaymentOrder.setPaymentChannel((String) payMap.get("type"));
|
|
|
studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
- return payMap;
|
|
|
+ return BaseController.succeed(payMap);
|
|
|
}
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
- public Map studentPaymentGoodsOrder(Integer goodsSellId) throws Exception {
|
|
|
+ public HttpResponseResult studentPaymentGoodsOrder(Integer goodsSellId) throws Exception {
|
|
|
StudentGoodsSell studentGoodsSell = studentGoodsSellDao.get(goodsSellId);
|
|
|
Integer studentId = studentGoodsSell.getUserId();
|
|
|
studentService.getDao().lockUser(studentId);
|
|
|
List<GoodsSellDto> goodsSellDtos = JSONObject.parseArray(studentGoodsSell.getGoodsJson(), GoodsSellDto.class);
|
|
|
- List<Integer> goodsIds = goodsSellDtos.stream().map(e -> e.getGoodsId()).collect(Collectors.toList());
|
|
|
+ List<Integer> goodsIds = goodsSellDtos.stream().map(GoodsSellDto::getGoodsId).collect(Collectors.toList());
|
|
|
Map<Integer, String> integerStringMap = getMap("goods", "id_", "type_", goodsIds, studentGoodsSell.getTenantId(), Integer.class, String.class);
|
|
|
Map<Integer, BigDecimal> map = getMap("goods", "id_", "discount_price_", goodsIds, studentGoodsSell.getTenantId(), Integer.class, BigDecimal.class);
|
|
|
for (GoodsSellDto goodsSellDto : goodsSellDtos) {
|
|
|
@@ -439,7 +447,11 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
if (StringUtils.isNotEmpty(orderNo1)) {
|
|
|
studentPaymentOrder = studentPaymentOrderService.findOrderByOrderNo(orderNo1);
|
|
|
if (studentPaymentOrder != null) {
|
|
|
- if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
|
|
|
+ HttpResponseResult result = studentPaymentOrderService.checkRepeatPay(studentPaymentOrder, true);
|
|
|
+ if (result.getCode() != 200) {
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ /*if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
|
|
|
throw new BizException("该订单已支付");
|
|
|
}
|
|
|
//关闭老订单
|
|
|
@@ -453,7 +465,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
if (studentPaymentOrder.getBalancePaymentAmount() != null && studentPaymentOrder.getBalancePaymentAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
sysUserCashAccountService.updateBalance(studentPaymentOrder.getUserId(), studentPaymentOrder.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "关闭订单");
|
|
|
}
|
|
|
- sysCouponCodeService.quit(studentPaymentOrder.getCouponCodeId());
|
|
|
+ sysCouponCodeService.quit(studentPaymentOrder.getCouponCodeId());*/
|
|
|
}
|
|
|
}
|
|
|
studentGoodsSellDao.update(studentGoodsSell);
|
|
|
@@ -501,7 +513,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
notifyMap.put("merOrderNo", studentPaymentOrder.getOrderNo());
|
|
|
studentPaymentOrderService.updateOrder(notifyMap);
|
|
|
notifyMap.put("orderNo", orderNo);
|
|
|
- return notifyMap;
|
|
|
+ return BaseController.failed(HttpStatus.CREATED, notifyMap,"恭喜您,购买成功!");
|
|
|
}
|
|
|
|
|
|
String baseApiUrl = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
|
@@ -520,7 +532,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));
|
|
|
studentPaymentOrder.setPaymentChannel((String) payMap.get("type"));
|
|
|
studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
- return payMap;
|
|
|
+ return BaseController.succeed(payMap);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -566,7 +578,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
String goodsJson = repairInfo.getGoodsJson();
|
|
|
if (StringUtils.isNotEmpty(goodsJson)) {
|
|
|
repairGoodsDtos = JSONObject.parseArray(goodsJson, RepairGoodsDto.class);
|
|
|
- List<Integer> goodsIds = repairGoodsDtos.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
|
+ List<Integer> goodsIds = repairGoodsDtos.stream().map(RepairGoodsDto::getId).collect(Collectors.toList());
|
|
|
Map<Integer, BigDecimal> map = getMap("goods", "id_", "discount_price_", goodsIds, student.getTenantId(), Integer.class, BigDecimal.class);
|
|
|
repairGoodsDtos.forEach(e -> {
|
|
|
e.setGroupPurchasePrice(map.get(e.getId()));
|
|
|
@@ -593,7 +605,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
}
|
|
|
StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(couponIdList, amount, repairInfo.getType() != 1);
|
|
|
amount = studentPaymentOrder.getActualAmount();
|
|
|
- if (couponIdList != null && couponIdList.size() > 0) {
|
|
|
+ if (CollectionUtils.isNotEmpty(couponIdList)) {
|
|
|
repairInfo.setCouponIds(StringUtils.join(couponIdList, ","));
|
|
|
}
|
|
|
studentRepairDao.insert(repairInfo);
|
|
|
@@ -797,7 +809,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
StudentRepair repairInfo = studentRepairDao.getRepairInfo(id);
|
|
|
String couponIds = repairInfo.getCouponIds();
|
|
|
if (StringUtils.isNotEmpty(couponIds)) {
|
|
|
- List<Integer> collect = Arrays.stream(couponIds.split(",")).map(e -> Integer.valueOf(e)).collect(Collectors.toList());
|
|
|
+ List<Integer> collect = Arrays.stream(couponIds.split(",")).map(Integer::valueOf).collect(Collectors.toList());
|
|
|
repairInfo.setCouponCodeDtos(sysCouponCodeService.findByIdList(collect));
|
|
|
}
|
|
|
String goodsJson = repairInfo.getGoodsJson();
|
|
|
@@ -835,7 +847,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
String goodsJson = studentRepair.getGoodsJson();
|
|
|
if (StringUtils.isNotEmpty(goodsJson)) {
|
|
|
repairGoodsDtos = JSONObject.parseArray(goodsJson, RepairGoodsDto.class);
|
|
|
- BigDecimal reduce = repairGoodsDtos.stream().map(e -> e.getGroupPurchasePrice()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ BigDecimal reduce = repairGoodsDtos.stream().map(RepairGoodsDto::getGroupPurchasePrice).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
amount = amount.add(reduce);
|
|
|
}
|
|
|
amount = amount.subtract(studentRepair.getExemptionAmount());
|
|
|
@@ -952,7 +964,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (studentPaymentOrderDetailList.size() > 0) {
|
|
|
+ if (CollectionUtils.isNotEmpty(studentPaymentOrderDetailList)) {
|
|
|
studentPaymentOrderDetailService.batchAdd(studentPaymentOrderDetailList);
|
|
|
}
|
|
|
|
|
|
@@ -987,11 +999,11 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
|
|
|
String baseApiUrl = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
|
|
|
|
- Map<String, BigDecimal> classFee = new HashMap<>();
|
|
|
+ /*Map<String, BigDecimal> classFee = new HashMap<>();
|
|
|
classFee.put("course", BigDecimal.ZERO);
|
|
|
classFee.put("instrument", BigDecimal.ZERO);
|
|
|
classFee.put("accessories", BigDecimal.ZERO);
|
|
|
- classFee.put("other", amount);
|
|
|
+ classFee.put("other", amount);*/
|
|
|
|
|
|
Map payMap = payService.getPayMap(
|
|
|
amount,
|
|
|
@@ -1080,7 +1092,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
|
|
|
//增加商品库存
|
|
|
List<StudentPaymentOrderDetail> studentPaymentOrderDetailList = studentPaymentOrderDetailService.queryOrderDetail(studentPaymentOrder.getId());
|
|
|
- String goodsIds = studentPaymentOrderDetailList.stream().filter(t -> StringUtils.isNotBlank(t.getMinuendStockGoodsIdList())).map(t -> t.getMinuendStockGoodsIdList()).collect(Collectors.joining(","));
|
|
|
+ String goodsIds = studentPaymentOrderDetailList.stream().map(StudentPaymentOrderDetail::getMinuendStockGoodsIdList).filter(StringUtils::isNotBlank).collect(Collectors.joining(","));
|
|
|
if (StringUtils.isNotBlank(goodsIds)) {
|
|
|
// GoodsProcurement goodsProcurement = null;
|
|
|
List<Goods> goodsList = goodsService.getGoodsWithLocked(goodsIds);
|
|
|
@@ -1120,7 +1132,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
goodsProcurementDao.batchUpdate(new ArrayList<GoodsProcurement>(goodsProcurementMap.values()));
|
|
|
}*/
|
|
|
|
|
|
- if (batchUpdateGoodsMap.size() > 0) {
|
|
|
+ if (!batchUpdateGoodsMap.isEmpty()) {
|
|
|
goodsService.batchUpdate(new ArrayList<Goods>(batchUpdateGoodsMap.values()));
|
|
|
}
|
|
|
}
|
|
|
@@ -1241,7 +1253,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
if (repairInfo.getType().equals(1)) { //线上
|
|
|
imContent = repairInfo.getStudentName() + "学员您好,请尽快寄送乐器至维修点,我们会尽快完成保养维修\n" +
|
|
|
"联系人:" + repairInfo.getEmployeeName() + "(" + repairInfo.getEmployeePhone() + ")\n" +
|
|
|
- "地址:" + repairInfo.getEmployeeAddress() + "";
|
|
|
+ "地址:" + repairInfo.getEmployeeAddress();
|
|
|
|
|
|
sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_REPAIR_ONLINE_PAYMENT_SUCCESS, map, null, 0, null, "STUDENT",
|
|
|
repairInfo.getStudentName(), repairInfo.getEmployeeName(), repairInfo.getEmployeePhone(), repairInfo.getEmployeeAddress());
|