|  |  | 
 |  |  | package com.moral.api.pojo.form.account; | 
 |  |  |  | 
 |  |  | import com.moral.api.entity.ManageAccount; | 
 |  |  | import com.moral.api.pojo.dto.account.AccountInsertDTO; | 
 |  |  | import com.moral.api.pojo.dto.account.AccountUpdateDTO; | 
 |  |  | import com.moral.api.pojo.dto.account.AccountDTO; | 
 |  |  | import com.moral.constant.ResponseCodeEnum; | 
 |  |  | import com.moral.util.AESUtils; | 
 |  |  | import com.moral.util.MD5Utils; | 
 |  |  | 
 |  |  |  | 
 |  |  |     private String wechat; | 
 |  |  |  | 
 |  |  |     private List<Integer> roleIds; | 
 |  |  |  | 
 |  |  |     public boolean valid() { | 
 |  |  |         if (ObjectUtils.isEmpty(accountId)) | 
 |  |  | 
 |  |  |                         ObjectUtils.isEmpty(password) && | 
 |  |  |                         ObjectUtils.isEmpty(email) && | 
 |  |  |                         ObjectUtils.isEmpty(mobile) && | 
 |  |  |                         ObjectUtils.isEmpty(wechat) && | 
 |  |  |                         ObjectUtils.isEmpty(roleIds) | 
 |  |  |                         ObjectUtils.isEmpty(wechat) | 
 |  |  |                 ) | 
 |  |  |             return false; | 
 |  |  |         return true; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public AccountUpdateDTO paramValid() { | 
 |  |  |         AccountUpdateDTO dto = new AccountUpdateDTO(); | 
 |  |  |     public AccountDTO paramValid() { | 
 |  |  |         AccountDTO dto = new AccountDTO(); | 
 |  |  |         //判断用户名是否有效 | 
 |  |  |         if(!ObjectUtils.isEmpty(userName)){ | 
 |  |  |             if(!RegexUtils.checkChinese(userName)||userName.contains(" ")){ | 
 |  |  |                 dto.setCode(ResponseCodeEnum.USERNAME_INVALID.getCode()); | 
 |  |  |                 dto.setMsg(ResponseCodeEnum.USERNAME_INVALID.getMsg()); | 
 |  |  |                 return dto; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         //判断手机号是否符合条件 | 
 |  |  |         if (!ObjectUtils.isEmpty(mobile)) { | 
 |  |  |             if (!RegexUtils.checkMobile(mobile)) { | 
 |  |  | 
 |  |  |         manageAccount.setWechat(wechat); | 
 |  |  |         return manageAccount; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } |