Forráskód Böngészése

Merge remote-tracking branch 'origin/dev' into dev

lazhaoqian 4 éve
szülő
commit
18c0cc34b2
37 módosított fájl, 1187 hozzáadás és 74 törlés
  1. 19 1
      sailun-allsteel-admin-rest/src/main/java/io/platform/base/common/utils/HuaweiOBSUtil.java
  2. 1 1
      sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/controller/rest/ConfigArticleRestController.java
  3. 33 1
      sailun-allsteel-admin-rest/src/main/java/io/platform/sys/web/controller/rest/AppVersionLogRestController.java
  4. 4 1
      sailun-allsteel-admin-rest/src/main/resources/application.yml
  5. 9 0
      sailun-allsteel-admin-rest/src/test/java/io/platform/TestOBS.java
  6. 13 0
      sailun-allsteel-app-rest/pom.xml
  7. 183 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/AppAgentController.java
  8. 171 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/AppAgentServiceRemote.java
  9. 43 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/BaseReqController.java
  10. 34 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/MyPageController.java
  11. 1 3
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/StoreScanController.java
  12. 54 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/AgentLongQuery.java
  13. 16 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/CommonQuery.java
  14. 18 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/QueryAgentStock.java
  15. 18 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/QueryAppAgentStock.java
  16. 43 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/RewardQuery.java
  17. 46 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/ScanRecordQuery.java
  18. 31 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/remote/BaseReqRemote.java
  19. 18 0
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/remote/MyPageRemote.java
  20. 1 1
      sailun-allsteel-app-rest/src/main/java/io/platform/config/header/ExceptionHeader.java
  21. 10 1
      sailun-allsteel-app-rest/src/main/resources/application-dev.yml
  22. 69 54
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/dto/ConfigBannerDto.java
  23. 10 0
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigBannerServiceClient.java
  24. 7 0
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigBrandServiceClient.java
  25. 8 3
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/store/service/client/api/StoreRewardServiceClient.java
  26. 24 1
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/entity/ConfigBanner.java
  27. 26 1
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigBannerServiceClientImpl.java
  28. 9 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigBrandServiceClientImpl.java
  29. 5 3
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/biz/mapper/StoreRewardMapper.java
  30. 6 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/biz/service/StoreRewardService.java
  31. 26 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/service/client/impl/StoreRewardServiceClientImpl.java
  32. 27 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/resources/mybatis/store/StoreRewardMapper.xml
  33. 71 0
      sailun-allsteel-common/src/main/java/io/platform/base/dto/StoreScanRewordDTO.java
  34. 0 1
      sailun-allsteel-common/src/main/java/io/platform/base/vo/StoreScanMatnrMsgVO.java
  35. 54 0
      sailun-allsteel-common/src/main/java/io/platform/base/vo/StoreScanRewordVO.java
  36. 77 0
      sailun-allsteel-common/src/main/java/io/platform/base/vo/StoreTaskStatisticsVO.java
  37. 2 2
      sailun-allsteel-sys-provider/sailun-allsteel-sys-service/src/main/java/io/platform/sys/service/client/impl/SysConfigServiceClientImpl.java

+ 19 - 1
sailun-allsteel-admin-rest/src/main/java/io/platform/base/common/utils/HuaweiOBSUtil.java

@@ -2,7 +2,7 @@ package io.platform.base.common.utils;
 
 import com.obs.services.ObsClient;
 import com.obs.services.exception.ObsException;
-import com.obs.services.model.PutObjectResult;
+import com.obs.services.model.*;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.stereotype.Component;
@@ -53,6 +53,24 @@ public class HuaweiOBSUtil {
     }
 
 
+    /**
+     * 设置对象为私有读写,设置后不可下载
+     * @param objName
+     * @return
+     */
+    public Boolean privateFileOBS (String objName) {
+        ObsClient obsClient = new ObsClient(ak, sk, endPoint);
+        BucketVersioningConfiguration status = obsClient.getBucketVersioning(bucketName);
+        System.out.println("\t" + status.getVersioningStatus());
+        return true;
+    }
+
+
+
+
+
+
+
 
 
 

+ 1 - 1
sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/controller/rest/ConfigArticleRestController.java

