优化保存楼层装修。优化管理端优惠券搜索

This commit is contained in:
paulGao 2022-07-13 20:03:05 +08:00
parent d17cb4ce96
commit b21e307640
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
package cn.lili.modules.page.serviceimpl;
import cn.hutool.core.text.CharSequenceUtil;
import cn.lili.common.enums.ClientTypeEnum;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.enums.SwitchEnum;
@ -80,8 +81,8 @@ public class PageDataServiceImpl extends ServiceImpl<PageDataMapper, PageData> i
//如果页面为发布则关闭其他页面开启此页面
if (pageData.getPageShow() != null && pageData.getPageShow().equals(SwitchEnum.OPEN.name())) {
LambdaUpdateWrapper<PageData> lambdaUpdateWrapper = Wrappers.lambdaUpdate();
lambdaUpdateWrapper.eq(PageData::getPageType, pageData.getPageType());
lambdaUpdateWrapper.eq(PageData::getPageClientType, pageData.getPageClientType());
lambdaUpdateWrapper.eq(CharSequenceUtil.isNotEmpty(pageData.getPageType()), PageData::getPageType, pageData.getPageType());
lambdaUpdateWrapper.eq(CharSequenceUtil.isNotEmpty(pageData.getPageClientType()), PageData::getPageClientType, pageData.getPageClientType());
lambdaUpdateWrapper.set(PageData::getPageShow, SwitchEnum.CLOSE.name());
this.update(lambdaUpdateWrapper);
} else {

View File

@ -44,7 +44,9 @@ public class CouponManagerController {
@ApiOperation(value = "获取优惠券列表")
@GetMapping
public ResultMessage<IPage<CouponVO>> getCouponList(CouponSearchParams queryParam, PageVO page) {
queryParam.setStoreId(PromotionTools.PLATFORM_ID);
if (queryParam.getStoreId() == null) {
queryParam.setStoreId(PromotionTools.PLATFORM_ID);
}
return ResultUtil.data(couponService.pageVOFindAll(queryParam, page));
}