修改报错
This commit is contained in:
parent
bbd5e6ae5c
commit
f8b88dddf1
|
|
@ -14,7 +14,6 @@ import com.ghy.common.utils.StringUtils;
|
|||
import com.ghy.common.utils.poi.ExcelUtil;
|
||||
import com.ghy.customer.domain.CustomerAddress;
|
||||
import com.ghy.customer.service.CustomerAddressService;
|
||||
import com.ghy.customer.service.CustomerService;
|
||||
import com.ghy.goods.domain.Goods;
|
||||
import com.ghy.goods.domain.GoodsImgs;
|
||||
import com.ghy.goods.domain.GoodsStandard;
|
||||
|
|
@ -48,15 +47,14 @@ import com.ghy.worker.domain.WorkerCertification;
|
|||
import com.ghy.worker.service.IWorkerCertificationService;
|
||||
import com.ghy.worker.service.WorkerService;
|
||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -74,37 +72,35 @@ public class OrderMasterController extends BaseController {
|
|||
|
||||
private final String prefix = "order/master";
|
||||
|
||||
@Autowired
|
||||
@Resource
|
||||
private OrderMasterService orderMasterService;
|
||||
@Autowired
|
||||
private CustomerService customerService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private WorkerService workerService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private IWorkerCertificationService workerCertificationService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private OrderDetailService orderDetailService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private OrderGoodsService orderGoodsService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private CustomerAddressService addressService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private GoodsService goodsService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private GoodsImgsService goodsImgsService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private FinancialMasterService financialMasterService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private FinancialDetailService financialDetailService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private GoodsStandardService goodsStandardService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private OrderFineRecordService orderFineRecordService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private ISysAreaService sysAreaService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private IAfterServiceRecordService afterServiceRecordService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private FinancialChangeRecordService financialChangeRecordService;
|
||||
|
||||
@RequiresPermissions("order:master:view")
|
||||
|
|
@ -164,7 +160,7 @@ public class OrderMasterController extends BaseController {
|
|||
// 查询售后记录
|
||||
List<AfterServiceRecord> afterServiceRecords = new ArrayList<>();
|
||||
List<OrderDetail> detailOrderList = orderDetailService.selectByOrderMasterId(master.getId());
|
||||
detailOrderList.stream().forEach(detail -> {
|
||||
detailOrderList.forEach(detail -> {
|
||||
OrderTimeoutRecord timeoutRecord = orderFineRecordService.selectByDetailIdAndStatus(detail.getId(), detail.getOrderStatus());
|
||||
if (timeoutRecord != null) {
|
||||
timeoutRecords.add(timeoutRecord);
|
||||
|
|
@ -277,7 +273,7 @@ public class OrderMasterController extends BaseController {
|
|||
List<OrderMaster> list = orderMasterService.selectOrderMasterList(orderMaster);
|
||||
list.forEach(master -> {
|
||||
//子单
|
||||
List<OrderDetail> detailList = orderDetailService.selectByOrderMasterId(master.getId());
|
||||
// List<OrderDetail> detailList = orderDetailService.selectByOrderMasterId(master.getId());
|
||||
|
||||
// 初始化属性
|
||||
OrderListResponse orderListResponse = new OrderListResponse();
|
||||
|
|
@ -320,7 +316,7 @@ public class OrderMasterController extends BaseController {
|
|||
// 查询是否超时
|
||||
List<OrderTimeoutRecord> timeoutRecords = new ArrayList<>();
|
||||
List<OrderDetail> detailOrderList = orderDetailService.selectByOrderMasterId(master.getId());
|
||||
detailOrderList.stream().forEach(detail -> {
|
||||
detailOrderList.forEach(detail -> {
|
||||
OrderTimeoutRecord timeoutRecord = orderFineRecordService.selectByDetailIdAndStatus(detail.getId(), detail.getOrderStatus());
|
||||
if (timeoutRecord != null) {
|
||||
timeoutRecords.add(timeoutRecord);
|
||||
|
|
@ -623,7 +619,7 @@ public class OrderMasterController extends BaseController {
|
|||
orderMasterResponseVo.setWorkerName(worker.getName());
|
||||
}
|
||||
// 消费者信息
|
||||
CustomerAddress customerAddress = addressService.selectByCustomerAddressId(orderMaster.getAddressId());
|
||||
CustomerAddress customerAddress = addressService.selectByCustomerAddressId(master.getAddressId());
|
||||
orderMasterResponseVo.setCustomerName(customerAddress.getName());
|
||||
|
||||
orderMasterResponseVos.add(orderMasterResponseVo);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.ghy.customer.mapper;
|
|||
import com.ghy.customer.domain.CustomerAddress;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
public interface CustomerAddressMapper {
|
||||
|
|
@ -35,7 +36,7 @@ public interface CustomerAddressMapper {
|
|||
* @param customerAddressId 地址id
|
||||
* @return 地址
|
||||
*/
|
||||
CustomerAddress selectByCustomerAddressId(@Param("customerAddressId") Long customerAddressId);
|
||||
CustomerAddress selectByCustomerAddressId(@NotNull @Param("customerAddressId") Long customerAddressId);
|
||||
|
||||
/**
|
||||
* @param customerAddress 地址信息
|
||||
|
|
|
|||
|
|
@ -59,11 +59,7 @@
|
|||
|
||||
<select id="selectByCustomerAddressId" resultMap="CustomerAddressResult">
|
||||
<include refid="selectCustomerAddress"/>
|
||||
<where>
|
||||
<if test="customerAddressId != null and customerAddressId != 0">
|
||||
AND customer_address_id = #{customerAddressId}
|
||||
</if>
|
||||
</where>
|
||||
WHERE customer_address_id = #{customerAddressId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCustomerAddress" parameterType="com.ghy.customer.domain.CustomerAddress" useGeneratedKeys="true" keyProperty="customerAddressId">
|
||||
|
|
|
|||
Loading…
Reference in New Issue