@@ -121,7 +121,7 @@ public class ConfigArticleRestController extends AbstractController {
 	 */
 	@RequestMapping("/uploadFile")
 	public R uploadFile(@RequestParam("file") MultipartFile file) {
-		String fileName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
+		String fileName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1);
 		String url = null;
 		try {
 			url = ftpUtils.defaultUpload(null, fileName, (FileInputStream) file.getInputStream());

+ 33 - 1
sailun-allsteel-admin-rest/src/main/java/io/platform/sys/web/controller/rest/AppVersionLogRestController.java

@@ -2,6 +2,7 @@
 package io.platform.sys.web.controller.rest;
 
 
+import io.platform.base.common.utils.HuaweiOBSUtil;
 import io.platform.sys.dto.AppVersionLogDto;
 import io.platform.sys.web.remote.AppVersionLogServiceRemote;
 import org.springframework.web.bind.annotation.*;
@@ -15,7 +16,9 @@ import io.platform.base.common.validator.ValidatorUtils;
 
 import io.platform.base.common.annotation.SysLog;
 import io.platform.base.common.utils.ExecuteResult;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.*;
 import java.util.List;
 import java.util.Map;
 
@@ -26,7 +29,10 @@ public class AppVersionLogRestController extends AbstractController {
 
     @Autowired
 	private AppVersionLogServiceRemote appVersionLogServiceRemote;
-	
+
+	@Autowired
+	private HuaweiOBSUtil huaweiOBSUtil;
+
 	/**
 	 * 所有列表
 	 */
@@ -102,4 +108,30 @@ public class AppVersionLogRestController extends AbstractController {
         }
 	}
 
+
+	/**
+	 * 华为云OBS上传文件
+	 * @param file
+	 * @return
+	 * @throws IOException
+	 */
+	@RequestMapping("uploadFileToHuaweiOBS")
+	public R uploadFileToHuaweiOBS (@RequestParam("file") MultipartFile file)  {
+		String url = "";
+		try {
+			FileInputStream fileInputStream = (FileInputStream) file.getInputStream();
+			url = huaweiOBSUtil.uploadFileForOBS(file.getOriginalFilename(), fileInputStream);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		return R.ok().put("url",url);
+	}
+
+
+
+
+
+
+
+
 }

+ 4 - 1
sailun-allsteel-admin-rest/src/main/resources/application.yml

@@ -21,7 +21,10 @@ spring:
         max-file-size: 100MB
         max-request-size: 100MB
         enabled: true
-    # 指定静态资源的路径
+    servlet:
+        multipart:
+            max-file-size: 50MB
+            max-request-size: 1000MB
 
 system:
      app:

+ 9 - 0
sailun-allsteel-admin-rest/src/test/java/io/platform/TestOBS.java

@@ -44,6 +44,15 @@ public class TestOBS {
 
 
 
+    @Test
+    public void testPrivateFileOBS () {
+
+        huaweiOBSUtil.privateFileOBS("apk");
+
+    }
+
+
+
 
 
 }

+ 13 - 0
sailun-allsteel-app-rest/pom.xml

@@ -167,6 +167,19 @@
             <artifactId>javase</artifactId>
             <version>3.3.3</version>
         </dependency>
+        <!-- 分页助手 -->
+        <!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper</artifactId>
+            <version>5.1.10</version>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis</artifactId>
+            <version>3.4.6</version>
+        </dependency>
     </dependencies>
 
 

+ 183 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/AppAgentController.java

@@ -0,0 +1,183 @@
+package io.platform.app.web.controller;
+
+import cn.hutool.http.HttpUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import io.platform.app.web.query.AgentLongQuery;
+import io.platform.app.web.query.QueryAgentStock;
+import io.platform.app.web.query.QueryAppAgentStock;
+import io.platform.base.common.annotation.CountUse;
+import io.platform.base.common.annotation.SysLog;
+import io.platform.base.common.utils.R;
+import io.platform.base.common.utils.StringUtils;
+import io.platform.store.dto.BizBasicMsgDto;
+import io.platform.store.dto.BizStoreAgentDto;
+import io.platform.store.dto.QueryAgentStockDto;
+import io.platform.store.dto.StoreAgentBrandLvDto;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@RestController
+@RequestMapping("/app/appAgent")
+public class AppAgentController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Value("${QueryAgentStock}")
+    private String QueryAgentStock;
+    @Value("${clientBasicMsg}")
+    private String clientBasicMsg;
+
+    @Autowired
+    AppAgentServiceRemote appAgentServiceRemote;
+
+//    /**
+//     * 通商APP-首页轮播图接口
+//     */
+//    @CountUse(fundesc = "通商APP-首页轮播图",username = "username")
+//    @RequestMapping("/getAgentBanner")
+//    @ResponseBody
+//    public R getAgentBanner(@RequestBody Map<String,Object> map){
+//        if (map.get("KUNNR") == null){
+//            return R.error("没有接收到参数");
+//        }
+//        return R.ok().put("agentBanner",appAgentServiceRemote.selectAgentBanner(map));
+//    }
+
+//    /**
+//     * 通商APP-首页跑马灯连接
+//     */
+//    @CountUse(fundesc = "通商APP-首页跑马灯连接",username = "username")
+//    @RequestMapping("/getAgentMessage")
+//    @ResponseBody
+//    public R getAgentMessage(@RequestParam Integer contentType){
+//        if (contentType == null){
+//            return R.error("没有接收到参数");
+//        }
+//        return R.ok().put("agentBanner",appAgentServiceRemote.selectAgentMessage(contentType));
+//    }
+
+    @CountUse(fundesc = "通商APP首页-经销商信息",username = "username")
+    @SysLog("通商APP首页-获取经销商信息")
+    @RequestMapping("/getClientBasicMsg")
+    @ResponseBody
+    public R getClientBasicMsg(@RequestBody AgentLongQuery agentLongQuery) {
+        String postResposts = "";
+        BizBasicMsgDto bizBasicMsgDto = new BizBasicMsgDto();
+        Map map = new HashMap();
+        map.put("token", agentLongQuery.getToken());
+        try {
+            long startDate = System.currentTimeMillis();
+            logger.info("开始调用B2B获取经销商信息接口" + startDate);
+            postResposts = HttpUtil.post(clientBasicMsg, map);
+            bizBasicMsgDto = JSON.parseObject(postResposts, BizBasicMsgDto.class);
+            logger.info("调用B2B获取经销商信息接口结束耗时为" + (System.currentTimeMillis() - startDate));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (bizBasicMsgDto.getCode()==1){
+            return R.ok().put("data", bizBasicMsgDto);
+        }else {
+            return R.error().put("data","查询经销商信息有误");
+        }
+    }
+
+    @CountUse(fundesc = "通商APP首页-经销商查询旗下门店进货量",username = "username")
+    @SysLog("通商APP首页-经销商查询旗下门店进货量")
+    @RequestMapping("/agentSelectStoreRecord")
+    @ResponseBody
+    public Map<String, Object> agentSelectStoreRecord(@RequestBody BizStoreAgentDto bizStoreAgentDto) {
+        Map selectStoreRecord = appAgentServiceRemote.agentSelectStoreRecord(bizStoreAgentDto);
+        return selectStoreRecord;
+    }
+
+    @SysLog("通商APP-经销商库存")
+    @PostMapping("/getAgentStock")
+    @ResponseBody
+    public R getAgentStock(@RequestBody QueryAppAgentStock queryAppAgentStock){
+        QueryAgentStockDto.Data queryAgentStockData = new QueryAgentStockDto.Data();
+        List<String> brands = new ArrayList<>();
+        List<String> patterns = new ArrayList<>();
+        List<String> specs = new ArrayList<>();
+        List<Integer> stocks = new ArrayList<>();
+        List<QueryAgentStockDto.Data.stockList> stockLists = new ArrayList<>();
+        String s = JSONObject.toJSONString(queryAppAgentStock);
+        try {
+            String postman =  HttpUtil.post(QueryAgentStock,s);
+            QueryAgentStockDto queryAgentStockDto = JSON.parseObject(postman,QueryAgentStockDto.class);
+            patterns.addAll(queryAgentStockDto.getData().getPatternList());
+            specs.addAll(queryAgentStockDto.getData().getSpecList());
+            stockLists.addAll(queryAgentStockDto.getData().getList());
+            stocks.add(queryAgentStockDto.getData().getStock());
+            return R.ok().put("data",queryAgentStockDto);
+        }catch (Exception e){
+            return R.error(e.getMessage());
+        }
+    }
+
+    @SysLog("门店APP-门店查经销商库存")
+    @PostMapping("/getStoreAgentStock")
+    @ResponseBody
+    public R getStoreAgentStock(@RequestBody QueryAgentStock queryAgentStock){
+        List<Long> agentIdList = new ArrayList<>();
+//        List<QueryAgentStockDto> queryAgentStockDtos = new ArrayList<>();
+        QueryAgentStockDto.Data queryAgentStockData = new QueryAgentStockDto.Data();
+        String postman = "";
+        QueryAgentStockDto queryAgentStockDto = new QueryAgentStockDto();
+        List<String> brands = new ArrayList<>();
+        List<String> patterns = new ArrayList<>();
+        List<String> specs = new ArrayList<>();
+        List<Integer> stocks = new ArrayList<>();
+        List<QueryAgentStockDto.Data.stockList> stockLists = new ArrayList<>();
+        try {
+        List<StoreAgentBrandLvDto> bizStoreAgentDtoList = appAgentServiceRemote.selectAgency(queryAgentStock.getStoreId());
+        if (bizStoreAgentDtoList!=null && bizStoreAgentDtoList.size()>0){
+            for(StoreAgentBrandLvDto item : bizStoreAgentDtoList){
+                agentIdList.add(item.getAgentId());
+            }
+            agentIdList = agentIdList.stream().distinct().collect(Collectors.toList());
+            for(Long itemAgent : agentIdList){
+                List<StoreAgentBrandLvDto> storeBrands = appAgentServiceRemote.selectStoreBrand(queryAgentStock.getStoreId(),itemAgent);
+                if(storeBrands!=null && storeBrands.size()>0){
+                    storeBrands = storeBrands.stream().distinct().collect(Collectors.toList());
+
+                    for(StoreAgentBrandLvDto itemBrand : storeBrands){
+                        if(StringUtils.isNotEmpty(itemBrand.getBrand())){
+                            String a = "000";
+                            queryAgentStock.setKunnr(a+itemAgent.toString());
+                            queryAgentStock.setBrand(itemBrand.getBrandCode());
+                            String s = JSONObject.toJSONString(queryAgentStock);
+                            postman =  HttpUtil.post(QueryAgentStock,s);
+                            brands.add(itemBrand.getBrandCode());
+
+                            queryAgentStockDto = JSON.parseObject(postman,QueryAgentStockDto.class);
+                            patterns.addAll(queryAgentStockDto.getData().getPatternList());
+                            specs.addAll(queryAgentStockDto.getData().getSpecList());
+                            stockLists.addAll(queryAgentStockDto.getData().getList());
+                            stocks.add(queryAgentStockDto.getData().getStock());
+//                            queryAgentStockDtos.add(queryAgentStockDto);
+                        }
+                    }
+                }
+            }
+            Integer sum = 0;
+            for(Integer item : stocks){
+                sum+=item;
+            }
+            queryAgentStockData.setBrandList(brands);
+            queryAgentStockData.setPatternList(patterns);
+            queryAgentStockData.setSpecList(specs);
+            queryAgentStockData.setList(stockLists);
+            queryAgentStockData.setStock(sum);
+        }
+            return R.ok().put("data",queryAgentStockData);
+        }catch (Exception e){
+            return R.error(e.getMessage());
+        }
+    }
+}

+ 171 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/AppAgentServiceRemote.java

@@ -0,0 +1,171 @@
+package io.platform.app.web.controller;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import io.platform.base.common.utils.PageUtil;
+import io.platform.homepage.dto.ConfigBannerDto;
+import io.platform.homepage.service.client.api.ConfigBannerServiceClient;
+import io.platform.store.dto.BizStoreAgentDto;
+import io.platform.store.dto.StoreAgentBrandLvDto;
+import io.platform.store.dto.StoreBasicInfoDto;
+import io.platform.store.dto.Zkotg901Dto;
+import io.platform.store.service.client.api.StoreAgentBrandLvServiceClient;
+import io.platform.store.service.client.api.StoreBasicInfoServiceClient;
+import io.platform.store.service.client.api.Zkotg901ServiceClient;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+@Service("appAgentServiceRemote")
+public class AppAgentServiceRemote {
+
+    @Reference(check = false)
+    private StoreAgentBrandLvServiceClient storeAgentBrandLvServiceClient;
+    @Reference(check = false)
+    private StoreBasicInfoServiceClient storeBasicInfoServiceClient;
+    @Reference(check = false)
+    private Zkotg901ServiceClient zkotg901ServiceClient;
+    @Reference(check = false)
+    private ConfigBannerServiceClient configBannerServiceClient;
+
+    /**
+     * 通商APP-首页轮播图接口
+     */
+    public List<ConfigBannerDto> selectAgentBanner(Map<String,Object> map) {
+        //从JYB2B_NEW.ZKOTG901表获取经销商的品牌名称
+        map.put("IF_FLAG","1");
+        map.put("VKORG","8100");
+        map.put("SPART","40");
+        map.put("VTWEG","10");
+        List<Zkotg901Dto> zkotg901Dtos = zkotg901ServiceClient.queryList(map);
+        if(zkotg901Dtos!=null &&zkotg901Dtos.size()>0){
+            return configBannerServiceClient.selectAgentBanner(zkotg901Dtos);
+        }
+        return null;
+    }
+
+    /**
+     * 通商APP-首页跑马灯链接
+     */
+    public List<ConfigBannerDto> selectAgentMessage(Integer contentType) {
+        return configBannerServiceClient.selectAgentMessage(contentType);
+    }
+
+    /**
+     * 根据门店查经销商
+     * @return
+     */
+    public List<StoreAgentBrandLvDto> selectAgency(Long storeId){
+        Map map = new HashMap();
+        map.put("STORE_ID", storeId);
+        map.put("AGENT_STATUS", "1");
+        return storeAgentBrandLvServiceClient.queryList(map);
+    }
+
+    public List<StoreAgentBrandLvDto> selectBrand(Long agentId){
+        Map map = new HashMap();
+        map.put("AGENT_ID",agentId);
+        map.put("AGENT_STATUS", "1");
+        return storeAgentBrandLvServiceClient.queryList(map);
+    }
+
+    public List<StoreAgentBrandLvDto> selectStoreBrand(Long storeId,Long agentId){
+        Map map = new HashMap();
+        map.put("STORE_ID",storeId);
+        map.put("AGENT_ID",agentId);
+        map.put("AGENT_STATUS", "1");
+        return storeAgentBrandLvServiceClient.queryList(map);
+    }
+
+    /**
+     * 根据经销商编号查门店ID -> 门店ID获取门店名 -> 门店ID获取门店经营品牌 -> 门店ID获取订单量
+     */
+    public Map agentSelectStoreRecord(BizStoreAgentDto bizStoreAgentDto) {
+        Map map = new HashMap(1);
+        map.put("KUNNR", bizStoreAgentDto.getKunnr());
+
+        List<StoreAgentBrandLvDto> storeAgentBrandLvDtoList = storeAgentBrandLvServiceClient.queryList(map);
+        List list = new ArrayList();
+        int total = 0;
+        for (StoreAgentBrandLvDto storeAgentDto : storeAgentBrandLvDtoList) {
+            Map map4 = new HashMap();
+            // 门店名 手机号
+            Map map1 = new HashMap(1);
+            map1.put("MAIN_ID", storeAgentDto.getStoreId());
+            List<StoreBasicInfoDto> storeBasicInfoDtoList = storeBasicInfoServiceClient.queryList(map1);
+            if (CollectionUtils.isNotEmpty(storeBasicInfoDtoList)) {
+                for (StoreBasicInfoDto bizStoreBasicInfoDto : storeBasicInfoDtoList) {
+                    map4.put("storeName", bizStoreBasicInfoDto.getStoreName());
+                    map4.put("storePhone", bizStoreBasicInfoDto.getStorePhone());
+                    map4.put("storeImageUrl", bizStoreBasicInfoDto.getStoreImageUrl());
+                }
+            }
+            // 品牌名
+            Map map2 = new HashMap(1);
+            map2.put("KUNNR", bizStoreAgentDto.getKunnr());
+            map2.put("RETAILER_ID", storeAgentDto.getStoreId());
+            List<StoreAgentBrandLvDto> storeBrandList = storeBasicInfoServiceClient.queryList(map2);
+            if (CollectionUtils.isNotEmpty(storeBrandList)) {
+                for (StoreAgentBrandLvDto bizStoreBrandDto : storeBrandList) {
+                    map4.put("brandName", bizStoreBrandDto.getBrand());
+                }
+            }
+//            // 订单
+//            int count = 0;
+//            List<BizOrderDto> bizOrderDtoList = bizOrderServiceClient.getAmount(storeAgentDto.getStoreId());
+//            if (CollectionUtils.isNotEmpty(bizOrderDtoList)) {
+//                for (BizOrderDto bizOrderDto : bizOrderDtoList) {
+//                    count = count + bizOrderDto.getAmount();
+//                    total = total + bizOrderDto.getAmount();
+//                    map4.put("createTime", bizOrderDto.getCreateTime());
+//                }
+//            }
+//            map4.put("count", count);
+//
+//            Map map5 = new HashMap();
+//            map5.put("RETARILER_ID", storeAgentDto.getStoreId());
+//            List<BizOrderInfoDto> bizOrderInfoDtoList = bizOrderInfoServiceClient.queryList(map5);
+//            if (CollectionUtils.isNotEmpty(bizOrderInfoDtoList)) {
+//                for (BizOrderInfoDto bizOrderInfoDto : bizOrderInfoDtoList) {
+//                    map4.put("materialId", bizOrderInfoDto.getMaterialId());
+//                    map4.put("maktx", bizOrderInfoDto.getMaktx());
+//                }
+//            }
+//            list.add(map4);
+        }
+
+        Map map1 = new HashMap();
+
+        Integer count = list.size();
+        if (list != null && list.size() > 1) {
+            Collections.sort(list, new Comparator<Map<String, Object>>() {
+                @Override
+                public int compare(Map<String, Object> o1, Map<String, Object> o2) {
+                    Integer o1Value = Integer.valueOf(o1.get("count").toString());
+                    Integer o2Value = Integer.valueOf(o2.get("count").toString());
+                    return o2Value.compareTo(o1Value);
+                }
+            });
+        }
+
+        if (bizStoreAgentDto.getSize() == null && bizStoreAgentDto.getPageSize() == null) {
+            bizStoreAgentDto.setSize(1);
+            bizStoreAgentDto.setPageSize(10);
+        }
+        Integer pageCount = 0;
+        if (count % bizStoreAgentDto.getPageSize() == 0) {
+            pageCount = count / bizStoreAgentDto.getPageSize();
+        } else {
+            pageCount = count / bizStoreAgentDto.getPageSize() + 1;
+        }
+        map1.put("pageCount", pageCount);
+        List list1 = PageUtil.startPage(list, bizStoreAgentDto.getSize(), bizStoreAgentDto.getPageSize());
+        map1.put("Data", list1);
+
+
+        map1.put("code:", "0");
+        map1.put("msg:", "success");
+        map1.put("count", total);
+        return map1;
+    }
+}

+ 43 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/BaseReqController.java

@@ -0,0 +1,43 @@
+package io.platform.app.web.controller;
+
+import io.platform.app.web.remote.BaseReqRemote;
+import io.platform.base.common.utils.R;
+import io.platform.config.annotation.FuncLogAnno;
+import io.platform.homepage.dto.ConfigBrandDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * TODO
+ *
+ * base接口
+ * @author shanxin
+ * @version 1.0
+ * @date 2020/11/17 16:52
+ */
+@RestController
+@RequestMapping("/baseReq/")
+public class BaseReqController {
+
+    @Autowired
+    private BaseReqRemote baseReqRemote;
+
+
+    /**
+     * 查询品牌列表
+     * @return
+     */
+    @RequestMapping("/getBrandList")
+    @FuncLogAnno(functionName = "查询品牌列表")
+    public R getBrandList() {
+        List<ConfigBrandDto> bannerDtoList = this.baseReqRemote.getBrandList();
+        return R.ok().put("data",bannerDtoList);
+    }
+
+
+
+
+}

+ 34 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/MyPageController.java

@@ -2,8 +2,12 @@ package io.platform.app.web.controller;
 
 
 import io.platform.app.web.remote.MyPageRemote;
+import io.platform.base.common.exception.RRException;
+import io.platform.base.common.utils.ExecuteResult;
 import io.platform.base.common.utils.R;
 import io.platform.base.dto.ScanRecordPageDTO;
+import io.platform.base.dto.StoreScanRewordDTO;
+import io.platform.base.vo.StoreScanRewordVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -12,6 +16,8 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
+
 /**
  * TODO
  * 1.我的页面Controller
@@ -44,7 +50,35 @@ public class MyPageController {
         // 获取扫码记录
         //Long storeStock = this.myPageRemote.getStoreStock(scanRecordPageDTO);
         // 获取扫码记录
+        return R.ok();
+    }
+
+
+    /**
+     * 分页获取门店奖励列表
+     * @param storeScanRewordDTO
+     * @return
+     */
+    @PostMapping("/getPageScanRewordList")
+    @ApiOperation("分页获取扫码奖励")
+    public R getPageScanRewordList (@RequestBody StoreScanRewordDTO storeScanRewordDTO) {
+        if (null == storeScanRewordDTO.getStoreId() || null == storeScanRewordDTO.getUserId()) {
+            throw new RRException("门店信息不能为空");
+        }
+        if (null == storeScanRewordDTO.getCurrent() || null == storeScanRewordDTO.getSize()) {
+            throw new RRException("分页参数不能为空");
+        }
+        ExecuteResult<List> result = this.myPageRemote.getPageScanReword(storeScanRewordDTO);
+        return R.ok().put("data",result.getResult());
+    }
+
+
+
+
 
+    @PostMapping("/getStoreTaskStatistics")
+    @ApiOperation("门店任务量统计")
+    public R getStoreTaskStatistics () {
 
         return R.ok();
     }

+ 1 - 3
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/StoreScanController.java

@@ -83,9 +83,8 @@ public class StoreScanController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "storeId", value = "门店id",required = true),
             @ApiImplicitParam(name = "userId", value = "用户id",required = true),
-            @ApiImplicitParam(name = "tyreNum", value = "轮胎号",required = true),
             @ApiImplicitParam(name = "materialList", value = "物料集合",required = true),
-            @ApiImplicitParam(name = "longitude", value = "经度",required = true),
+                @ApiImplicitParam(name = "longitude", value = "经度",required = true),
             @ApiImplicitParam(name = "latitude", value = "纬度",required = true),
             @ApiImplicitParam(name = "scanAddress", value = "扫码地址",required = true),
     })
