framework/src/main/java/cn/lili/modules/lmk/domain/query/CouponVirtualQuery.java
@@ -21,5 +21,8 @@ @ApiModel(value = "CouponVirtual查询参数", description = "虚拟商品优惠卷查询参数") public class CouponVirtualQuery extends AbsQuery { private String orderId; private String userNickName; private String skuName; } framework/src/main/java/cn/lili/modules/lmk/domain/vo/CouponVirtualVO.java
@@ -64,6 +64,8 @@ private String original; private String userNickName; public static CouponVirtualVO getVoByEntity(@NonNull CouponVirtual entity, CouponVirtualVO vo) { if(vo == null) { vo = new CouponVirtualVO(); framework/src/main/java/cn/lili/modules/order/order/entity/dto/OrderSearchParams.java
@@ -117,6 +117,9 @@ @ApiModelProperty(value = "订单促销类型") private String orderPromotionType; private String couponFlag; public <T> QueryWrapper<T> queryWrapper() { AuthUser currentUser = UserContext.getCurrentUser(); QueryWrapper<T> wrapper = new QueryWrapper<>(); @@ -180,6 +183,8 @@ //按评价状态 wrapper.eq(CharSequenceUtil.isNotEmpty(commentStatus), "oi.comment_status", commentStatus); wrapper.eq(CharSequenceUtil.isNotEmpty(couponFlag),"o.coupon_flag", couponFlag); //按标签查询 if (CharSequenceUtil.isNotEmpty(tag)) { String orderStatusColumn = "o.order_status"; framework/src/main/resources/mapper/lmk/CouponVirtualMapper.xml
@@ -19,6 +19,7 @@ <result column="update_by" property="updateBy" /> <result column="delete_flag" property="deleteFlag" /> <result column="original" property="original" /> <result column="user_nickname" property="userNickName" /> </resultMap> <select id="getById" resultMap="BaseResultMap"> @@ -61,6 +62,8 @@ LCV.create_time, LCV.update_by, LCV.delete_flag, LCV.user_nickname, LCV.id LCV.id, LGS.original FROM @@ -70,6 +73,12 @@ <if test="query.orderId != null and query.orderId !=''"> AND LCV.order_id = #{query.orderId} </if> <if test="query.userNickName != null and query.userNickName !=''"> AND LCV.user_nickname like CONCAT('%', #{query.userNickName}, '%') </if> <if test="query.skuName != null and query.skuName !=''"> AND LCV.sku_name like CONCAT('%', #{query.skuName}, '%') </if> </select> manager-api/src/main/java/cn/lili/controller/lmk/CardPackController.java
New file @@ -0,0 +1,36 @@ package cn.lili.controller.lmk; import cn.lili.base.Result; import cn.lili.modules.lmk.domain.query.CouponVirtualQuery; import cn.lili.modules.lmk.service.CouponVirtualService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * lmk-shop-java * * @author : zxl * @date : 2025-09-12 18:11 **/ @Validated @RequiredArgsConstructor @Api(value = "礼品卡包", tags = "礼品卡包") @RestController @RequestMapping("/manager/cardPack") public class CardPackController { private final CouponVirtualService couponVirtualService; @GetMapping @ApiOperation(value = "列表", notes = "列表") public Result getPage(CouponVirtualQuery query){ //更具订单id查询 return couponVirtualService.page(query); } }