|
|
@ -25,6 +25,7 @@ import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ImppRedis;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ImppRedis;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
@ -401,7 +402,9 @@ public class SysRoleController extends CrudBaseController<SysRole> {
|
|
|
|
ValidatorBean.beginValid(refRoleMenu)
|
|
|
|
ValidatorBean.beginValid(refRoleMenu)
|
|
|
|
.notNull("roleId", refRoleMenu.getRoleId())
|
|
|
|
.notNull("roleId", refRoleMenu.getRoleId())
|
|
|
|
.notNull("softType", refRoleMenu.getSoftType());
|
|
|
|
.notNull("softType", refRoleMenu.getSoftType());
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(refRoleMenu.getMenuIdList())) {
|
|
|
|
|
|
|
|
throw ImppExceptionBuilder.newInstance().setSystemID(CommonEnumUtil.SOFT_TYPE.IMPP.getCode()).setErrorCode(ImppExceptionEnum.BUSINESS_EXCEPTION_DATA_ERROR.getCode()).setErrorDetail("未勾选菜单").build();
|
|
|
|
|
|
|
|
}
|
|
|
|
sysRoleService.refreshSysRoleRef(refRoleMenu.getRoleId(), refRoleMenu.getSoftType(), refRoleMenu.getMenuIdList()
|
|
|
|
sysRoleService.refreshSysRoleRef(refRoleMenu.getRoleId(), refRoleMenu.getSoftType(), refRoleMenu.getMenuIdList()
|
|
|
|
, AuthUtil.getSessionUser().getUserName());
|
|
|
|
, AuthUtil.getSessionUser().getUserName());
|
|
|
|
|
|
|
|
|
|
|
@ -488,4 +491,14 @@ public class SysRoleController extends CrudBaseController<SysRole> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
|
|
String aa ="{\"roleId\":\"1161540710735032320\",\"softType\":3,\"menuIdList\":[]}";
|
|
|
|
|
|
|
|
JSONObject bb = (JSONObject) JSONObject.toJSON(aa);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SysRefRoleMenu sysRefRoleMenu = JSONObject.toJavaObject(bb, SysRefRoleMenu.class);
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(sysRefRoleMenu.getMenuIdList())) {
|
|
|
|
|
|
|
|
System.out.println(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|