|
@@ -1,12 +1,17 @@
|
|
|
package io.platform.app.web.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import io.platform.app.web.remote.HomePageRemote;
|
|
|
import io.platform.base.common.exception.RRException;
|
|
|
import io.platform.base.common.utils.R;
|
|
|
import io.platform.base.dto.ArticleDTO;
|
|
|
import io.platform.base.dto.NoticeDTO;
|
|
|
import io.platform.base.dto.StoreBannerDTO;
|
|
|
+import io.platform.base.dto.StoreStockQuery;
|
|
|
+import io.platform.base.vo.StoreBrandVO;
|
|
|
import io.platform.config.annotation.FuncLogAnno;
|
|
|
+import io.platform.store.dto.StoreAgentBrandLvLogDto;
|
|
|
+import io.platform.store.dto.StoreStockDto;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -14,6 +19,8 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* TODO
|
|
|
*
|
|
@@ -57,7 +64,7 @@ public class HomePageController {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/noticeList")
|
|
|
- @ApiOperation("首页公告消息")
|
|
|
+ @ApiOperation("首页公告消息接口")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "contentType", value = "展示位置",required = true),
|
|
|
})
|
|
@@ -76,7 +83,7 @@ public class HomePageController {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/articleList")
|
|
|
- @ApiOperation("系统政策")
|
|
|
+ @ApiOperation("系统政策接口")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "displayType", value = "展示位置",required = true),
|
|
|
})
|
|
@@ -89,6 +96,50 @@ public class HomePageController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取门店库存
|
|
|
+ * 1.
|
|
|
+ * @param storeStockQuery
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("/getStoreStock")
|
|
|
+ @ApiOperation("门店查看库存接口")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "storeId", value = "门店id",required = true),
|
|
|
+ @ApiImplicitParam(name = "current", value = "页码数",required = true),
|
|
|
+ @ApiImplicitParam(name = "size", value = "每页多少条",required = true),
|
|
|
+ @ApiImplicitParam(name = "brandCode", value = "品牌code",required = false),
|
|
|
+ @ApiImplicitParam(name = "specKey", value = "关键字",required = false)
|
|
|
+ })
|
|
|
+ public R getStoreStock(@RequestBody StoreStockQuery storeStockQuery) {
|
|
|
+ if (null == storeStockQuery.getStoreId()) {
|
|
|
+ throw new RRException("门店ID不能为空");
|
|
|
+ }
|
|
|
+ if (null == storeStockQuery.getCurrent()) {
|
|
|
+ throw new RRException("页码数不能为空");
|
|
|
+ }if (null == storeStockQuery.getSize()) {
|
|
|
+ throw new RRException("条数不能为空");
|
|
|
+ }
|
|
|
+ Page<StoreStockDto> storeStock = this.homePageRemote.getStoreStock(storeStockQuery);
|
|
|
+ List<StoreBrandVO> brandList = this.homePageRemote.getStoreBrandList(storeStockQuery);
|
|
|
+ return R.ok().put("storeStock",storeStock).put("brandList",brandList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
-}
|
|
|
+}
|