Browse Source

调整胡志航代码

shanxin 4 years ago
parent
commit
84b7ba51de
31 changed files with 294 additions and 319 deletions
  1. 61 15
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/HomePageController.java
  2. 0 50
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/MyController.java
  3. 28 12
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/remote/HomePageRemote.java
  4. 0 68
      sailun-allsteel-app-rest/src/main/java/io/platform/app/web/remote/MyRemote.java
  5. 2 1
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigArticleServiceClient.java
  6. 2 1
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigBannerServiceClient.java
  7. 2 1
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigNoticeServiceClient.java
  8. 0 5
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/scan/service/client/api/ScanRecordServiceClient.java
  9. 1 6
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/store/service/client/api/StoreBasicInfoServiceClient.java
  10. 4 11
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/store/service/client/api/StoreRewardServiceClient.java
  11. 8 6
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/store/service/client/api/StoreStockServiceClient.java
  12. 15 5
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigArticleServiceClientImpl.java
  13. 1 1
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigBannerServiceClientImpl.java
  14. 7 2
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigNoticeServiceClientImpl.java
  15. 0 12
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/scan/biz/mapper/ScanRecordMapper.java
  16. 1 12
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/scan/biz/service/ScanRecordService.java
  17. 1 6
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/scan/service/client/impl/ScanRecordServiceClientImpl.java
  18. 1 6
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/biz/mapper/StoreRewardMapper.java
  19. 1 1
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/biz/mapper/StoreStockMapper.java
  20. 1 3
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/biz/service/StoreRewardService.java
  21. 1 3
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/biz/service/StoreStockService.java
  22. 1 7
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/service/client/impl/StoreBasicInfoServiceClientImpl.java
  23. 1 6
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/service/client/impl/StoreRewardServiceClientImpl.java
  24. 1 4
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/service/client/impl/StoreStockServiceClientImpl.java
  25. 0 43
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/resources/mybatis/scan/ScanRecordMapper.xml
  26. 1 29
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/resources/mybatis/store/StoreRewardMapper.xml
  27. 1 3
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/resources/mybatis/store/StoreStockMapper.xml
  28. 29 0
      sailun-allsteel-common/src/main/java/io/platform/base/dto/ArticleDTO.java
  29. 32 0
      sailun-allsteel-common/src/main/java/io/platform/base/dto/NoticeDTO.java
  30. 64 0
      sailun-allsteel-common/src/main/java/io/platform/base/dto/ScanRecordQuery.java
  31. 27 0
      sailun-allsteel-common/src/main/java/io/platform/base/dto/StoreBannerDTO.java

+ 61 - 15
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/controller/HomePageController.java

@@ -1,48 +1,94 @@
 package io.platform.app.web.controller;
 
-import io.platform.app.web.query.CommonQuery;
 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.config.annotation.FuncLogAnno;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+/**
+ * TODO
+ *
+ * 首页模块
+ * 1.轮播图
+ * 2.系统公告
+ * 3.门店政策
+ *
+ * @author shanxin
+ * @version 1.0
+ * @date 2020/11/6 9:03
+ */
 @RestController
