|
|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.toolkit.Assert;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
+import com.cyksj.model.entity.GoodsDonCategory;
|
|
|
import com.cyksj.model.entity.HomeManagementConfig;
|
|
|
import com.cyksj.model.entity.HomeManagementConfigUserClickRecord;
|
|
|
import com.cyksj.model.request.HomeManageConfigReq;
|
|
|
@@ -11,6 +12,7 @@ import com.cyksj.model.views.HomeManagementAvailableGoodsView;
|
|
|
import com.cyksj.model.views.HomeManagementConfigView;
|
|
|
import com.cyksj.redis.RedisService;
|
|
|
import com.cyksj.service.home.HomeManagementConfigService;
|
|
|
+import com.cyksj.service.mange.GoodsDonCategoryService;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
import com.ejlchina.searcher.SearchResult;
|
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
|
@@ -39,6 +41,8 @@ public class HomeManageConfigController {
|
|
|
|
|
|
private final RedisService redisService;
|
|
|
|
|
|
+ private final GoodsDonCategoryService goodsDonCategoryService;
|
|
|
+
|
|
|
/**
|
|
|
* 新增首页配置
|
|
|
*/
|
|
|
@@ -85,6 +89,17 @@ public class HomeManageConfigController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 分类 一键上下架
|
|
|
+ */
|
|
|
+ @PutMapping("/batch/update/category/status/{status}")
|
|
|
+ public Result<String> batchUpdateCategoryStatus(@RequestBody List<Long> ids, @PathVariable Boolean status) {
|
|
|
+ goodsDonCategoryService.update(null, Wrappers.lambdaUpdate(GoodsDonCategory.class)
|
|
|
+ .set(GoodsDonCategory::getStatus, status)
|
|
|
+ .in(GoodsDonCategory::getId, ids));
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 配置排序
|
|
|
*/
|