漏传
This commit is contained in:
@@ -2621,4 +2621,19 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
|
|
||||||
accountMapper.updateById(account);
|
accountMapper.updateById(account);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateUserInfo(String country, String occupation){
|
||||||
|
Long accountId = UserContext.getUserHolder().getId();
|
||||||
|
Account account = accountMapper.selectById(accountId);
|
||||||
|
boolean flag = false;
|
||||||
|
if (!StringUtil.isNullOrEmpty(country) && !country.equals(account.getCountry())) {
|
||||||
|
account.setCountry(country.trim());
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
if (!StringUtil.isNullOrEmpty(occupation) && !occupation.equals(account.getOccupation())) {
|
||||||
|
account.setOccupation(occupation.trim());
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
if(flag) accountMapper.updateById(account);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user