Merge branch 'master' of http://gitea.yxtsoft.com/yxt_group/demo into master
This commit is contained in:
@@ -29,5 +29,5 @@ public interface DictTypeFeign {
|
||||
|
||||
@DeleteMapping("/delete/{sid}")
|
||||
@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 = "查询论坛评论")
|
||||
@RequestMapping("/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);
|
||||
|
||||
@ApiOperation(value = "修改教师学生关联")
|
||||
@RequestMapping("alterSysInfoShip")
|
||||
@RequestMapping("/alterSysInfoShip")
|
||||
ResultBean alterSysInfoShip(@RequestBody SysInfoShip sysInfoShip);
|
||||
|
||||
@ApiOperation(value = "查询教师学生关联")
|
||||
|
||||
@@ -22,4 +22,18 @@ public class SysPlan extends BaseEntity {
|
||||
private String planContent;
|
||||
@ApiModelProperty("反馈意见")
|
||||
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 = "查询自主学习计划")
|
||||
@RequestMapping("/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 = "自主学习计划进度表")
|
||||
public interface SysPlanScheduleFeign {
|
||||
|
||||
@ApiOperation(value = "修改自主学习计划进度")
|
||||
@RequestMapping("/alterSysPlanSchedule")
|
||||
ResultBean alterSysPlanSchedule(@RequestBody SysPlanSchedule sysPlanSchedule);
|
||||
// @ApiOperation(value = "修改自主学习计划进度")
|
||||
// @RequestMapping("/alterSysPlanSchedule")
|
||||
// ResultBean alterSysPlanSchedule(@RequestBody SysPlanSchedule sysPlanSchedule);
|
||||
|
||||
@ApiOperation(value = "添加/修改 自主学习计划进度")
|
||||
@RequestMapping("/saveSysPlanSchedule")
|
||||
|
||||
@@ -22,7 +22,7 @@ public interface SysRoleFeign {
|
||||
|
||||
@ApiOperation(value = "删除角色")
|
||||
@PostMapping("/deleteRole/{sid}")
|
||||
ResultBean deleteRole(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid);
|
||||
ResultBean deleteRole(@PathVariable String sid);
|
||||
|
||||
@ApiOperation(value = "查询角色")
|
||||
@PostMapping("/RoleOne/{sid}")
|
||||
|
||||
@@ -29,4 +29,15 @@ public class SysUser extends BaseEntity {
|
||||
private int hasActivated;
|
||||
@ApiModelProperty("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;
|
||||
@ApiModelProperty("角色sid")
|
||||
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);
|
||||
|
||||
@ApiOperation(value = "删除该用户角色")
|
||||
@RequestMapping("/deleteUserRoleById")
|
||||
ResultBean deleteUserRoleById(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid);
|
||||
@RequestMapping("/deleteUserRoleById/{sid}")
|
||||
ResultBean deleteUserRoleById(@PathVariable String sid);
|
||||
|
||||
@ApiOperation(value = "查询用户权限")
|
||||
@RequestMapping("/selectUserRole")
|
||||
ResultBean selectUserRole();
|
||||
@RequestMapping("/selectUserRole/{sid}")
|
||||
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.yxt.demo.system.api.sys_forum_comment.SysForumComment;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,4 +15,6 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface SysForumCommentMapper extends BaseMapper<SysForumComment> {
|
||||
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 * from sys_forum_comment
|
||||
</select>
|
||||
|
||||
<select id="selectSysForumCommentOne" resultType="com.yxt.demo.system.api.sys_forum_comment.SysForumComment">
|
||||
select * from sys_forum_comment where sid = #{sid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -47,4 +47,9 @@ public class SysForumCommentRest implements SysForumCommentFeign {
|
||||
public ResultBean 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);
|
||||
}
|
||||
|
||||
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.yxt.demo.system.api.sys_plan.SysPlan;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,4 +15,12 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface SysPlanMapper extends BaseMapper<SysPlan> {
|
||||
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" >
|
||||
<mapper namespace="com.yxt.demo.system.biz.sys_plan.SysPlanMapper">
|
||||
<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>
|
||||
</mapper>
|
||||
@@ -49,4 +49,14 @@ public class SysPlanRest implements SysPlanFeign {
|
||||
public ResultBean 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();
|
||||
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
|
||||
private SysPlanScheduleService sysPlanScheduleService;
|
||||
|
||||
@Override
|
||||
public ResultBean alterSysPlanSchedule(SysPlanSchedule sysPlanSchedule) {
|
||||
return sysPlanScheduleService.alterSysPlanSchedule(sysPlanSchedule);
|
||||
}
|
||||
// @Override
|
||||
// public ResultBean alterSysPlanSchedule(SysPlanSchedule sysPlanSchedule) {
|
||||
// return sysPlanScheduleService.alterSysPlanSchedule(sysPlanSchedule);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public ResultBean saveSysPlanSchedule(SysPlanSchedule sysPlanSchedule) {
|
||||
|
||||
@@ -19,15 +19,15 @@ public class SysPlanScheduleService extends MybatisBaseService<SysPlanScheduleMa
|
||||
@Autowired
|
||||
private SysPlanScheduleMapper sysPlanScheduleMapper;
|
||||
|
||||
public ResultBean alterSysPlanSchedule(SysPlanSchedule sysPlanSchedule){
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
sysPlanSchedule.setModifyTime(new Date());
|
||||
int i = baseMapper.updateById(sysPlanSchedule);
|
||||
if (i == 0){
|
||||
return rb.setMsg("修改失败");
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
// public ResultBean alterSysPlanSchedule(SysPlanSchedule sysPlanSchedule){
|
||||
// ResultBean rb = ResultBean.fireFail();
|
||||
// sysPlanSchedule.setModifyTime(new Date());
|
||||
// int i = baseMapper.updateById(sysPlanSchedule);
|
||||
// if (i == 0){
|
||||
// return rb.setMsg("修改失败");
|
||||
// }
|
||||
// return rb.success();
|
||||
// }
|
||||
|
||||
public void saveSysPlanSchedule(SysPlanSchedule sysPlanSchedule){
|
||||
baseMapper.insert(sysPlanSchedule);
|
||||
@@ -35,6 +35,10 @@ public class SysPlanScheduleService extends MybatisBaseService<SysPlanScheduleMa
|
||||
|
||||
public ResultBean updateSysPlanSchedule(SysPlanSchedule sysPlanSchedule) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
if (sysPlanSchedule.getSid() == null){
|
||||
baseMapper.insert(sysPlanSchedule);
|
||||
return rb.success().setMsg("添加成功");
|
||||
}
|
||||
sysPlanScheduleMapper.updateSysPlanScheduleBySid(sysPlanSchedule);
|
||||
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.yxt.demo.system.api.sys_user_role.SysUserRole;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,4 +18,6 @@ public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
|
||||
List<SysUserRole> selectSysUserRole(String sid);
|
||||
|
||||
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 * from sys_user_role
|
||||
</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>
|
||||
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@Api(tags = "用户角色关联表")
|
||||
@RestController
|
||||
@RequestMapping("v1/sysuser")
|
||||
@RequestMapping("v1/sysuserrole")
|
||||
public class SysUserRoleRest implements SysUserRoleFeign {
|
||||
|
||||
@Autowired
|
||||
@@ -43,7 +43,7 @@ public class SysUserRoleRest implements SysUserRoleFeign {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean selectUserRole() {
|
||||
return sysUserRoleSerrvice.selectUserRole();
|
||||
public ResultBean selectUserRole(String sid) {
|
||||
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();
|
||||
List<SysUserRole> userRolesList = sysUserRoleMapper.selectUserRoleList();
|
||||
return rb.setData(userRolesList);
|
||||
SysUserRole sysUserRole = sysUserRoleMapper.selectUserRole(sid);
|
||||
// List<SysUserRole> userRolesList = sysUserRoleMapper.selectUserRoleList();
|
||||
return rb.success().setData(sysUserRole);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user