zoujiajian 2 年之前
父節點
當前提交
2ee2c8e6dc

+ 1 - 1
netflix-dao/src/main/java/com/cyksj/model/entity/GroupsRelationAlert.java

@@ -43,5 +43,5 @@ public class GroupsRelationAlert extends BaseEntity{
 	/**
 	 * 是否重置 根据新增对应规格账号 重置该预警记录
 	 */
-	private Boolean isRest;
+	private Boolean isReset;
 }

+ 2 - 2
netflix-dao/src/main/resources/mapper/GroupRelationMapper.xml

@@ -256,13 +256,13 @@
         from groups_relation gr2
         where gr2.groups_id = gt.id
         and status = 'outside'
-        and num lt;= #{maxNum}) t1,
+        and num <= #{maxNum}) t1,
         (select count(*)
         from groups_relation gr2
         where gr2.groups_id = gt.id
         and user_id = 0
         and status = 'outside'
-        and num lt;= #{maxNum}) a1
+        and num <= #{maxNum}) a1
         from account a
         inner join `groups_trips` gt on gt.account_id = a.id
         and gt.`status` = 'validity'

+ 5 - 4
netflix-service/src/main/java/com/cyksj/service/mange/group/CmsGroupServiceImpl.java

@@ -112,9 +112,9 @@ public class CmsGroupServiceImpl extends ServiceImpl<GroupsMapper,GroupsTrips> i
                 .last("limit 1"));
         if (alertCount > 0) {
             alertMapper.update(null, Wrappers.lambdaUpdate(GroupsRelationAlert.class)
-                    .set(GroupsRelationAlert::getIsRest, true)
+                    .set(GroupsRelationAlert::getIsReset, true)
                     .eq(GroupsRelationAlert::getSkuId, sku.getId())
-                    .eq(GroupsRelationAlert::getIsRest, false));
+                    .eq(GroupsRelationAlert::getIsReset, false));
         }
         return groups;
     }
@@ -278,9 +278,9 @@ public class CmsGroupServiceImpl extends ServiceImpl<GroupsMapper,GroupsTrips> i
                 .last("limit 1"));
         if (alertCount > 0) {
             alertMapper.update(null, Wrappers.lambdaUpdate(GroupsRelationAlert.class)
-                    .set(GroupsRelationAlert::getIsRest, true)
+                    .set(GroupsRelationAlert::getIsReset, true)
                     .eq(GroupsRelationAlert::getSkuId, sku.getId())
-                    .eq(GroupsRelationAlert::getIsRest, false));
+                    .eq(GroupsRelationAlert::getIsReset, false));
         }
     }
 
@@ -371,6 +371,7 @@ public class CmsGroupServiceImpl extends ServiceImpl<GroupsMapper,GroupsTrips> i
     public Integer getAvailableRelation(Long goodsId, Long skuId) {
         //chatGPT
         GoodsDonSku sku = skuMapper.selectById(skuId);
+        goodsId = sku.getGoodsId();
         Integer skuNum = sku.getNum();
         if (Constant.AI_goodsIds.contains(sku.getGoodsId()) && sku.getNum() > 1) {
             Integer extraNum = Constant.AI_EXTRACT_NUM;

+ 1 - 1
netflix-web/src/main/java/com/cyksj/web/controller/manage/group/CmsGroupController.java

@@ -375,7 +375,7 @@ public class CmsGroupController {
         Integer dbNum = dbAlert.getNum();
         Integer num = groupsRelationAlert.getNum();
         if (dbNum != num) {
-            groupsRelationAlert.setIsRest(true);
+            groupsRelationAlert.setIsReset(true);
         }
         alertMapper.updateById(groupsRelationAlert);
         return GatewayResponse.SUCCESS.newBuilder().toResult();