@@ -182,7 +181,6 @@ public class StoreScanController {
         if (null == storeScanDTO.getScanAddress() ) {
             throw new RRException("门店扫码详细地址不能为空!");
         }
-
         // 扫码出库
         ExecuteResult<StoreScanOutDTO> result = this.storeScanRemote.storeScanOutTyres(storeScanDTO);
         return R.ok().put("data",result);

+ 54 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/AgentLongQuery.java

@@ -0,0 +1,54 @@
+package io.platform.app.web.query;
+
+import lombok.Data;
+
+@Data
+public class AgentLongQuery {
+    /**
+     * 封装了调用远程接口的参数
+     */
+    //客户编号
+    private String clientId;
+    //密码
+    private String password;
+    //验证码
+    private String authCode;
+    //登录后的用户信息
+    private String token;
+    //销售组织
+    private String vkorg;
+    //分销渠道
+    private String vtweg;
+    //产品组
+    private String spart;
+    //查询时间范围    0、三个月以内,1、一个月以内 2、一周以内,空着就是所有
+    private String dateinterval;
+    //订单状态:0、订单处理,1、订单确认,2、装运安排,3、货物运输,4、客户签收
+    private String orderstatus;
+    //订单编号
+    private String ordernumber;
+    //交货单号
+    private String deliverynumber;
+    //提交开始时间
+    private String startdate;
+    //提交结束时间
+    private String enddate;
+    //送货地址
+    private String destination;
+    //开始页数
+    private String page;
+    //每页数量
+    private String pagesize;
+    //装运凭证
+    private String shippingdoc;
+    //装运日期
+    private String shipdate;
+    //使用0。0、不需要更新信贷;1、需要更新信贷
+    private String type;
+    //品牌
+    private String brands;
+    //花纹
+    private String pattern;
+    //规格
+    private String specification;
+}

+ 16 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/CommonQuery.java

@@ -0,0 +1,16 @@
+package io.platform.app.web.query;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+
+@Data
+public class CommonQuery {
+
+    /**
+     * 门店Id
+     */
+    private Long storeId;
+}

+ 18 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/QueryAgentStock.java

@@ -0,0 +1,18 @@
+package io.platform.app.web.query;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class QueryAgentStock {
+    private String kunnr;
+    private String brand;
+    private String spec;
+    private String pattern;
+    private String starttime;
+    private String endtime;
+    private Long storeId;
+    private int page=1;
+    private int pagesize=5;
+}

+ 18 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/QueryAppAgentStock.java

@@ -0,0 +1,18 @@
+package io.platform.app.web.query;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class QueryAppAgentStock {
+    private String kunnr;
+    private String brand;
+    private String spec;
+    private String pattern;
+    private String starttime;
+    private String endtime;
+    private Long storeId;
+    private int page=1;
+    private int pagesize=5;
+}

+ 43 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/RewardQuery.java

@@ -0,0 +1,43 @@
+package io.platform.app.web.query;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+
+@Data
+public class RewardQuery {
+    /**
+     * 门店Id
+     */
+    private Long storeId;
+    /**
+     * 品牌cade
+     */
+    private String brandCode;
+
+    /**
+     * 开始日期
+     */
+    private String beginDate;
+
+    /**
+     * 结束日期
+     */
+    private String endDate;
+
+
+    /**
+     * 搜索条件
+     */
+    private String content;
+    /**
+     * 当前页
+     */
+    private Long current;
+    /**
+     * 页数
+     */
+    private Long size;
+
+}

+ 46 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/query/ScanRecordQuery.java

@@ -0,0 +1,46 @@
+package io.platform.app.web.query;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+
+@Data
+public class ScanRecordQuery {
+
+    /**
+     * 门店Id
+     */
+    private Long storeId;
+    /**
+     * 品牌cade
+     */
+    private String brandCode;
+
+    /**
+     * 开始日期
+     */
+    private String beginDate;
+    /**
+     * 结束日期
+     */
+    private String endDate;
+
+    /**
+     * 搜索条件
+     */
+    private String content;
+
+    /**
+     * 1入库2出库
+     */
+    private Integer scanType;
+    /**
+     * 当前页
+     */
+    private Long current;
+    /**
+     * 页数
+     */
+    private Long size;
+}

+ 31 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/remote/BaseReqRemote.java

@@ -0,0 +1,31 @@
+package io.platform.app.web.remote;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import io.platform.homepage.dto.ConfigBannerDto;
+import io.platform.homepage.dto.ConfigBrandDto;
+import io.platform.homepage.service.client.api.ConfigBannerServiceClient;
+import io.platform.homepage.service.client.api.ConfigBrandServiceClient;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * TODO
+ *
+ * @author shanxin
+ * @version 1.0
+ * @date 2020/11/17 16:54
+ */
+@Service("baseReqRemote")
+public class BaseReqRemote {
+
+
+    @Reference(check = false)
+    private ConfigBrandServiceClient configBrandServiceClient;
+
+    public List<ConfigBrandDto> getBrandList() {
+        return this.configBrandServiceClient.getBrandList();
+    }
+
+
+}

+ 18 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/remote/MyPageRemote.java

@@ -1,7 +1,14 @@
 package io.platform.app.web.remote;
 
+import com.alibaba.dubbo.config.annotation.Reference;
+import io.platform.base.common.utils.ExecuteResult;
+import io.platform.base.dto.StoreScanRewordDTO;
+import io.platform.base.vo.StoreScanRewordVO;
+import io.platform.store.service.client.api.StoreRewardServiceClient;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * TODO
  *
@@ -13,5 +20,16 @@ import org.springframework.stereotype.Service;
 public class MyPageRemote {
 
 
+    @Reference(check = false)
+    private StoreRewardServiceClient storeRewardServiceClient;
+
+    public ExecuteResult<List> getPageScanReword(StoreScanRewordDTO storeScanRewordDTO) {
+        return this.storeRewardServiceClient.getPageScanReword(storeScanRewordDTO);
+    }
+
+
+
+
+
 
 }

+ 1 - 1
sailun-allsteel-app-rest/src/main/java/io/platform/config/header/ExceptionHeader.java

@@ -16,7 +16,7 @@ public class ExceptionHeader {
     public Map<String, Object> handleHttpException(RRException e){
         Map<String, Object> map = new HashMap<>();
         map.put("code", e.getCode());
-        map.put("message", e.getMessage());
+        map.put("msg", e.getMessage());
         return map;
     }
 

+ 10 - 1
sailun-allsteel-app-rest/src/main/resources/application-dev.yml

@@ -25,4 +25,13 @@ spring:
 
 
 #门店扫码获取相应的物料信息
-storeScanGetTyreMsgUrl: http://b2bcnapi.sailuntire.com/api/test/b2bapi/action/api/scanCode.xhtml
+storeScanGetTyreMsgUrl: http://b2bcnapi.sailuntire.com/api/test/b2bapi/action/api/scanCode.xhtml
+##门店查询经销商库存
+#QueryAgentStock :  http://b2bcnapi.sailuntire.com/api/b2bapi/action/api/queryAgentStock.xhtml
+##获取经销商信息接口
+#clientBasicMsg: http://b2bcnapi.sailuntire.com/api/b2bapi/action/api/clientBasicMsg.xhtml
+#门店查询经销商库存
+QueryAgentStock :  http://b2bcnapi.sailuntire.com/api/test/b2bapi/action/api/queryAgentStockTBR.xhtml
+#获取经销商信息接口
+clientBasicMsg: http://b2bcnapi.sailuntire.com/api/test/b2bapi/action/api/clientBasicMsg.xhtml
+

+ 69 - 54
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/dto/ConfigBannerDto.java

@@ -1,5 +1,6 @@
 package io.platform.homepage.dto;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import lombok.Data;
 
 @Data
@@ -7,66 +8,80 @@ public class ConfigBannerDto  implements java.io.Serializable{
 private static final long serialVersionUID = 5454155825314635342L;
 
 
+/**
+ * mainId       db_column: MAIN_ID
+ */
+private Long mainId;
+/**
+ * banner名称描述       db_column: BANNER_NAME
+ */
+private String bannerName;
+/**
+ * 可见品牌       db_column: BRAND
+ */
+private String brand;
+/**
+ * 链接       db_column: PATH
+ */
+private String path;
+/**
+ * banner图片       db_column: IMG_PATH
+ */
+private String imgPath;
+/**
+ * 类型0静态图片,1活动,2新闻       db_column: TYPE
+ */
+private Long type;
+/**
+ * 排序       db_column: ORDER_INDEX
+ */
+private Long orderIndex;
+/**
+ * 备注       db_column: REMARK
+ */
+private String remark;
+/**
+ * 删除标记 0有效,1删除       db_column: FLAG_DEL
+ */
+private Long flagDel;
+/**
+ * 宽度       db_column: WIDTH
+ */
+private Long width;
+/**
+ * 高度       db_column: HEIGHT
+ */
+private Long height;
+/**
+ * 展示位置0门店       db_column: SHOW_POSITION
+ */
+private Long showPosition;
+/**
+ * 创建时间       db_column: CREATE_TIME
+ */
+private java.util.Date createTime;
+/**
+ * 修改时间       db_column: UPDATE_TIME
+ */
+private java.util.Date updateTime;
+/**
+ * 创建人       db_column: CREATE_BY
+ */
+private String createBy;
     /**
-     * mainId       db_column: MAIN_ID
+     * 区分APP:0门店APP1小程序2通商APP
      */
-    private Long mainId;
+    private int appType;
     /**
-     * banner名称描述       db_column: BANNER_NAME
+     * 标题
      */
-    private String bannerName;
+    private String msgTitle;
     /**
-     * 可见品牌       db_column: BRAND
+     * 0系统消息1门店消息2经销商消息3车主消息
      */
-    private String brandCode;
+    private int contentType;
     /**
-     * 链接       db_column: PATH
+     * 区分滚动图和跑马灯:0滚动图1跑马灯
      */
-    private String path;
-    /**
-     * banner图片       db_column: IMG_PATH
-     */
-    private String imgPath;
-    /**
-     * 类型0静态图片,1活动,2新闻       db_column: TYPE
-     */
-    private Long imgType;
-    /**
-     * 排序       db_column: ORDER_INDEX
-     */
-    private Long orderIndex;
-    /**
-     * 备注       db_column: REMARK
-     */
-    private String remark;
-    /**
-     * 删除标记 0有效,1删除       db_column: FLAG_DEL
-     */
-    private Long flagDel;
-    /**
-     * 宽度       db_column: WIDTH
-     */
-    private Long width;
-    /**
-     * 高度       db_column: HEIGHT
-     */
-    private Long height;
-    /**
-     * 展示位置0门店       db_column: SHOW_POSITION
-     */
-    private Long showPosition;
-    /**
-     * 创建时间       db_column: CREATE_TIME
-     */
-    private java.util.Date createTime;
-    /**
-     * 修改时间       db_column: UPDATE_TIME
-     */
-    private java.util.Date updateTime;
-    /**
-     * 创建人       db_column: CREATE_BY
-     */
-    private String createBy;
-    //columns END
-
+    private int modelType;
 }

+ 10 - 0
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigBannerServiceClient.java

@@ -8,6 +8,7 @@ import io.platform.homepage.dto.ConfigBannerDto;
 import java.util.List;
 import java.util.Map;
 import io.platform.base.common.utils.ExecuteResult;
+import io.platform.store.dto.Zkotg901Dto;
 
 
 public interface ConfigBannerServiceClient{
@@ -49,4 +50,13 @@ public interface ConfigBannerServiceClient{
          * @return
          */
         List<ConfigBannerDto> getStoreBannerList(StoreBannerDTO storeBannerDTO);
+
+        /**
+         * 通商APP-首页轮播图接口
+         */
+        List<ConfigBannerDto> selectAgentBanner(List<Zkotg901Dto> list);
+        /**
+         * 通商APP-首页跑马灯链接
+         */
+        List<ConfigBannerDto> selectAgentMessage(Integer contentType);
 }

+ 7 - 0
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigBrandServiceClient.java

@@ -2,6 +2,7 @@
 package io.platform.homepage.service.client.api;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.platform.homepage.dto.ConfigBannerDto;
 import io.platform.homepage.dto.ConfigBrandDto;
 
 import java.util.List;
@@ -42,4 +43,10 @@ public interface ConfigBrandServiceClient{
          * 根据分页参数 获取 分页集合
          */
         Page<ConfigBrandDto>getPage(Page<ConfigBrandDto>page,ConfigBrandDto configBrandDto);
+
+        /**
+         * 获取品牌列表
+         * @return
+         */
+        List<ConfigBrandDto> getBrandList();
 }

+ 8 - 3
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/store/service/client/api/StoreRewardServiceClient.java

@@ -2,6 +2,8 @@
 package io.platform.store.service.client.api;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.platform.base.dto.StoreScanRewordDTO;
+import io.platform.base.vo.StoreScanRewordVO;
 import io.platform.store.dto.StoreRewardDto;
 
 import java.util.List;
@@ -44,7 +46,10 @@ public interface StoreRewardServiceClient{
         Page<StoreRewardDto>getPage(Page<StoreRewardDto>page,StoreRewardDto storeRewardDto);
 
 
-
-
-
+        /**
+         * 获取门店奖励记录
+         * @param storeScanRewordDTO
+         * @return
+         */
+        ExecuteResult<List> getPageScanReword(StoreScanRewordDTO storeScanRewordDTO);
 }

+ 24 - 1
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/entity/ConfigBanner.java

@@ -109,6 +109,29 @@ public class ConfigBanner extends Model<ConfigBanner>  implements Serializable{
      */
     @TableField("CREATE_BY")
     private String createBy;
-//columns END
+
+    /**
+     * 区分APP:0门店APP1小程序2通商APP
+     */
+    @TableField("APP_TYPE")
+    private int appType;
+
+    /**
+     * 标题
+     */
+    @TableField("MSG_TITLE")
+    private String msgTitle;
+
+    /**
+     * 0系统消息1门店消息2经销商消息3车主消息
+     */
+    @TableField("CONTENT_TYPE")
+    private int contentType;
+
+    /**
+     * 区分滚动图和跑马灯:0滚动图1跑马灯
+     */
+    @TableField("MODEL_TYPE")
+    private int modelType;
 
 }

+ 26 - 1
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigBannerServiceClientImpl.java

@@ -8,21 +8,26 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.platform.base.common.BaseServiceClient;
 import io.platform.base.common.utils.ExecuteResult;
 
+import io.platform.base.common.utils.Query;
 import io.platform.base.dto.StoreBannerDTO;
 import io.platform.homepage.biz.entity.ConfigBanner;
+import io.platform.homepage.biz.mapper.ConfigBannerMapper;
 import io.platform.homepage.biz.service.ConfigBannerService;
 import io.platform.homepage.dto.ConfigBannerDto;
 import io.platform.homepage.service.client.api.ConfigBannerServiceClient;
 
+import io.platform.store.dto.Zkotg901Dto;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.springframework.beans.BeanUtils;
-import org.springframework.data.convert.EntityWriter;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
+import java.rmi.MarshalledObject;
 import java.util.Date;
+import java.util.HashMap;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
@@ -36,6 +41,8 @@ public class ConfigBannerServiceClientImpl extends BaseServiceClient<ConfigBanne
 
     @Resource
     private ConfigBannerService configBannerService;
+    @Resource
+    private ConfigBannerMapper configBannerMapper;
 
     @Override
     public ConfigBannerDto queryObject(Long id) {
@@ -154,4 +161,22 @@ public class ConfigBannerServiceClientImpl extends BaseServiceClient<ConfigBanne
     }
 
 
+
+
+    public List<ConfigBannerDto> selectAgentBanner(List<Zkotg901Dto> list) {
+        List<ConfigBanner> agentBannerList = new ArrayList<>();
+        for (Zkotg901Dto zkotg901Dto : list) {
+            List<ConfigBanner> bizBannerList =  configBannerService.list(new QueryWrapper<ConfigBanner>().eq("brand", zkotg901Dto.getEan11().toString()).eq("SHOW_POSITION", 2).eq("APP_TYPE",2).eq("MODEL_TYPE",0));
+            agentBannerList.addAll(bizBannerList);
+        }
+        return convertList(agentBannerList,ConfigBannerDto.class);
+    }
+
+    public List<ConfigBannerDto> selectAgentMessage(Integer contentType) {
+        QueryWrapper<ConfigBanner> condition = new QueryWrapper<>();
+        condition.eq("APP_TYPE",2).eq("CONTENT_TYPE",contentType).eq("MODEL_TYPE",1);
+        List<ConfigBanner> agentBannerList = configBannerMapper.selectList(condition);
+        return convertList(agentBannerList,ConfigBannerDto.class);
+    }
+
 }

+ 9 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigBrandServiceClientImpl.java

@@ -10,6 +10,7 @@ import io.platform.base.common.utils.ExecuteResult;
 
 import io.platform.homepage.biz.service.ConfigBrandService;
 import io.platform.homepage.biz.entity.ConfigBrand;
+import io.platform.homepage.dto.ConfigBannerDto;
 import io.platform.homepage.dto.ConfigBrandDto;
 import io.platform.homepage.service.client.api.ConfigBrandServiceClient;
 
@@ -20,6 +21,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -142,4 +144,11 @@ public class ConfigBrandServiceClientImpl extends BaseServiceClient<ConfigBrand,
         pageDto.setRecords(configBrandDtoList);
         return pageDto;
     }
+
+    @Override
+    public List<ConfigBrandDto> getBrandList() {
+        Map<String,Object> map = new HashMap<>();
+        List<ConfigBrandDto> configBrandDtos = this.queryList(map);
+        return configBrandDtos;
+    }
 }

+ 5 - 3
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/biz/mapper/StoreRewardMapper.java

@@ -1,12 +1,14 @@
 package io.platform.store.biz.mapper;
 
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
 import io.platform.base.common.BaseMapper;
-import io.platform.store.dto.StoreRewardDto;
+import io.platform.base.dto.StoreScanRewordDTO;
+import io.platform.base.vo.StoreScanRewordVO;
 import org.apache.ibatis.annotations.Mapper;
 import io.platform.store.biz.entity.StoreReward;
 import org.apache.ibatis.annotations.Param;
 
+
 import java.util.List;
 
 
@@ -17,5 +19,5 @@ import java.util.List;
 public interface StoreRewardMapper extends BaseMapper<StoreReward>{
 
 
-
+    List<StoreScanRewordVO> selectStoreRewords(@Param("storeScanRewordDTO") StoreScanRewordDTO storeScanRewordDTO);
 }

+ 6 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/biz/service/StoreRewardService.java

@@ -4,6 +4,8 @@ package io.platform.store.biz.service;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
+import io.platform.base.dto.StoreScanRewordDTO;
+import io.platform.base.vo.StoreScanRewordVO;
 import io.platform.store.biz.mapper.StoreRewardMapper;
 import io.platform.store.biz.entity.StoreReward;
 
