|
@@ -1,13 +1,10 @@
|
|
|
package com.pj.tb_orders;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.service.IService;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.pj.api.client.admin.AdminInterface;
|
|
|
import com.pj.api.client.async_server.AsyncServerInterface;
|
|
|
import com.pj.api.client.level_one_server.LevelOneServerInterface;
|
|
@@ -22,11 +19,13 @@ import com.pj.current.satoken.StpAPPUserUtil;
|
|
|
import com.pj.enummj.DataType;
|
|
|
import com.pj.enummj.DeleteStatus;
|
|
|
import com.pj.enummj.OrderStatus;
|
|
|
-import com.pj.tb_company.TbCompany;
|
|
|
import com.pj.tb_demand_quotation.TbDemandQuotation;
|
|
|
import com.pj.tb_demand_quotation.TbDemandQuotationService;
|
|
|
+import com.pj.tb_fee_item.TbFeeItem;
|
|
|
+import com.pj.tb_fee_item.TbFeeItemService;
|
|
|
+import com.pj.tb_fee_item_record.TbFeeItemRecord;
|
|
|
+import com.pj.tb_fee_item_record.TbFeeItemRecordService;
|
|
|
import com.pj.tb_goods_demand.TbGoodsDemand;
|
|
|
-import com.pj.tb_goods_demand.TbGoodsDemandMapper;
|
|
|
import com.pj.tb_goods_demand.TbGoodsDemandService;
|
|
|
import com.pj.tb_goods_demand.vo.GoodsDemandVo;
|
|
|
import com.pj.tb_orders_cart.TbOrdersCart;
|
|
@@ -37,10 +36,13 @@ import com.pj.utils.so.SoMap;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import com.baomidou.mybatisplus.extension.service.IService;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* Service: tb_orders -- 订单表
|
|
|
*
|
|
@@ -68,6 +70,12 @@ public class TbOrdersService extends ServiceImpl<TbOrdersMapper, TbOrders> imple
|
|
|
@Autowired
|
|
|
TbOrdersCartMapper tbOrdersCartMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ TbFeeItemService tbFeeItemService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ TbFeeItemRecordService tbFeeItemRecordService;
|
|
|
+
|
|
|
/**
|
|
|
* 远程调用
|
|
|
*/
|
|
@@ -162,6 +170,21 @@ public class TbOrdersService extends ServiceImpl<TbOrdersMapper, TbOrders> imple
|
|
|
orders.setPayTaxTime(new Date());
|
|
|
orders.setOrderFinish(1);//缴费成功订单完成
|
|
|
if (updateById(orders)) {
|
|
|
+ //保存缴费记录
|
|
|
+ List<TbFeeItem> feeItems = tbFeeItemService.getFeeItems();
|
|
|
+ feeItems.stream().forEach(e -> {
|
|
|
+ TbFeeItemRecord record = new TbFeeItemRecord();
|
|
|
+ record.setItemId(e.getId());
|
|
|
+ record.setCompanyName(e.getCompanyName());
|
|
|
+ record.setItemName(e.getName());
|
|
|
+ record.setOrderNo(orders.getOrderNo());
|
|
|
+ record.setLevelTwoOrderId(orders.getId());
|
|
|
+ record.setPayTime(new Date());
|
|
|
+ record.setCreateTime(new Date());
|
|
|
+ record.setPayStatus("1");
|
|
|
+ record.setPayRemark("缴纳:" + e.getName());
|
|
|
+ tbFeeItemRecordService.save(record);
|
|
|
+ });
|
|
|
//todo:给收购商发送边民缴费成功消息
|
|
|
MessageDto dto = new MessageDto();
|
|
|
dto.setUrl("/pages/market/two/purchaser/order/list");
|