update:
1. 后台订单管理接口修改
This commit is contained in:
@@ -33,9 +33,9 @@ public interface AppCommonConvert {
|
|||||||
@Mapping(target = "imageUrl", source = "product.thumbImageUrl")
|
@Mapping(target = "imageUrl", source = "product.thumbImageUrl")
|
||||||
CommonUserOrderEntity convertMallProductToOrder(CreateOrderRequest request, MallProductEntity product);
|
CommonUserOrderEntity convertMallProductToOrder(CreateOrderRequest request, MallProductEntity product);
|
||||||
|
|
||||||
CommonUserOrderVO convertUserOrderEntityToVO(CommonUserOrderEntity entity);
|
CommonUserOrderApiVO convertUserOrderEntityToApi(CommonUserOrderEntity entity);
|
||||||
|
|
||||||
List<CommonUserOrderVO> convertUserOrderEntityListTOVOList(List<CommonUserOrderEntity> entityList);
|
List<CommonUserOrderApiVO> convertUserOrderEntityListTOApiList(List<CommonUserOrderEntity> entityList);
|
||||||
|
|
||||||
CommonUserOrderApiVO convertOrderApiVO(CommonUserOrderVO vo);
|
CommonUserOrderApiVO convertOrderApiVO(CommonUserOrderVO vo);
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ public interface CommonUserOrderMapper extends BaseMapper<CommonUserOrderEntity>
|
|||||||
*/
|
*/
|
||||||
List<CommonUserOrderVO> selectOrderPage(IPage page, CommonUserOrderVO order);
|
List<CommonUserOrderVO> selectOrderPage(IPage page, CommonUserOrderVO order);
|
||||||
|
|
||||||
|
List<CommonUserOrderEntity> selectOrderEntityPage(IPage page, CommonUserOrderEntity order);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取导出数据
|
* 获取导出数据
|
||||||
|
|||||||
@@ -34,6 +34,16 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectOrderPage" resultType="org.springblade.modules.common.pojo.vo.CommonUserOrderVO">
|
<select id="selectOrderPage" resultType="org.springblade.modules.common.pojo.vo.CommonUserOrderVO">
|
||||||
|
select uo.*, bu.account as account
|
||||||
|
from user_order uo
|
||||||
|
left join blade_user bu on uo.user_id = bu.id
|
||||||
|
where uo.is_deleted = 0
|
||||||
|
<if test="order.id != null">
|
||||||
|
and uo.id = #{order.id}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOrderEntityPage" resultType="org.springblade.modules.common.pojo.entity.CommonUserOrderEntity">
|
||||||
select * from user_order where is_deleted = 0 and user_id = #{order.userId}
|
select * from user_order where is_deleted = 0 and user_id = #{order.userId}
|
||||||
<if test="order.orderStatus !=null and order.orderStatus > 0 ">
|
<if test="order.orderStatus !=null and order.orderStatus > 0 ">
|
||||||
and order_status = #{order.orderStatus}
|
and order_status = #{order.orderStatus}
|
||||||
@@ -42,7 +52,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="exportOrder" resultType="org.springblade.modules.common.excel.CommonUserOrderExcel">
|
<select id="exportOrder" resultType="org.springblade.modules.common.excel.CommonUserOrderExcel">
|
||||||
SELECT * FROM user_order ${ew.customSqlSegment}
|
SELECT *
|
||||||
|
FROM user_order ${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ import org.springblade.modules.common.pojo.entity.CommonUserOrderEntity;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户订单 视图实体类
|
* 用户订单 视图实体类
|
||||||
@@ -37,9 +40,50 @@ import java.io.Serial;
|
|||||||
* @since 2026-02-06
|
* @since 2026-02-06
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
public class CommonUserOrderVO implements Serializable {
|
||||||
public class CommonUserOrderVO extends CommonUserOrderEntity {
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String account;
|
||||||
|
|
||||||
|
private String consigneePhone;
|
||||||
|
|
||||||
|
private String consignee;
|
||||||
|
|
||||||
|
private String deliveryAddress;
|
||||||
|
|
||||||
|
private String orderType;
|
||||||
|
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
private String imageUrl;
|
||||||
|
|
||||||
|
private Integer quantity;
|
||||||
|
|
||||||
|
private String expressCompany;
|
||||||
|
|
||||||
|
private String expressNo;
|
||||||
|
|
||||||
|
private Integer orderStatus;
|
||||||
|
|
||||||
|
private BigDecimal totalAmount;
|
||||||
|
|
||||||
|
private BigDecimal actualAmount;
|
||||||
|
|
||||||
|
private Integer paymentType;
|
||||||
|
|
||||||
|
private Date paymentTime;
|
||||||
|
|
||||||
|
private Integer paymentStatus;
|
||||||
|
|
||||||
|
private Long createUser;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Long updateUser;
|
||||||
|
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,11 +124,11 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<CommonUserOrderApiVO> selectOrderApiPage(IPage<CommonUserOrderApiVO> page, CommonUserOrderApiVO userOrder) {
|
public IPage<CommonUserOrderApiVO> selectOrderApiPage(IPage<CommonUserOrderApiVO> page, CommonUserOrderApiVO userOrder) {
|
||||||
CommonUserOrderVO vo = new CommonUserOrderVO();
|
CommonUserOrderEntity entity = new CommonUserOrderEntity();
|
||||||
vo.setOrderStatus(userOrder.getOrderStatus());
|
entity.setOrderStatus(userOrder.getOrderStatus());
|
||||||
vo.setUserId(AuthUtil.getUserId());
|
entity.setUserId(AuthUtil.getUserId());
|
||||||
List<CommonUserOrderVO> commonUserOrderVOS = baseMapper.selectOrderPage(page, vo);
|
List<CommonUserOrderEntity> commonUserOrderEntityList = baseMapper.selectOrderEntityPage(page, entity);
|
||||||
return page.setRecords(AppCommonConvert.INSTANCE.convertOrderApiListVO(commonUserOrderVOS));
|
return page.setRecords(AppCommonConvert.INSTANCE.convertUserOrderEntityListTOApiList(commonUserOrderEntityList));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user