-@Api(tags = "首页模块相关")
-@RequestMapping("/app/homePage")
+@RequestMapping("/homepage/")
+@Api(tags = "APP首页相关内容")
 public class HomePageController {
 
     @Autowired
     private HomePageRemote homePageRemote;
 
     /**
-     * 获取banner图列表
+     * 用户获取banner图列表
+     * @param storeBannerDTO
      * @return
      */
-    @PostMapping("/bannerList")
-    @ApiOperation("banner图列表")
-    public R bannerList(@RequestBody CommonQuery bannerQuery){
-        return R.ok().put("list",homePageRemote.getBannerList(bannerQuery));
+    @PostMapping("/getBanners")
+    @ApiOperation("用户获取Banner图列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "storeId", value = "门店id",required = true),
+    })
+    @FuncLogAnno(functionName = "用户获取Banner图列表接口")
+    public R getStoreBannerList(@RequestBody StoreBannerDTO storeBannerDTO){
+        if(storeBannerDTO.getStoreId()==null){
+            throw new RRException("门店ID不能为空");
+        }
+        return R.ok().put("list",homePageRemote.getStoreBannerList(storeBannerDTO));
     }
 
     /**
      * 首页公告消息
      * @return
      */
-    @ApiOperation("首页公告消息")
     @PostMapping("/noticeList")
-    public R noticeList(){
-        return R.ok().put("list",homePageRemote.getNoticeList());
+    @ApiOperation("首页公告消息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "contentType", value = "展示位置",required = true),
+    })
+    @FuncLogAnno(functionName = "首页公告消息接口")
+    public R noticeList(@RequestBody NoticeDTO noticeDTO){
+        if (null == noticeDTO.getContentType()) {
+            throw new RRException("展示位置不能为空");
+        }
+        return R.ok().put("list",homePageRemote.getNoticeList(noticeDTO));
     }
 
+
     /**
-     * 系统政策
+     * 系统政策接口
+     * @param articleDTO
      * @return
      */
-    @ApiOperation("系统政策")
     @PostMapping("/articleList")
-    public R articleList(){
-        return R.ok().put("list",homePageRemote.getArticleList());
+    @ApiOperation("系统政策")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "displayType", value = "展示位置",required = true),
+    })
+    @FuncLogAnno(functionName = "系统政策接口")
+    public R articleList(@RequestBody ArticleDTO articleDTO){
+        if (null == articleDTO.getDisplayType()) {
+            throw new RRException("显示位置不能为空");
+        }
+        return R.ok().put("list",homePageRemote.getArticle(articleDTO));
     }
+
+
+
+
 }

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

@@ -1,50 +0,0 @@
-package io.platform.app.web.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import io.platform.app.web.query.CommonQuery;
-import io.platform.app.web.query.RewardQuery;
-import io.platform.app.web.query.ScanRecordQuery;
-import io.platform.app.web.remote.MyRemote;
-import io.platform.base.common.utils.R;
-import io.swagger.annotations.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-@RestController
-@RequestMapping("/app/my")
-@Api(tags = "我的模块相关")
-public class MyController {
-
-    @Autowired
-    private MyRemote myRemote;
-
-    /**
-     * 分页获取出入库列表
-     * @param
-     * @param scanRecordQuery
-     * @return
-     */
-    @PostMapping("/scanRecordList")
-    @ApiOperation("分页获取出入库记录")
-    public R getScanRecordListBypage(@RequestBody ScanRecordQuery scanRecordQuery){
-        //出入库记录列表
-        Page page = myRemote.getScanRecordListBypage(scanRecordQuery);
-        //库存总量
-        Long totalStock = myRemote.getStoreTotalStock(scanRecordQuery);
-        return R.ok().put("page",page).put("totalStock",totalStock);
-    }
-
-
-    @PostMapping("/storeRewardList")
-    @ApiOperation("分页获取奖励明细记录")
-    public R getStoreRewardListBypage(@RequestBody RewardQuery rewardQuery){
-        return R.ok().put("page",myRemote.getStoreRewardListBypage(rewardQuery));
-    }
-
-
-    @PostMapping("/storeInfo")
-    @ApiOperation("获取门店信息")
-    public R getStoreInfo(@RequestBody CommonQuery commonQuery){
-        return R.ok().put("info",myRemote.getStoreInfo(commonQuery));
-    }
-}

+ 28 - 12
sailun-allsteel-app-rest/src/main/java/io/platform/app/web/remote/HomePageRemote.java

@@ -2,6 +2,9 @@ package io.platform.app.web.remote;
 
 import com.alibaba.dubbo.config.annotation.Reference;
 import io.platform.base.common.exception.RRException;
+import io.platform.base.dto.ArticleDTO;
+import io.platform.base.dto.NoticeDTO;
+import io.platform.base.dto.StoreBannerDTO;
 import io.platform.homepage.dto.ConfigArticleDto;
 import io.platform.homepage.dto.ConfigBannerDto;
 import io.platform.homepage.dto.ConfigNoticeDto;
@@ -13,30 +16,43 @@ import org.springframework.stereotype.Service;
 
 import java.util.List;
 
