
48 changed files with 715 additions and 135 deletions
@ -0,0 +1,36 @@ |
|||
package com.yxt.demo.system.api.sys_info_ship; |
|||
|
|||
import com.yxt.demo.system.api.sys_user.SysUserDto; |
|||
import com.yxt.demo.system.biz.sys_info_ship.SysInfoShipService; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-04-27-15:20 |
|||
*/ |
|||
@Api(tags = "教师学生表") |
|||
public interface SysInfoShipFeign { |
|||
|
|||
@ApiOperation(value = "添加教师学生") |
|||
@RequestMapping("/saveSysInfoShip") |
|||
ResultBean saveSysInfoShip(@RequestBody SysInfoShip sysInfoShip); |
|||
|
|||
@ApiOperation(value = "删除教师学生关联") |
|||
@RequestMapping("/deleteSysInfoShip/{sid}") |
|||
ResultBean deleteSysInfoShip(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid); |
|||
|
|||
@ApiOperation(value = "修改教师学生关联") |
|||
@RequestMapping("alterSysInfoShip") |
|||
ResultBean alterSysInfoShip(@RequestBody SysInfoShip sysInfoShip); |
|||
|
|||
@ApiOperation(value = "查询教师学生关联") |
|||
@RequestMapping("/selectSysInfoShip") |
|||
ResultBean selectSysInfoShip(); |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.demo.system.api.sys_menu_role; |
|||
|
|||
import com.yxt.demo.system.api.sys_user.SysUserDto; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-04-27-13:32 |
|||
*/ |
|||
@Api(tags = "菜单角色表") |
|||
public interface SysMenuRoleFeign { |
|||
|
|||
@ApiOperation(value = "给菜单设置角色") |
|||
@RequestMapping("/addSysMenuRole") |
|||
ResultBean addSysMenuRole(@RequestBody SysMenuRole sysMenuRole); |
|||
|
|||
@ApiOperation(value = "删除给菜单设置的权限") |
|||
@RequestMapping("/deleteSysMenuRole") |
|||
ResultBean deleteSysMenuRole(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid); |
|||
|
|||
@ApiOperation(value = "修改菜单角色") |
|||
@RequestMapping("/alterSysMenuRole") |
|||
ResultBean alterSysMenuRole(@RequestBody SysMenuRole sysMenuRole); |
|||
|
|||
@ApiOperation(value = "查询菜单角色") |
|||
@RequestMapping("/selectSysMenuRole") |
|||
ResultBean selectSysMenuRole(); |
|||
} |
@ -1,9 +1,34 @@ |
|||
package com.yxt.demo.system.api.sys_plan; |
|||
|
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:24 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "自主学习表") |
|||
public interface SysPlanFeign { |
|||
|
|||
@ApiOperation(value = "添加自主学习计划") |
|||
@RequestMapping("/saveSysPlan") |
|||
ResultBean saveSysPlan(@RequestBody SysPlan sysPlan); |
|||
|
|||
@ApiOperation(value = "删除自主学习计划") |
|||
@RequestMapping("/deleteSysPlan/{sid}") |
|||
ResultBean deleteSysPlan(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid); |
|||
|
|||
@ApiOperation(value = "修改自主学习计划") |
|||
@RequestMapping("/alterSysPlan") |
|||
ResultBean alterSysPlan(@RequestBody SysPlan sysPlan); |
|||
|
|||
@ApiOperation(value = "查询自主学习计划") |
|||
@RequestMapping("/selectSysPlan") |
|||
ResultBean selectSysPlan(); |
|||
} |
|||
|
@ -1,9 +1,25 @@ |
|||
package com.yxt.demo.system.api.sys_plan_schedule; |
|||
|
|||
import com.yxt.demo.system.api.sys_user.SysUserDto; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:25 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "自主学习计划进度表") |
|||
public interface SysPlanScheduleFeign { |
|||
|
|||
@ApiOperation(value = "修改自主学习计划进度") |
|||
@PostMapping("/alterSysPlanSchedule") |
|||
ResultBean alterSysPlanSchedule(@RequestBody SysPlanSchedule sysPlanSchedule); |
|||
|
|||
// @ApiOperation(value = "添加自主学习计划进度")
|
|||
// @PostMapping("/alterSysPlanSchedule")
|
|||
// ResultBean
|
|||
} |
|||
|
@ -1,9 +1,35 @@ |
|||
package com.yxt.demo.system.api.sys_student_score; |
|||
|
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:29 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "学生成绩表") |
|||
public interface SysStudentScoreFeign { |
|||
|
|||
@ApiOperation(value = "添加学生成绩") |
|||
@RequestMapping("/addStudentScore") |
|||
ResultBean addStudentScore(@RequestBody SysStudentScore sysStudentScore); |
|||
|
|||
@ApiOperation(value = "删除学生成绩") |
|||
@RequestMapping("/deleteStudentScore") |
|||
ResultBean deleteStudentScore(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid); |
|||
|
|||
@ApiOperation(value = "修改学生成绩") |
|||
@RequestMapping("/alterStudentScore") |
|||
ResultBean alterStudentScore(@RequestBody SysStudentScore sysStudentScore); |
|||
|
|||
@ApiOperation(value = "查询学生信息") |
|||
@RequestMapping("/selectStudentScore") |
|||
ResultBean selectStudentScore(); |
|||
} |
|||
|
@ -1,12 +1,17 @@ |
|||
package com.yxt.demo.system.biz.sys_info_ship; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.demo.system.api.sys_info_ship.SysInfoShip; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:15 |
|||
* @Description |
|||
*/ |
|||
@Mapper |
|||
public interface SysInfoShipMapper { |
|||
public interface SysInfoShipMapper extends BaseMapper<SysInfoShip> { |
|||
List<SysInfoShip> selectSysInfoShipList(); |
|||
} |
|||
|
@ -1,4 +1,7 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!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_info_ship.SysInfoShipMapper"> |
|||
<select id="selectSysInfoShipList" resultType="com.yxt.demo.system.api.sys_info_ship.SysInfoShip"> |
|||
select * from sys_info_ship |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,47 @@ |
|||
package com.yxt.demo.system.biz.sys_info_ship; |
|||
|
|||
import com.yxt.demo.system.api.sys_info_ship.SysInfoShip; |
|||
import com.yxt.demo.system.api.sys_info_ship.SysInfoShipFeign; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-04-27-15:28 |
|||
*/ |
|||
@Api(tags = "教师学生表") |
|||
@RestController |
|||
@RequestMapping("v1/sysinfoship") |
|||
public class SysInfoShipRest implements SysInfoShipFeign { |
|||
|
|||
@Autowired |
|||
private SysInfoShipService sysInfoShipService; |
|||
|
|||
@Override |
|||
public ResultBean saveSysInfoShip(SysInfoShip sysInfoShip) { |
|||
return sysInfoShipService.saveSysInfoShip(sysInfoShip); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean deleteSysInfoShip(String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = sysInfoShipService.deleteBySid(sid); |
|||
if (i == 0){ |
|||
return rb.setMsg("删除失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean alterSysInfoShip(SysInfoShip sysInfoShip) { |
|||
return sysInfoShipService.alterSysInfoShip(sysInfoShip); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean selectSysInfoShip() { |
|||
return sysInfoShipService.selectSysInfoShip(); |
|||
} |
|||
} |
@ -1,12 +1,47 @@ |
|||
package com.yxt.demo.system.biz.sys_info_ship; |
|||
|
|||
import com.yxt.demo.system.api.sys_info_ship.SysInfoShip; |
|||
import com.yxt.demo.system.jdbc.service.MybatisBaseService; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:15 |
|||
* @Description |
|||
*/ |
|||
@Service |
|||
public class SysInfoShipService { |
|||
public class SysInfoShipService extends MybatisBaseService<SysInfoShipMapper, SysInfoShip> { |
|||
|
|||
@Autowired |
|||
private SysInfoShipMapper sysInfoShipMapper; |
|||
|
|||
public ResultBean saveSysInfoShip(SysInfoShip sysInfoShip) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int insert = baseMapper.insert(sysInfoShip); |
|||
if (insert == 0){ |
|||
return rb.setMsg("添加失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean alterSysInfoShip(SysInfoShip sysInfoShip){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
sysInfoShip.setModifyTime(new Date()); |
|||
int i = baseMapper.updateById(sysInfoShip); |
|||
if (i == 0){ |
|||
return rb.setMsg("修改失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean selectSysInfoShip() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<SysInfoShip> sysInfoShips = sysInfoShipMapper.selectSysInfoShipList(); |
|||
return rb.success().setData(sysInfoShips); |
|||
} |
|||
} |
|||
|
@ -1,4 +1,7 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!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_menu.SysMenuMapper"> |
|||
<select id="selectMenuList" resultType="com.yxt.demo.system.api.sys_menu.SysMenu"> |
|||
select * from sys_menu |
|||
</select> |
|||
</mapper> |
@ -1,12 +1,18 @@ |
|||
package com.yxt.demo.system.biz.sys_menu_role; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.demo.system.api.sys_menu_role.SysMenuRole; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:12 |
|||
* @Description |
|||
*/ |
|||
@Mapper |
|||
public interface SysMenuRoleMapper { |
|||
public interface SysMenuRoleMapper extends BaseMapper<SysMenuRole> { |
|||
|
|||
List<SysMenuRole> selectMenuRoleList(); |
|||
} |
|||
|
@ -1,4 +1,7 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!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_menu_role.SysMenuRoleMapper"> |
|||
<select id="selectMenuRoleList" resultType="com.yxt.demo.system.api.sys_menu_role.SysMenuRole"> |
|||
select * from sys_menu_role |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,47 @@ |
|||
package com.yxt.demo.system.biz.sys_menu_role; |
|||
|
|||
import com.yxt.demo.system.api.sys_menu_role.SysMenuRole; |
|||
import com.yxt.demo.system.api.sys_menu_role.SysMenuRoleFeign; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-04-27-13:39 |
|||
*/ |
|||
@Api(tags = "菜单角色表") |
|||
@RestController |
|||
@RequestMapping("v1/sysmenurole") |
|||
public class SysMenuRoleRest implements SysMenuRoleFeign { |
|||
|
|||
@Autowired |
|||
private SysMenuRoleService sysMenuRoleService; |
|||
|
|||
@Override |
|||
public ResultBean addSysMenuRole(SysMenuRole sysMenuRole) { |
|||
return sysMenuRoleService.addSysMenuRole(sysMenuRole); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean deleteSysMenuRole(String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = sysMenuRoleService.deleteBySid(sid); |
|||
if (i == 0){ |
|||
return rb.setMsg("删除失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean alterSysMenuRole(SysMenuRole sysMenuRole) { |
|||
return sysMenuRoleService.alterSysMenuRole(sysMenuRole); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean selectSysMenuRole() { |
|||
return sysMenuRoleService.selectSysMenuRole(); |
|||
} |
|||
} |
@ -1,12 +1,47 @@ |
|||
package com.yxt.demo.system.biz.sys_menu_role; |
|||
|
|||
import com.yxt.demo.system.api.sys_menu_role.SysMenuRole; |
|||
import com.yxt.demo.system.jdbc.service.MybatisBaseService; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:12 |
|||
* @Description |
|||
*/ |
|||
@Service |
|||
public class SysMenuRoleService { |
|||
public class SysMenuRoleService extends MybatisBaseService<SysMenuRoleMapper, SysMenuRole> { |
|||
|
|||
@Autowired |
|||
private SysMenuRoleMapper sysMenuRoleMapper; |
|||
|
|||
public ResultBean addSysMenuRole(SysMenuRole sysMenuRole){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int insert = baseMapper.insert(sysMenuRole); |
|||
if (insert == 0){ |
|||
return rb.setMsg("添加失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean alterSysMenuRole(SysMenuRole sysMenuRole){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
sysMenuRole.setModifyTime(new Date()); |
|||
int i = baseMapper.updateById(sysMenuRole); |
|||
if (i == 0){ |
|||
return rb.setMsg("修改失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean selectSysMenuRole(){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<SysMenuRole> sysMenuRoles = sysMenuRoleMapper.selectMenuRoleList(); |
|||
return rb.success().setData(sysMenuRoles); |
|||
} |
|||
} |
|||
|
@ -1,9 +1,17 @@ |
|||
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 java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:24 |
|||
* @Description |
|||
*/ |
|||
public interface SysPlanMapper { |
|||
@Mapper |
|||
public interface SysPlanMapper extends BaseMapper<SysPlan> { |
|||
List<SysPlan> selectSysPlanList(); |
|||
} |
|||
|
@ -1,4 +1,7 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!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> |
|||
</mapper> |
@ -1,9 +1,48 @@ |
|||
package com.yxt.demo.system.biz.sys_plan; |
|||
|
|||
import com.yxt.demo.system.api.sys_plan.SysPlan; |
|||
import com.yxt.demo.system.api.sys_plan.SysPlanFeign; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:24 |
|||
* @Description |
|||
*/ |
|||
public class SysPlanRest { |
|||
@Api(tags = "自主学习表") |
|||
@RestController |
|||
@RequestMapping("v1/sysPlan") |
|||
public class SysPlanRest implements SysPlanFeign { |
|||
|
|||
@Autowired |
|||
private SysPlanService sysPlanService; |
|||
|
|||
@Override |
|||
public ResultBean saveSysPlan(SysPlan sysPlan) { |
|||
return sysPlanService.saveSysPlan(sysPlan); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean deleteSysPlan(String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = sysPlanService.deleteBySid(sid); |
|||
if (i == 0){ |
|||
return rb.setMsg("删除失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean alterSysPlan(SysPlan sysPlan) { |
|||
return sysPlanService.alterSysPlan(sysPlan); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean selectSysPlan() { |
|||
return sysPlanService.selectSysPlan(); |
|||
} |
|||
} |
|||
|
@ -1,9 +1,45 @@ |
|||
package com.yxt.demo.system.biz.sys_plan; |
|||
|
|||
import com.yxt.demo.system.api.sys_plan.SysPlan; |
|||
import com.yxt.demo.system.jdbc.service.MybatisBaseService; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:24 |
|||
* @Description |
|||
*/ |
|||
public class SysPlanService { |
|||
@Service |
|||
public class SysPlanService extends MybatisBaseService<SysPlanMapper, SysPlan> { |
|||
|
|||
@Autowired |
|||
private SysPlanMapper sysPlanMapper; |
|||
|
|||
public ResultBean saveSysPlan(SysPlan sysPlan){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int insert = baseMapper.insert(sysPlan); |
|||
if (insert == 0){ |
|||
return rb.setMsg("添加失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean alterSysPlan(SysPlan sysPlan) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = baseMapper.updateById(sysPlan); |
|||
if (i == 0){ |
|||
return rb.setMsg("修改失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean selectSysPlan() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<SysPlan> sysPlans = sysPlanMapper.selectSysPlanList(); |
|||
return rb.success().setData(sysPlans); |
|||
} |
|||
} |
|||
|
@ -1,9 +1,14 @@ |
|||
package com.yxt.demo.system.biz.sys_plan_schedule; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.demo.system.api.sys_plan_schedule.SysPlanSchedule; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:25 |
|||
* @Description |
|||
*/ |
|||
public interface SysPlanScheduleMapper { |
|||
@Mapper |
|||
public interface SysPlanScheduleMapper extends BaseMapper<SysPlanSchedule> { |
|||
} |
|||
|
@ -1,9 +1,28 @@ |
|||
package com.yxt.demo.system.biz.sys_plan_schedule; |
|||
|
|||
import com.yxt.demo.system.api.sys_plan_schedule.SysPlanSchedule; |
|||
import com.yxt.demo.system.api.sys_plan_schedule.SysPlanScheduleFeign; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:25 |
|||
* @Description |
|||
*/ |
|||
public class SysPlanScheduleRest { |
|||
@Api(tags = "自主学习计划进度表") |
|||
@RestController |
|||
@RequestMapping("v1/sysPlanSchedule") |
|||
public class SysPlanScheduleRest implements SysPlanScheduleFeign{ |
|||
|
|||
@Autowired |
|||
private SysPlanScheduleService sysPlanScheduleService; |
|||
|
|||
@Override |
|||
public ResultBean alterSysPlanSchedule(SysPlanSchedule sysPlanSchedule) { |
|||
return sysPlanScheduleService.alterSysPlanSchedule(sysPlanSchedule); |
|||
} |
|||
} |
|||
|
@ -1,9 +1,31 @@ |
|||
package com.yxt.demo.system.biz.sys_plan_schedule; |
|||
|
|||
import com.yxt.demo.system.api.sys_plan_schedule.SysPlanSchedule; |
|||
import com.yxt.demo.system.jdbc.service.MybatisBaseService; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:25 |
|||
* @Description |
|||
*/ |
|||
public class SysPlanScheduleService { |
|||
@Service |
|||
public class SysPlanScheduleService extends MybatisBaseService<SysPlanScheduleMapper, SysPlanSchedule> { |
|||
|
|||
|
|||
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(){ |
|||
} |
|||
} |
|||
|
@ -1,4 +1,7 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!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_score.SysScoreMapper"> |
|||
<select id="selectScoreList" resultType="com.yxt.demo.system.api.sys_score.SysScore"> |
|||
select * from sys_score |
|||
</select> |
|||
</mapper> |
@ -1,9 +1,17 @@ |
|||
package com.yxt.demo.system.biz.sys_student_score; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.demo.system.api.sys_student_score.SysStudentScore; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:31 |
|||
* @Description |
|||
*/ |
|||
public interface SysStudentScoreMapper { |
|||
@Mapper |
|||
public interface SysStudentScoreMapper extends BaseMapper<SysStudentScore> { |
|||
List<SysStudentScore> selectStudentScoreList(); |
|||
} |
|||
|
@ -1,4 +1,7 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!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_student_score.SysStudentScoreMapper"> |
|||
<select id="selectStudentScoreList" resultType="com.yxt.demo.system.api.sys_student_score.SysStudentScore"> |
|||
select * from sys_student_score |
|||
</select> |
|||
</mapper> |
@ -1,9 +1,50 @@ |
|||
package com.yxt.demo.system.biz.sys_student_score; |
|||
|
|||
import com.yxt.demo.system.api.sys_student_score.SysStudentScore; |
|||
import com.yxt.demo.system.api.sys_student_score.SysStudentScoreFeign; |
|||
import com.yxt.demo.system.api.sys_user.SysUser; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:29 |
|||
* @Description |
|||
*/ |
|||
public class SysStudentScoreRest { |
|||
@Api(tags = "学生成绩表") |
|||
@RestController |
|||
@RequestMapping("v1/sysstudentscore") |
|||
public class SysStudentScoreRest implements SysStudentScoreFeign { |
|||
|
|||
@Autowired |
|||
private SysStudentScoreService sysStudentScoreService; |
|||
|
|||
@Override |
|||
public ResultBean addStudentScore(SysStudentScore sysStudentScore) { |
|||
return sysStudentScoreService.addStudentScore(sysStudentScore); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean deleteStudentScore(String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = sysStudentScoreService.deleteBySid(sid); |
|||
if (i == 0){ |
|||
return rb.setMsg("删除失败"); |
|||
}else { |
|||
return rb.setMsg("删除成功"); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean alterStudentScore(SysStudentScore sysStudentScore) { |
|||
return sysStudentScoreService.alterStudentScore(sysStudentScore); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean selectStudentScore() { |
|||
return sysStudentScoreService.selectStudentScore(); |
|||
} |
|||
} |
|||
|
@ -1,9 +1,45 @@ |
|||
package com.yxt.demo.system.biz.sys_student_score; |
|||
|
|||
import com.yxt.demo.system.api.sys_student_score.SysStudentScore; |
|||
import com.yxt.demo.system.api.sys_user.SysUser; |
|||
import com.yxt.demo.system.jdbc.service.MybatisBaseService; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:31 |
|||
* @Description |
|||
*/ |
|||
public class SysStudentScoreService { |
|||
@Service |
|||
public class SysStudentScoreService extends MybatisBaseService<SysStudentScoreMapper, SysStudentScore>{ |
|||
|
|||
@Autowired |
|||
private SysStudentScoreMapper sysStudentScoreMapper; |
|||
|
|||
public ResultBean addStudentScore(SysStudentScore sysStudentScore) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
baseMapper.insert(sysStudentScore); |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean alterStudentScore(SysStudentScore sysStudentScore){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
sysStudentScore.setModifyTime(new Date()); |
|||
int i = baseMapper.updateById(sysStudentScore); |
|||
if (i == 0){ |
|||
return rb.setMsg("修改失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean selectStudentScore(){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<SysStudentScore> sysStudentScores = sysStudentScoreMapper.selectStudentScoreList(); |
|||
return rb.success().setData(sysStudentScores); |
|||
} |
|||
} |
|||
|
@ -1,25 +0,0 @@ |
|||
package com.yxt.demo.system.utils; |
|||
|
|||
import com.yxt.demo.system.api.sys_user.SysUser; |
|||
import org.springframework.security.core.context.SecurityContextHolder; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-04-26-14:42 |
|||
*/ |
|||
public class Const{ |
|||
public static final long EXPIRATION_TIME = 3600 * 24 * 7; // 以秒计
|
|||
public static final String SECRET = "sinsinsinsinsinsinnetnetnetnetnetnet"; // JWT密码
|
|||
public static final String TOKEN_PREFIX = "Bearer"; // Token前缀
|
|||
public static final String HEADER_STRING = "Authorization"; // 存放Token的Header Key
|
|||
public static final String AUTHORITY = "admin"; //管理员
|
|||
|
|||
|
|||
public static SysUser getUser(){ |
|||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal(); |
|||
if(principal instanceof SysUser){ |
|||
return (SysUser)principal; |
|||
} |
|||
return null; |
|||
} |
|||
} |
Loading…
Reference in new issue