|
@@ -14,7 +14,7 @@ import com.cyksj.model.entity.*;
|
|
|
import com.cyksj.model.request.YhShopApplyMoneyReq;
|
|
import com.cyksj.model.request.YhShopApplyMoneyReq;
|
|
|
import com.cyksj.model.views.*;
|
|
import com.cyksj.model.views.*;
|
|
|
import com.cyksj.service.cps.shop.YhShopManageService;
|
|
import com.cyksj.service.cps.shop.YhShopManageService;
|
|
|
-import com.cyksj.service.mange.GoodsDonCategoryService;
|
|
|
|
|
|
|
+import com.cyksj.service.mange.RefreshCacheService;
|
|
|
import com.cyksj.web.util.StpYhShopManageUser;
|
|
import com.cyksj.web.util.StpYhShopManageUser;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
import com.ejlchina.searcher.SearchResult;
|
|
import com.ejlchina.searcher.SearchResult;
|
|
@@ -54,7 +54,7 @@ public class YhShopUserController {
|
|
|
|
|
|
|
|
private final YhShopApplyRecordMapper yhShopApplyRecordMapper;
|
|
private final YhShopApplyRecordMapper yhShopApplyRecordMapper;
|
|
|
|
|
|
|
|
- private final GoodsDonCategoryService goodsDonCategoryService;
|
|
|
|
|
|
|
+ private final RefreshCacheService refreshCacheService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 店铺 信息详情
|
|
* 店铺 信息详情
|
|
@@ -85,6 +85,25 @@ public class YhShopUserController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 设置是否展示广告位
|
|
|
|
|
+ */
|
|
|
|
|
+ @PutMapping("/set/shop/ad")
|
|
|
|
|
+ public Result<String> setShopAd(@RequestBody YhShop yhShop) {
|
|
|
|
|
+ long userId = StpYhShopManageUser.getLoginIdAsLong();
|
|
|
|
|
+ YhShop dbShop = yhShopMapper.selectOne(Wrappers.lambdaQuery(YhShop.class)
|
|
|
|
|
+ .eq(YhShop::getUserId, userId).last("limit 1"));
|
|
|
|
|
+ if (dbShop == null) {
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("店铺不存在");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (yhShop.getIsShowAd() != null && dbShop.getIsShowAd() != yhShop.getIsShowAd()) {
|
|
|
|
|
+ dbShop.setIsShowAd(yhShop.getIsShowAd());
|
|
|
|
|
+ yhShopMapper.updateById(dbShop);
|
|
|
|
|
+ refreshCacheService.refreshUserShopMangeCache(dbShop.getCustomId());
|
|
|
|
|
+ }
|
|
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 申请修改
|
|
* 申请修改
|
|
|
*/
|
|
*/
|