- 添加后去收件人信息
parent
fb60682c44
commit
21bb6fd1c4
|
@ -4,6 +4,7 @@ import cn.iocoder.common.framework.vo.CommonResult;
|
||||||
import cn.iocoder.mall.order.api.OrderService;
|
import cn.iocoder.mall.order.api.OrderService;
|
||||||
import cn.iocoder.mall.order.api.bo.OrderItemBO;
|
import cn.iocoder.mall.order.api.bo.OrderItemBO;
|
||||||
import cn.iocoder.mall.order.api.bo.OrderPageBO;
|
import cn.iocoder.mall.order.api.bo.OrderPageBO;
|
||||||
|
import cn.iocoder.mall.order.api.bo.OrderRecipientBO;
|
||||||
import cn.iocoder.mall.order.api.dto.*;
|
import cn.iocoder.mall.order.api.dto.*;
|
||||||
import cn.iocoder.mall.order.application.convert.OrderConvertAPP;
|
import cn.iocoder.mall.order.application.convert.OrderConvertAPP;
|
||||||
import cn.iocoder.mall.order.application.vo.OrderItemUpdateVO;
|
import cn.iocoder.mall.order.application.vo.OrderItemUpdateVO;
|
||||||
|
@ -45,6 +46,12 @@ public class AdminsOrderController {
|
||||||
return orderService.getOrderItems(orderId);
|
return orderService.getOrderItems(orderId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("order_recipient_info")
|
||||||
|
@ApiOperation("订单收件人信息")
|
||||||
|
public CommonResult<OrderRecipientBO> getOrderRecipientBO(@RequestParam("orderId") Integer orderId) {
|
||||||
|
return orderService.getOrderRecipientBO(orderId);
|
||||||
|
}
|
||||||
|
|
||||||
@PutMapping("update_remark")
|
@PutMapping("update_remark")
|
||||||
@ApiOperation("更新-更新订单备注")
|
@ApiOperation("更新-更新订单备注")
|
||||||
public CommonResult updateRemark(@RequestParam("orderId") Integer orderId,
|
public CommonResult updateRemark(@RequestParam("orderId") Integer orderId,
|
||||||
|
|
|
@ -4,6 +4,7 @@ import cn.iocoder.common.framework.vo.CommonResult;
|
||||||
import cn.iocoder.mall.order.api.bo.OrderCreateBO;
|
import cn.iocoder.mall.order.api.bo.OrderCreateBO;
|
||||||
import cn.iocoder.mall.order.api.bo.OrderItemBO;
|
import cn.iocoder.mall.order.api.bo.OrderItemBO;
|
||||||
import cn.iocoder.mall.order.api.bo.OrderPageBO;
|
import cn.iocoder.mall.order.api.bo.OrderPageBO;
|
||||||
|
import cn.iocoder.mall.order.api.bo.OrderRecipientBO;
|
||||||
import cn.iocoder.mall.order.api.dto.*;
|
import cn.iocoder.mall.order.api.dto.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -32,6 +33,14 @@ public interface OrderService {
|
||||||
*/
|
*/
|
||||||
CommonResult<List<OrderItemBO>> getOrderItems(Integer orderId);
|
CommonResult<List<OrderItemBO>> getOrderItems(Integer orderId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单收件人信息
|
||||||
|
*
|
||||||
|
* @param orderId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
CommonResult<OrderRecipientBO> getOrderRecipientBO(Integer orderId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单 - 创建
|
* 订单 - 创建
|
||||||
*
|
*
|
||||||
|
|
|
@ -23,6 +23,9 @@ public interface OrderRecipientConvert {
|
||||||
@Mappings({})
|
@Mappings({})
|
||||||
OrderRecipientDO convert(OrderCreateDTO orderCreateDTO);
|
OrderRecipientDO convert(OrderCreateDTO orderCreateDTO);
|
||||||
|
|
||||||
|
@Mappings({})
|
||||||
|
OrderRecipientBO convert(OrderRecipientDO orderRecipientDO);
|
||||||
|
|
||||||
@Mappings({})
|
@Mappings({})
|
||||||
List<OrderRecipientBO> convert(List<OrderRecipientDO> orderRecipientDOList);
|
List<OrderRecipientBO> convert(List<OrderRecipientDO> orderRecipientDOList);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,16 @@ public interface OrderRecipientMapper {
|
||||||
*/
|
*/
|
||||||
int insert(OrderRecipientDO orderRecipient);
|
int insert(OrderRecipientDO orderRecipient);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询 - 根据 orderId
|
||||||
|
*
|
||||||
|
* @param orderId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
OrderRecipientDO selectByOrderId(
|
||||||
|
@Param("orderId") Integer orderId
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询 - 根据 orderIds
|
* 查询 - 根据 orderIds
|
||||||
*
|
*
|
||||||
|
@ -33,4 +43,5 @@ public interface OrderRecipientMapper {
|
||||||
List<OrderRecipientDO> selectByOrderIds(
|
List<OrderRecipientDO> selectByOrderIds(
|
||||||
@Param("orderIds")Collection<Integer> orderIds
|
@Param("orderIds")Collection<Integer> orderIds
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,17 @@ public class OrderServiceImpl implements OrderService {
|
||||||
return CommonResult.success(orderItemBOList);
|
return CommonResult.success(orderItemBOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommonResult<OrderRecipientBO> getOrderRecipientBO(Integer orderId) {
|
||||||
|
if (orderMapper.selectById(orderId) == null) {
|
||||||
|
return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_NOT_EXISTENT.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
OrderRecipientDO orderRecipientDO = orderRecipientMapper.selectByOrderId(orderId);
|
||||||
|
OrderRecipientBO orderRecipientBO = OrderRecipientConvert.INSTANCE.convert(orderRecipientDO);
|
||||||
|
return CommonResult.success(orderRecipientBO);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public CommonResult<OrderCreateBO> createOrder(Integer userId, OrderCreateDTO orderCreateDTO) {
|
public CommonResult<OrderCreateBO> createOrder(Integer userId, OrderCreateDTO orderCreateDTO) {
|
||||||
|
|
|
@ -20,6 +20,16 @@
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
查询 - 根据 orderId
|
||||||
|
-->
|
||||||
|
<select id="selectByOrderId" resultType="cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO">
|
||||||
|
SELECT
|
||||||
|
<include refid="FIELDS" />
|
||||||
|
FROM `order_recipient`
|
||||||
|
WHERE order_id = #{orderId}
|
||||||
|
</select>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
查询 - 根据 orderIds
|
查询 - 根据 orderIds
|
||||||
-->
|
-->
|
||||||
|
@ -32,4 +42,5 @@
|
||||||
#{orderId}
|
#{orderId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue