|
|
@@ -143,9 +143,10 @@ public class IpAccountServiceImpl implements IpAccountService {
|
|
|
if(ipAccountPO != null){
|
|
|
throw new RuntimeException("账户编号已存在");
|
|
|
}
|
|
|
+ }else{
|
|
|
+ ipAccountPO = ipAccountRepository.findById(accountParam.getId()).get();
|
|
|
+ ipAccountPO.setRemark(accountParam.getRemark());
|
|
|
}
|
|
|
- ipAccountPO = new IpAccountPO();
|
|
|
- BeanUtils.copyProperties(accountParam, ipAccountPO);
|
|
|
if(accountParam.getId() == null){
|
|
|
ipAccountPO.setId(SnowflakeIdWorker.nextId());
|
|
|
ipAccountPO.setAddTime(LocalDateTime.now());
|
|
|
@@ -167,8 +168,8 @@ public class IpAccountServiceImpl implements IpAccountService {
|
|
|
* @return 是否成功
|
|
|
*/
|
|
|
public boolean deleteById(Long id, LoginUser user){
|
|
|
- ipAccountRepository.deleteById(id);
|
|
|
IpAccountPO ipAccountPO = ipAccountRepository.findById(id).get();
|
|
|
+ ipAccountPO.setStatus("delete");
|
|
|
ipAccountPO.setUpdateTime(LocalDateTime.now());
|
|
|
ipAccountPO.setUpdateUserId(user.getUserid());
|
|
|
ipAccountPO.setUpdateUserName(user.getUsername());
|