优化商品分类及子集查询

This commit is contained in:
sj
2022-11-14 16:26:07 +08:00
parent 91188fe1a0
commit 010132f237
3 changed files with 10 additions and 7 deletions
@@ -42,10 +42,12 @@ public class YxStoreCouponUserDto implements Serializable {
private Date addTime;
// 优惠券结束时间
private Date endTime;
private Date useEndTime;
// 使用时间
private Date useTime;
// 优惠券结束时间
private Date useStartTime;
// // 使用时间
// private Date useTime;
// 获取方式
private String type;
@@ -341,8 +341,8 @@ public class YxStoreCouponUserServiceImpl extends BaseServiceImpl<YxStoreCouponU
map.put("优惠券的面值", yxStoreCouponUser.getCouponPrice());
map.put("最低消费多少金额可用优惠券", yxStoreCouponUser.getUseMinPrice());
map.put("优惠券创建时间", yxStoreCouponUser.getAddTime());
map.put("优惠券结束时间", yxStoreCouponUser.getEndTime());
map.put("使用时间", yxStoreCouponUser.getUseTime());
map.put("优惠券使用结束时间", yxStoreCouponUser.getUseEndTime());
map.put("使用开始时间", yxStoreCouponUser.getUseEndTime());
map.put("获取方式", yxStoreCouponUser.getType());
map.put("状态(0:未使用,1:已使用, 2:已过期)", yxStoreCouponUser.getStatus());
map.put("是否有效", yxStoreCouponUser.getIsFail());
@@ -126,8 +126,9 @@ public class StoreProductController {
String newHtml = "";
Map<String,Object> map = new HashMap<>();
newHtml = String.join("", Collections.nCopies(1,html));
map.put("value",yxStoreCategory.getId());
map.put("label",newHtml + yxStoreCategory.getCateName());
//为了前端级联选择器好显示,这里分类名也字段名为storeName
map.put("id",yxStoreCategory.getId());
map.put("storeName",newHtml + yxStoreCategory.getCateName());
List<YxStoreProduct> list=yxStoreProductService.lambdaQuery()
.eq(YxStoreProduct::getIsShow,ShopCommonEnum.SHOW_1.getValue())
.eq(YxStoreProduct::getCateId,yxStoreCategory.getId())