参数序列化问题
This commit is contained in:
@@ -132,13 +132,18 @@ public class PpPackageOrderDTO implements Serializable {
|
||||
private Integer isMyself;
|
||||
|
||||
/**
|
||||
* 阶梯优惠
|
||||
* 套餐信息
|
||||
*/
|
||||
private List<PpPackageVO.TieredDiscount> tieredDiscount;
|
||||
private PpPackageVO packageInfo;
|
||||
|
||||
/**
|
||||
* 分享期限(小时)
|
||||
* 店铺名称
|
||||
*/
|
||||
private Integer expireHours;
|
||||
private String shopName;
|
||||
|
||||
/**
|
||||
* 店铺地址
|
||||
*/
|
||||
private String shopAddress;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.czg.market.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
@@ -66,6 +67,7 @@ public class PpPackage implements Serializable {
|
||||
/**
|
||||
* 套餐图片
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String images;
|
||||
|
||||
/**
|
||||
@@ -81,6 +83,7 @@ public class PpPackage implements Serializable {
|
||||
/**
|
||||
* 套餐内容 json
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String packageContent;
|
||||
|
||||
/**
|
||||
@@ -101,6 +104,7 @@ public class PpPackage implements Serializable {
|
||||
/**
|
||||
* 阶梯优惠
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String tieredDiscount;
|
||||
|
||||
/**
|
||||
@@ -116,6 +120,7 @@ public class PpPackage implements Serializable {
|
||||
/**
|
||||
* 商品详情图片
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String detailImages;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.czg.market.service;
|
||||
|
||||
import com.czg.market.dto.PpPackageOrderDTO;
|
||||
import com.czg.market.vo.PpOrderListVO;
|
||||
import com.czg.order.dto.GbOrderQueryParam;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.market.entity.PpPackageOrder;
|
||||
|
||||
@@ -28,12 +31,12 @@ public interface PpPackageOrderService extends IService<PpPackageOrder> {
|
||||
boolean helpOrder(Long orderId);
|
||||
|
||||
/**
|
||||
* 获取进行中的套餐推广订单数量
|
||||
* 查询订单分页
|
||||
*/
|
||||
long getProgressingPackageOrderCount(Long packageId);
|
||||
Page<PpOrderListVO> queryOrderList(Long shopId, Long userId, GbOrderQueryParam param);
|
||||
|
||||
/**
|
||||
* 将所有正在进行的推广订单设置为取消
|
||||
* 取消订单
|
||||
*/
|
||||
void cancelProgressingPackageOrder(Long shopId, Long packageId);
|
||||
Boolean cancelOrder(Long orderId);
|
||||
}
|
||||
|
||||
@@ -48,4 +48,8 @@ public interface PpPackageService extends IService<PpPackage> {
|
||||
* 获取套餐分页
|
||||
*/
|
||||
Page<PpPackageVO> getPackagePage(PpPackagePageReqVo reqVo, boolean isAdmin);
|
||||
|
||||
PpPackage getPackageById(Long id);
|
||||
|
||||
PpPackageVO convertPackageToVo(PpPackage ppPackage);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.czg.market.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yjjie
|
||||
* @date 2025/12/18 16:36
|
||||
*/
|
||||
@Data
|
||||
public class PpOrderListVO {
|
||||
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 店铺 Id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 套餐 Id
|
||||
*/
|
||||
private Long packageId;
|
||||
|
||||
/**
|
||||
* 分享人数
|
||||
*/
|
||||
private Integer shareNum;
|
||||
|
||||
/**
|
||||
* 订单状态:ing进行中, wait_verify 待核销,finish 已核销,refunding 退款中,refund 已退款,cancel 已取消,timeout 超时
|
||||
* {@link com.czg.constants.PpPackageConstants.OrderStatus}
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 店铺名称
|
||||
*/
|
||||
private String shopName;
|
||||
|
||||
/**
|
||||
* 店铺地址
|
||||
*/
|
||||
private String shopAddress;
|
||||
|
||||
/**
|
||||
* 套餐名称
|
||||
*/
|
||||
private String packageName;
|
||||
|
||||
/**
|
||||
* 套餐原价
|
||||
*/
|
||||
private BigDecimal originPrice;
|
||||
|
||||
/**
|
||||
* 销售价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 套餐图片
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String imagesStr;
|
||||
|
||||
/**
|
||||
* 套餐图片Json
|
||||
*/
|
||||
private List<String> images;
|
||||
|
||||
/**
|
||||
* 阶梯优惠
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String tieredDiscountStr;
|
||||
|
||||
/**
|
||||
* 阶梯优惠Json
|
||||
*/
|
||||
private List<PpPackageVO.TieredDiscount> tieredDiscount;
|
||||
|
||||
/**
|
||||
* 分享期限(小时)
|
||||
*/
|
||||
private Integer expireHours;
|
||||
}
|
||||
@@ -23,10 +23,12 @@ public class GbOrderQueryParam extends BaseQueryParam {
|
||||
|
||||
/**
|
||||
* 下单 开始时间 yyyy-MM-dd HH:mm:ss
|
||||
* 支付 开始时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String orderStartTime;
|
||||
/**
|
||||
* 下单 结束时间 yyyy-MM-dd HH:mm:ss
|
||||
* 支付 结束时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String orderEndTime;
|
||||
|
||||
@@ -53,6 +55,11 @@ public class GbOrderQueryParam extends BaseQueryParam {
|
||||
*/
|
||||
private String groupOrderNo;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
|
||||
|
||||
public String getOrderStartTime() {
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.czg.service.market.mapper;
|
||||
|
||||
import com.czg.market.vo.PpOrderListVO;
|
||||
import com.czg.order.dto.GbOrderQueryParam;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.market.entity.PpPackageOrder;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 套餐推广订单 映射层。
|
||||
@@ -11,4 +16,7 @@ import com.czg.market.entity.PpPackageOrder;
|
||||
*/
|
||||
public interface PpPackageOrderMapper extends BaseMapper<PpPackageOrder> {
|
||||
|
||||
List<PpOrderListVO> getOrderList(@Param("shopId") Long shopId,
|
||||
@Param("userId") Long userId,
|
||||
@Param("param") GbOrderQueryParam param);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.czg.service.market.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.constants.PpPackageConstants;
|
||||
import com.czg.constants.SystemConstants;
|
||||
import com.czg.enums.OrderNoPrefixEnum;
|
||||
@@ -10,18 +13,26 @@ import com.czg.market.entity.PpPackage;
|
||||
import com.czg.market.entity.PpPackageOrder;
|
||||
import com.czg.market.service.PpHelpRecordService;
|
||||
import com.czg.market.service.PpPackageOrderService;
|
||||
import com.czg.market.service.PpPackageService;
|
||||
import com.czg.market.vo.PpOrderListVO;
|
||||
import com.czg.market.vo.PpPackageVO;
|
||||
import com.czg.order.dto.GbOrderQueryParam;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.service.market.mapper.PpPackageMapper;
|
||||
import com.czg.service.market.mapper.PpPackageOrderMapper;
|
||||
import com.czg.utils.CzgRandomUtils;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.czg.utils.PageUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.update.UpdateChain;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 套餐推广订单 服务层实现。
|
||||
@@ -33,15 +44,17 @@ import java.time.LocalDateTime;
|
||||
public class PpPackageOrderServiceImpl extends ServiceImpl<PpPackageOrderMapper, PpPackageOrder> implements PpPackageOrderService {
|
||||
|
||||
@Resource
|
||||
private PpPackageMapper ppPackageMapper;
|
||||
private PpPackageService ppPackageService;
|
||||
|
||||
@Resource
|
||||
private PpHelpRecordService ppHelpRecordService;
|
||||
|
||||
@DubboReference
|
||||
private ShopInfoService shopInfoService;
|
||||
|
||||
@Override
|
||||
public Long createPackageOrder(Long packageId) {
|
||||
PpPackage aPackage = ppPackageMapper.selectOneByQuery(QueryWrapper.create().eq(PpPackage::getId, packageId)
|
||||
.eq(PpPackage::getIsDel, SystemConstants.OneZero.ZERO));
|
||||
PpPackage aPackage = ppPackageService.getPackageById(packageId);
|
||||
if (aPackage == null) {
|
||||
throw new CzgException("套餐不存在");
|
||||
}
|
||||
@@ -85,6 +98,15 @@ public class PpPackageOrderServiceImpl extends ServiceImpl<PpPackageOrderMapper,
|
||||
orderDto.setCanHelp(0);
|
||||
}
|
||||
|
||||
ShopInfo shopInfo = shopInfoService.getById(order.getShopId());
|
||||
if (shopInfo != null) {
|
||||
orderDto.setShopName(shopInfo.getShopName());
|
||||
orderDto.setShopAddress(shopInfo.getAddress());
|
||||
}
|
||||
|
||||
PpPackage aPackage = ppPackageService.getById(order.getPackageId());
|
||||
orderDto.setPackageInfo(ppPackageService.convertPackageToVo(aPackage));
|
||||
|
||||
return orderDto;
|
||||
}
|
||||
|
||||
@@ -115,23 +137,36 @@ public class PpPackageOrderServiceImpl extends ServiceImpl<PpPackageOrderMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getProgressingPackageOrderCount(Long packageId) {
|
||||
QueryWrapper wrapper = QueryWrapper.create().eq(PpPackageOrder::getPackageId, packageId)
|
||||
.eq(PpPackageOrder::getStatus, PpPackageConstants.OrderStatus.PROCESSING);
|
||||
return count(wrapper);
|
||||
public Page<PpOrderListVO> queryOrderList(Long shopId, Long userId, GbOrderQueryParam param) {
|
||||
PageHelper.startPage(param.getPage(), param.getSize());
|
||||
List<PpOrderListVO> result = mapper.getOrderList(shopId, userId, param);
|
||||
result.forEach(vo -> {
|
||||
vo.setImages(vo.getImagesStr() == null ? null : JSONArray.parseArray(vo.getImagesStr(), String.class));
|
||||
vo.setTieredDiscount(vo.getTieredDiscountStr() == null ? null : JSONArray.parseArray(vo.getTieredDiscountStr(), PpPackageVO.TieredDiscount.class));
|
||||
});
|
||||
return PageUtil.convert(new PageInfo<>(result));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancelProgressingPackageOrder(Long shopId, Long packageId) {
|
||||
UpdateChain<PpPackageOrder> update = UpdateChain.of(PpPackageOrder.class)
|
||||
public Boolean cancelOrder(Long orderId) {
|
||||
PpPackageOrder order = getById(orderId);
|
||||
if (order == null) {
|
||||
throw new CzgException("订单不存在");
|
||||
}
|
||||
|
||||
if (!PpPackageConstants.OrderStatus.PROCESSING.equals(order.getStatus()) && !PpPackageConstants.OrderStatus.TIMEOUT.equals(order.getStatus())) {
|
||||
throw new CzgException("不允许取消");
|
||||
}
|
||||
|
||||
if (!order.getUserId().equals(StpKit.USER.getLoginIdAsLong())) {
|
||||
throw new CzgException("无权限");
|
||||
}
|
||||
|
||||
return UpdateChain.of(PpPackageOrder.class)
|
||||
.set(PpPackageOrder::getStatus, PpPackageConstants.OrderStatus.CANCEL)
|
||||
.set(PpPackageOrder::getCancelTime, LocalDateTime.now())
|
||||
.set(PpPackageOrder::getCancelReason, "商家下架套餐");
|
||||
if (packageId != null && packageId > 0L) {
|
||||
update.eq(PpPackageOrder::getPackageId, packageId);
|
||||
}
|
||||
update.eq(PpPackageOrder::getShopId, shopId)
|
||||
.eq(PpPackageOrder::getStatus, PpPackageConstants.OrderStatus.PROCESSING)
|
||||
.set(PpPackageOrder::getCancelReason, "用户取消")
|
||||
.eq(PpPackageOrder::getId, orderId)
|
||||
.update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,15 +5,17 @@ import com.alibaba.fastjson2.JSONArray;
|
||||
import com.czg.account.entity.ShopConfig;
|
||||
import com.czg.account.service.ShopConfigService;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.constants.PpPackageConstants;
|
||||
import com.czg.constants.SystemConstants;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.market.entity.PpPackage;
|
||||
import com.czg.market.service.PpPackageOrderService;
|
||||
import com.czg.market.entity.PpPackageOrder;
|
||||
import com.czg.market.service.PpPackageService;
|
||||
import com.czg.market.vo.PpPackagePageReqVo;
|
||||
import com.czg.market.vo.PpPackageVO;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.service.market.mapper.PpPackageMapper;
|
||||
import com.czg.service.market.mapper.PpPackageOrderMapper;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
@@ -21,9 +23,11 @@ import com.mybatisflex.core.update.UpdateChain;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -37,13 +41,15 @@ import java.util.List;
|
||||
public class PpPackageServiceImpl extends ServiceImpl<PpPackageMapper, PpPackage> implements PpPackageService {
|
||||
|
||||
@Resource
|
||||
private PpPackageOrderService ppPackageOrderService;
|
||||
private PpPackageOrderMapper ppPackageOrderMapper;
|
||||
|
||||
@DubboReference
|
||||
private ShopInfoService shopInfoService;
|
||||
|
||||
@DubboReference
|
||||
private ShopConfigService shopConfigService;
|
||||
@Autowired
|
||||
private PpPackageMapper ppPackageMapper;
|
||||
|
||||
@Override
|
||||
public Integer getPackagePromotionSwitch() {
|
||||
@@ -64,7 +70,7 @@ public class PpPackageServiceImpl extends ServiceImpl<PpPackageMapper, PpPackage
|
||||
.eq(PpPackage::getShopId, shopId)
|
||||
.update();
|
||||
|
||||
ppPackageOrderService.cancelProgressingPackageOrder(StpKit.USER.getShopId(), 0L);
|
||||
cancelProgressingPackageOrder(StpKit.USER.getShopId(), 0L);
|
||||
}
|
||||
return update;
|
||||
}
|
||||
@@ -127,7 +133,9 @@ public class PpPackageServiceImpl extends ServiceImpl<PpPackageMapper, PpPackage
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
|
||||
long orderCount = ppPackageOrderService.getProgressingPackageOrderCount(id);
|
||||
QueryWrapper wrapper = QueryWrapper.create().eq(PpPackageOrder::getPackageId, id)
|
||||
.eq(PpPackageOrder::getStatus, PpPackageConstants.OrderStatus.PROCESSING);
|
||||
long orderCount = ppPackageMapper.selectCountByQuery(wrapper);
|
||||
if (orderCount > 0) {
|
||||
return orderCount;
|
||||
}
|
||||
@@ -144,7 +152,7 @@ public class PpPackageServiceImpl extends ServiceImpl<PpPackageMapper, PpPackage
|
||||
ppPackage.setIsDel(1);
|
||||
updateById(ppPackage);
|
||||
|
||||
ppPackageOrderService.cancelProgressingPackageOrder(StpKit.USER.getShopId(), id);
|
||||
cancelProgressingPackageOrder(StpKit.USER.getShopId(), id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -176,17 +184,7 @@ public class PpPackageServiceImpl extends ServiceImpl<PpPackageMapper, PpPackage
|
||||
Page<PpPackage> page = page(Page.of(reqVo.getPage(), reqVo.getSize()), queryWrapper);
|
||||
|
||||
List<PpPackageVO> voList = new ArrayList<>();
|
||||
page.getRecords().forEach(item -> {
|
||||
PpPackageVO packageVO = BeanUtil.copyProperties(item, PpPackageVO.class);
|
||||
|
||||
packageVO.setUseWeeks(JSONArray.parseArray(item.getUseWeeks(), String.class));
|
||||
packageVO.setPackageContent(JSONArray.parseArray(item.getPackageContent(), PpPackageVO.PackageContent.class));
|
||||
packageVO.setTieredDiscount(JSONArray.parseArray(item.getTieredDiscount(), PpPackageVO.TieredDiscount.class));
|
||||
packageVO.setImages(JSONArray.parseArray(item.getImages(), String.class));
|
||||
packageVO.setDetailImages(JSONArray.parseArray(item.getDetailImages(), String.class));
|
||||
|
||||
voList.add(packageVO);
|
||||
});
|
||||
page.getRecords().forEach(item -> voList.add(convertPackageToVo(item)));
|
||||
|
||||
Page<PpPackageVO> voPage = new Page<>();
|
||||
BeanUtil.copyProperties(page, voPage, "records");
|
||||
@@ -194,7 +192,8 @@ public class PpPackageServiceImpl extends ServiceImpl<PpPackageMapper, PpPackage
|
||||
return voPage;
|
||||
}
|
||||
|
||||
private PpPackage getPackageById(Long id) {
|
||||
@Override
|
||||
public PpPackage getPackageById(Long id) {
|
||||
PpPackage ppPackage = getOne(QueryWrapper.create().eq(PpPackage::getId, id)
|
||||
.eq(PpPackage::getIsDel, SystemConstants.OneZero.ZERO));
|
||||
if (ppPackage == null) {
|
||||
@@ -202,4 +201,30 @@ public class PpPackageServiceImpl extends ServiceImpl<PpPackageMapper, PpPackage
|
||||
}
|
||||
return ppPackage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PpPackageVO convertPackageToVo(PpPackage ppPackage) {
|
||||
PpPackageVO packageVO = BeanUtil.copyProperties(ppPackage, PpPackageVO.class);
|
||||
|
||||
packageVO.setUseWeeks(JSONArray.parseArray(ppPackage.getUseWeeks(), String.class));
|
||||
packageVO.setPackageContent(JSONArray.parseArray(ppPackage.getPackageContent(), PpPackageVO.PackageContent.class));
|
||||
packageVO.setTieredDiscount(JSONArray.parseArray(ppPackage.getTieredDiscount(), PpPackageVO.TieredDiscount.class));
|
||||
packageVO.setImages(JSONArray.parseArray(ppPackage.getImages(), String.class));
|
||||
packageVO.setDetailImages(JSONArray.parseArray(ppPackage.getDetailImages(), String.class));
|
||||
|
||||
return packageVO;
|
||||
}
|
||||
|
||||
public void cancelProgressingPackageOrder(Long shopId, Long packageId) {
|
||||
UpdateChain<PpPackageOrder> update = UpdateChain.of(PpPackageOrder.class)
|
||||
.set(PpPackageOrder::getStatus, PpPackageConstants.OrderStatus.CANCEL)
|
||||
.set(PpPackageOrder::getCancelTime, LocalDateTime.now())
|
||||
.set(PpPackageOrder::getCancelReason, "商家下架套餐");
|
||||
if (packageId != null && packageId > 0L) {
|
||||
update.eq(PpPackageOrder::getPackageId, packageId);
|
||||
}
|
||||
update.eq(PpPackageOrder::getShopId, shopId)
|
||||
.eq(PpPackageOrder::getStatus, PpPackageConstants.OrderStatus.PROCESSING)
|
||||
.update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,4 +4,38 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czg.service.market.mapper.PpPackageOrderMapper">
|
||||
|
||||
<select id="getOrderList" resultType="com.czg.market.vo.PpOrderListVO">
|
||||
SELECT
|
||||
o.id, o.shop_id, o.order_no, o.package_id, o.share_num, o.status,
|
||||
s.shop_name as shopName, s.address as shopAddress,
|
||||
p.origin_price as originPrice, p.price, p.images as imagesStr, p.tiered_discount as tieredDiscountStr,
|
||||
p.expire_hours as expireHours, p.package_name as packageName
|
||||
from pp_package_order o
|
||||
left join tb_shop_info s on o.shop_id = s.id
|
||||
left join pp_package p on o.package_id = p.id
|
||||
where 1=1
|
||||
<if test="shopId != null">
|
||||
and o.shop_id = #{shopId}
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and o.user_id = #{userId}
|
||||
</if>
|
||||
<if test="param.orderNo != null">
|
||||
and o.order_no = #{param.orderNo}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
and o.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.orderStartTime != null and param.orderEndTime != null ">
|
||||
and o.pay_time BETWEEN #{param.orderStartTime} and #{param.orderEndTime}
|
||||
</if>
|
||||
<if test="param.verifyStartTime != null and param.verifyEndTime != null ">
|
||||
and o.verify_time BETWEEN #{param.verifyStartTime} and #{param.verifyEndTime}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
and p.package_name like concat('%', #{param.name}, '%')
|
||||
</if>
|
||||
order by o.create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -20,7 +20,7 @@ public interface GbOrderMapper extends BaseMapper<GbOrder> {
|
||||
|
||||
GbOrderCountVO countOrder(@Param("param") GbOrderQueryParam param);
|
||||
|
||||
List<GbOrderDetailVO> getGbOrderPage(@Param("param")GbOrderQueryParam param, Long shopId, Long mainShopId);
|
||||
List<GbOrderDetailVO> getGbOrderPage(@Param("param") GbOrderQueryParam param, Long shopId, Long mainShopId);
|
||||
|
||||
GbOrderDetailVO getDetailByDetailId(Long mainShopId, Long shopId, Long detailId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user