4-29 代码提交
This commit is contained in:
@@ -29,5 +29,5 @@ public interface DictTypeFeign {
|
|||||||
|
|
||||||
@DeleteMapping("/delete/{sid}")
|
@DeleteMapping("/delete/{sid}")
|
||||||
@ApiOperation(value = "数据字典类型删除")
|
@ApiOperation(value = "数据字典类型删除")
|
||||||
ResultBean delete(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid);
|
ResultBean delete(@PathVariable String sid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,4 +31,8 @@ public interface SysForumCommentFeign {
|
|||||||
@ApiOperation(value = "查询论坛评论")
|
@ApiOperation(value = "查询论坛评论")
|
||||||
@RequestMapping("/selectSysForumComment")
|
@RequestMapping("/selectSysForumComment")
|
||||||
ResultBean selectSysForumComment();
|
ResultBean selectSysForumComment();
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询论坛评论")
|
||||||
|
@RequestMapping("/selectSysForumCommentOne/{sid}")
|
||||||
|
ResultBean selectSysForumCommentOne(@PathVariable String sid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public interface SysInfoShipFeign {
|
|||||||
ResultBean deleteSysInfoShip(@PathVariable String sid);
|
ResultBean deleteSysInfoShip(@PathVariable String sid);
|
||||||
|
|
||||||
@ApiOperation(value = "修改教师学生关联")
|
@ApiOperation(value = "修改教师学生关联")
|
||||||
@RequestMapping("alterSysInfoShip")
|
@RequestMapping("/alterSysInfoShip")
|
||||||
ResultBean alterSysInfoShip(@RequestBody SysInfoShip sysInfoShip);
|
ResultBean alterSysInfoShip(@RequestBody SysInfoShip sysInfoShip);
|
||||||
|
|
||||||
@ApiOperation(value = "查询教师学生关联")
|
@ApiOperation(value = "查询教师学生关联")
|
||||||
|
|||||||
@@ -22,4 +22,18 @@ public class SysPlan extends BaseEntity {
|
|||||||
private String planContent;
|
private String planContent;
|
||||||
@ApiModelProperty("反馈意见")
|
@ApiModelProperty("反馈意见")
|
||||||
private String planOpinion;
|
private String planOpinion;
|
||||||
|
|
||||||
|
@ApiModelProperty("姓名")
|
||||||
|
private String name;
|
||||||
|
@ApiModelProperty("系别")
|
||||||
|
private String department;
|
||||||
|
@ApiModelProperty("专业")
|
||||||
|
private String speciality;
|
||||||
|
@ApiModelProperty("班级")
|
||||||
|
private String calss;
|
||||||
|
|
||||||
|
@ApiModelProperty("进度内容")
|
||||||
|
private String planContentJd;
|
||||||
|
@ApiModelProperty("反馈意见")
|
||||||
|
private String planOpinionYj;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,4 +31,12 @@ public interface SysPlanFeign {
|
|||||||
@ApiOperation(value = "查询自主学习计划")
|
@ApiOperation(value = "查询自主学习计划")
|
||||||
@RequestMapping("/selectSysPlan")
|
@RequestMapping("/selectSysPlan")
|
||||||
ResultBean selectSysPlan();
|
ResultBean selectSysPlan();
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询指定的一个自主学习计划")
|
||||||
|
@RequestMapping("/selectSysPlanOne/{sid}")
|
||||||
|
ResultBean selectSysPlanOne(@PathVariable String sid);
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询自主学习计划的进度")
|
||||||
|
@RequestMapping("/selectSysPlanComment/{sid}")
|
||||||
|
ResultBean selectSysPlanCommentBySid(@PathVariable String sid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
@Api(tags = "自主学习计划进度表")
|
@Api(tags = "自主学习计划进度表")
|
||||||
public interface SysPlanScheduleFeign {
|
public interface SysPlanScheduleFeign {
|
||||||
|
|
||||||
@ApiOperation(value = "修改自主学习计划进度")
|
// @ApiOperation(value = "修改自主学习计划进度")
|
||||||
@RequestMapping("/alterSysPlanSchedule")
|
// @RequestMapping("/alterSysPlanSchedule")
|
||||||
ResultBean alterSysPlanSchedule(@RequestBody SysPlanSchedule sysPlanSchedule);
|
// ResultBean alterSysPlanSchedule(@RequestBody SysPlanSchedule sysPlanSchedule);
|
||||||
|
|
||||||
@ApiOperation(value = "添加/修改 自主学习计划进度")
|
@ApiOperation(value = "添加/修改 自主学习计划进度")
|
||||||
@RequestMapping("/saveSysPlanSchedule")
|
@RequestMapping("/saveSysPlanSchedule")
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public interface SysRoleFeign {
|
|||||||
|
|
||||||
@ApiOperation(value = "删除角色")
|
@ApiOperation(value = "删除角色")
|
||||||
@PostMapping("/deleteRole/{sid}")
|
@PostMapping("/deleteRole/{sid}")
|
||||||
ResultBean deleteRole(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid);
|
ResultBean deleteRole(@PathVariable String sid);
|
||||||
|
|
||||||
@ApiOperation(value = "查询角色")
|
@ApiOperation(value = "查询角色")
|
||||||
@PostMapping("/RoleOne/{sid}")
|
@PostMapping("/RoleOne/{sid}")
|
||||||
|
|||||||
@@ -29,4 +29,15 @@ public class SysUser extends BaseEntity {
|
|||||||
private int hasActivated;
|
private int hasActivated;
|
||||||
@ApiModelProperty("token")
|
@ApiModelProperty("token")
|
||||||
private String token;
|
private String token;
|
||||||
|
|
||||||
|
@ApiModelProperty("性别")
|
||||||
|
private String sex;
|
||||||
|
@ApiModelProperty("入学年份")
|
||||||
|
private String studyYear;
|
||||||
|
@ApiModelProperty("系别")
|
||||||
|
private String department;
|
||||||
|
@ApiModelProperty("专业")
|
||||||
|
private String speciality;
|
||||||
|
@ApiModelProperty("班级")
|
||||||
|
private String calss;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,4 +16,14 @@ public class SysUserRole extends BaseEntity {
|
|||||||
private String userSid;
|
private String userSid;
|
||||||
@ApiModelProperty("角色sid")
|
@ApiModelProperty("角色sid")
|
||||||
private String roleSid;
|
private String roleSid;
|
||||||
|
|
||||||
|
@ApiModelProperty("姓名")
|
||||||
|
private String name;
|
||||||
|
@ApiModelProperty("昵称")
|
||||||
|
private String nickName;
|
||||||
|
@ApiModelProperty("工号/学号")
|
||||||
|
private String userName;
|
||||||
|
@ApiModelProperty("角色名称")
|
||||||
|
private String roleName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,10 +24,11 @@ public interface SysUserRoleFeign {
|
|||||||
ResultBean alterUserRole(@RequestBody SysUserRole sysUserRole);
|
ResultBean alterUserRole(@RequestBody SysUserRole sysUserRole);
|
||||||
|
|
||||||
@ApiOperation(value = "删除该用户角色")
|
@ApiOperation(value = "删除该用户角色")
|
||||||
@RequestMapping("/deleteUserRoleById")
|
@RequestMapping("/deleteUserRoleById/{sid}")
|
||||||
ResultBean deleteUserRoleById(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid);
|
ResultBean deleteUserRoleById(@PathVariable String sid);
|
||||||
|
|
||||||
@ApiOperation(value = "查询用户权限")
|
@ApiOperation(value = "查询用户权限")
|
||||||
@RequestMapping("/selectUserRole")
|
@RequestMapping("/selectUserRole/{sid}")
|
||||||
ResultBean selectUserRole();
|
ResultBean selectUserRole(@PathVariable String sid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.yxt.demo.system.biz.sys_forum_comment;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yxt.demo.system.api.sys_forum_comment.SysForumComment;
|
import com.yxt.demo.system.api.sys_forum_comment.SysForumComment;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -14,4 +15,6 @@ import java.util.List;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface SysForumCommentMapper extends BaseMapper<SysForumComment> {
|
public interface SysForumCommentMapper extends BaseMapper<SysForumComment> {
|
||||||
List<SysForumComment> selectSysForumCommentList();
|
List<SysForumComment> selectSysForumCommentList();
|
||||||
|
|
||||||
|
SysForumComment selectSysForumCommentOne(@Param("sid") String sid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,4 +4,8 @@
|
|||||||
<select id="selectSysForumCommentList" resultType="com.yxt.demo.system.api.sys_forum_comment.SysForumComment">
|
<select id="selectSysForumCommentList" resultType="com.yxt.demo.system.api.sys_forum_comment.SysForumComment">
|
||||||
select * from sys_forum_comment
|
select * from sys_forum_comment
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysForumCommentOne" resultType="com.yxt.demo.system.api.sys_forum_comment.SysForumComment">
|
||||||
|
select * from sys_forum_comment where sid = #{sid}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -47,4 +47,9 @@ public class SysForumCommentRest implements SysForumCommentFeign {
|
|||||||
public ResultBean selectSysForumComment() {
|
public ResultBean selectSysForumComment() {
|
||||||
return sysForumCommentService.selectSysForumComment();
|
return sysForumCommentService.selectSysForumComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultBean selectSysForumCommentOne(String sid) {
|
||||||
|
return sysForumCommentService.selectSysForumCommentOne(sid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,4 +46,10 @@ public class SysForumCommentService extends MybatisBaseService<SysForumCommentMa
|
|||||||
}
|
}
|
||||||
return rb.success().setData(sysForumComments);
|
return rb.success().setData(sysForumComments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ResultBean selectSysForumCommentOne(String sid) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
SysForumComment sysForumComment = sysForumCommentMapper.selectSysForumCommentOne(sid);
|
||||||
|
return rb.success().setData(sysForumComment);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.yxt.demo.system.biz.sys_plan;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yxt.demo.system.api.sys_plan.SysPlan;
|
import com.yxt.demo.system.api.sys_plan.SysPlan;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -14,4 +15,12 @@ import java.util.List;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface SysPlanMapper extends BaseMapper<SysPlan> {
|
public interface SysPlanMapper extends BaseMapper<SysPlan> {
|
||||||
List<SysPlan> selectSysPlanList();
|
List<SysPlan> selectSysPlanList();
|
||||||
|
|
||||||
|
SysPlan selectSysPlanOneStudent(@Param("sid") String sid);
|
||||||
|
|
||||||
|
SysPlan selectSysPlanOneTeacher(@Param("sid") String sid);
|
||||||
|
|
||||||
|
SysPlan selectSysPlanBySid(@Param("sid") String sid);
|
||||||
|
|
||||||
|
SysPlan selectSysPlanCommentBySid(@Param("sid") String sid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,33 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.yxt.demo.system.biz.sys_plan.SysPlanMapper">
|
<mapper namespace="com.yxt.demo.system.biz.sys_plan.SysPlanMapper">
|
||||||
<select id="selectSysPlanList" resultType="com.yxt.demo.system.api.sys_plan.SysPlan">
|
<select id="selectSysPlanList" resultType="com.yxt.demo.system.api.sys_plan.SysPlan">
|
||||||
select * from sys_plan
|
select p.id,p.sid,p.studentNo,p.teacherNo,p.planContent,p.planOpinion,i.name,i.department,i.speciality,i.calss from sys_plan p
|
||||||
|
left join sys_info i
|
||||||
|
on p.studentNo = i.infoId or p.teacherNo = i.infoId
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysPlanOneStudent" resultType="com.yxt.demo.system.api.sys_plan.SysPlan">
|
||||||
|
select p.id,p.sid,p.studentNo,p.teacherNo,p.planContent,p.planOpinion,i.name,i.department,i.speciality,i.calss from sys_plan p
|
||||||
|
left join sys_info i
|
||||||
|
on p.studentNo = i.infoId
|
||||||
|
where p.sid = #{sid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysPlanOneTeacher" resultType="com.yxt.demo.system.api.sys_plan.SysPlan">
|
||||||
|
select p.id,p.sid,p.studentNo,p.teacherNo,p.planContent,p.planOpinion,i.name,i.department,i.speciality,i.calss from sys_plan p
|
||||||
|
left join sys_info i
|
||||||
|
on p.studentNo = i.infoId
|
||||||
|
where p.sid = #{sid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysPlanBySid" resultType="com.yxt.demo.system.api.sys_plan.SysPlan">
|
||||||
|
select * from sys_plan where sid = #{sid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysPlanCommentBySid" resultType="com.yxt.demo.system.api.sys_plan.SysPlan">
|
||||||
|
select p.id,p.sid,p.teacherNo,p.studentNo,p.planContent,p.planOpinion,ps.planContent planContentJd,ps.planOpinion planOpinionYj from sys_plan p
|
||||||
|
left join sys_plan_schedule ps
|
||||||
|
on p.sid = ps.planSid
|
||||||
|
where p.sid = #{sid}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -49,4 +49,14 @@ public class SysPlanRest implements SysPlanFeign {
|
|||||||
public ResultBean selectSysPlan() {
|
public ResultBean selectSysPlan() {
|
||||||
return sysPlanService.selectSysPlan();
|
return sysPlanService.selectSysPlan();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultBean selectSysPlanOne(String sid) {
|
||||||
|
return sysPlanService.selectSysPlanOne(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultBean selectSysPlanCommentBySid(String sid) {
|
||||||
|
return sysPlanService.selectSysPlanCommentBySid(sid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,4 +49,23 @@ public class SysPlanService extends MybatisBaseService<SysPlanMapper, SysPlan> {
|
|||||||
List<SysPlan> sysPlans = sysPlanMapper.selectSysPlanList();
|
List<SysPlan> sysPlans = sysPlanMapper.selectSysPlanList();
|
||||||
return rb.success().setData(sysPlans);
|
return rb.success().setData(sysPlans);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ResultBean selectSysPlanOne(String sid) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
SysPlan sysPlan1 = sysPlanMapper.selectSysPlanBySid(sid);
|
||||||
|
if (sysPlan1.getStudentNo() != null){
|
||||||
|
SysPlan sysPlan = sysPlanMapper.selectSysPlanOneStudent(sid);
|
||||||
|
return rb.success().setData(sysPlan);
|
||||||
|
}else if (sysPlan1.getTeacherNo() != null){
|
||||||
|
SysPlan sysPlan = sysPlanMapper.selectSysPlanOneTeacher(sid);
|
||||||
|
return rb.success().setData(sysPlan);
|
||||||
|
}
|
||||||
|
return rb.setMsg("没有该任务");
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean selectSysPlanCommentBySid(String sid) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
SysPlan sysPlan = sysPlanMapper.selectSysPlanBySid(sid);
|
||||||
|
return rb.success().setData(sysPlan);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ public class SysPlanScheduleRest implements SysPlanScheduleFeign{
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SysPlanScheduleService sysPlanScheduleService;
|
private SysPlanScheduleService sysPlanScheduleService;
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public ResultBean alterSysPlanSchedule(SysPlanSchedule sysPlanSchedule) {
|
// public ResultBean alterSysPlanSchedule(SysPlanSchedule sysPlanSchedule) {
|
||||||
return sysPlanScheduleService.alterSysPlanSchedule(sysPlanSchedule);
|
// return sysPlanScheduleService.alterSysPlanSchedule(sysPlanSchedule);
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultBean saveSysPlanSchedule(SysPlanSchedule sysPlanSchedule) {
|
public ResultBean saveSysPlanSchedule(SysPlanSchedule sysPlanSchedule) {
|
||||||
|
|||||||
@@ -19,15 +19,15 @@ public class SysPlanScheduleService extends MybatisBaseService<SysPlanScheduleMa
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SysPlanScheduleMapper sysPlanScheduleMapper;
|
private SysPlanScheduleMapper sysPlanScheduleMapper;
|
||||||
|
|
||||||
public ResultBean alterSysPlanSchedule(SysPlanSchedule sysPlanSchedule){
|
// public ResultBean alterSysPlanSchedule(SysPlanSchedule sysPlanSchedule){
|
||||||
ResultBean rb = ResultBean.fireFail();
|
// ResultBean rb = ResultBean.fireFail();
|
||||||
sysPlanSchedule.setModifyTime(new Date());
|
// sysPlanSchedule.setModifyTime(new Date());
|
||||||
int i = baseMapper.updateById(sysPlanSchedule);
|
// int i = baseMapper.updateById(sysPlanSchedule);
|
||||||
if (i == 0){
|
// if (i == 0){
|
||||||
return rb.setMsg("修改失败");
|
// return rb.setMsg("修改失败");
|
||||||
}
|
// }
|
||||||
return rb.success();
|
// return rb.success();
|
||||||
}
|
// }
|
||||||
|
|
||||||
public void saveSysPlanSchedule(SysPlanSchedule sysPlanSchedule){
|
public void saveSysPlanSchedule(SysPlanSchedule sysPlanSchedule){
|
||||||
baseMapper.insert(sysPlanSchedule);
|
baseMapper.insert(sysPlanSchedule);
|
||||||
@@ -35,6 +35,10 @@ public class SysPlanScheduleService extends MybatisBaseService<SysPlanScheduleMa
|
|||||||
|
|
||||||
public ResultBean updateSysPlanSchedule(SysPlanSchedule sysPlanSchedule) {
|
public ResultBean updateSysPlanSchedule(SysPlanSchedule sysPlanSchedule) {
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
if (sysPlanSchedule.getSid() == null){
|
||||||
|
baseMapper.insert(sysPlanSchedule);
|
||||||
|
return rb.success().setMsg("添加成功");
|
||||||
|
}
|
||||||
sysPlanScheduleMapper.updateSysPlanScheduleBySid(sysPlanSchedule);
|
sysPlanScheduleMapper.updateSysPlanScheduleBySid(sysPlanSchedule);
|
||||||
return rb.success();
|
return rb.success();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.yxt.demo.system.biz.sys_user_role;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yxt.demo.system.api.sys_user_role.SysUserRole;
|
import com.yxt.demo.system.api.sys_user_role.SysUserRole;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -17,4 +18,6 @@ public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
|
|||||||
List<SysUserRole> selectSysUserRole(String sid);
|
List<SysUserRole> selectSysUserRole(String sid);
|
||||||
|
|
||||||
List<SysUserRole> selectUserRoleList();
|
List<SysUserRole> selectUserRoleList();
|
||||||
|
|
||||||
|
SysUserRole selectUserRole(@Param("sid") String sid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,4 +8,11 @@
|
|||||||
<select id="selectUserRoleList" resultType="com.yxt.demo.system.api.sys_user_role.SysUserRole">
|
<select id="selectUserRoleList" resultType="com.yxt.demo.system.api.sys_user_role.SysUserRole">
|
||||||
select * from sys_user_role
|
select * from sys_user_role
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectUserRole" resultType="com.yxt.demo.system.api.sys_user_role.SysUserRole">
|
||||||
|
select ur.id,u.name,u.nickName,u.userName,ur.userSid,ur.roleSid,r.name roleName from sys_user u
|
||||||
|
left join sys_user_role ur on u.sid = ur.userSid
|
||||||
|
left join sys_role r on ur.roleSid = r.sid
|
||||||
|
where ur.userSid = #{sid}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
*/
|
*/
|
||||||
@Api(tags = "用户角色关联表")
|
@Api(tags = "用户角色关联表")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("v1/sysuser")
|
@RequestMapping("v1/sysuserrole")
|
||||||
public class SysUserRoleRest implements SysUserRoleFeign {
|
public class SysUserRoleRest implements SysUserRoleFeign {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -43,7 +43,7 @@ public class SysUserRoleRest implements SysUserRoleFeign {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultBean selectUserRole() {
|
public ResultBean selectUserRole(String sid) {
|
||||||
return sysUserRoleSerrvice.selectUserRole();
|
return sysUserRoleSerrvice.selectUserRole(sid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,9 +44,10 @@ public class SysUserRoleSerrvice extends MybatisBaseService<SysUserRoleMapper, S
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResultBean selectUserRole(){
|
public ResultBean selectUserRole(String sid){
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
List<SysUserRole> userRolesList = sysUserRoleMapper.selectUserRoleList();
|
SysUserRole sysUserRole = sysUserRoleMapper.selectUserRole(sid);
|
||||||
return rb.setData(userRolesList);
|
// List<SysUserRole> userRolesList = sysUserRoleMapper.selectUserRoleList();
|
||||||
|
return rb.success().setData(sysUserRole);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user