| | |
| | | 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.constant.ResponseCodeEnum; |
| | | import com.moral.util.AESUtils; |
| | | import com.moral.util.MD5Utils; |
| | | import com.moral.util.RegexUtils; |
| | | import lombok.Data; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | return dto; |
| | | } |
| | | |
| | | public ManageAccount formConvertEntity() { |
| | | ManageAccount manageAccount = new ManageAccount(); |
| | | manageAccount.setId(accountId); |
| | | if (!ObjectUtils.isEmpty(password)) |
| | | manageAccount.setPassword(MD5Utils.saltMD5(AESUtils.decrypt(password))); |
| | | manageAccount.setUserName(userName); |
| | | manageAccount.setEmail(email); |
| | | manageAccount.setMobile(mobile); |
| | | manageAccount.setWechat(wechat); |
| | | return manageAccount; |
| | | } |
| | | } |