@@ -21,4 +23,8 @@ public class StoreRewardService extends ServiceImpl<StoreRewardMapper,StoreRewar
     }
 
 
+    public List<StoreScanRewordVO> selectStoreRewords(StoreScanRewordDTO storeScanRewordDTO) {
+        return this.baseMapper.selectStoreRewords(storeScanRewordDTO);
+
+    }
 }

+ 26 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/service/client/impl/StoreRewardServiceClientImpl.java

@@ -5,9 +5,12 @@ import com.alibaba.dubbo.config.annotation.Service;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
+import com.github.pagehelper.PageHelper;
 import io.platform.base.common.BaseServiceClient;
 import io.platform.base.common.utils.ExecuteResult;
 
+import io.platform.base.dto.StoreScanRewordDTO;
+import io.platform.base.vo.StoreScanRewordVO;
 import io.platform.store.biz.entity.StoreReward;
 import io.platform.store.biz.service.StoreRewardService;
 import io.platform.store.dto.StoreRewardDto;
@@ -144,4 +147,27 @@ public class StoreRewardServiceClientImpl extends BaseServiceClient<StoreReward,
     }
 
 
+    /**
+     * 获取门店奖励记录
+     * @param storeScanRewordDTO
+     * @return
+     */
+    @Override
+    public ExecuteResult<List> getPageScanReword(StoreScanRewordDTO storeScanRewordDTO) {
+        ExecuteResult<List> result = new ExecuteResult<>();
+        PageHelper.startPage(storeScanRewordDTO.getCurrent(),storeScanRewordDTO.getSize());
+        List<StoreScanRewordVO> scanRewords = this.storeRewardService.selectStoreRewords(storeScanRewordDTO);
+        result.setResult(scanRewords);
+        return result;
+    }
+
+
+
+
+
+
+
+
+
+
 }

+ 27 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/resources/mybatis/store/StoreRewardMapper.xml

@@ -4,5 +4,32 @@
 <mapper namespace="io.platform.store.biz.mapper.StoreRewardMapper">
 
 
+    <select id="selectStoreRewords" resultType="io.platform.base.vo.StoreScanRewordVO"
+            parameterType="io.platform.base.dto.StoreScanRewordDTO">
 
+        SELECT
+            BONUS money,
+            TIRE_MODEL tireModel,
+            REWARD_TYPE getWay,
+            TIRENUMBER tyreNum,
+            CREATE_TIME createTime
+        FROM
+            "APP_STORE_REWARD"
+        <where>
+            STORE_ID = #{storeScanRewordDTO.storeId}
+            <if test=" ''!= storeScanRewordDTO.brandCode and null != storeScanRewordDTO.brandCode">
+               and TIRE_BRAND = #{storeScanRewordDTO.brandCode}
+            </if>
+            <if test=" null != storeScanRewordDTO.searchKey and '' != storeScanRewordDTO.searchKey">
+                and KEYWORD LIKE #{storeScanRewordDTO.searchKey}
+            </if>
+            <if test="null != storeScanRewordDTO.startTime">
+                and CREATE_TIME &gt; #{storeScanRewordDTO.startTime}
+            </if>
+            <if test="null != storeScanRewordDTO.endTime">
+                and CREATE_TIME &lt; #{storeScanRewordDTO.endTime}
+            </if>
+        </where>
+        ORDER BY CREATE_TIME DESC
+    </select>
 </mapper>

+ 71 - 0
sailun-allsteel-common/src/main/java/io/platform/base/dto/StoreScanRewordDTO.java

@@ -0,0 +1,71 @@
+package io.platform.base.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * TODO
+ *
+ * 1.门店扫码奖励记录
+ * @author shanxin
+ * @version 1.0
+ * @date 2020/11/17 14:11
+ */
+@Data
+public class StoreScanRewordDTO implements Serializable {
+
+    private static final long serialVersionUID = 5454155825314635342L;
+
+
+    /**
+     * 门店id
+     */
+    private Long storeId;
+
+    /**
+     * 用户id
+     */
+    private String userId;
+
+
+    /**
+     * 品牌code
+     */
+    private String brandCode;
+
+
+    /**
+     * 开始时间
+     *
+     */
+    private Date startTime;
+
+
+    /**
+     * 结束时间
+     */
+    private Date endTime;
+
+
+    /**
+     * 关键词
+     */
+    private String searchKey;
+
+
+    /**
+     * 当前页
+     */
+    private Integer current;
+
+    /**
+     * 页面大小
+     */
+    private Integer size;
+
+
+
+
+}

+ 0 - 1
sailun-allsteel-common/src/main/java/io/platform/base/vo/StoreScanMatnrMsgVO.java

@@ -1,6 +1,5 @@
 package io.platform.base.vo;
 
