|
@@ -8,6 +8,7 @@ import com.qmth.themis.business.annotation.ApiJsonObject;
|
|
import com.qmth.themis.business.annotation.ApiJsonProperty;
|
|
import com.qmth.themis.business.annotation.ApiJsonProperty;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.dto.AuthDto;
|
|
import com.qmth.themis.business.dto.AuthDto;
|
|
|
|
+import com.qmth.themis.business.entity.TBOrg;
|
|
import com.qmth.themis.business.entity.TBSession;
|
|
import com.qmth.themis.business.entity.TBSession;
|
|
import com.qmth.themis.business.entity.TBUser;
|
|
import com.qmth.themis.business.entity.TBUser;
|
|
import com.qmth.themis.business.entity.TBUserRole;
|
|
import com.qmth.themis.business.entity.TBUserRole;
|
|
@@ -525,7 +526,7 @@ public class TBUserController {
|
|
@RequestMapping(value = "/save", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/save", method = RequestMethod.POST)
|
|
@ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
|
|
@Transactional
|
|
@Transactional
|
|
- public Result save(@ApiJsonObject(name = "save", value = {
|
|
|
|
|
|
+ public Result save(@ApiJsonObject(name = "userSave", value = {
|
|
@ApiJsonProperty(key = "id", type = "long", example = "1", description = "新增不需要主键"),
|
|
@ApiJsonProperty(key = "id", type = "long", example = "1", description = "新增不需要主键"),
|
|
@ApiJsonProperty(key = "loginName", description = "登录名,新增必须"),
|
|
@ApiJsonProperty(key = "loginName", description = "登录名,新增必须"),
|
|
@ApiJsonProperty(key = "name", description = "姓名,新增必须"),
|
|
@ApiJsonProperty(key = "name", description = "姓名,新增必须"),
|
|
@@ -541,9 +542,11 @@ public class TBUserController {
|
|
if (Objects.nonNull(roleList) && roleList.size() > 0) {
|
|
if (Objects.nonNull(roleList) && roleList.size() > 0) {
|
|
roleSet = new HashSet<>(roleList);
|
|
roleSet = new HashSet<>(roleList);
|
|
}
|
|
}
|
|
- //todo orgId待从redis取
|
|
|
|
if (Objects.isNull(tbUser.getId())) {
|
|
if (Objects.isNull(tbUser.getId())) {
|
|
|
|
+ HttpServletRequest request = ServletUtil.getRequest();
|
|
|
|
+ TBOrg tbOrg = (TBOrg) ServletUtil.getRequestOrg(request);
|
|
tbUser.setId(Constants.idGen.next());
|
|
tbUser.setId(Constants.idGen.next());
|
|
|
|
+ tbUser.setOrgId(tbOrg.getId());
|
|
tbUser.setCreateId(tbUser.getId());
|
|
tbUser.setCreateId(tbUser.getId());
|
|
if (Objects.nonNull(roleSet) && roleSet.size() > 0) {
|
|
if (Objects.nonNull(roleSet) && roleSet.size() > 0) {
|
|
roleSet.forEach(s -> {
|
|
roleSet.forEach(s -> {
|