补充v2.6.0升级说明及修复新增account提示mysql错误问题

This commit is contained in:
zengqiao
2022-01-18 15:48:05 +08:00
parent 05022f8db4
commit 3b0c208eff
7 changed files with 28 additions and 56 deletions

View File

@@ -13,14 +13,19 @@ import java.util.List;
* @date 19/5/3
*/
public class AccountConverter {
private AccountConverter() {
}
public static AccountDO convert2AccountDO(AccountDTO dto) {
AccountDO accountDO = new AccountDO();
accountDO.setUsername(dto.getUsername());
accountDO.setPassword(dto.getPassword());
accountDO.setRole(dto.getRole());
accountDO.setDepartment(dto.getDepartment());
accountDO.setMail(dto.getMail());
accountDO.setDisplayName(dto.getDisplayName());
// 兼容前端未传这些信息的情况
accountDO.setDepartment(dto.getDepartment() == null? "": dto.getDepartment());
accountDO.setMail(dto.getMail() == null? "": dto.getMail());
accountDO.setDisplayName(dto.getDisplayName() == null? "": dto.getDisplayName());
return accountDO;
}