Explorar el Código

修改会员到期提示信息

wutt hace 5 años
padre
commit
e117df593b

+ 4 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/vo/UserVO.java

@@ -2,8 +2,12 @@ package com.management.platform.entity.vo;
 
 import com.management.platform.entity.User;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
 
 @Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
 public class UserVO extends User {
     private String companyName;
     private Long remainingTime;

+ 8 - 7
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -70,21 +70,21 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                 if (0 == company.getSetMeal()) {
                     //未办理会员
                     if (company.getExpirationDate().isBefore(LocalDateTime.now())) {
-                        httpRespMsg.setError("账号试用已到期,请联系公司负责人开通会员套餐");
+                        httpRespMsg.setError("账号试用已到期,请联系客服。");
                         return httpRespMsg;
                     }
                 } else {
                     if (company.getExpirationDate().isBefore(LocalDateTime.now())) {
-                        httpRespMsg.setError("账号会员已到期,请联系公司负责人续费会员套餐");
+                        httpRespMsg.setError("账号会员已到期,请联系客服。");
                         return httpRespMsg;
                     }
                 }
             }
             //检测密码正确时
-            UserVO userVO = new UserVO();
+            UserVO userVO = new UserVO().setCompanyName(company.getCompanyName());
             BeanUtils.copyProperties(userList.get(0), userVO);
             //还要多返回一个公司名字
-            userVO.setCompanyName(company.getCompanyName());
+            userVO.setPassword("");
             LocalDateTime remainingTime = company.getExpirationDate() == null ? LocalDateTime.now() : company.getExpirationDate();
             userVO.setRemainingTime(remainingTime.toInstant(ZoneOffset.of("+8")).toEpochMilli() - LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli());
             httpRespMsg.data = userVO;
@@ -114,22 +114,23 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                 if (0 == company.getSetMeal()) {
                     //未办理会员
                     if (company.getExpirationDate().isBefore(LocalDateTime.now())) {
-                        httpRespMsg.setError("账号试用已到期,请联系公司负责人开通会员套餐");
+                        httpRespMsg.setError("账号试用已到期,请联系客服。");
                         return httpRespMsg;
                     }
                 } else {
                     if (company.getExpirationDate().isBefore(LocalDateTime.now())) {
-                        httpRespMsg.setError("账号会员已到期,请联系公司负责人续费会员套餐");
+                        httpRespMsg.setError("账号会员已到期,请联系客服。");
                         return httpRespMsg;
                     }
                 }
             }
             //检测密码正确时
-            UserVO userVO = new UserVO();
+            UserVO userVO = new UserVO().setCompanyName(company.getCompanyName());
             BeanUtils.copyProperties(userList.get(0), userVO);
             //还要多返回一个公司名字
             LocalDateTime remainingTime = company.getExpirationDate() == null ? LocalDateTime.now() : company.getExpirationDate();
             userVO.setRemainingTime(remainingTime.toInstant(ZoneOffset.of("+8")).toEpochMilli() - LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli());
+            userVO.setPassword("");
             httpRespMsg.data = userVO;
         } else {
             httpRespMsg.setError("密码错误");