浏览代码

Merge remote-tracking branch 'origin/master'

wxd 9 小时之前
父节点
当前提交
a88269d1f2

+ 6 - 0
alien-entity/src/main/java/shop/alien/entity/store/dto/StoreInfoDto.java

@@ -159,4 +159,10 @@ public class StoreInfoDto {
 
     @ApiModelProperty(value = "门店营业时间")
     private List<StoreBusinessInfo> storeBusinessTime;
+
+    @ApiModelProperty(value = "审核续签合同原因")
+    private String contractReason;
+
+    @ApiModelProperty(value = "审核续签合同状态")
+    private Integer renewContractStatus;
 }

+ 1 - 1
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeGroupBuyThaliVo.java

@@ -133,7 +133,7 @@ public class LifeGroupBuyThaliVo {
      */
     @ApiModelProperty(value = "有效期类型(0指定天数/1指定时间段)")
     @TableField("effective_date_type")
-    private String effectiveDateType;
+    private Integer effectiveDateType;
 
     /**
      * 有效期值

+ 5 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreInfoVo.java

@@ -99,6 +99,9 @@ public class StoreInfoVo extends StoreInfo {
     @ApiModelProperty(value = "营业执照图片地址")
     private List<String> contractImageList;
 
+    @ApiModelProperty(value = "续签合同图片地址")
+    private List<String> renewContractImageList;
+
     @ApiModelProperty(value = "过期天数")
     private Long daysToExpire;
 
@@ -169,4 +172,6 @@ public class StoreInfoVo extends StoreInfo {
 
     @ApiModelProperty(value = "验证码")
     private String verificationCode;
+
+
 }

+ 17 - 21
alien-store/src/main/java/shop/alien/store/controller/StoreInfoController.java

@@ -214,7 +214,8 @@ public class StoreInfoController {
             @ApiImplicitParam(name = "businessSection", value = "经营板块", dataType = "String", paramType = "query"),
             @ApiImplicitParam(name = "storeApplicationStatus", value = "门店审核状态", dataType = "String", paramType = "query"),
             @ApiImplicitParam(name = "jingdu", value = "jingdu", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "weidu", value = "weidu", dataType = "String", paramType = "query")
+            @ApiImplicitParam(name = "weidu", value = "weidu", dataType = "String", paramType = "query"),
+            @ApiImplicitParam(name = "renewContractStatus", value = "门店续签合同状态", dataType = "String", paramType = "query")
     })
     @GetMapping("/getStorePage")
     public R<IPage<StoreInfoVo>> getStoresPage(
@@ -230,10 +231,11 @@ public class StoreInfoController {
             @RequestParam(required = false) String businessSection,
             @RequestParam(required = false) String storeStatus,
             @RequestParam(required = false) String jingdu,
-            @RequestParam(required = false) String weidu) {
-        log.info("StoreInfoController.getStoresPage?pageNum={},pageSize={},storeName={},storeContact={},id={},storePhone={},storeType={},expiredState={},storeApplicationStatus={},storeStatus={},businessSection={},jingdu={},weidu={}",
-                pageNum, pageSize, storeName, storeContact, id, storePhone, storeType, expiredState, storeApplicationStatus, storeStatus, businessSection, jingdu, weidu);
-        return R.data(storeInfoService.getStorePage(pageNum, pageSize, storeName, storeContact, id, storePhone, storeType, expiredState, storeApplicationStatus, storeStatus, businessSection, jingdu, weidu));
+            @RequestParam(required = false) String weidu,
+            @RequestParam(required = false) String renewContractStatus) {
+        log.info("StoreInfoController.getStoresPage?pageNum={},pageSize={},storeName={},storeContact={},id={},storePhone={},storeType={},expiredState={},storeApplicationStatus={},storeStatus={},businessSection={},jingdu={},weidu={},renewContractStatus={}",
+                pageNum, pageSize, storeName, storeContact, id, storePhone, storeType, expiredState, storeApplicationStatus, storeStatus, businessSection, jingdu, weidu, renewContractStatus);
+        return R.data(storeInfoService.getStorePage(pageNum, pageSize, storeName, storeContact, id, storePhone, storeType, expiredState, storeApplicationStatus, storeStatus, businessSection, jingdu, weidu, renewContractStatus));
     }
 
     /**
@@ -566,20 +568,14 @@ public class StoreInfoController {
     }
 
     @ApiOperation(value = "门店装修-审核续签合同状态")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "门店id", dataType = "int"),
-            @ApiImplicitParam(name = "contractReason", value = "审核拒绝原因", dataType = "String"),
-            @ApiImplicitParam(name = "renewContractStatus", value = "审核续签合同状态", dataType = "int"),
-    })
     @PostMapping("/updateContractImageStatus")
-    public R<String> updateContractImageStatus(int id, String contractReason, int renewContractStatus) {
-        log.info("StoreInfoController.updateContractImageStatus?id={}&contractReason={}&renewContractStatus{}", id, contractReason, renewContractStatus);
-        StoreInfo storeInfo = storeInfoService.getOne(new LambdaQueryWrapper<StoreInfo>().eq(StoreInfo::getId, id));
+    public R<String> updateContractImageStatus(@RequestBody StoreInfoDto storeInfoDto) {
+        log.info("StoreInfoController.updateContractImageStatus?storeInfoDto={}", storeInfoDto);
+        StoreInfo storeInfo = storeInfoService.getOne(new LambdaQueryWrapper<StoreInfo>().eq(StoreInfo::getId, storeInfoDto.getId()));
         if (storeInfo != null) {
-            if (renewContractStatus == 3) {
-                storeInfo.setContractReason(contractReason);
-                storeInfo.setRenewContractStatus(renewContractStatus);
-                storeInfo.setContractReason(contractReason);
+            if (storeInfoDto.getRenewContractStatus() == 3) {
+                storeInfo.setContractReason(storeInfoDto.getContractReason());
+                storeInfo.setRenewContractStatus(storeInfoDto.getRenewContractStatus());
                 boolean flag = storeInfoService.updateById(storeInfo);
                 if (flag) {
                     return R.success("拒绝审核成功");
@@ -587,12 +583,12 @@ public class StoreInfoController {
                     return R.fail("拒绝审核失败");
                 }
             }
-            storeInfo.setRenewContractStatus(renewContractStatus);
-            storeInfo.setContractReason(contractReason);
+            storeInfo.setRenewContractStatus(storeInfoDto.getRenewContractStatus());
+            storeInfo.setContractReason(storeInfoDto.getContractReason());
             boolean flag = storeInfoService.updateById(storeInfo);
             if (flag) {
                 //审核通过后删除原店铺合同 续签合同类型变为合同
-                int num = storeInfoService.conversionContract(id);
+                int num = storeInfoService.conversionContract(storeInfoDto.getId());
                 if (num > 0) {
                     return R.success("审核通过成功");
                 } else {
@@ -601,6 +597,6 @@ public class StoreInfoController {
             }
         }
         return R.fail("审核失败 店铺不存在");
-
     }
+
 }

+ 1 - 1
alien-store/src/main/java/shop/alien/store/service/StoreInfoService.java

@@ -66,7 +66,7 @@ public interface StoreInfoService extends IService<StoreInfo> {
      * @param storeType    门店类型
      * @return IPage<StoreInfoVo>
      */
-    IPage<StoreInfoVo> getStorePage(int page, int size, String storeName, String storeContact, String id, String storePhone, String storeType, String expiredState, String storeApplicationStatus, String storeStatus, String businessSection, String jingdu, String weidu);
+    IPage<StoreInfoVo> getStorePage(int page, int size, String storeName, String storeContact, String id, String storePhone, String storeType, String expiredState, String storeApplicationStatus, String storeStatus, String businessSection, String jingdu, String weidu, String renewContractStatus);
 
     /**
      * web-重置门店密码

+ 10 - 2
alien-store/src/main/java/shop/alien/store/service/impl/StoreInfoServiceImpl.java

@@ -271,7 +271,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
      * @return IPage<StoreInfoVo>
      */
     @Override
-    public IPage<StoreInfoVo> getStorePage(int page, int size, String storeName, String storeContact, String id, String storePhone, String storeType, String expiredState, String storeApplicationStatus, String storeStatus, String businessSection, String jingdu, String weidu) {
+    public IPage<StoreInfoVo> getStorePage(int page, int size, String storeName, String storeContact, String id, String storePhone, String storeType, String expiredState, String storeApplicationStatus, String storeStatus, String businessSection, String jingdu, String weidu, String renewContractStatus) {
         checkAndUpdateExpiredRecords();
         IPage<StoreInfoVo> iPage = new Page<>(page, size);
         QueryWrapper<StoreInfoVo> queryWrapper = new QueryWrapper<>();
@@ -282,6 +282,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 .eq(StringUtils.isNotEmpty(storeApplicationStatus), "a.store_application_status", storeApplicationStatus)
                 .eq(StringUtils.isNotEmpty(businessSection), "a.business_section", businessSection)
                 .eq(StringUtils.isNotEmpty(storeStatus), "a.store_status", storeStatus)
+                .eq(StringUtils.isNotEmpty(renewContractStatus),"a.renew_contract_status",renewContractStatus)
                 .like(StringUtils.isNotEmpty(id), "a.id", id)
                 .eq("a.delete_flag", 0)
                 .eq("b.delete_flag", 0)
@@ -929,6 +930,13 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         result.setBusinessLicenseAddress(storeImgPaths);
         result.setContractImageList(storeContractImagePathImgs);
 
+        //存入续签合同地址
+        List<StoreImg> renewContractImgs = storeImgMapper.selectList(new LambdaQueryWrapper<StoreImg>().eq(StoreImg::getStoreId, storeId).eq(StoreImg::getImgType, 22));
+        List<String> renewContractImagePathImgs = new ArrayList<>();
+        for (StoreImg storeImg : renewContractImgs) {
+            renewContractImagePathImgs.add(storeImg.getImgUrl());
+        }
+        result.setRenewContractImageList(renewContractImagePathImgs);
         // 存放商家入口图
         List<StoreImg> storeEntranceImageImgs = storeImgMapper.selectList(new LambdaQueryWrapper<StoreImg>().eq(StoreImg::getStoreId, storeId).eq(StoreImg::getImgType, 1));
         if (!storeEntranceImageImgs.isEmpty()) {
@@ -1300,7 +1308,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
 
         // 通过经纬度距离获取商家id
         if (lat != null && lon != null && distance != null) {
-            List<NearMeDto> nearMeDtos = nearMeService.nearbyMerchants(lat, lon, distance, flag);
+            List<NearMeDto> nearMeDtos = nearMeService.nearbyMerchants(lon, lat, distance, flag);
             if (nearMeDtos != null && !nearMeDtos.isEmpty()) {
                 storeId = nearMeDtos.stream()
                         .map(item -> String.valueOf(item.getConent()))