-@Service("HomePageRemote")
+@Service("homePageRemote")
 public class HomePageRemote {
 
     @Reference(check = false)
     private ConfigBannerServiceClient configBannerServiceClient;
 
-    @Reference
+    @Reference(check = false)
     private ConfigNoticeServiceClient configNoticeServiceClient;
 
-    @Reference
+    @Reference(check = false)
     private ConfigArticleServiceClient configArticleServiceClient;
 
-    public List<ConfigBannerDto> getBannerList(CommonQuery bannerQuery) {
-        if(bannerQuery.getStoreId()==null){
-            throw new RRException("门店id不能为空");
-        }
-        return configBannerServiceClient.getBannerList(bannerQuery.getStoreId());
+    /**
+     * 轮播图
+     * @param storeBannerDTO
+     * @return
+     */
+    public List<ConfigBannerDto> getStoreBannerList(StoreBannerDTO storeBannerDTO) {
+        return configBannerServiceClient.getStoreBannerList(storeBannerDTO);
     }
 
-    public List<ConfigNoticeDto> getNoticeList() {
-        return configNoticeServiceClient.getNoticeList();
+    /**
+     * 公告
+     * @param noticeDTO
+     * @return
+     */
+    public List<ConfigNoticeDto> getNoticeList(NoticeDTO noticeDTO) {
+        return configNoticeServiceClient.getNoticeList(noticeDTO);
     }
 
-    public List<ConfigArticleDto> getArticleList() {
-        return configArticleServiceClient.getArticleList();
+    /**
+     * 政策
+     * @param articleDTO
+     * @return
+     */
+    public ConfigArticleDto getArticle(ArticleDTO articleDTO) {
+        return configArticleServiceClient.getArticle(articleDTO);
     }
+
 }

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

@@ -1,68 +0,0 @@
-package io.platform.app.web.remote;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import io.platform.app.web.query.CommonQuery;
-import io.platform.app.web.query.RewardQuery;
-import io.platform.app.web.query.ScanRecordQuery;
-import io.platform.base.common.exception.RRException;
-import io.platform.base.common.utils.PageUtils;
-import io.platform.base.common.utils.Query;
-import io.platform.base.common.utils.R;
-import io.platform.scan.dto.ScanRecordDto;
-import io.platform.scan.dto.ScanRecordListDto;
-import io.platform.scan.service.client.api.ScanRecordServiceClient;
-import io.platform.store.dto.StoreBasicInfoDto;
-import io.platform.store.dto.StoreRewardDto;
-import io.platform.store.service.client.api.StoreBasicInfoServiceClient;
-import io.platform.store.service.client.api.StoreRewardServiceClient;
-import io.platform.store.service.client.api.StoreStockServiceClient;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service("scanRecordRemote")
-public class MyRemote {
-
-    @Reference
-    private ScanRecordServiceClient scanRecordServiceClient;
-
-    @Reference
-    private StoreRewardServiceClient storeRewardServiceClient;
-
-    @Reference
-    private StoreStockServiceClient storeStockServiceClient;
-
-    @Reference
-    private StoreBasicInfoServiceClient storeBasicInfoServiceClient;
-
-    public Page<ScanRecordListDto> getScanRecordListBypage(ScanRecordQuery scanRecordQuery) {
-        if (scanRecordQuery.getStoreId()==null){
-            throw new RRException("门店Id为空");
-        }
-        Page page = new Page(scanRecordQuery.getCurrent(),scanRecordQuery.getSize());
-        return scanRecordServiceClient.getScanRecordListBypage(page,scanRecordQuery.getStoreId(),scanRecordQuery.getBrandCode(),scanRecordQuery.getContent(),scanRecordQuery.getBeginDate(),scanRecordQuery.getEndDate(),scanRecordQuery.getScanType());
-    }
-
-    public Page<StoreRewardDto> getStoreRewardListBypage(RewardQuery rewardQuery) {
-        if (rewardQuery.getStoreId()==null){
-            throw new RRException("门店Id为空");
-        }
-        Page page = new Page(rewardQuery.getCurrent(),rewardQuery.getSize());
-        return storeRewardServiceClient.getStoreRewardListBypage(page,rewardQuery.getStoreId(),rewardQuery.getBrandCode(),rewardQuery.getContent(),rewardQuery.getBeginDate(),rewardQuery.getEndDate());
-    }
-
-    public Long getStoreTotalStock(ScanRecordQuery scanRecordQuery) {
-        if (scanRecordQuery.getStoreId()==null){
-            throw new RRException("门店Id为空");
-        }
-        return storeStockServiceClient.getStoreTotalStock(scanRecordQuery.getStoreId());
-    }
-
-    public StoreBasicInfoDto getStoreInfo(CommonQuery commonQuery) {
-        if (commonQuery.getStoreId()==null){
-            throw new RRException("门店Id为空");
-        }
-        return storeBasicInfoServiceClient.getStoreInfo(commonQuery.getStoreId());
-    }
-}

+ 2 - 1
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigArticleServiceClient.java

@@ -2,6 +2,7 @@
 package io.platform.homepage.service.client.api;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.platform.base.dto.ArticleDTO;
 import io.platform.homepage.dto.ConfigArticleDto;
 
 import java.util.List;
@@ -47,5 +48,5 @@ public interface ConfigArticleServiceClient{
          * 获取系统政策列表
          * @return
          */
-        List<ConfigArticleDto> getArticleList();
+        ConfigArticleDto getArticle(ArticleDTO articleDTO);
 }

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

@@ -2,6 +2,7 @@
 package io.platform.homepage.service.client.api;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.platform.base.dto.StoreBannerDTO;
 import io.platform.homepage.dto.ConfigBannerDto;
 
 import java.util.List;
@@ -48,5 +49,5 @@ public interface ConfigBannerServiceClient{
          * @param storeId
          * @return
          */
-        List<ConfigBannerDto> getBannerList(Long storeId);
+        List<ConfigBannerDto> getStoreBannerList(StoreBannerDTO storeBannerDTO);
 }

+ 2 - 1
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigNoticeServiceClient.java

@@ -2,6 +2,7 @@
 package io.platform.homepage.service.client.api;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.platform.base.dto.NoticeDTO;
 import io.platform.homepage.dto.ConfigNoticeDto;
 
 import java.util.List;
@@ -46,6 +47,6 @@ public interface ConfigNoticeServiceClient{
         /**
          * 获取首页公告消息
          */
-        List<ConfigNoticeDto> getNoticeList();
+        List<ConfigNoticeDto> getNoticeList(NoticeDTO noticeDTO);
 
 }

+ 0 - 5
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/scan/service/client/api/ScanRecordServiceClient.java

@@ -44,10 +44,5 @@ public interface ScanRecordServiceClient{
          * 根据分页参数 获取 分页集合
          */
         Page<ScanRecordDto>getPage(Page<ScanRecordDto>page,ScanRecordDto scanRecordDto);
-        /**
-         * 根据分页参数 获取 分页集合
-         */
-        Page<ScanRecordListDto> getScanRecordListBypage(Page page, Long storeId, String brandCode, String content, String beginDate,String endDate, Integer scanType);
-
 
 }

+ 1 - 6
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/store/service/client/api/StoreBasicInfoServiceClient.java

@@ -43,10 +43,5 @@ public interface StoreBasicInfoServiceClient{
          */
         Page<StoreBasicInfoDto>getPage(Page<StoreBasicInfoDto>page,StoreBasicInfoDto storeBasicInfoDto);
 
-        /**
-         * 获取门店基本信息
-         * @param storeId
-         * @return
-         */
-        StoreBasicInfoDto getStoreInfo(Long storeId);
+
 }

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

@@ -43,15 +43,8 @@ public interface StoreRewardServiceClient{
          */
         Page<StoreRewardDto>getPage(Page<StoreRewardDto>page,StoreRewardDto storeRewardDto);
 
-        /**
-         * 根据分页获取奖励列表
-         * @param page
-         * @param storeId
-         * @param brandCode
-         * @param content
-         * @param beginDate
-         * @Param endDate
-         * @return
-         */
-        Page<StoreRewardDto> getStoreRewardListBypage(Page page, Long storeId, String brandCode, String content, String beginDate, String endDate);
+
+
+
+
 }

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

@@ -42,10 +42,12 @@ public interface StoreStockServiceClient{
          * 根据分页参数 获取 分页集合
          */
         Page<StoreStockDto>getPage(Page<StoreStockDto>page,StoreStockDto storeStockDto);
-        /**
-         * 根据门店Id获取库存总量
-         * @param storeId
-         * @return
-         */
-        Long getStoreTotalStock(Long storeId);
+
+
+
+
+
+
+
+
 }

+ 15 - 5
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigArticleServiceClientImpl.java

@@ -1,6 +1,7 @@
 
 package io.platform.homepage.service.client.impl;
 
+import cn.hutool.core.bean.BeanUtil;
 import com.alibaba.dubbo.config.annotation.Service;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -8,6 +9,7 @@ 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.dto.ArticleDTO;
 import io.platform.homepage.biz.entity.ConfigArticle;
 import io.platform.homepage.biz.service.ConfigArticleService;
 import io.platform.homepage.dto.ConfigArticleDto;
@@ -143,12 +145,20 @@ public class ConfigArticleServiceClientImpl extends BaseServiceClient<ConfigArti
         return pageDto;
     }
 
+    /**
+     * 月度政策图
+     * @param articleDTO
+     * @return
+     */
     @Override
-    public List<ConfigArticleDto> getArticleList() {
+    public ConfigArticleDto getArticle(ArticleDTO articleDTO) {
         QueryWrapper<ConfigArticle>  wrapper = new QueryWrapper<>();
-        wrapper.eq("NSTATUS",1);
-        wrapper.eq("DISPLAY_TYPE",1);
-        List<ConfigArticleDto> configArticleDtos = convertList(configArticleService.list(wrapper),ConfigArticleDto.class);
-        return configArticleDtos;
+        wrapper.eq("NSTATUS",1)
+                .eq("DISPLAY_TYPE",articleDTO.getDisplayType())
+                .eq("FLAG_DEFAULT",1);
+        ConfigArticle configArticle = configArticleService.getOne(wrapper);
+        ConfigArticleDto configArticleDto = new ConfigArticleDto();
+        BeanUtil.copyProperties(configArticle,configArticleDto);
+        return configArticleDto;
     }
 }

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

@@ -145,7 +145,7 @@ public class ConfigBannerServiceClientImpl extends BaseServiceClient<ConfigBanne
     }
 
     @Override
-    public List<ConfigBannerDto> getBannerList(Long storeId) {
+    public List<ConfigBannerDto> getStoreBannerList(Long storeId) {
         List<ConfigBannerDto> bannerList = configBannerService.getBannerList(storeId);
         return bannerList;
     }

+ 7 - 2
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigNoticeServiceClientImpl.java

@@ -8,6 +8,7 @@ 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.dto.NoticeDTO;
 import io.platform.homepage.biz.entity.ConfigNotice;
 import io.platform.homepage.biz.service.ConfigNoticeService;
 import io.platform.homepage.dto.ConfigNoticeDto;
@@ -143,10 +144,14 @@ public class ConfigNoticeServiceClientImpl extends BaseServiceClient<ConfigNotic
         return pageDto;
     }
 
+    /**
+     * 获取门店公告
+     * @return
+     */
     @Override
-    public List<ConfigNoticeDto> getNoticeList() {
+    public List<ConfigNoticeDto> getNoticeList(NoticeDTO noticeDTO) {
         QueryWrapper<ConfigNotice> wrapper = new QueryWrapper<>();
-        wrapper.eq("CONTENT_TYPE",1);
+        wrapper.eq("CONTENT_TYPE",noticeDTO.getContentType());
         List<ConfigNoticeDto> noticeDtos = convertList(configNoticeService.list(wrapper),ConfigNoticeDto.class);
         return noticeDtos;
     }

+ 0 - 12
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/scan/biz/mapper/ScanRecordMapper.java

@@ -19,17 +19,5 @@ import java.util.List;
 @Mapper
 public interface ScanRecordMapper extends BaseMapper<ScanRecord>{
 
-    List<ScanRecordListDto> getScanRecordListBypage(Page page,
-                                                    @Param("storeId") Long storeId,
-                                                    @Param("brandCode") String brandCode,
-                                                    @Param("content")String content,
-                                                    @Param("beginDate")String beginDate,
-                                                    @Param("endDate")String endDate,
-                                                    @Param("scanType")Integer scanType);
 
-    List<TireModelDto> getTireModelByScanNum(@Param("storeId") Long storeId,
-                                             @Param("scanNum")String scanNum);
-
-    List<TireInfo> getTireInfoByTireModel(@Param("storeId") Long storeId,
-                                          @Param("tireModel")String tireModel);
 }

+ 1 - 12
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/scan/biz/service/ScanRecordService.java

@@ -24,16 +24,5 @@ public class ScanRecordService extends ServiceImpl<ScanRecordMapper,ScanRecord>{
         return baseMapper.selectByMap(map);
     }
 
-    public List<ScanRecordListDto> getScanRecordListBypage(Page page, Long storeId, String brandCode, String content, String beginDate,String endDate, Integer scanType) {
-        List<ScanRecordListDto> scanRecordListDtos = baseMapper.getScanRecordListBypage(page, storeId, brandCode, content, beginDate,endDate, scanType);
-        for (ScanRecordListDto scanRecordListDto:scanRecordListDtos) {
-            List<TireModelDto> tireModelDtos = baseMapper.getTireModelByScanNum(storeId,scanRecordListDto.getScanNum());
-            for (TireModelDto tireModelDto:tireModelDtos) {
-                List<TireInfo> tireInfos = baseMapper.getTireInfoByTireModel(storeId,tireModelDto.getTireModel());
-                tireModelDto.setTireInfos(tireInfos);
-            }
-            scanRecordListDto.setTireModelDtos(tireModelDtos);
-        }
-        return scanRecordListDtos;
-    }
+
 }

+ 1 - 6
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/scan/service/client/impl/ScanRecordServiceClientImpl.java

@@ -145,10 +145,5 @@ public class ScanRecordServiceClientImpl extends BaseServiceClient<ScanRecord,Sc
         return pageDto;
     }
 
-    @Override
-    public Page<ScanRecordListDto> getScanRecordListBypage(Page page,Long storeId, String brandCode, String content, String beginDate,String endDate, Integer scanType) {
-        List<ScanRecordListDto> scanRecordListDtos = scanRecordService.getScanRecordListBypage(page,storeId,brandCode,content,beginDate,endDate,scanType);
-        page.setRecords(scanRecordListDtos);
-        return page;
-    }
+
 }

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

@@ -16,11 +16,6 @@ import java.util.List;
 @Mapper
 public interface StoreRewardMapper extends BaseMapper<StoreReward>{
 
-    List<StoreRewardDto> getStoreRewardListBypage(Page page,
-                                                  @Param("storeId") Long storeId,
-                                                  @Param("brandCode") String brandCode,
-                                                  @Param("content")String content,
-                                                  @Param("beginDate")String beginDate,
-                                                  @Param("endDate")String endDate);
+
 
 }

+ 1 - 1
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/biz/mapper/StoreStockMapper.java

@@ -12,5 +12,5 @@ import org.apache.ibatis.annotations.Param;
 @Mapper
 public interface StoreStockMapper extends BaseMapper<StoreStock>{
 
-    Long getStoreTotalStock(@Param("storeId") Long storeId);
+
 }

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

@@ -20,7 +20,5 @@ public class StoreRewardService extends ServiceImpl<StoreRewardMapper,StoreRewar
         return baseMapper.selectByMap(map);
     }
 
-    public List<StoreRewardDto> getStoreRewardListBypage(Page page, Long storeId, String brandCode, String content, String beginDate, String endDate) {
-        return baseMapper.getStoreRewardListBypage(page,storeId,brandCode,content,beginDate,endDate);
-    }
+
 }

+ 1 - 3
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/biz/service/StoreStockService.java

@@ -18,7 +18,5 @@ public class StoreStockService extends ServiceImpl<StoreStockMapper,StoreStock>{
         return baseMapper.selectByMap(map);
     }
 
-    public Long getStoreTotalStock(Long storeId) {
-        return baseMapper.getStoreTotalStock(storeId);
-    }
+
 }

+ 1 - 7
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/service/client/impl/StoreBasicInfoServiceClientImpl.java

@@ -143,11 +143,5 @@ public class StoreBasicInfoServiceClientImpl extends BaseServiceClient<StoreBasi
         return pageDto;
     }
 
-    @Override
-    public StoreBasicInfoDto getStoreInfo(Long storeId) {
-        StoreBasicInfo storeBasicInfo = storeBasicInfoService.getById(storeId);
-        StoreBasicInfoDto storeBasicInfoDto = new StoreBasicInfoDto();
-        convert(storeBasicInfo,storeBasicInfoDto);
-        return storeBasicInfoDto;
-    }
+
 }

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

@@ -143,10 +143,5 @@ public class StoreRewardServiceClientImpl extends BaseServiceClient<StoreReward,
         return pageDto;
     }
 
-    @Override
-    public Page<StoreRewardDto> getStoreRewardListBypage(Page page, Long storeId, String brandCode, String content, String beginDate,String endDate) {
-        List<StoreRewardDto> storeRewardDtos = storeRewardService.getStoreRewardListBypage(page,storeId,brandCode,content,beginDate,endDate);
-        page.setRecords(storeRewardDtos);
-        return page;
-    }
+
 }

+ 1 - 4
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/store/service/client/impl/StoreStockServiceClientImpl.java

@@ -143,8 +143,5 @@ public class StoreStockServiceClientImpl extends BaseServiceClient<StoreStock,St
         return pageDto;
     }
 
-    @Override
-    public Long getStoreTotalStock(Long storeId) {
-        return storeStockService.getStoreTotalStock(storeId);
-    }
+
 }

+ 0 - 43
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/resources/mybatis/scan/ScanRecordMapper.xml

@@ -3,48 +3,5 @@
 
 <mapper namespace="io.platform.scan.biz.mapper.ScanRecordMapper">
 
-    <resultMap id="scanRecordListMap" type="io.platform.scan.dto.ScanRecordListDto">
-<!--        <id column="MAIN_ID" property="mainId"/>-->
-        <result column="STORE_ID" property="storeId"/>
-        <result column="SCAN_NUM" property="scanNum"/>
-        <result column="SCAN_DATE" property="scanDate"/>
-        <collection property="scanRecordListDtos" ofType="io.platform.scan.dto.TireModelDto">
-            <result column="TIRE_MODEL" property="tireModel"/>
-            <collection property="scanRecordDtos" ofType="io.platform.scan.dto.TireInfo">
-                <id column="MAIN_ID" property="mainId"/>
-                <result column="MAKTX" property="maktx"/>
-                <result column="TIRE_NUMBER" property="tireNumber"/>
-                <result column="SATISFY_ACTIVITY" property="satisfyActivity"/>
-                <result column="CREATE_TIME" property="createTime"/>
-            </collection>
-        </collection>
-    </resultMap>
 
-    <select id="getScanRecordListBypage" resultType="io.platform.scan.dto.ScanRecordListDto">
-        select
-               ASR.SCAN_NUM,
-               to_char(ASR.CREATE_TIME,'yyyy-MM-dd') SCAN_DATE,
-        from APP_SCAN_RECORD ASR
-        where ASR.STORE_ID = #{storeId} and ASR.SCAN_TYPE = #{scanType}
-        <if test="brandCode!=null and brandCode!=''">
-            and ASR.BRAND = #{brandCode}
-        </if>
-        group by ASR.SCAN_NUM
-    </select>
-    <select id="getTireModelByScanNum" resultType="io.platform.scan.dto.TireModelDto">
-        select
-        ASR.TIRE_MODEL
-        from APP_SCAN_RECORD ASR
-        where ASR.STORE_ID = #{storeId} and ASR.SCAN_NUM = #{scanNum}
-        group by ASR.TIRE_MODEL
-    </select>
-    <select id="getTireInfoByTireModel" resultType="io.platform.scan.dto.TireInfo">
-        select ASR.MAIN_ID,
-               ASR.MAKTX,
-               ASR.TIRE_NUMBER,
-               ASR.SATISFY_ACTIVITY,
-               ASR.CREATE_TIME
-        from APP_SCAN_RECORD ASR
-        where ASR.STORE_ID = #{storeId} and ASR.TIRE_MODEL = #{tireModel}
-    </select>
 </mapper>

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

@@ -4,33 +4,5 @@
 <mapper namespace="io.platform.store.biz.mapper.StoreRewardMapper">
 
 
-    <select id="getStoreRewardListBypage" resultType="io.platform.store.dto.StoreRewardDto">
-        select
-               MAIN_ID,
-               STORE_ID,
-               KUNNR,
-               INTEGRAL,
-               BONUS,
-               CREATE_TIME,
-               SCAN_ID,
-               REWARD_TYPE,
-               TIRENUMBER,
-               TIRE_REBATE,
-               TIRE_MODEL
-        from APP_STORE_REWARD ASR
-        where ASR.STORE_ID = #{storeId}
-        <if test="brandCode!=null and brandCode!=''">
-            and ASR.TIRE_BRAND=#{brandCode}
-        </if>
-        <if test="content!=null and content!=''">
-            and ASR.KEYWORD like concat(concat('%',#{content}),'%')
-        </if>
-        <if test="beginDate!=null and beginDate!=''">
-            and ASR.CREATE_TIME&gt;=to_date(#{beginDate},'yyyy-MM-dd')
-        </if>
-        <if test="endDate!=null and endDate!=''">
-            and ASR.CREATE_TIME&lt;=to_date(#{endDate},'yyyy-MM-dd')
-        </if>
-        order by ASR.CREATE_TIME desc
-    </select>
+
 </mapper>

+ 1 - 3
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/resources/mybatis/store/StoreStockMapper.xml

@@ -4,7 +4,5 @@
 <mapper namespace="io.platform.store.biz.mapper.StoreStockMapper">
 
 
-    <select id="getStoreTotalStock" resultType="java.lang.Long">
-        select NVL(sum(TATAL_STOCK),0) TATAL_STOCK from APP_STORE_STOCK where STORE_ID = #{storeId}
-    </select>
+
 </mapper>

+ 29 - 0
sailun-allsteel-common/src/main/java/io/platform/base/dto/ArticleDTO.java

@@ -0,0 +1,29 @@
+package io.platform.base.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * TODO
+ *
+ * 1.系统政策DTO
+ * @author shanxin
+ * @version 1.0
+ * @date 2020/11/6 9:33
+ */
+@Data
+public class ArticleDTO implements Serializable {
+
+    private static final long serialVersionUID = 5454155825314635342L;
+
+
+    /**
+     * 显示位置
+     * (0车主/1门店/2经销商)
+     */
+    private Integer displayType;
+
+
+
+}

+ 32 - 0
sailun-allsteel-common/src/main/java/io/platform/base/dto/NoticeDTO.java

@@ -0,0 +1,32 @@
+package io.platform.base.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * TODO
+ * 1.通知公告DTO
+ *
+ * @author shanxin
+ * @version 1.0
+ * @date 2020/11/6 9:26
+ */
+@Data
+public class NoticeDTO implements Serializable {
+
+    private static final long serialVersionUID = 5454155825314635342L;
+
+    /**
+     * 门店id
+     */
+    private Long storeId;
+
+    /**
+     * 展示位置
+     */
+    private Integer contentType;
+
+
+
+}

+ 64 - 0
sailun-allsteel-common/src/main/java/io/platform/base/dto/ScanRecordQuery.java

@@ -0,0 +1,64 @@
+package io.platform.base.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * TODO
+ *
+ * 1.门店出入库记录查询
+ *
+ * @author shanxin
+ * @version 1.0
+ * @date 2020/11/6 10:08
+ */
+@Data
+public class ScanRecordQuery implements Serializable {
+
+    private static final long serialVersionUID = 5454155825314635342L;
+
+
+    /**
+     * 门店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;
+
+
+
+}

+ 27 - 0
sailun-allsteel-common/src/main/java/io/platform/base/dto/StoreBannerDTO.java

@@ -0,0 +1,27 @@
+package io.platform.base.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * TODO
+ *
+ * 1.门店轮播图DTO
+ * @author shanxin
+ * @version 1.0
+ * @date 2020/11/6 9:16
+ */
+@Data
+public class StoreBannerDTO implements Serializable {
+
+    private static final long serialVersionUID = 5454155825314635342L;
+
+
+    /**
+     * 门店Id
+     */
+    private Long storeId;
+
+
+}