Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

wxd 4 bulan lalu
induk
melakukan
4697c7ec68

+ 1 - 0
alien-api/src/main/resources/bootstrap-prod.yml

@@ -9,6 +9,7 @@ spring:
         server-addr: localhost:8848
         username: nacos
         password: ngfriend198092
+        namespace: 3cbb802a-b56e-47f7-b658-b5012ecafb1f
 
       #配置中心
       config:

+ 1 - 0
alien-api/src/main/resources/bootstrap-test.yml

@@ -9,6 +9,7 @@ spring:
         server-addr: 192.168.2.252:8848
         username: nacos
         password: ngfriend198092
+        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
 
       #配置中心
       config:

+ 6 - 2
alien-entity/src/main/resources/mapper/second/SecondGoodsInfoMapper.xml

@@ -117,7 +117,9 @@
             g.home_image,
             case when llr.id is null then '0' else '1' end likeStatus,
             case when lc.id is null then '0' else '1' end collectStatus,
-            (SELECT count(1) FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0 ) as commentCount
+            (select count(1) from (SELECT id FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0 UNION ALL
+            SELECT t.id FROM store_comment t INNER JOIN (SELECT id FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0) d ON t.reply_id = d.id and business_type = 6 and delete_flag = 0) a ) as commentCount
+<!--            (SELECT count(1) FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0 ) as commentCount-->
         from
             life_fans f inner join life_user u on
                 f.followed_id = CONCAT('user_', u.user_phone) and u.delete_flag = 0
@@ -198,7 +200,9 @@
             g.home_image,
             case when llr.id is null then '0' else '1' end likeStatus,
             case when lc.id is null then '0' else '1' end collectStatus,
-            (SELECT count(1) FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0 ) as commentCount
+            (select count(1) from (SELECT id FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0 UNION ALL
+            SELECT t.id FROM store_comment t INNER JOIN (SELECT id FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0) d ON t.reply_id = d.id and business_type = 6 and delete_flag = 0) a ) as commentCount
+<!--            (SELECT count(1) FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0 ) as commentCount-->
         FROM
             second_goods g inner join life_user u on u.id = g.user_id
             left join life_like_record llr on llr.dianzan_id = #{phoneId} and llr.huifu_id = g.id and llr.type = 6 and llr.delete_flag = 0

+ 1 - 0
alien-gateway/src/main/resources/bootstrap-prod.yml

@@ -9,6 +9,7 @@ spring:
         server-addr: localhost:8848
         username: nacos
         password: ngfriend198092
+        namespace: 3cbb802a-b56e-47f7-b658-b5012ecafb1f
 
       #配置中心
       config:

+ 1 - 0
alien-gateway/src/main/resources/bootstrap-test.yml

@@ -9,6 +9,7 @@ spring:
         server-addr: 192.168.2.252:8848
         username: nacos
         password: ngfriend198092
+        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
 
       #配置中心
       config:

+ 1 - 1
alien-job/src/main/java/shop/alien/job/feign/AlienStoreFeign.java