-import com.sun.xml.internal.ws.spi.db.DatabindingException;
 import lombok.Data;
 
 import java.io.Serializable;

+ 54 - 0
sailun-allsteel-common/src/main/java/io/platform/base/vo/StoreScanRewordVO.java

@@ -0,0 +1,54 @@
+package io.platform.base.vo;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * TODO
+ *
+ * 1.门店奖励信息VO
+ * @author shanxin
+ * @version 1.0
+ * @date 2020/11/17 14:21
+ */
+@Data
+public class StoreScanRewordVO implements Serializable {
+
+    private static final long serialVersionUID = 5454155825314635342L;
+
+
+    /**
+     * 奖励金额
+     */
+    private Long money;
+
+
+    /**
+     * 轮胎型号
+     */
+    private String tireModel;
+
+
+    /**
+     * 胎号
+     */
+    private String tyreNum;
+
+
+    /**
+     * 获得方式
+     */
+    private Integer getWay;
+
+
+    /**
+     * 获得时间
+     */
+    private Date createTime;
+
+
+
+}

+ 77 - 0
sailun-allsteel-common/src/main/java/io/platform/base/vo/StoreTaskStatisticsVO.java

@@ -0,0 +1,77 @@
+package io.platform.base.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * TODO
+ *
+ * 1.门店任务量统计VO显示
+ * @author shanxin
+ * @version 1.0
+ * @date 2020/11/18 11:05
+ */
+@Data
+public class StoreTaskStatisticsVO implements Serializable {
+
+    private static final long serialVersionUID = 5454155825314635342L;
+
+
+    /**
+     * 品牌
+     */
+    private String brand;
+
+    /**
+     * 季度
+     */
+    private String quarter;
+
+    /**
+     * 任务量
+     */
+    private Long taskNum;
+
+
+    /**
+     * 月度完成量
+     */
+    private Long monthCompleteNum;
+
+    /**
+     * 月度未完成量
+     */
+    private Long monthNotCompleteNum;
+
+
+    /**
+     * 月度完成占比
+     */
+    private String monthProportion;
+
+
+    /**
+     * 季度完成量
+     */
+    private Long quarterCompleteNum;
+
+
+    /**
+     * 季度未完成量
+     */
+    private Long quarterNotCompleteNum;
+
+
+    /**
+     * 月度完成占比
+     */
+    private String quarterProportion;
+
+
+
+
+
+
+
+}

+ 2 - 2
sailun-allsteel-sys-provider/sailun-allsteel-sys-service/src/main/java/io/platform/sys/service/client/impl/SysConfigServiceClientImpl.java

@@ -72,7 +72,7 @@ public class SysConfigServiceClientImpl extends BaseServiceClient<SysConfig, Sys
                 result.addErrorMessage("保存失败。");
             }
             // 保存成功! 存redis
-            redisUtils.set(sysConfigDto.getParamKey(),sysConfigDto.getParamValue());
+            redisUtils.set(sysConfigDto.getParamKey(),sysConfigDto);
         } catch (Exception e) {
             logger.error(" 保存错误:" + e.toString(), e);
             result.addErrorMessage("保存错误:" + e.toString());
@@ -92,7 +92,7 @@ public class SysConfigServiceClientImpl extends BaseServiceClient<SysConfig, Sys
                 result.addErrorMessage("更新失败。");
             }
             // 保存成功! 存redis
-            redisUtils.set(sysConfigDto.getParamKey(),sysConfigDto.getParamValue());
+            redisUtils.set(sysConfigDto.getParamKey(),sysConfigDto);
         } catch (Exception e) {
             logger.error(" 更新错误:" + e.toString(), e);
             result.addErrorMessage("更新错误:" + e.toString());