列表展示项
This commit is contained in:
parent
e2fc42ab47
commit
a9bf6204f1
@ -8,6 +8,7 @@ import com.tmerclub.cloud.cuerecycle.mapper.CueOrderFlawMapper;
|
|||||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderFlawDTO;
|
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderFlawDTO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueRetractedDTO;
|
import com.tmerclub.cloud.cuerecycle.model.dto.CueRetractedDTO;
|
||||||
|
import com.tmerclub.cloud.cuerecycle.model.vo.AdminCueOrderVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderFlawVO;
|
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderFlawVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.service.CueOrderService;
|
import com.tmerclub.cloud.cuerecycle.service.CueOrderService;
|
||||||
@ -45,8 +46,8 @@ public class CueOrderController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "查询回收订单分页列表", description = "查询回收订单分页列表")
|
@Operation(summary = "查询回收订单分页列表", description = "查询回收订单分页列表")
|
||||||
public ServerResponseEntity<PageVO<CueOrderVO>> page(@Valid PageDTO pageDTO, CueOrderDTO cueOrderDTO) {
|
public ServerResponseEntity<PageVO<AdminCueOrderVO>> page(@Valid PageDTO pageDTO, CueOrderDTO cueOrderDTO) {
|
||||||
PageVO<CueOrderVO> cueOrderPage = cueOrderService.page(pageDTO, cueOrderDTO);
|
PageVO<AdminCueOrderVO> cueOrderPage = cueOrderService.page(pageDTO, cueOrderDTO);
|
||||||
return ServerResponseEntity.success(cueOrderPage);
|
return ServerResponseEntity.success(cueOrderPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.tmerclub.cloud.cuerecycle.manager;
|
package com.tmerclub.cloud.cuerecycle.manager;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.tmerclub.cloud.api.coupon.feign.CouponFeignClient;
|
import com.tmerclub.cloud.api.coupon.feign.CouponFeignClient;
|
||||||
@ -132,12 +133,14 @@ public class CreateOrderManager {
|
|||||||
if (!Objects.equals(cueOrderVO.getOrderStatus(), OrderStatus.CUE_EVALUATION_SUCCESS.value())) {
|
if (!Objects.equals(cueOrderVO.getOrderStatus(), OrderStatus.CUE_EVALUATION_SUCCESS.value())) {
|
||||||
throw new LuckException("状态已变更,请检查!");
|
throw new LuckException("状态已变更,请检查!");
|
||||||
}
|
}
|
||||||
|
DateTime date = DateUtil.date();
|
||||||
CueOrder cueOrder = new CueOrder();
|
CueOrder cueOrder = new CueOrder();
|
||||||
cueOrder.setOrderId(cueAgreeOrderDTO.getOrderId());
|
cueOrder.setOrderId(cueAgreeOrderDTO.getOrderId());
|
||||||
cueOrder.setCueOrderType(cueAgreeOrderDTO.getCueOrderType());
|
cueOrder.setCueOrderType(cueAgreeOrderDTO.getCueOrderType());
|
||||||
cueOrder.setOrderStatus(OrderStatus.CUE_EVALUATION_SUCCESS_PAY.value());
|
cueOrder.setOrderStatus(OrderStatus.CUE_EVALUATION_SUCCESS_PAY.value());
|
||||||
cueOrder.setUpdateTime(DateUtil.date());
|
cueOrder.setUpdateTime(date);
|
||||||
cueOrder.setFinallyTime(DateUtil.date());
|
cueOrder.setFinallyTime(date);
|
||||||
|
cueOrder.setPayTime(date);
|
||||||
cueOrder.setIsPayed(1);
|
cueOrder.setIsPayed(1);
|
||||||
// 根据回收类型进行不同操作
|
// 根据回收类型进行不同操作
|
||||||
switch (cueAgreeOrderDTO.getCueOrderType()) {
|
switch (cueAgreeOrderDTO.getCueOrderType()) {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.tmerclub.cloud.cuerecycle.mapper;
|
package com.tmerclub.cloud.cuerecycle.mapper;
|
||||||
|
|
||||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
||||||
|
import com.tmerclub.cloud.cuerecycle.model.vo.AdminCueOrderVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.vo.AppCueOrderVO;
|
import com.tmerclub.cloud.cuerecycle.model.vo.AppCueOrderVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.CueOrder;
|
import com.tmerclub.cloud.cuerecycle.model.CueOrder;
|
||||||
@ -22,7 +23,7 @@ public interface CueOrderMapper{
|
|||||||
* @param cueOrderDTO 查询参数
|
* @param cueOrderDTO 查询参数
|
||||||
* @return 回收订单列表数据
|
* @return 回收订单列表数据
|
||||||
*/
|
*/
|
||||||
List<CueOrderVO> list(@Param("dto") CueOrderDTO cueOrderDTO);
|
List<AdminCueOrderVO> list(@Param("dto") CueOrderDTO cueOrderDTO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取回收订单详情
|
* 获取回收订单详情
|
||||||
|
@ -0,0 +1,133 @@
|
|||||||
|
package com.tmerclub.cloud.cuerecycle.model.vo;
|
||||||
|
|
||||||
|
import com.tmerclub.cloud.common.vo.BaseVO;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回收订单视图对象
|
||||||
|
*
|
||||||
|
* @author : frank
|
||||||
|
* @create : 2025-04-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class AdminCueOrderVO extends BaseVO implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "主键ID")
|
||||||
|
private Long orderId;
|
||||||
|
/**
|
||||||
|
* 商品名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "商品名称")
|
||||||
|
private String productName;
|
||||||
|
/**
|
||||||
|
* 品牌名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "品牌名称")
|
||||||
|
private String brandName;
|
||||||
|
/**
|
||||||
|
* 系列名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "系列名称")
|
||||||
|
private String seriesName;
|
||||||
|
/**
|
||||||
|
* 类型名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "类型名称")
|
||||||
|
private String typeName;
|
||||||
|
/**
|
||||||
|
* 商品图片
|
||||||
|
*/
|
||||||
|
@Schema(description = "商品图片")
|
||||||
|
private String productImages;
|
||||||
|
/**
|
||||||
|
* 用户姓名
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户姓名")
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 用户联系方式
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户联系方式")
|
||||||
|
private String userPhone;
|
||||||
|
/**
|
||||||
|
* 类型:1-回收,2-置换,3-寄售
|
||||||
|
*/
|
||||||
|
@Schema(description = "类型:1-回收,2-置换,3-寄售")
|
||||||
|
private Integer cueOrderType;
|
||||||
|
/**
|
||||||
|
* 订单状态
|
||||||
|
*/
|
||||||
|
@Schema(description = "订单状态")
|
||||||
|
private Integer orderStatus;
|
||||||
|
/**
|
||||||
|
* 预计金额
|
||||||
|
*/
|
||||||
|
@Schema(description = "预计金额")
|
||||||
|
private Long estimatedAmount;
|
||||||
|
/**
|
||||||
|
* 评估金额
|
||||||
|
*/
|
||||||
|
@Schema(description = "评估金额")
|
||||||
|
private Long actualAmount;
|
||||||
|
/**
|
||||||
|
* 代金卷金额
|
||||||
|
*/
|
||||||
|
@Schema(description = "代金卷金额")
|
||||||
|
private Long voucherAmount;
|
||||||
|
/**
|
||||||
|
* 寄售佣金
|
||||||
|
*/
|
||||||
|
private Long brokerage;
|
||||||
|
/**
|
||||||
|
* 服务费
|
||||||
|
*/
|
||||||
|
private Long serviceCharge;
|
||||||
|
/**
|
||||||
|
* 是否已支付,1.已支付0.未支付
|
||||||
|
*/
|
||||||
|
@Schema(description = "是否已支付,1.已支付0.未支付")
|
||||||
|
private Integer isPayed;
|
||||||
|
/**
|
||||||
|
* 支付方式:1-余额,2-代金卷
|
||||||
|
*/
|
||||||
|
@Schema(description = "支付方式:1-余额,2-代金卷")
|
||||||
|
private Integer payType;
|
||||||
|
/**
|
||||||
|
* 付款时间
|
||||||
|
*/
|
||||||
|
@Schema(description = "付款时间")
|
||||||
|
private Date payTime;
|
||||||
|
/**
|
||||||
|
* 发货时间
|
||||||
|
*/
|
||||||
|
@Schema(description = "发货时间")
|
||||||
|
private Date deliveryTime;
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
@Schema(description = "完成时间")
|
||||||
|
private Date finallyTime;
|
||||||
|
/**
|
||||||
|
* 寄出单号
|
||||||
|
*/
|
||||||
|
@Schema(description = "收货物流单号")
|
||||||
|
private String sendNumber;
|
||||||
|
/**
|
||||||
|
* 退货物流单号
|
||||||
|
*/
|
||||||
|
@Schema(description = "退货物流单号")
|
||||||
|
private String backTrackingNumber;
|
||||||
|
}
|
@ -68,9 +68,9 @@ public class CueOrderVO extends BaseVO implements Serializable {
|
|||||||
@Schema(description = "类型:1-回收,2-置换,3-寄售")
|
@Schema(description = "类型:1-回收,2-置换,3-寄售")
|
||||||
private Integer cueOrderType;
|
private Integer cueOrderType;
|
||||||
/**
|
/**
|
||||||
* 状态:0-待审核,1-审核通过(待发货),2-审核拒绝,3-待收货(已发货),4-已收货(评估中),5-评估失败(退回),6-评估成功(给出价格),7-价格不满意(退回),8-价格满意(结束),9-价格不满意(已退回)
|
* 订单状态
|
||||||
*/
|
*/
|
||||||
@Schema(description = "0-待审核,1-审核通过(待发货),2-审核拒绝,3-待收货(已发货),4-已收货(评估中),5-评估失败(退回),6-评估成功(给出价格),7-价格不满意(退回),8-价格满意(结束),9-价格不满意(已退回)")
|
@Schema(description = "订单状态")
|
||||||
private Integer orderStatus;
|
private Integer orderStatus;
|
||||||
/**
|
/**
|
||||||
* 瑕疵图片,逗号隔开
|
* 瑕疵图片,逗号隔开
|
||||||
|
@ -4,6 +4,7 @@ import com.tmerclub.cloud.common.database.dto.PageDTO;
|
|||||||
import com.tmerclub.cloud.common.database.vo.PageVO;
|
import com.tmerclub.cloud.common.database.vo.PageVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueSaveMailingDTO;
|
import com.tmerclub.cloud.cuerecycle.model.dto.CueSaveMailingDTO;
|
||||||
|
import com.tmerclub.cloud.cuerecycle.model.vo.AdminCueOrderVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.vo.AppCueOrderVO;
|
import com.tmerclub.cloud.cuerecycle.model.vo.AppCueOrderVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
||||||
|
|
||||||
@ -22,7 +23,7 @@ public interface CueOrderService {
|
|||||||
* @param cueOrderDTO 查询参数
|
* @param cueOrderDTO 查询参数
|
||||||
* @return 分页数据
|
* @return 分页数据
|
||||||
*/
|
*/
|
||||||
PageVO<CueOrderVO> page(PageDTO pageDTO, CueOrderDTO cueOrderDTO);
|
PageVO<AdminCueOrderVO> page(PageDTO pageDTO, CueOrderDTO cueOrderDTO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取回收订单详情
|
* 获取回收订单详情
|
||||||
|
@ -17,6 +17,7 @@ import com.tmerclub.cloud.cuerecycle.mapper.CueOrderMapper;
|
|||||||
import com.tmerclub.cloud.cuerecycle.model.CueOrder;
|
import com.tmerclub.cloud.cuerecycle.model.CueOrder;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueSaveMailingDTO;
|
import com.tmerclub.cloud.cuerecycle.model.dto.CueSaveMailingDTO;
|
||||||
|
import com.tmerclub.cloud.cuerecycle.model.vo.AdminCueOrderVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.vo.AppCueOrderVO;
|
import com.tmerclub.cloud.cuerecycle.model.vo.AppCueOrderVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
||||||
import com.tmerclub.cloud.cuerecycle.service.CueOrderService;
|
import com.tmerclub.cloud.cuerecycle.service.CueOrderService;
|
||||||
@ -49,7 +50,7 @@ public class CueOrderServiceImpl implements CueOrderService {
|
|||||||
private RocketMQTemplate sendNotifyToUserTemplate;
|
private RocketMQTemplate sendNotifyToUserTemplate;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageVO<CueOrderVO> page(PageDTO pageDTO, CueOrderDTO cueOrderDTO) {
|
public PageVO<AdminCueOrderVO> page(PageDTO pageDTO, CueOrderDTO cueOrderDTO) {
|
||||||
return PageUtil.doPage(pageDTO, () -> cueOrderMapper.list(cueOrderDTO));
|
return PageUtil.doPage(pageDTO, () -> cueOrderMapper.list(cueOrderDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,34 +41,59 @@
|
|||||||
create_time,update_time,is_payed,pay_type,pay_time,delivery_time,finally_time,mall_order_id,send_number,order_addr_id,warehouse_id,shop_id
|
create_time,update_time,is_payed,pay_type,pay_time,delivery_time,finally_time,mall_order_id,send_number,order_addr_id,warehouse_id,shop_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="list" resultMap="cueOrderVOMap">
|
<select id="list" resultType="com.tmerclub.cloud.cuerecycle.model.vo.AdminCueOrderVO">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="Vo_Column_List" />
|
co.order_id,
|
||||||
|
co.product_name,
|
||||||
|
co.product_images,
|
||||||
|
co.user_name,
|
||||||
|
co.user_phone,
|
||||||
|
co.cue_order_type,
|
||||||
|
co.order_status,
|
||||||
|
co.estimated_amount,
|
||||||
|
co.actual_amount,
|
||||||
|
co.voucher_amount,
|
||||||
|
co.brokerage,
|
||||||
|
co.service_charge,
|
||||||
|
co.is_payed,
|
||||||
|
co.pay_type,
|
||||||
|
co.pay_time,
|
||||||
|
co.delivery_time,
|
||||||
|
co.finally_time,
|
||||||
|
co.send_number,
|
||||||
|
co.back_tracking_number,
|
||||||
|
cb.brand_name,
|
||||||
|
cs.series_name,
|
||||||
|
ct.type_name
|
||||||
FROM
|
FROM
|
||||||
cue_order
|
`cue_order` AS co
|
||||||
|
LEFT JOIN cue_product AS cp ON co.product_id = cp.product_id
|
||||||
|
LEFT JOIN cue_type AS ct ON cp.type_id = ct.type_id
|
||||||
|
LEFT JOIN cue_brand AS cb ON cp.brand_id = cb.brand_id
|
||||||
|
LEFT JOIN cue_series AS cs ON cp.series_id = cs.series_id
|
||||||
<where>
|
<where>
|
||||||
deleted = 0
|
deleted = 0
|
||||||
<if test="dto.userName != null and dto.userName != ''">
|
<if test="dto.userName != null and dto.userName != ''">
|
||||||
AND user_name LIKE CONCAT('%', #{dto.userName}, '%')
|
AND co.user_name LIKE CONCAT('%', #{dto.userName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.userPhone != null and dto.userPhone != ''">
|
<if test="dto.userPhone != null and dto.userPhone != ''">
|
||||||
AND user_phone LIKE CONCAT('%', #{dto.userPhone}, '%')
|
AND co.user_phone LIKE CONCAT('%', #{dto.userPhone}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.cueOrderType != null">
|
<if test="dto.cueOrderType != null">
|
||||||
AND cue_order_type = #{dto.cueOrderType}
|
AND co.cue_order_type = #{dto.cueOrderType}
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.orderStatus != null">
|
<if test="dto.orderStatus != null">
|
||||||
AND order_status = #{dto.orderStatus}
|
AND co.order_status = #{dto.orderStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.isPayed != null">
|
<if test="dto.isPayed != null">
|
||||||
AND is_payed = #{dto.isPayed}
|
AND co.is_payed = #{dto.isPayed}
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.payType != null">
|
<if test="dto.payType != null">
|
||||||
AND pay_type = #{dto.payType}
|
AND co.pay_type = #{dto.payType}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
order_id DESC
|
co.order_id DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getById" resultMap="cueOrderVOMap">
|
<select id="getById" resultMap="cueOrderVOMap">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user