@@ -5,7 +5,7 @@ import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
-@FeignClient(url = "http://localhost:8888", name = "alien-store")
+@FeignClient(url = "${feign.alienStore.url}", name = "alien-store")
 public interface AlienStoreFeign {
 
     @GetMapping("/websocket/sendMsgToClientByPhoneId")

+ 1 - 0
alien-job/src/main/resources/bootstrap-prod.yml

@@ -9,6 +9,7 @@ spring:
         server-addr: localhost:8848
         username: nacos
         password: ngfriend198092
+        namespace: 3cbb802a-b56e-47f7-b658-b5012ecafb1f
 
       #配置中心
       config:

+ 1 - 0
alien-job/src/main/resources/bootstrap-test.yml

@@ -9,6 +9,7 @@ spring:
         server-addr: 192.168.2.252:8848
         username: nacos
         password: ngfriend198092
+        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
 
       #配置中心
       config:

+ 1 - 1
alien-second/src/main/java/shop/alien/second/feign/AlienStoreFeign.java

@@ -5,7 +5,7 @@ import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
-@FeignClient(url = "http://localhost:8888", name = "alien-store")
+@FeignClient(url = "${feign.alienStore.url}", name = "alien-store")
 public interface AlienStoreFeign {
 
     @GetMapping("/message/getMessageList")

+ 1 - 0
alien-second/src/main/resources/bootstrap-prod.yml

@@ -9,6 +9,7 @@ spring:
         server-addr: localhost:8848
         username: nacos
         password: ngfriend198092
+        namespace: 3cbb802a-b56e-47f7-b658-b5012ecafb1f
 
       #配置中心
       config:

+ 1 - 0
alien-second/src/main/resources/bootstrap-test.yml

@@ -9,6 +9,7 @@ spring:
         server-addr: 192.168.2.252:8848
         username: nacos
         password: ngfriend198092
+        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
 
       #配置中心
       config:

+ 1 - 1
alien-store/src/main/java/shop/alien/store/controller/LifeDiscountCouponController.java

@@ -181,7 +181,7 @@ public class LifeDiscountCouponController {
     @GetMapping("/getUserCouponList")
     @ApiImplicitParams({@ApiImplicitParam(name = "page", value = "分页页数", dataType = "String", paramType = "query", required = true),
             @ApiImplicitParam(name = "size", value = "分页条数", dataType = "String", paramType = "query", required = true),
-            @ApiImplicitParam(name = "tabType", value = "分页类型(0:全部,1:即将过期,2:已使用,3:已过期)", dataType = "String", paramType = "query", required = true)
+            @ApiImplicitParam(name = "tabType", value = "分页类型(0:全部(未使用),1:即将过期,2:已使用,3:已过期)", dataType = "String", paramType = "query", required = true)
     })
     public R<List<LifeDiscountCouponVo>> getUserCouponList(@ApiIgnore @TokenInfo UserLoginInfo userLoginInfo,
                                                            @RequestParam(value = "tabType") String tabType,

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

@@ -676,7 +676,7 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
             lifeDiscountCouponVo.setQuantityClaimed(lifeDiscountCouponUserIPage.getRecords().size());
             // 判断是否到了优惠券的开始时间
             lifeDiscountCouponVo.setReachUseTimeFlag(1);
-            if (localNow1.isBefore(lifeDiscountCouponOne.getStartDate())) {
+            if (localNow1.isBefore(lifeDiscountCouponOne.getBeginGetDate())) {
                 lifeDiscountCouponVo.setReachUseTimeFlag(0);
             }
             lifeDiscountCouponVos.add(lifeDiscountCouponVo);

+ 8 - 1
alien-store/src/main/java/shop/alien/store/service/impl/StoreInfoServiceImpl.java

@@ -1481,6 +1481,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         }
 
         queryWrapper.eq("a.delete_flag",0);
+        queryWrapper.eq("a.logout_flag",0);
         queryWrapper.like(StringUtils.isNotEmpty(vo.getFoodType()), "a.business_types_name", vo.getFoodType());
         queryWrapper.like(StringUtils.isNotEmpty(vo.getStoreName()), "a.store_name", vo.getStoreName());
 
@@ -1751,7 +1752,13 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 BeanUtils.copyProperties(storeInfodto, storeInfo);
 
                 //存入经纬度
-                storeInfo.setStorePosition(storeInfodto.getStorePositionLongitude() + "," + storeInfodto.getStorePositionLatitude());
+                if(StringUtils.isEmpty(storeInfodto.getStorePositionLongitude())||StringUtils.isEmpty(storeInfodto.getStorePositionLatitude())){
+                    StoreInfo storeIn = storeInfoMapper.selectById(storeInfodto.getId());
+                    storeInfo.setStorePosition(storeIn.getStorePosition());
+                }else{
+                    storeInfo.setStorePosition(storeInfodto.getStorePositionLongitude() + "," + storeInfodto.getStorePositionLatitude());
+                }
+
                 //存入门店状态
                 storeInfo.setStoreStatus(storeInfodto.getStoreStatus());
                 //板块及类型

+ 1 - 0
alien-store/src/main/resources/bootstrap-prod.yml

@@ -9,6 +9,7 @@ spring:
         server-addr: localhost:8848
         username: nacos
         password: ngfriend198092
+        namespace: 3cbb802a-b56e-47f7-b658-b5012ecafb1f
 
       #配置中心
       config:

+ 1 - 0
alien-store/src/main/resources/bootstrap-test.yml

@@ -9,6 +9,7 @@ spring:
         server-addr: 192.168.2.252:8848
         username: nacos
         password: ngfriend198092
+        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
 
       #配置中心
       config:

+ 1 - 1
alien-util/src/main/java/shop/alien/util/common/constant/DiscountCouponEnum.java

@@ -50,7 +50,7 @@ public enum DiscountCouponEnum {
     UNAVAILABLE_TIME_QUANTUM("unavailable_time_quantum"),
 
     /**条件类型*/
-    //所有
+    //所有(未使用)
     ALL("0"),
     //即将过期
     BE_ABOUT_TO_EXPORE("1"),