|
@@ -1,9 +1,11 @@
|
|
|
package com.mw.platform.controller.system;
|
|
|
|
|
|
+import com.mw.platform.aspect.Log;
|
|
|
import com.mw.platform.core.BaseController;
|
|
|
import com.mw.platform.core.BaseParameter;
|
|
|
import com.mw.platform.core.Example;
|
|
|
import com.mw.platform.core.ListView;
|
|
|
+import com.mw.platform.enums.OperationType;
|
|
|
import com.mw.platform.system.mysql.dao.ISysUserDao;
|
|
|
import com.mw.platform.system.mysql.entity.LoginUser;
|
|
|
import com.mw.platform.system.mysql.entity.SysRoleAuthority;
|
|
@@ -22,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.io.IOException;
|
|
|
import java.util.Arrays;
|
|
@@ -39,7 +42,7 @@ public class SysUserController extends BaseController {
|
|
|
@Autowired
|
|
|
private ISysRoleService roleService;
|
|
|
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private ISysUserDao userInfoMapper;
|
|
|
|
|
|
@RequestMapping(value = "/getUserList", method = RequestMethod.GET)
|
|
@@ -93,6 +96,7 @@ public class SysUserController extends BaseController {
|
|
|
@RequestMapping(value = "/userPull", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
@Transactional
|
|
|
+ @Log(operationType = OperationType.OTHER , title = "主管部门用户拉取")
|
|
|
public String userPull(){
|
|
|
List<LoginUser> loginUsers = userService.selectZgbmUser();
|
|
|
|
|
@@ -110,21 +114,21 @@ public class SysUserController extends BaseController {
|
|
|
user.setId(UUIDUtils.getEncryUUID());
|
|
|
user.setAccount(loginUser.getAccount());
|
|
|
user.setPassword(MD5Util.MD5Encode("123456", "UTF-8"));
|
|
|
- user.setRoleId(16);
|
|
|
+ user.setRoleId(19);
|
|
|
user.setNice("主管部门-"+loginUser.getUserName());
|
|
|
user.setSysType("059358cc4487e7773a878cda0193de67");
|
|
|
user.setStatus(1);
|
|
|
user.setCreateTime(new Date());
|
|
|
- user.settyyhId(loginUser.getTyyhId());
|
|
|
+ user.settyyhId("zgbm" + loginUser.getUserId());
|
|
|
user.setFranId(5);
|
|
|
- userInfoMapper.insert(user);
|
|
|
+ userService.saveSysUser(user);
|
|
|
crsl++;
|
|
|
}else {
|
|
|
if (!loginUser.getAccount().equals(userInfo.getAccount()) ||
|
|
|
!("主管部门-"+loginUser.getUserName()).equals(userInfo.getNice())){
|
|
|
userInfo.setAccount(loginUser.getAccount());
|
|
|
userInfo.setNice("主管部门-"+loginUser.getUserName());
|
|
|
- userInfoMapper.update(userInfo);
|
|
|
+ userService.updateSysUser(userInfo);
|
|
|
gxsl++;
|
|
|
}
|
|
|
}
|
|
@@ -187,9 +191,6 @@ public class SysUserController extends BaseController {
|
|
|
@ResponseBody
|
|
|
public String toEditUser(SysUserInfo userInfo){
|
|
|
BaseParameter result = new BaseParameter();
|
|
|
- if (userInfo.getPassword().equals("")){
|
|
|
- userInfo.setPassword(null);
|
|
|
- }
|
|
|
userService.updateSysUser(userInfo);
|
|
|
result.setMessage("修改成功");
|
|
|
result.commit();
|