From ffb2063003d3e735f3f8848207078b75c3f05bfa Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Fri, 21 May 2021 16:24:40 +0800
Subject: [PATCH] screen-manage 修改删除用户BUG
---
screen-manage/src/main/java/com/moral/api/service/impl/ManageAccountServiceImpl.java | 503 +++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 441 insertions(+), 62 deletions(-)
diff --git a/screen-manage/src/main/java/com/moral/api/service/impl/ManageAccountServiceImpl.java b/screen-manage/src/main/java/com/moral/api/service/impl/ManageAccountServiceImpl.java
index 48d1b78..2076867 100644
--- a/screen-manage/src/main/java/com/moral/api/service/impl/ManageAccountServiceImpl.java
+++ b/screen-manage/src/main/java/com/moral/api/service/impl/ManageAccountServiceImpl.java
@@ -1,22 +1,44 @@
package com.moral.api.service.impl;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.moral.api.entity.ManageAccount;
+import com.moral.api.entity.ManageAccountRole;
import com.moral.api.entity.ManageMenu;
import com.moral.api.entity.ManageRole;
import com.moral.api.mapper.ManageAccountMapper;
+import com.moral.api.mapper.ManageAccountRoleMapper;
import com.moral.api.mapper.ManageMenuMapper;
import com.moral.api.mapper.ManageRoleMapper;
+import com.moral.api.pojo.dto.account.*;
+import com.moral.api.pojo.dto.login.AccountInfoDTO;
+import com.moral.api.pojo.dto.login.LoginDTO;
+import com.moral.api.pojo.form.account.AccountDeleteForm;
+import com.moral.api.pojo.form.account.AccountInsertForm;
+import com.moral.api.pojo.form.account.AccountQueryForm;
+import com.moral.api.pojo.form.account.AccountUpdateForm;
+import com.moral.api.pojo.form.login.LoginForm;
+import com.moral.api.pojo.form.login.LogoutForm;
import com.moral.api.service.ManageAccountService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.moral.util.AESUtils;
-import com.moral.util.MD5Utils;
-import com.moral.util.TokenUtils;
-import org.springframework.beans.factory.annotation.Value;
+import com.moral.api.config.mybatis.wrapper.NullFilterWrapper;
+import com.moral.api.service.ManageMenuService;
+import com.moral.api.util.LogUtils;
+import com.moral.constant.Constants;
+import com.moral.constant.ResponseCodeEnum;
+import com.moral.util.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
-import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
import java.util.*;
/**
@@ -28,82 +50,439 @@
* @since 2021-03-09
*/
@Service
+@ConfigurationProperties(prefix = "log-aspect")
public class ManageAccountServiceImpl extends ServiceImpl<ManageAccountMapper, ManageAccount> implements ManageAccountService {
- @Value("${AES.KEY}")
- private String AESKey;
- @Resource
- ManageAccountMapper accountMapper;
- @Resource
- ManageRoleMapper roleMapper;
- @Resource
- ManageMenuMapper manageMenuMapper;
+ @Autowired
+ ManageAccountMapper manageAccountMapper;
+ @Autowired
+ ManageRoleMapper manageRoleMapper;
+ @Autowired
+ ManageMenuService manageMenuService;
+ @Autowired
+ ManageAccountRoleMapper manageAccountRoleMapper;
+ @Autowired
+ LogUtils logUtils;
- public Map<String, Object> login(Map<String, Object> paramters) {
- Map<String,Object> result = new HashMap<>();
- //������������
- String cyrpAccount = (String) paramters.get("account");
- String cyrpPassword = (String) paramters.get("password");
+ Map<String, String> manageAccountFormMap;
+
+ public void setManageAccountFormMap(Map<String, String> manageAccountFormMap) {
+ this.manageAccountFormMap = manageAccountFormMap;
+ }
+
+ /**
+ * @Description: ������������
+ * @Param: [loginForm]
+ * @return: com.moral.api.pojo.dto.login.LoginDTO
+ * @Author: ���������
+ * @Date: 2021/3/30
+ */
+ @Override
+ public LoginDTO login(LoginForm loginForm) {
+ LoginDTO loginDTO = new LoginDTO();
+ //������
+ String account = loginForm.getAccount();
+ String AESPassword = loginForm.getPassword();
//������
- String account = AESUtils.decrypt(cyrpAccount, AESKey);
- String password = AESUtils.decrypt(cyrpPassword, AESKey);
+ String password = AESUtils.decrypt(AESPassword);
//������������������
QueryWrapper<ManageAccount> wrapper = new QueryWrapper<>();
wrapper.eq("account", account);
- ManageAccount manageAccount = accountMapper.selectOne(wrapper);
- if(ObjectUtils.isEmpty(manageAccount)){
- result.put("accountId",-1);
- result.put("msg","������������������");
- return result;
+ List<ManageAccount> manageAccounts = manageAccountMapper.selectList(wrapper);
+ if (ObjectUtils.isEmpty(manageAccounts)) {
+ loginDTO.setCode(ResponseCodeEnum.ACCOUNT_NOT_EXIST.getCode());
+ loginDTO.setMsg(ResponseCodeEnum.ACCOUNT_NOT_EXIST.getMsg());
+ return loginDTO;
}
//������������������������
- if(manageAccount.getIsDelete().equals("1")){
- result.put("accountId",-1);
- result.put("msg","������������������");
- return result;
+ ManageAccount manageAccount = null;
+ for (ManageAccount value : manageAccounts) {
+ if (Constants.NOT_DELETE.equals(value.getIsDelete()))
+ manageAccount = value;
+ }
+
+ if (ObjectUtils.isEmpty(manageAccount)) {
+ loginDTO.setCode(ResponseCodeEnum.ACCOUNT_IS_DELETE.getCode());
+ loginDTO.setMsg(ResponseCodeEnum.ACCOUNT_NOT_EXIST.getMsg());
+ return loginDTO;
}
//������������
- if(!MD5Utils.saltMD5Verify(password,manageAccount.getPassword())){
- result.put("accountId",-1);
- result.put("msg","���������������������");
- return result;
+ if (!MD5Utils.saltMD5Verify(password, manageAccount.getPassword())) {
+ loginDTO.setCode(ResponseCodeEnum.PASSWORD_ERROR.getCode());
+ loginDTO.setMsg(ResponseCodeEnum.PASSWORD_ERROR.getMsg());
+ return loginDTO;
}
+
//������������
- List<ManageRole> roles = roleMapper.getManageRoleByAccountId(manageAccount.getId());
- if(ObjectUtils.isEmpty(roles)){
- result.put("accountId",-1);
- result.put("msg","������������������������");
- return result;
- }
+ List<ManageRole> roles = manageRoleMapper.getManageRoleByAccountId(manageAccount.getId());
+
//������������
- List<ManageMenu> menus = manageMenuMapper.getParentChildrenMenusByRoles(roles);
- if(ObjectUtils.isEmpty(menus)){
- result.put("accountId",-1);
- result.put("msg","������������������������");
- return result;
+ List<ManageMenu> menus = null;
+ if (!ObjectUtils.isEmpty(roles)) {
+ menus = manageMenuService.getParentChildrenMenusByRoles(roles);
}
- //������������token,���������������������������������
- Map<String,Object> userInfo = new HashMap<>();//���������������������������������������
- userInfo.put("accountId",manageAccount.getId());//������Id
- userInfo.put("userName",manageAccount.getUserName());//������������
- userInfo.put("roles",roles);//������������
- userInfo.put("menus",menus);//������������
- Map<String, Object> tokenResult = TokenUtils.getToken(String.valueOf(manageAccount.getId()), userInfo);
- if(tokenResult.get("code").equals(TokenUtils.error)){
- result.put("accountId",-1);
- result.put("msg","������token������");
- return result;
+ //������������������
+ AccountInfoDTO accountInfoDTO = new AccountInfoDTO();
+ accountInfoDTO.setAccount(manageAccount);
+ accountInfoDTO.setMenus(menus);
+ accountInfoDTO.setRoles(roles);
+
+ //������token ������������������
+ String token = TokenUtils.getToken(String.valueOf(manageAccount.getId()), accountInfoDTO);
+
+ //������������������
+ loginDTO.setCode(ResponseCodeEnum.SUCCESS.getCode());
+ loginDTO.setMsg(ResponseCodeEnum.SUCCESS.getMsg());
+ loginDTO.setAccountInfoDTO(accountInfoDTO);
+ loginDTO.setToken(token);
+
+ //������������������
+ HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+ StringBuilder content = new StringBuilder();
+ content.append(manageAccount.getUserName()).append("���������������������;");
+ logUtils.saveLoginForManage(request, content.toString(), manageAccount, manageAccount.getUserName());
+
+ return loginDTO;
+ }
+
+ /**
+ * @Description: ������
+ * @Param: [parameters]
+ * @return:
+ * @Author: ���������
+ * @Date: 2021/3/11
+ */
+ @Override
+ public boolean logout(LogoutForm logoutForm) {
+ String accountId = logoutForm.getAccountId();
+ String token = logoutForm.getToken();
+ TokenUtils.destoryToken(accountId, token);
+ return true;
+ }
+
+ /**
+ * @Description: ������������������
+ * @Param: [accountAddRequest]
+ * @return: com.moral.api.pojo.dto.AccountDTO
+ * @Author: ���������
+ * @Date: 2021/3/13
+ */
+ @Override
+ @Transactional
+ public AccountDTO insertAccount(AccountInsertForm accountInsertForm) {
+ AccountDTO accountDTO = new AccountDTO();
+ //������
+ ManageAccount manageAccount = accountInsertForm.formConvertEntity();
+ List<Integer> roleIds = accountInsertForm.getRoleIds();
+
+ /*������������������������*/
+ ManageAccount existAccount = new ManageAccount();
+ existAccount.setAccount(manageAccount.getAccount());
+ existAccount.setIsDelete(Constants.NOT_DELETE);
+ QueryWrapper<ManageAccount> wrapper = new QueryWrapper<>();
+ wrapper.setEntity(existAccount);
+ ManageAccount exitAccountResult = manageAccountMapper.selectOne(wrapper);
+ if (!ObjectUtils.isEmpty(exitAccountResult)) {
+ accountDTO.setCode(ResponseCodeEnum.ACCOUNT_EXIST.getCode());
+ accountDTO.setMsg(ResponseCodeEnum.ACCOUNT_EXIST.getMsg());
+ return accountDTO;
}
- //������������������
- result.put("accountId",manageAccount.getId());//������Id
- result.put("userName",manageAccount.getUserName());//������������
- result.put("roles",roles);//������������
- result.put("menus",menus);//������������
- result.put("token",tokenResult.get("token"));
- return result;
+ //������
+ manageAccountMapper.insert(manageAccount);
+
+ //������������������������������������������������������
+ if (!ObjectUtils.isEmpty(roleIds)) {
+ Integer accountId = manageAccount.getId();
+ roleIds.forEach(
+ value -> {
+ ManageAccountRole manageAccountRole = new ManageAccountRole();
+ manageAccountRole.setAccountId(accountId);
+ manageAccountRole.setRoleId(value);
+ manageAccountRoleMapper.insert(manageAccountRole);
+ }
+ );
+ }
+ //������������������
+ accountDTO.setCode(ResponseCodeEnum.SUCCESS.getCode());
+ accountDTO.setMsg(ResponseCodeEnum.SUCCESS.getMsg());
+
+ //������������������
+ HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+ StringBuilder content = new StringBuilder();
+ content.append("������������������").append(manageAccount.getUserName() + ";")
+ .append("account���" + manageAccount.getAccount() + ";");
+ logUtils.saveOperationForManage(request, content.toString(), Constants.INSERT_OPERATE_TYPE);
+
+ return accountDTO;
+ }
+
+ /**
+ * @Description: ������������������
+ * @Param: [accountQueryRequest]
+ * @return: com.moral.api.pojo.dto.AccountDTO
+ * @Author: ���������
+ * @Date: 2021/3/15
+ */
+ @Override
+ public AccountQueryDTO queryAccount(AccountQueryForm accountQueryForm) {
+ AccountQueryDTO accountQueryDTO = new AccountQueryDTO();
+
+ //������
+ Integer page = accountQueryForm.getPage();
+ Integer size = accountQueryForm.getSize();
+ String userName = accountQueryForm.getUserName();
+ String email = accountQueryForm.getEmail();
+ String mobile = accountQueryForm.getMobile();
+ String wechat = accountQueryForm.getWechat();
+ String isDelete = accountQueryForm.getIsDelete();
+ String order = accountQueryForm.getOrder();
+ String orderType = accountQueryForm.getOrderType();
+ Date createStartTime = accountQueryForm.getCreateStartTime();
+ Date createEndTime = accountQueryForm.getCreateEndTime();
+
+ //������������������
+ Page<ManageAccount> queryPage = new Page<>(page, size);
+ NullFilterWrapper<ManageAccount> wrapper = new NullFilterWrapper<>();
+
+ wrapper.like("user_name", userName);
+ wrapper.like("email", email);
+ wrapper.like("mobile", mobile);
+ wrapper.like("wechat", wechat);
+ wrapper.between("create_time", createStartTime, createEndTime);
+
+ if (!ObjectUtils.isEmpty(order) && !ObjectUtils.isEmpty(orderType)) { //������������������������
+ if (orderType.equals(Constants.ORDER_ASC))
+ wrapper.orderByAsc(ConvertUtils.toLine(order));
+ else
+ wrapper.orderByDesc(ConvertUtils.toLine(order));
+ }
+
+ if (!ObjectUtils.isEmpty(isDelete))//������������������������
+ wrapper.eq("is_delete", isDelete);
+ else
+ wrapper.eq("is_delete", Constants.NOT_DELETE);
+
+ //������������
+ Page resultPage = manageAccountMapper.selectPage(queryPage, wrapper);
+
+ //���������������������������
+ List<ManageAccount> accounts = resultPage.getRecords();
+ List<AccountDTO> accountDTOS = new ArrayList<>();
+ for (ManageAccount manageAccount : accounts) {
+ AccountDTO accountDTO = new AccountDTO();
+ List<ManageRole> roles = manageRoleMapper.getManageRoleByAccountId(manageAccount.getId());
+ accountDTO.setRoles(roles);
+ accountDTO.setAccount(manageAccount);
+ accountDTOS.add(accountDTO);
+ }
+
+
+ //������������������
+ accountQueryDTO.setAccountDTOS(accountDTOS);
+ accountQueryDTO.setCurrent(resultPage.getCurrent());
+ accountQueryDTO.setPages(resultPage.getPages());
+ accountQueryDTO.setSize(resultPage.getSize());
+ accountQueryDTO.setTotal(resultPage.getTotal());
+ accountQueryDTO.setCode(ResponseCodeEnum.SUCCESS.getCode());
+ accountQueryDTO.setMsg(ResponseCodeEnum.SUCCESS.getMsg());
+
+ return accountQueryDTO;
+ }
+
+ /**
+ * @Description: ������������������
+ * @Param: [accountDeleteRequest]
+ * @return: com.moral.api.pojo.dto.account.AccountDeleteDTO
+ * @Author: ���������
+ * @Date: 2021/3/16
+ */
+ @Override
+ @Transactional
+ public AccountDTO deleteAccount(AccountDeleteForm accountDeleteForm) {
+ AccountDTO accountDTO = new AccountDTO();
+ //������
+ Integer accountId = accountDeleteForm.getAccountId();
+ //���������������������������������������������
+ ManageAccount manageAccount = new ManageAccount();
+ manageAccount.setIsDelete(Constants.NOT_DELETE);
+ manageAccount.setId(accountId);
+ QueryWrapper<ManageAccount> queryWrapper = new QueryWrapper<>();
+ queryWrapper.setEntity(manageAccount);
+ ManageAccount existManageAccount = manageAccountMapper.selectOne(queryWrapper);
+ if (ObjectUtils.isEmpty(existManageAccount)) {
+ accountDTO.setCode(ResponseCodeEnum.ACCOUNT_NOT_EXIST.getCode());
+ accountDTO.setMsg(ResponseCodeEnum.ACCOUNT_NOT_EXIST.getMsg());
+ return accountDTO;
+ }
+ //������������������
+ UpdateWrapper<ManageAccount> deleteAccountWrapper = new UpdateWrapper<>();
+ deleteAccountWrapper.eq("id", accountId);
+ deleteAccountWrapper.set("is_delete", Constants.DELETE);
+ manageAccountMapper.update(null, deleteAccountWrapper);
+ //������������������������������
+ UpdateWrapper<ManageAccountRole> deleteManageAccountRoleWrapper = new UpdateWrapper<>();
+ deleteManageAccountRoleWrapper.set("is_delete", Constants.DELETE).eq("account_id", manageAccount.getId());
+ manageAccountRoleMapper.update(null, deleteManageAccountRoleWrapper);
+ //������token
+ TokenUtils.destoryToken(accountId);
+ //������������������
+ accountDTO.setCode(ResponseCodeEnum.SUCCESS.getCode());
+ accountDTO.setMsg(ResponseCodeEnum.SUCCESS.getMsg());
+ //������������������
+ HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+ StringBuilder content = new StringBuilder();
+ content.append("������������������").append(existManageAccount.getUserName() + ";")
+ .append("������:" + existManageAccount.getAccount() + ";");
+ logUtils.saveOperationForManage(request, content.toString(), Constants.DELETE_OPERATE_TYPE);
+
+ return accountDTO;
+ }
+
+ /**
+ * @Description: ������������������
+ * @Param: [accountUpdateRequest]
+ * @return: com.moral.api.pojo.dto.account.AccountUpdateDTO
+ * @Author: ���������
+ * @Date: 2021/3/16
+ */
+ @Override
+ @Transactional
+ public AccountDTO updateAccount(AccountUpdateForm accountUpdateForm) {
+ AccountDTO accountDTO = new AccountDTO();
+ //������
+ ManageAccount manageAccount = accountUpdateForm.formConvertEntity();
+ List<Integer> roleIds = accountUpdateForm.getRoleIds();
+
+ //������������������������������������������
+ QueryWrapper<ManageAccount> oldAccountWrapper = new QueryWrapper<>();
+ ManageAccount oldManageAccount = new ManageAccount();
+ oldManageAccount.setId(manageAccount.getId());
+ oldManageAccount.setIsDelete(Constants.NOT_DELETE);
+ oldAccountWrapper.setEntity(oldManageAccount);
+ oldManageAccount = manageAccountMapper.selectOne(oldAccountWrapper);
+ if (ObjectUtils.isEmpty(oldManageAccount)) {
+ accountDTO.setCode(ResponseCodeEnum.ACCOUNT_NOT_EXIST.getCode());
+ accountDTO.setMsg(ResponseCodeEnum.ACCOUNT_NOT_EXIST.getMsg());
+ return accountDTO;
+ }
+
+ //������ManageAccount���
+ Map manageAccountMap = JSONObject.parseObject(JSON.toJSONString(manageAccount), Map.class);//���������Map���������������������������
+ if (manageAccountMap.size() > 1) {//������������������������id���������������������������������
+ manageAccountMapper.updateById(manageAccount);
+ }
+
+ //������������������������������
+ List<ManageRole> oldRoles = manageRoleMapper.getManageRoleByAccountId(manageAccount.getId());
+
+ //���������������������������������ManageAccountRole���
+ /*
+ * ������roleIds���null������������������������������������������
+ * ������roleIds���������������������������������������������������
+ * ������roleIds���������������������������������������������
+ * */
+ if (roleIds != null) {
+ //������������������
+ UpdateWrapper<ManageAccountRole> deleteWrapper = new UpdateWrapper<>();
+ deleteWrapper.eq("account_id", manageAccount.getId()).set("is_delete", Constants.DELETE);
+ manageAccountRoleMapper.update(null, deleteWrapper);
+ /*������������������*/
+ for (Integer roleId : roleIds) {
+ ManageAccountRole manageAccountRole = new ManageAccountRole();
+ manageAccountRole.setAccountId(manageAccount.getId());
+ manageAccountRole.setRoleId(roleId);
+ manageAccountRoleMapper.insert(manageAccountRole);
+ }
+ }
+ //������token
+ TokenUtils.destoryToken(manageAccount.getId());
+ //������������������
+ accountDTO.setCode(ResponseCodeEnum.SUCCESS.getCode());
+ accountDTO.setMsg(ResponseCodeEnum.SUCCESS.getMsg());
+ //������������������
+ insertUpdateLog(accountUpdateForm, oldManageAccount, oldRoles);
+ return accountDTO;
+ }
+
+ /**
+ * @Description: ���������������������������
+ * @Param: [form, newAccount, oldAccount]
+ * @return: void
+ * @Author: ���������
+ * @Date: 2021/4/8
+ */
+ private void insertUpdateLog(AccountUpdateForm updateForm, ManageAccount oldAccount, List<ManageRole> oldRoles) {
+ //������������������
+ HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+ StringBuilder content = new StringBuilder();
+ content.append("������������������").append(oldAccount.getUserName() + ";")
+ .append("������:" + oldAccount.getAccount() + ";");
+ //������������Map,���������������������������������
+ Map<String, Object> newParameters = JSONObject.parseObject(JSON.toJSONString(updateForm), Map.class);
+ Map<String, Object> oldParameters = JSONObject.parseObject(JSON.toJSONString(oldAccount), Map.class);
+ //������������������������Map���������������������������
+ Set<String> keys = manageAccountFormMap.keySet();
+ for (String key : keys) {
+ String value = manageAccountFormMap.get(key);//���������������������
+ if ("password".equals(key)) {//������������������������������������������
+ if (!ObjectUtils.isEmpty(updateForm.getPassword())) {//���������������������������������
+ content.append("���������������;");
+ }
+ } else if ("roleIds".equals(key)) {//������������������������Id���������������������
+ List<Integer> newRoleIds = updateForm.getRoleIds();
+
+ if (newRoleIds != null && 0 == newRoleIds.size()) {//���������������������������������������������������������������
+ content.append("������������������������������;");
+ }
+ if ((newRoleIds != null) && (newRoleIds.size() != 0)) {//���������������������������������������������null���������������������������
+ StringBuilder oldRolesName = new StringBuilder("���");
+ StringBuilder newRolesName = new StringBuilder("���");
+
+ List<ManageRole> newRoles = null;
+ if (!ObjectUtils.isEmpty(updateForm.getRoleIds())) {
+ newRoles = manageRoleMapper.selectBatchIds(updateForm.getRoleIds());
+ }
+
+ if (!ObjectUtils.isEmpty(oldRoles)) {
+ oldRolesName.deleteCharAt(oldRolesName.length() - 1);//������ "���"
+ oldRolesName.append("[");
+ for (ManageRole role : oldRoles) {
+ oldRolesName.append(role.getName() + ",");
+ }
+ oldRolesName.deleteCharAt(oldRolesName.length() - 1);//������������������������
+ oldRolesName.append("]");
+ }
+
+ if (!ObjectUtils.isEmpty(newRoles)) {
+ newRolesName.deleteCharAt(newRolesName.length() - 1);//������ "���"
+ newRolesName.append("[");
+ for (ManageRole role : newRoles) {
+ newRolesName.append(role.getName() + ",");
+ }
+ newRolesName.deleteCharAt(newRolesName.length() - 1);//������������������������
+ newRolesName.append("]");
+ }
+ //������������content
+ content.append(value + ":" + oldRolesName + "->" + newRolesName + ";");
+ }
+ } else {//������������������
+ if (newParameters.get(key) != null) {
+ String newValue = "���";
+ String oldValue = "���";
+ if (newParameters.get(key) != null && !newParameters.get(key).equals(" ")) {
+ newValue = String.valueOf(newParameters.get(key));
+ }
+ if (oldParameters.get(key) != null && !oldParameters.get(key).equals(" ")) {
+ oldValue = String.valueOf(oldParameters.get(key));
+ }
+ content.append(value + ":" + oldValue + "->" + newValue + ";");
+ }
+ }
+ }
+ logUtils.saveOperationForManage(request, content.toString(), Constants.UPDATE_OPERATE_TYPE);
}
--
Gitblit v1.8.0