puzhibing
2023-07-20 1e4181e2131350b15fd5538532331e333631c64f
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
@@ -10,14 +10,8 @@
import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsSpreadService;
import com.stylefeng.guns.modular.system.dao.RegionMapper;
import com.stylefeng.guns.modular.system.dao.UserInfoMapper;
import com.stylefeng.guns.modular.system.model.Company;
import com.stylefeng.guns.modular.system.model.Driver;
import com.stylefeng.guns.modular.system.model.Region;
import com.stylefeng.guns.modular.system.model.UserInfo;
import com.stylefeng.guns.modular.system.service.ICompanyService;
import com.stylefeng.guns.modular.system.service.IDriverService;
import com.stylefeng.guns.modular.system.service.IIncomeService;
import com.stylefeng.guns.modular.system.service.ISystemNoticeService;
import com.stylefeng.guns.modular.system.model.*;
import com.stylefeng.guns.modular.system.service.*;
import com.stylefeng.guns.modular.system.util.*;
import com.stylefeng.guns.modular.taxi.model.OrderTaxi;
import org.jsoup.Jsoup;
@@ -83,6 +77,12 @@
    @Value("${spring.mail.template-path}")
    private String templatePath;
    @Autowired
    private IPaymentRecordService paymentRecordService;
    @Autowired
    private ITransactionDetailsService transactionDetailsService;
@@ -95,8 +95,8 @@
     * @throws Exception
     */
    @Override
    public Map<String, Object> queryPushOrder(Integer orderId) throws Exception {
        return orderLogisticsMapper.queryPushOrder(orderId);
    public Map<String, Object> queryPushOrder(Integer orderId, Integer language) throws Exception {
        return orderLogisticsMapper.queryPushOrder(orderId, language);
    }
@@ -310,8 +310,8 @@
    }
    @Override
    public List<Map<String, Object>> queryOrderList(Integer driverId) throws Exception {
        return orderLogisticsMapper.queryOrderList(driverId);
    public List<Map<String, Object>> queryOrderList(Integer driverId, Integer language) throws Exception {
        return orderLogisticsMapper.queryOrderList(driverId, language);
    }
    /**
@@ -322,8 +322,8 @@
     * @throws Exception
     */
    @Override
    public List<Map<String, Object>> queryMyAllOrder(Integer state, Integer uid) throws Exception {
        return orderLogisticsMapper.queryMyAllOrder(state, uid);
    public List<Map<String, Object>> queryMyAllOrder(Integer state, Integer uid, Integer language) throws Exception {
        return orderLogisticsMapper.queryMyAllOrder(state, uid, language);
    }
@@ -480,4 +480,23 @@
        }
    }
    @Override
    public void payOrderLogisticsCallback(Integer id, String order_id, Integer language) throws Exception {
        OrderLogistics orderLogistics = this.selectById(id);
        PaymentRecord query = paymentRecordService.query(1, null, 2, Integer.valueOf(id), orderLogistics.getType(), null, 1);
        if(null != query){
            //添加交易明细
            transactionDetailsService.saveData(orderLogistics.getDriverId(), language == 1 ? "现金收款代付" : language == 2 ? "Cash collection on behalf of payment" : "Paiement en espèces", query.getAmount(), 2, 1, 2, orderLogistics.getType(), id);
            orderLogistics.setDriverPay(2);
            this.updateById(orderLogistics);
            query.setState(2);
            query.setCode(order_id);
            paymentRecordService.updateById(query);
        }else{
            System.err.println("预支付数据异常(orderId = "  + id + ")");
        }
    }
}