|
@@ -23,6 +23,7 @@ import com.tianhu.system.api.domain.SysDept;
|
|
|
import com.tianhu.system.api.domain.SysRole;
|
|
import com.tianhu.system.api.domain.SysRole;
|
|
|
import com.tianhu.system.api.domain.SysUser;
|
|
import com.tianhu.system.api.domain.SysUser;
|
|
|
import com.tianhu.system.api.model.LoginUser;
|
|
import com.tianhu.system.api.model.LoginUser;
|
|
|
|
|
+import com.tianhu.system.common.ValidateCodeService;
|
|
|
import com.tianhu.system.domain.*;
|
|
import com.tianhu.system.domain.*;
|
|
|
import com.tianhu.system.domain.vo.TreeSelect;
|
|
import com.tianhu.system.domain.vo.TreeSelect;
|
|
|
import com.tianhu.system.mapper.SysDeptMapper;
|
|
import com.tianhu.system.mapper.SysDeptMapper;
|
|
@@ -91,6 +92,8 @@ public class SysUserController extends BaseController
|
|
|
private SysUserRoleMapper userRoleMapper;
|
|
private SysUserRoleMapper userRoleMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private SysDeptMapper deptMapper;
|
|
private SysDeptMapper deptMapper;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ValidateCodeService validateCodeService;
|
|
|
|
|
|
|
|
// 下载模板
|
|
// 下载模板
|
|
|
@PostMapping("/importTemplate")
|
|
@PostMapping("/importTemplate")
|
|
@@ -131,12 +134,15 @@ public class SysUserController extends BaseController
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public R<Map<String, Object>> info(@RequestParam(value = "type", required = false) String type,
|
|
public R<Map<String, Object>> info(@RequestParam(value = "type", required = false) String type,
|
|
|
@RequestParam(value = "code", required = false) String code,
|
|
@RequestParam(value = "code", required = false) String code,
|
|
|
|
|
+ @RequestParam(value = "uuid", required = false) String uuid,
|
|
|
@RequestParam(value = "unionId", required = false) String unionId,
|
|
@RequestParam(value = "unionId", required = false) String unionId,
|
|
|
@RequestParam(value = "username") String username,
|
|
@RequestParam(value = "username") String username,
|
|
|
@RequestParam(value = "shortMessageCode", required = false) String shortMessageCode)
|
|
@RequestParam(value = "shortMessageCode", required = false) String shortMessageCode)
|
|
|
{
|
|
{
|
|
|
Map<String, Object> resMap = new HashMap<>();
|
|
Map<String, Object> resMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
+ validateCodeService.checkCapcha(code, uuid, true);
|
|
|
|
|
+
|
|
|
SysUser sysUser = userService.selectUserByUserName(username);
|
|
SysUser sysUser = userService.selectUserByUserName(username);
|
|
|
// 短信验证码登陆 或者 验证码注册
|
|
// 短信验证码登陆 或者 验证码注册
|
|
|
if ("1".equals(type) || "2".equals(type)) {
|
|
if ("1".equals(type) || "2".equals(type)) {
|