package com.supersavedriving.user.modular.system.service.impl;
|
|
|
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONObject;
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
import com.supersavedriving.user.core.util.ToolUtil;
|
import com.supersavedriving.user.modular.system.dao.TOrderCheckMapper;
|
import com.supersavedriving.user.modular.system.model.*;
|
import com.supersavedriving.user.modular.system.service.*;
|
import com.supersavedriving.user.modular.system.util.*;
|
import com.supersavedriving.user.modular.system.util.GaoDe.MapUtil;
|
import com.supersavedriving.user.modular.system.util.GaoDe.model.District;
|
import com.supersavedriving.user.modular.system.warpper.*;
|
import lombok.extern.log4j.Log4j2;
|
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.stereotype.Service;
|
|
import javax.annotation.Resource;
|
import java.math.BigDecimal;
|
import java.math.RoundingMode;
|
import java.text.SimpleDateFormat;
|
import java.util.*;
|
import java.util.concurrent.TimeUnit;
|
import java.util.stream.Collectors;
|
|
/**
|
* <p>
|
* 订单 服务实现类
|
* </p>
|
*
|
* @author administrator
|
* @since 2025-07-23
|
*/
|
@Service
|
@Log4j2
|
public class TOrderCheckServiceImpl extends ServiceImpl<TOrderCheckMapper, TOrderCheck> implements TOrderCheckService {
|
|
@Autowired
|
private IAppUserService appUserService;
|
|
@Autowired
|
private IBranchOfficeService branchOfficeService;
|
|
@Autowired
|
private ISystemConfigService systemConfigService;
|
|
@Autowired
|
private IDriverService driverService;
|
|
@Autowired
|
private IRevenueService revenueService;
|
|
@Autowired
|
private IAccountChangeDetailService accountChangeDetailService;
|
|
@Autowired
|
private PushUtil pushUtil;
|
|
@Autowired
|
private TUserCouponService tUserCouponService;
|
|
@Autowired
|
private TCheckCarExplainService tCheckCarExplainService;
|
|
|
@Resource
|
private RedisTemplate<String, String> redisTemplate;
|
|
@Override
|
public ResultUtil travelOrder(Integer uid, CheckOrder checkOrder) {
|
// 102=已接单(正在前往取车地),104=到达预约点(用户待支付车检),105=开始服务,106=车检完成,107=前往还车地,108=到达还车地
|
List<Integer> state = Arrays.asList(101, 102, 104, 105, 106, 107, 107, 108);
|
TOrderCheck order = this.selectOne(new EntityWrapper<TOrderCheck>().eq("userId", uid).eq("status", 1).in("state", state));
|
if(null != order){
|
return ResultUtil.error("您还有正在进行的订单");
|
}
|
AppUser appUser = appUserService.selectById(uid);
|
order = this.selectOne(new EntityWrapper<TOrderCheck>().eq("userPhone", appUser.getPhone()).eq("status", 1).in("state", state));
|
if(null != order){
|
return ResultUtil.error("您还有正在进行的订单");
|
}
|
|
|
String startAddress = checkOrder.getStartAddress();
|
startAddress = startAddress.replaceAll("& #40;", "(");
|
startAddress = startAddress.replaceAll("& #41;", ")");
|
checkOrder.setStartAddress(startAddress);
|
if(ToolUtil.isNotEmpty(checkOrder.getEndAddress())){
|
String endAddress = checkOrder.getEndAddress();
|
endAddress = endAddress.replaceAll("& #40;", "(");
|
endAddress = endAddress.replaceAll("& #41;", ")");
|
checkOrder.setEndAddress(endAddress);
|
}
|
|
order = new TOrderCheck();
|
|
if(checkOrder.getReInspection()!=null && checkOrder.getReInspection()==1){
|
TOrderCheck tOrderCheck = this.selectById(checkOrder.getOrderId());
|
if(tOrderCheck.getCheckStatus()!=2){
|
return ResultUtil.error("你已通过车检,无需重复提交");
|
}
|
// 支付了车检 下次不用支付
|
if(tOrderCheck.getCheckPayTime()!=null){
|
order.setReInspection(1);
|
}
|
|
}
|
|
|
BeanUtils.copyProperties(checkOrder, order);
|
order.setStartLng(checkOrder.getUserLng());
|
order.setStartLat(checkOrder.getUserLat());
|
order.setUserId(uid);
|
order.setStatus(1);
|
order.setCreateTime(new Date());
|
order.setState(100);
|
String city = "";
|
Integer branchOfficeId = null;
|
District geocode = MapUtil.geocode(checkOrder.getUserLng().toString(), checkOrder.getUserLat().toString());
|
if(null != geocode){
|
String districtCode = geocode.getDistrictCode();
|
order.setAreaCode(districtCode);
|
BranchOffice branchOffice = branchOfficeService.selectOne(new EntityWrapper<BranchOffice>().eq("status", 1).eq("districtCode", districtCode));
|
if(null == branchOffice){
|
String cityCode = geocode.getCityCode();
|
|
branchOffice = branchOfficeService.selectOne(new EntityWrapper<BranchOffice>().eq("status", 1).eq("cityCode", cityCode));
|
if(null == branchOffice){
|
String provinceCode = geocode.getProvinceCode();
|
branchOffice = branchOfficeService.selectOne(new EntityWrapper<BranchOffice>().eq("status", 1).eq("provinceCode", provinceCode));
|
}
|
}
|
if(null == branchOffice){
|
return ResultUtil.error("暂无企业服务");
|
}
|
branchOfficeId = branchOffice.getId();
|
}else {
|
return ResultUtil.error("暂无企业服务");
|
}
|
order.setCreateTime(new Date());
|
order.setBranchOfficeId(branchOfficeId);
|
|
order = getOrderPrice(branchOfficeId,order);
|
|
this.insert(order);
|
|
|
|
// 添加代检车新订单通知到Redis
|
addCheckCarOrderNotification(order.getId(), branchOfficeId);
|
|
|
return ResultUtil.success(order.getId());
|
}
|
|
/**
|
* 添加代检车新订单通知到Redis
|
* @param orderId 订单ID
|
* @param branchOfficeId 分公司ID
|
*/
|
private void addCheckCarOrderNotification(Integer orderId, Integer branchOfficeId) {
|
try {
|
String orderIdStr = orderId.toString();
|
|
// 添加到平台通知队列(使用Redis List)
|
String platformKey = "newCheckCarOrder:platform";
|
List<String> existingPlatformOrders = redisTemplate.opsForList().range(platformKey, 0, -1);
|
|
// 检查是否已存在该订单ID,避免重复
|
if (existingPlatformOrders == null || !existingPlatformOrders.contains(orderIdStr)) {
|
// 添加到列表左侧
|
redisTemplate.opsForList().leftPush(platformKey, orderIdStr);
|
// 设置过期时间24小时
|
redisTemplate.expire(platformKey, 24, TimeUnit.HOURS);
|
}
|
|
// 添加到分公司通知队列(使用Redis List)
|
String branchKey = "newCheckCarOrder:branch:" + branchOfficeId;
|
List<String> existingBranchOrders = redisTemplate.opsForList().range(branchKey, 0, -1);
|
|
// 检查是否已存在该订单ID,避免重复
|
if (existingBranchOrders == null || !existingBranchOrders.contains(orderIdStr)) {
|
// 添加到列表左侧
|
redisTemplate.opsForList().leftPush(branchKey, orderIdStr);
|
// 设置过期时间24小时
|
redisTemplate.expire(branchKey, 24, TimeUnit.HOURS);
|
}
|
|
|
} catch (Exception e) {
|
log.error("添加代检车新订单通知到Redis失败: 订单ID={}, 分公司ID={}, 错误: {}", orderId, branchOfficeId, e.getMessage(), e);
|
// 通知失败不影响主流程,只记录日志
|
}
|
}
|
|
@Override
|
public ResultUtil getCheckOrderInfo(String userLat, String userLng) {
|
District geocode = MapUtil.geocode(userLng, userLat);
|
if(null != geocode){
|
String districtCode = geocode.getDistrictCode();
|
BranchOffice branchOffice = branchOfficeService.selectOne(new EntityWrapper<BranchOffice>().eq("status", 1).eq("districtCode", districtCode));
|
if(null == branchOffice){
|
String cityCode = geocode.getCityCode();
|
|
branchOffice = branchOfficeService.selectOne(new EntityWrapper<BranchOffice>().eq("status", 1).eq("cityCode", cityCode));
|
if(null == branchOffice){
|
String provinceCode = geocode.getProvinceCode();
|
branchOffice = branchOfficeService.selectOne(new EntityWrapper<BranchOffice>().eq("status", 1).eq("provinceCode", provinceCode));
|
}
|
}
|
if(null == branchOffice){
|
TCheckCarExplain branchOfficeId = tCheckCarExplainService.selectOne(new EntityWrapper<TCheckCarExplain>().eq("branchOfficeId", -1).last(" limit 1"));
|
return ResultUtil.success(branchOfficeId);
|
}
|
Integer id = branchOffice.getId();
|
TCheckCarExplain branchOfficeId = tCheckCarExplainService.selectOne(new EntityWrapper<TCheckCarExplain>().eq("branchOfficeId", id).orderBy("id", false).last(" limit 1"));
|
return ResultUtil.success(branchOfficeId);
|
|
}
|
TCheckCarExplain branchOfficeId = tCheckCarExplainService.selectOne(new EntityWrapper<TCheckCarExplain>().eq("branchOfficeId", -1).last(" limit 1"));
|
return ResultUtil.success(branchOfficeId);
|
}
|
|
@Override
|
public ResultUtil cancelOrder(Integer uid, Long orderId) {
|
TOrderCheck order = this.selectById(orderId);
|
if(null == order){
|
return ResultUtil.error("订单不存在");
|
}
|
if(order.getUserId() != uid){
|
return ResultUtil.error("无权限取消");
|
}
|
if(order.getState() > 100){
|
return ResultUtil.error("不能取消订单");
|
}
|
order.setState(111);
|
this.updateById(order);
|
return ResultUtil.success();
|
}
|
|
@Override
|
public ResultUtil payCheckOrder(Integer uid, PayCheckOrder payCheckOrder) throws Exception {
|
TOrderCheck order = this.selectById(payCheckOrder.getOrderId());
|
|
AppUser appUser = appUserService.selectById(uid);
|
|
//开始支付操作
|
if(payCheckOrder.getType() == 1){//车检费
|
if(payCheckOrder.getCouponId()!=null){
|
TUserCoupon tUserCoupon = tUserCouponService.selectById(payCheckOrder.getCouponId());
|
if(null == tUserCoupon){
|
return ResultUtil.error("优惠券不存在");
|
}
|
if(tUserCoupon.getExpireTime().getTime()<System.currentTimeMillis()){
|
return ResultUtil.error("优惠券已过期");
|
}
|
if(!tUserCoupon.getUserId().equals(uid)){
|
return ResultUtil.error("无此优惠券");
|
}
|
if (!tUserCoupon.getAreaCode().equals(order.getAreaCode())) {
|
return ResultUtil.error("该优惠券不可用");
|
}
|
// 计算新的价格
|
order.setCheckMoney(order.getCheckMoney().subtract(tUserCoupon.getMoney()));
|
order.setDiscountedPriceCheck(tUserCoupon.getMoney());
|
order.setCouponIdCheck(tUserCoupon.getId());
|
}
|
order.setCheckCode(UUIDUtil.getTimeStr() + UUIDUtil.getNumberRandom(5));
|
this.updateById(order);
|
return weixinPay(order, appUser, order.getCheckMoney(), order.getCheckCode(),"车检费");
|
}else if(payCheckOrder.getType()==2){
|
if(payCheckOrder.getCouponId()!=null){
|
TUserCoupon tUserCoupon = tUserCouponService.selectById(payCheckOrder.getCouponId());
|
if(null == tUserCoupon){
|
return ResultUtil.error("优惠券不存在");
|
}
|
if(tUserCoupon.getExpireTime().getTime()<System.currentTimeMillis()){
|
return ResultUtil.error("优惠券已过期");
|
}
|
if(!tUserCoupon.getUserId().equals(uid)){
|
return ResultUtil.error("无此优惠券");
|
}
|
if (!tUserCoupon.getAreaCode().equals(order.getAreaCode())) {
|
return ResultUtil.error("该优惠券不可用");
|
}
|
// 计算新的价格
|
order.setPayMoney(order.getPayMoney().subtract(tUserCoupon.getMoney()));
|
order.setDiscountedPrice(tUserCoupon.getMoney());
|
if(order.getBranchOfficeId()!=null){
|
SystemConfig systemConfig1 = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 3).eq("companyId", order.getBranchOfficeId()));
|
if(systemConfig1!=null) {
|
JSONObject jsonObject1 = JSON.parseObject(systemConfig1.getContent());
|
Double num5 = jsonObject1.getDouble("num5");
|
SystemConfig systemConfig2 = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 3).eq("companyId", 1).eq("branchOfficeId", order.getBranchOfficeId()));
|
if(systemConfig2!=null){
|
JSONObject jsonObject2 = JSON.parseObject(systemConfig2.getContent());
|
// 平台抽成
|
Double num6 = jsonObject2.getDouble("num5");
|
if(num6!=null){
|
num6 = num5 - num6;
|
order.setCompanyMoney(new BigDecimal(num6));
|
}
|
}
|
|
order.setOrderMoney(order.getPayMoney().subtract(new BigDecimal(num5)));
|
}
|
}else {
|
Driver driver = driverService.selectById(order.getDriverId());
|
SystemConfig systemConfig1 = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 3).eq("companyId", driver.getBranchOfficeId()));
|
if(systemConfig1!=null) {
|
JSONObject jsonObject1 = JSON.parseObject(systemConfig1.getContent());
|
Double num5 = jsonObject1.getDouble("num5");
|
SystemConfig systemConfig2 = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 3).eq("companyId", 1).eq("branchOfficeId", driver.getBranchOfficeId()));
|
if(systemConfig2!=null){
|
JSONObject jsonObject2 = JSON.parseObject(systemConfig2.getContent());
|
// 平台抽成
|
Double num6 = jsonObject2.getDouble("num5");
|
if(num6!=null){
|
num6 = num5 - num6;
|
order.setCompanyMoney(new BigDecimal(num6));
|
}
|
}
|
|
order.setOrderMoney(order.getPayMoney().subtract(new BigDecimal(num5)));
|
}
|
}
|
order.setCouponId(tUserCoupon.getId());
|
}
|
order.setCode(UUIDUtil.getTimeStr() + UUIDUtil.getNumberRandom(5));
|
this.updateById(order);
|
return weixinPay(order, appUser, order.getPayMoney(), order.getCode(),"服务费");
|
}
|
return ResultUtil.success();
|
}
|
|
@Override
|
public ResultUtil orderPayCallback(Integer type, TOrderCheck order, String s1) throws Exception {
|
if(type==1){
|
if(order.getState() != 104){
|
return ResultUtil.success();
|
}
|
order.setState(105);
|
order.setCheckPayTime(new Date());
|
this.updateById(order);
|
|
pushUtil.pushCheckOrderStatus(order.getUserId(), 1, Long.valueOf(order.getId()), order.getState());
|
if(null != order.getDriverId()) {
|
PushCheckOrderInfoWarpper pushOrderInfoWarpper = new PushCheckOrderInfoWarpper();
|
pushOrderInfoWarpper.setId(Long.valueOf(order.getId()));
|
pushOrderInfoWarpper.setState(order.getState());
|
pushOrderInfoWarpper.setType(1);
|
pushUtil.pushCheckOrderInfo(order.getDriverId(), 2, pushOrderInfoWarpper);
|
}
|
return ResultUtil.success();
|
}
|
if(type==2){
|
Integer couponId = order.getCouponId();
|
if(couponId!=null){
|
// 修改已使用状态
|
TUserCoupon tUserCoupon = tUserCouponService.selectById(couponId);
|
tUserCoupon.setState(2);
|
tUserCouponService.updateById(tUserCoupon);
|
}
|
if(order.getState() != 108){
|
return ResultUtil.success();
|
}
|
order.setState(109);
|
order.setPayTime(new Date());
|
this.updateById(order);
|
//添加收入明细
|
saveCommissionWX(order);
|
|
pushUtil.pushCheckOrderStatus(order.getUserId(), 1, Long.valueOf(order.getId()), order.getState());
|
if(null != order.getDriverId()) {
|
PushCheckOrderInfoWarpper pushOrderInfoWarpper = new PushCheckOrderInfoWarpper();
|
pushOrderInfoWarpper.setId(Long.valueOf(order.getId()));
|
pushOrderInfoWarpper.setState(order.getState());
|
pushOrderInfoWarpper.setType(2);
|
pushUtil.pushCheckOrderInfo(order.getDriverId(), 2, pushOrderInfoWarpper);
|
}
|
return ResultUtil.success();
|
}
|
return ResultUtil.success();
|
}
|
|
@Override
|
public CheckOrderInfoWarpper queryOrderInfo(Integer uid, Long orderId) {
|
TOrderCheck order = this.selectById(orderId);
|
if(!order.getUserId().equals(uid)){
|
return null;
|
}
|
CheckOrderInfoWarpper orderInfoWarpper = this.baseMapper.queryOrderInfo(orderId);
|
if(ToolUtil.isEmpty(orderInfoWarpper.getAvatar())){
|
orderInfoWarpper.setAvatar("https://csxdj.obs.cn-south-1.myhuaweicloud.com:443/66cc269703a84e4da87fb21e2c21ab1f.png");
|
}
|
orderInfoWarpper.setDriverId(order.getDriverId());
|
Driver driver = driverService.selectById(orderInfoWarpper.getDriverId());
|
orderInfoWarpper.setDriverAvatar(driver.getAvatar());
|
orderInfoWarpper.setDriverName(driver.getName());
|
orderInfoWarpper.setDriverPhone(driver.getPhone());
|
return orderInfoWarpper;
|
}
|
|
@Override
|
public List<CheckOrderListWarpper> queryCheckOrderList(Integer uid, Integer state, Integer pageNum, Integer pageSize) {
|
pageNum = (pageNum - 1) * pageSize;
|
return this.baseMapper.queryCheckOrderList(uid, state, pageNum, pageSize);
|
}
|
|
@Override
|
public ResultUtil orderAppraise(Integer uid, Long orderId, Integer score, String content) {
|
TOrderCheck tOrderCheck = this.baseMapper.selectById(orderId);
|
if(tOrderCheck.getState() != 109 || !tOrderCheck.getUserId().equals(uid)){
|
return ResultUtil.error("不能进行评价");
|
}
|
tOrderCheck.setCommentRate(score);
|
tOrderCheck.setCommentStr(content);
|
tOrderCheck.setCommentTime(new Date());
|
tOrderCheck.setState(110);
|
this.baseMapper.updateById(tOrderCheck);
|
return ResultUtil.success();
|
}
|
|
@Override
|
public List<CheckCouponWarpper> queryPayCouponList(Integer uid, Long orderId) {
|
TOrderCheck tOrderCheck = this.baseMapper.selectById(orderId);
|
if(!tOrderCheck.getUserId().equals(uid)){
|
return Collections.emptyList();
|
}
|
List<TUserCoupon> tUserCoupons = tUserCouponService.selectList(new EntityWrapper<TUserCoupon>().eq("user_id", uid).eq("state", 1).lt("expiration_date", new Date()).eq("areaCode", tOrderCheck.getAreaCode()));
|
// tUserCoupons 转化为 List<CheckCouponWarpper>
|
List<CheckCouponWarpper> collect = tUserCoupons.stream().map(tUserCoupon -> {
|
CheckCouponWarpper checkCouponWarpper = new CheckCouponWarpper();
|
checkCouponWarpper.setId(tUserCoupon.getId());
|
checkCouponWarpper.setCouponName(tUserCoupon.getCouponName());
|
checkCouponWarpper.setCouponPreferentialAmount(tUserCoupon.getMoney().doubleValue());
|
checkCouponWarpper.setExpirationDate(tUserCoupon.getExpireTime().getTime());
|
return checkCouponWarpper;
|
}).collect(Collectors.toList());
|
return collect;
|
}
|
|
|
public void saveCommissionWX(TOrderCheck order) throws Exception{
|
Driver driver = driverService.selectById(order.getDriverId());
|
//司机订单收入
|
Revenue revenue = new Revenue();
|
revenue.setType(1);
|
revenue.setUserType(2);
|
revenue.setUserId(driver.getId());
|
revenue.setOrderId(Long.valueOf(order.getId()));
|
revenue.setAmount(order.getOrderMoney().doubleValue());
|
revenue.setCreateTime(new Date());
|
revenueService.insert(revenue);
|
|
AccountChangeDetail accountChangeDetail = new AccountChangeDetail();
|
accountChangeDetail.setCode(System.currentTimeMillis() + UUIDUtil.getNumberRandom(5));
|
accountChangeDetail.setUserType(2);
|
accountChangeDetail.setUserId(driver.getId());
|
accountChangeDetail.setType(1);
|
accountChangeDetail.setChangeType(1);
|
accountChangeDetail.setOrderId(Long.valueOf(order.getId()));
|
accountChangeDetail.setOldData(driver.getBalance());
|
accountChangeDetail.setExplain("订单收入");
|
accountChangeDetail.setCreateTime(new Date());
|
accountChangeDetail.setNewData(new BigDecimal(driver.getBalance()).add(order.getOrderMoney()).doubleValue());
|
driver.setBalance(new BigDecimal(driver.getBalance()).add(order.getOrderMoney()).doubleValue());
|
driverService.updateById(driver);
|
accountChangeDetailService.saveData(accountChangeDetail);
|
}
|
|
|
|
|
public ResultUtil weixinPay(TOrderCheck order, AppUser appUser,BigDecimal payMoney,String code,String body) throws Exception {
|
order.setPayType(1);
|
return MiniAppPay.payCheck(appUser.getOpenid(), payMoney.multiply(new BigDecimal(100)).setScale(0, RoundingMode.HALF_EVEN).longValue() + "", "/base/order/orderPayCallback", code,body);
|
}
|
|
public TOrderCheck getOrderPrice(Integer branchOfficeId,TOrderCheck order){
|
SystemConfig systemConfig = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 5).eq("companyId", branchOfficeId));
|
SystemConfig systemConfig1 = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 3).eq("companyId", branchOfficeId));
|
if(null == systemConfig){
|
order.setCheckMoney(BigDecimal.ZERO);
|
order.setOrderMoney(BigDecimal.ZERO);
|
}
|
JSONObject jsonObject = JSON.parseObject(systemConfig.getContent());
|
JSONObject extraCost = jsonObject.getJSONObject("ExtraCost");
|
|
Double num11 = extraCost.getDouble("num11");//车检费 油车
|
Double num12 = extraCost.getDouble("num12");//车检费 油车
|
Double num13 = extraCost.getDouble("num13");//服务费
|
|
Integer carType = order.getCarType();
|
if(carType==1){
|
if(num11!=null){
|
order.setCheckMoney(new BigDecimal(num11));
|
}
|
}
|
if(carType==2){
|
if(num12!=null){
|
order.setCheckMoney(new BigDecimal(num12));
|
}
|
}
|
|
if(num13!=null){
|
order.setPayMoney(new BigDecimal(num13));
|
if(systemConfig1!=null){
|
JSONObject jsonObject1 = JSON.parseObject(systemConfig1.getContent());
|
// 分公司抽成
|
Double num5 = jsonObject1.getDouble("num5");
|
SystemConfig systemConfig2 = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 3).eq("companyId", 1).eq("branchOfficeId", branchOfficeId));
|
if(systemConfig2!=null){
|
JSONObject jsonObject2 = JSON.parseObject(systemConfig2.getContent());
|
// 平台抽成
|
Double num6 = jsonObject2.getDouble("num5");
|
if(num6!=null){
|
num6 = num5 - num6;
|
order.setCompanyMoney(new BigDecimal(num6));
|
}
|
}
|
order.setOrderMoney(order.getPayMoney().subtract(new BigDecimal(num5)));
|
}else {
|
order.setOrderMoney(order.getPayMoney());
|
}
|
|
}
|
return order;
|
}
|
|
}
|