|
@@ -71,8 +71,12 @@ public class HtTradeSettlementService extends ServiceImpl<HtTradeSettlementMappe
|
|
/**
|
|
/**
|
|
* 删
|
|
* 删
|
|
*/
|
|
*/
|
|
|
|
+ @Transactional
|
|
void delete(Long id) {
|
|
void delete(Long id) {
|
|
removeById(id);
|
|
removeById(id);
|
|
|
|
+ SoMap soMap = new SoMap();
|
|
|
|
+ soMap.put("sale_main_id", id);
|
|
|
|
+ tbOrderMapper.deleteByMap(soMap);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -102,13 +106,13 @@ public class HtTradeSettlementService extends ServiceImpl<HtTradeSettlementMappe
|
|
* 远程调用: 添加大订单时同时生成边民订单
|
|
* 远程调用: 添加大订单时同时生成边民订单
|
|
*/
|
|
*/
|
|
public boolean tradeSettlementDto(TradeSettlementDto tradeSettlementDto) {
|
|
public boolean tradeSettlementDto(TradeSettlementDto tradeSettlementDto) {
|
|
- LambdaQueryWrapper<HtTradeSettlement> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
|
+ LambdaQueryWrapper<HtTradeSettlement> wrapper = new LambdaQueryWrapper<>();
|
|
wrapper.eq(HtTradeSettlement::getPlatSeqNo, tradeSettlementDto.getPlatSeqNo());
|
|
wrapper.eq(HtTradeSettlement::getPlatSeqNo, tradeSettlementDto.getPlatSeqNo());
|
|
List<HtTradeSettlement> htTradeSettlements = htTradeSettlementMapper.selectList(wrapper);
|
|
List<HtTradeSettlement> htTradeSettlements = htTradeSettlementMapper.selectList(wrapper);
|
|
//删除已存在的大订单与小订单,保留航通送过来的最新记录
|
|
//删除已存在的大订单与小订单,保留航通送过来的最新记录
|
|
- if(htTradeSettlements.size()>0) {
|
|
|
|
|
|
+ if (htTradeSettlements.size() > 0) {
|
|
List<Long> idList = htTradeSettlements.stream().map(item -> item.getId()).collect(Collectors.toList());
|
|
List<Long> idList = htTradeSettlements.stream().map(item -> item.getId()).collect(Collectors.toList());
|
|
- LambdaQueryWrapper<TbOrder> orderWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
|
+ LambdaQueryWrapper<TbOrder> orderWrapper = new LambdaQueryWrapper<>();
|
|
orderWrapper.in(TbOrder::getSaleMainId, idList);
|
|
orderWrapper.in(TbOrder::getSaleMainId, idList);
|
|
int orderDelete = tbOrderMapper.delete(orderWrapper);
|
|
int orderDelete = tbOrderMapper.delete(orderWrapper);
|
|
|
|
|
|
@@ -198,7 +202,7 @@ public class HtTradeSettlementService extends ServiceImpl<HtTradeSettlementMappe
|
|
//发送短信
|
|
//发送短信
|
|
if (result == 1) {
|
|
if (result == 1) {
|
|
String content = "您好,您的[边民互市订单]已经生成,订单商品是[" + tbOrder.getGoodsNames() + "]。请前往app进行交易确认";
|
|
String content = "您好,您的[边民互市订单]已经生成,订单商品是[" + tbOrder.getGoodsNames() + "]。请前往app进行交易确认";
|
|
- // SystemObject.smsFactory.handler().sendSMS(tbPeople.getPhone(), content);
|
|
|
|
|
|
+ // SystemObject.smsFactory.handler().sendSMS(tbPeople.getPhone(), content);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
htTradeSettlement.setTotalPrice(totalPrice);
|
|
htTradeSettlement.setTotalPrice(totalPrice);
|