Parcourir la source

fix: 处理修改订单时政策回显问题

luofeiyun il y a 1 jour
Parent
commit
33c5d8aa93

+ 1 - 3
ship-module-marketing/ship-module-marketing-biz/src/main/java/com/yc/ship/module/marketing/dal/mysql/policy/PolicyMapper.java

@@ -30,8 +30,6 @@ public interface PolicyMapper extends BaseMapperX<PolicyDO> {
 
     default List<PolicyDO> selectList(List<Long> policyIds) {
         return selectList(new LambdaQueryWrapperX<PolicyDO>()
-                .inIfPresent(PolicyDO::getId, policyIds)
-                .ge(PolicyDO::getEffectiveTime, LocalDateTime.now())
-                .eq(PolicyDO::getStatus, CommonStatusEnum.ENABLE.getStatus()));
+                .inIfPresent(PolicyDO::getId, policyIds));
     }
 }

+ 4 - 0
ship-module-marketing/ship-module-marketing-biz/src/main/java/com/yc/ship/module/marketing/service/policy/PolicyServiceImpl.java

@@ -191,6 +191,10 @@ public class PolicyServiceImpl implements PolicyService {
                     policyRespVO.setCanAddRoom(false);
                 }
             }
+            if(!policyRespVO.getEffectiveTime().isAfter(LocalDateTime.now())) {
+                policyRespVO.setName(policyRespVO.getName()+"(已过期)");
+                policyRespVO.setCanAddRoom(false);
+            }
         });
         return policyRespVOS;
     }