|
|
@@ -1,11 +1,13 @@
|
|
|
package com.fs.app.controller.store;
|
|
|
|
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.fs.app.annotation.Login;
|
|
|
import com.fs.app.controller.AppBaseController;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.param.BaseQueryParam;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
+import com.fs.course.config.AppConfig;
|
|
|
import com.fs.erp.service.IErpGoodsService;
|
|
|
import com.fs.hisStore.domain.*;
|
|
|
import com.fs.hisStore.param.*;
|
|
|
@@ -19,6 +21,8 @@ import com.fs.hisStore.domain.FsStoreOrderItemScrm;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Map;
|
|
|
import java.util.HashMap;
|
|
|
+
|
|
|
+import com.fs.system.service.ISysConfigService;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
@@ -65,6 +69,9 @@ public class ProductScrmController extends AppBaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private IFsStoreOrderItemScrmService orderItemService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ISysConfigService configService;
|
|
|
/**
|
|
|
* 获取用户信息
|
|
|
* @param storeId
|
|
|
@@ -102,6 +109,13 @@ public class ProductScrmController extends AppBaseController {
|
|
|
@ApiOperation("获取商品列表")
|
|
|
@GetMapping("/getProducts")
|
|
|
public R getProducts(FsStoreProductQueryParam param, HttpServletRequest request){
|
|
|
+ String sourcetype=request.getHeader("sourcetype");
|
|
|
+ if("APP".equals(sourcetype)){
|
|
|
+ // 获取当前appid
|
|
|
+ String appJson = configService.selectConfigByKey("app.config");
|
|
|
+ AppConfig app = JSONUtil.toBean(appJson, AppConfig.class);
|
|
|
+ param.setAppId(app.getAppId());
|
|
|
+ }
|
|
|
PageHelper.startPage(param.getPage(), param.getPageSize());
|
|
|
param.setIsDisplay(1);
|
|
|
List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductListQuery(param);
|