This commit is contained in:
kuang.yifei@iwhalecloud.com 2022-06-18 14:39:37 +08:00
parent f6d580de7c
commit 0c69a77465
3 changed files with 10 additions and 5 deletions

View File

@ -126,8 +126,11 @@ public class OrderController extends BaseController {
Worker acceptWorker = workerService.selectById(request.getWorkerId()); Worker acceptWorker = workerService.selectById(request.getWorkerId());
Assert.notNull(acceptWorker, "查询接单师傅信息失败"); Assert.notNull(acceptWorker, "查询接单师傅信息失败");
// 校验接单师傅和派单师傅是不是同一个Team // 校验接单师傅和派单师傅是不是同一个Team
boolean checkInTeam = workerService.checkInTeam(assignWorker.getWorkerId(), acceptWorker.getWorkerId()); if(!om.getWorkerId().equals(request.getWorkerId())){
Assert.isTrue(checkInTeam, "接单师傅不在本团队"); boolean checkInTeam = workerService.checkInTeam(assignWorker.getWorkerId(), acceptWorker.getWorkerId());
Assert.isTrue(checkInTeam, "接单师傅不在本团队");
}
// 创建子订单 // 创建子订单
OrderDetail od = new OrderDetail(); OrderDetail od = new OrderDetail();
@ -231,6 +234,7 @@ public class OrderController extends BaseController {
orderMaster.setPayType(appOrderRequest.getPayType()); orderMaster.setPayType(appOrderRequest.getPayType());
orderMaster.setOrderStatus(OrderStatus.PLAIN.code()); orderMaster.setOrderStatus(OrderStatus.PLAIN.code());
orderMaster.setCustomerId(appOrderRequest.getCustomerId()); orderMaster.setCustomerId(appOrderRequest.getCustomerId());
orderMaster.setAddressId(appOrderRequest.getAddressId());
orderMaster.setPayStatus(PayStatus.WAIT_PAY.getCode()); orderMaster.setPayStatus(PayStatus.WAIT_PAY.getCode());
orderMaster.setCreateTime(new Date()); orderMaster.setCreateTime(new Date());
orderMaster.setWorkerId(goods.getWorkerId()); orderMaster.setWorkerId(goods.getWorkerId());
@ -283,7 +287,7 @@ public class OrderController extends BaseController {
} }
/* 1 平台服务服务费 */ /* 1 平台服务服务费 */
DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.selectOneByGoodsCategoryId(deptGoodsCategoryId); DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.get(deptGoodsCategoryId);
BigDecimal deptRate = new BigDecimal(deptGoodsCategory.getDeptRate()); BigDecimal deptRate = new BigDecimal(deptGoodsCategory.getDeptRate());
BigDecimal deptMoney = deptGoodsCategory.getDeptMoney(); BigDecimal deptMoney = deptGoodsCategory.getDeptMoney();

View File

@ -1,6 +1,7 @@
package com.ghy.customer.mapper; package com.ghy.customer.mapper;
import com.ghy.customer.domain.CustomerAddress; import com.ghy.customer.domain.CustomerAddress;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -34,7 +35,7 @@ public interface CustomerAddressMapper {
* @param customerAddressId 地址id * @param customerAddressId 地址id
* @return 地址 * @return 地址
*/ */
CustomerAddress selectByCustomerAddressId(Long customerAddressId); CustomerAddress selectByCustomerAddressId(@Param("customerAddressId") Long customerAddressId);
/** /**
* @param customerAddress 地址信息 * @param customerAddress 地址信息

View File

@ -83,7 +83,7 @@
<foreach collection="goodsStandards" separator="," item="goodsStandard"> <foreach collection="goodsStandards" separator="," item="goodsStandard">
( (
#{goodsStandard.goodsStandardName}, #{goodsStandard.goodsId}, #{goodsStandard.deptGoodsCategoryId}, #{goodsStandard.goodsPrice}, #{goodsStandard.discountPrice}, #{goodsStandard.goodsStandardName}, #{goodsStandard.goodsId}, #{goodsStandard.deptGoodsCategoryId}, #{goodsStandard.goodsPrice}, #{goodsStandard.discountPrice},
#{goodsStandard.groupPrice}, #{goodsStandard.goodsNum}, #{goodsStandard.saleNum}, #{goodsStandard.status}, #{goodsStandard.remark}, #{goodsStandard.createBy}, sysdate() #{goodsStandard.groupPrice}, 100, 0, #{goodsStandard.status}, #{goodsStandard.remark}, #{goodsStandard.createBy}, sysdate()
) )
</foreach> </foreach>
</insert> </insert>