Merge branch 'develop_master' into 'FOTON'
Develop master See merge request LiuChao/foton-slrs-system-rest!365
This commit is contained in:
@@ -8,6 +8,7 @@ import com.adc.da.login.util.UserUtils;
|
|||||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||||
|
import com.adc.da.slrs.sarRole.dao.TsRoleDao;
|
||||||
import com.adc.da.slrs.sarRole.entity.TsRoleMenuVO;
|
import com.adc.da.slrs.sarRole.entity.TsRoleMenuVO;
|
||||||
import com.adc.da.slrs.sarRole.entity.TsRoleResourceVO;
|
import com.adc.da.slrs.sarRole.entity.TsRoleResourceVO;
|
||||||
import com.adc.da.slrs.sarRole.service.ITsRoleService;
|
import com.adc.da.slrs.sarRole.service.ITsRoleService;
|
||||||
@@ -39,6 +40,8 @@ import java.util.List;
|
|||||||
public class TsRoleController extends BaseController<TsRole> {
|
public class TsRoleController extends BaseController<TsRole> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITsRoleService tsRoleService;
|
private ITsRoleService tsRoleService;
|
||||||
|
@Autowired
|
||||||
|
private TsRoleDao tsRoleDao;
|
||||||
|
|
||||||
@ApiOperation("查询所有角色")
|
@ApiOperation("查询所有角色")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@@ -95,9 +98,14 @@ public class TsRoleController extends BaseController<TsRole> {
|
|||||||
@ApiOperation("查询角色详情")
|
@ApiOperation("查询角色详情")
|
||||||
@GetMapping("/id")
|
@GetMapping("/id")
|
||||||
public ResponseMessage<TsRole> getRoleById(@RequestParam String roleId){
|
public ResponseMessage<TsRole> getRoleById(@RequestParam String roleId){
|
||||||
TsRole tsRole=tsRoleService.getById(roleId);
|
// TsRole tsRole=tsRoleService.getById(roleId);
|
||||||
|
// if(tsRole.getParentId()!=null){
|
||||||
|
// TsRole parent=tsRoleService.getById(tsRole.getParentId());
|
||||||
|
// tsRole.setParent(parent.getName());
|
||||||
|
// }
|
||||||
|
TsRole tsRole=tsRoleDao.getAllDatas(roleId);
|
||||||
if(tsRole.getParentId()!=null){
|
if(tsRole.getParentId()!=null){
|
||||||
TsRole parent=tsRoleService.getById(tsRole.getParentId());
|
TsRole parent=tsRoleDao.getAllDatas(tsRole.getParentId());
|
||||||
tsRole.setParent(parent.getName());
|
tsRole.setParent(parent.getName());
|
||||||
}
|
}
|
||||||
return Result.success(tsRole);
|
return Result.success(tsRole);
|
||||||
|
|||||||
@@ -99,4 +99,7 @@ public interface TsRoleDao extends BaseMapper<TsRole> {
|
|||||||
* @return List<String>
|
* @return List<String>
|
||||||
*/
|
*/
|
||||||
List<String> getRootMenuIdsByRoleIds(List<String> roleIds);
|
List<String> getRootMenuIdsByRoleIds(List<String> roleIds);
|
||||||
|
|
||||||
|
@Select("select *,DATE_ADD(ts_role.operate_time,INTERVAL 8 HOUR) as operateTime from ts_role where ts_role.ID = #{roleId}")
|
||||||
|
TsRole getAllDatas(@Param("roleId") String roleId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public class TsRole extends BaseEntity {
|
|||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
||||||
@ApiModelProperty(value = "操作时间")
|
@ApiModelProperty(value = "操作时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss",locale = "zh")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Timestamp operateTime;
|
private Timestamp operateTime;
|
||||||
|
|
||||||
@@ -89,13 +89,13 @@ public class TsRole extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
@TableField("CREATION_TIME")
|
@TableField("CREATION_TIME")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Timestamp creationTime;
|
private Timestamp creationTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "修改时间")
|
@ApiModelProperty(value = "修改时间")
|
||||||
@TableField("MODIFY_TIME")
|
@TableField("MODIFY_TIME")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Timestamp modifyTime;
|
private Timestamp modifyTime;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.adc.da.slrs.sarRole.entity.TsRole;
|
|||||||
import com.adc.da.slrs.sarRole.entity.TsRoleMenuVO;
|
import com.adc.da.slrs.sarRole.entity.TsRoleMenuVO;
|
||||||
import com.adc.da.slrs.sarRole.entity.TsRoleResourceVO;
|
import com.adc.da.slrs.sarRole.entity.TsRoleResourceVO;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user