
43 changed files with 555 additions and 78 deletions
@ -1,14 +1,34 @@ |
|||
package com.yxt.demo.system.api.sys_forum; |
|||
|
|||
import com.yxt.demo.system.api.sys_student_score.SysStudentScore; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
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:21 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "论坛") |
|||
@Api(tags = "论坛表") |
|||
public interface SysForumFeign { |
|||
|
|||
@ApiOperation(value = "添加论坛") |
|||
@RequestMapping("/saveSysForum") |
|||
ResultBean saveSysForum(@RequestBody SysForum sysForum); |
|||
|
|||
@ApiOperation(value = "删除论坛") |
|||
@RequestMapping("/deleteSysForum/{sid}") |
|||
ResultBean deleteSysForum(@PathVariable String sid); |
|||
|
|||
@ApiOperation(value = "修改论坛") |
|||
@RequestMapping("/alterSysForum") |
|||
ResultBean alterSysForum(@RequestBody SysForum sysForum); |
|||
|
|||
@ApiOperation(value = "查询论坛") |
|||
@RequestMapping("/selectSysForum") |
|||
ResultBean selectSysForum(); |
|||
} |
|||
|
@ -1,12 +1,34 @@ |
|||
package com.yxt.demo.system.api.sys_forum_comment; |
|||
|
|||
import com.yxt.demo.system.api.sys_student_score.SysStudentScore; |
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
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:22 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "论坛评论") |
|||
@Api(tags = "论坛评论表") |
|||
public interface SysForumCommentFeign { |
|||
|
|||
@ApiOperation(value = "添加论坛评论") |
|||
@RequestMapping("/saveSysForumComment") |
|||
ResultBean saveSysForumComment(@RequestBody SysForumComment sysForumComment); |
|||
|
|||
@ApiOperation(value = "删除论坛评论") |
|||
@RequestMapping("/deleteSysForumComment/{sid}") |
|||
ResultBean deleteSysForumComment(@PathVariable String sid); |
|||
|
|||
@ApiOperation(value = "修改论坛评论") |
|||
@RequestMapping("/alterSysForumComment") |
|||
ResultBean alterSysForumComment(@RequestBody SysForumComment sysForumComment); |
|||
|
|||
@ApiOperation(value = "查询论坛评论") |
|||
@RequestMapping("/selectSysForumComment") |
|||
ResultBean selectSysForumComment(); |
|||
} |
|||
|
@ -1,12 +1,33 @@ |
|||
package com.yxt.demo.system.api.sys_notice; |
|||
|
|||
import com.yxt.demo.system.utils.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
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:23 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "公告") |
|||
@Api(tags = "公告表") |
|||
public interface SysNoticeFeign { |
|||
|
|||
@ApiOperation(value = "增加公告") |
|||
@RequestMapping("/saveSysNotice") |
|||
ResultBean saveSysNotice(@RequestBody SysNotice sysNotice); |
|||
|
|||
@ApiOperation(value = "删除公告") |
|||
@RequestMapping("/deleteSysNotice/{sid}") |
|||
ResultBean deleteSysNotice(@PathVariable String sid); |
|||
|
|||
@ApiOperation(value = "修改公告") |
|||
@RequestMapping("/alterSysNotice") |
|||
ResultBean alterSysNotice(@RequestBody SysNotice sysNotice); |
|||
|
|||
@ApiOperation(value = "查询公告") |
|||
@RequestMapping("/selectSysNotice") |
|||
ResultBean selectSysNotice(); |
|||
} |
|||
|
@ -1,12 +1,17 @@ |
|||
package com.yxt.demo.system.biz.sys_forum; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.demo.system.api.sys_forum.SysForum; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:21 |
|||
* @Description |
|||
*/ |
|||
@Mapper |
|||
public interface SysForumMapper { |
|||
public interface SysForumMapper extends BaseMapper<SysForum> { |
|||
List<SysForum> selectSysForumList(); |
|||
} |
|||
|
@ -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_forum.SysForumMapper"> |
|||
<select id="selectSysForumList" resultType="com.yxt.demo.system.api.sys_forum.SysForum"> |
|||
select * from sys_forum |
|||
</select> |
|||
</mapper> |
@ -1,9 +1,48 @@ |
|||
package com.yxt.demo.system.biz.sys_forum; |
|||
|
|||
import com.yxt.demo.system.api.sys_forum.SysForum; |
|||
import com.yxt.demo.system.api.sys_forum.SysForumFeign; |
|||
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:21 |
|||
* @Description |
|||
*/ |
|||
public class SysForumRest { |
|||
@Api(tags = "论坛表") |
|||
@RequestMapping("v1/sysforum") |
|||
@RestController |
|||
public class SysForumRest implements SysForumFeign { |
|||
|
|||
@Autowired |
|||
private SysForumService sysForumService; |
|||
|
|||
@Override |
|||
public ResultBean saveSysForum(SysForum sysForum) { |
|||
return sysForumService.saveSysForum(sysForum); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean deleteSysForum(String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = sysForumService.deleteBySid(sid); |
|||
if (i == 0){ |
|||
return rb.setMsg("删除失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean alterSysForum(SysForum sysForum) { |
|||
return sysForumService.alterSysForum(sysForum); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean selectSysForum() { |
|||
return sysForumService.selectSysForum(); |
|||
} |
|||
} |
|||
|
@ -1,9 +1,47 @@ |
|||
package com.yxt.demo.system.biz.sys_forum; |
|||
|
|||
import com.yxt.demo.system.api.sys_forum.SysForum; |
|||
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:21 |
|||
* @Description |
|||
*/ |
|||
public class SysForumService { |
|||
@Service |
|||
public class SysForumService extends MybatisBaseService<SysForumMapper, SysForum> { |
|||
|
|||
@Autowired |
|||
private SysForumMapper sysForumMapper; |
|||
|
|||
public ResultBean saveSysForum(SysForum sysForum) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int insert = sysForumMapper.insert(sysForum); |
|||
if (insert == 0){ |
|||
return rb.setMsg("添加失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean alterSysForum(SysForum sysForum) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
sysForum.setModifyTime(new Date()); |
|||
int i = baseMapper.updateById(sysForum); |
|||
if (i == 0){ |
|||
return rb.setMsg("修改失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean selectSysForum() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<SysForum> sysForums = sysForumMapper.selectSysForumList(); |
|||
return rb.success().setData(sysForums); |
|||
} |
|||
} |
|||
|
@ -1,9 +1,17 @@ |
|||
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 java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:22 |
|||
* @Description |
|||
*/ |
|||
public interface SysForumCommentMapper { |
|||
@Mapper |
|||
public interface SysForumCommentMapper extends BaseMapper<SysForumComment> { |
|||
List<SysForumComment> selectSysForumCommentList(); |
|||
} |
|||
|
@ -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_forum_comment.SysForumCommentMapper"> |
|||
<select id="selectSysForumCommentList" resultType="com.yxt.demo.system.api.sys_forum_comment.SysForumComment"> |
|||
select * from sys_forum_comment |
|||
</select> |
|||
</mapper> |
@ -1,9 +1,50 @@ |
|||
package com.yxt.demo.system.biz.sys_forum_comment; |
|||
|
|||
import com.yxt.demo.system.api.sys_forum.SysForum; |
|||
import com.yxt.demo.system.api.sys_forum.SysForumFeign; |
|||
import com.yxt.demo.system.api.sys_forum_comment.SysForumComment; |
|||
import com.yxt.demo.system.api.sys_forum_comment.SysForumCommentFeign; |
|||
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:22 |
|||
* @Description |
|||
*/ |
|||
public class SysForumCommentRest { |
|||
@Api(tags = "论坛评论表") |
|||
@RestController |
|||
@RequestMapping("v1/sysforumcommen") |
|||
public class SysForumCommentRest implements SysForumCommentFeign { |
|||
|
|||
@Autowired |
|||
private SysForumCommentService sysForumCommentService; |
|||
|
|||
@Override |
|||
public ResultBean saveSysForumComment(SysForumComment sysForumComment) { |
|||
return sysForumCommentService.saveSysForumComment(sysForumComment); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean deleteSysForumComment(String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = sysForumCommentService.deleteBySid(sid); |
|||
if (i == 0){ |
|||
return rb.setMsg("删除失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean alterSysForumComment(SysForumComment sysForumComment) { |
|||
return sysForumCommentService.alterSysForumComment(sysForumComment); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean selectSysForumComment() { |
|||
return sysForumCommentService.selectSysForumComment(); |
|||
} |
|||
} |
|||
|
@ -1,9 +1,49 @@ |
|||
package com.yxt.demo.system.biz.sys_forum_comment; |
|||
|
|||
import com.yxt.demo.system.api.sys_forum.SysForum; |
|||
import com.yxt.demo.system.api.sys_forum_comment.SysForumComment; |
|||
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:22 |
|||
* @Description |
|||
*/ |
|||
public class SysForumCommentService { |
|||
@Service |
|||
public class SysForumCommentService extends MybatisBaseService<SysForumCommentMapper, SysForumComment> { |
|||
|
|||
@Autowired |
|||
private SysForumCommentMapper sysForumCommentMapper; |
|||
|
|||
public ResultBean saveSysForumComment(SysForumComment sysForumComment) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int insert = sysForumCommentMapper.insert(sysForumComment); |
|||
if (insert == 0){ |
|||
return rb.setMsg("添加失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean alterSysForumComment(SysForumComment sysForumComment) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = sysForumCommentMapper.updateById(sysForumComment); |
|||
if (i == 0){ |
|||
return rb.setMsg("修改失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean selectSysForumComment() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<SysForumComment> sysForumComments = sysForumCommentMapper.selectSysForumCommentList(); |
|||
if (sysForumComments == null){ |
|||
return rb.setMsg("查询失败"); |
|||
} |
|||
return rb.success().setData(sysForumComments); |
|||
} |
|||
} |
|||
|
@ -1,12 +1,17 @@ |
|||
package com.yxt.demo.system.biz.sys_notice; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.demo.system.api.sys_notice.SysNotice; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/4/24 14:14 |
|||
* @Description |
|||
*/ |
|||
@Mapper |
|||
public interface SysNoticeMapper { |
|||
public interface SysNoticeMapper extends BaseMapper<SysNotice> { |
|||
List<SysNotice> selectSysNoticeList(); |
|||
} |
|||
|
@ -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_notice.SysNoticeMapper"> |
|||
<select id="selectSysNoticeList" resultType="com.yxt.demo.system.api.sys_notice.SysNotice"> |
|||
select * from sys_notice |
|||
</select> |
|||
</mapper> |
@ -1,9 +1,48 @@ |
|||
package com.yxt.demo.system.biz.sys_notice; |
|||
|
|||
import com.yxt.demo.system.api.sys_notice.SysNotice; |
|||
import com.yxt.demo.system.api.sys_notice.SysNoticeFeign; |
|||
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:23 |
|||
* @Description |
|||
*/ |
|||
public class SysNoticeRest { |
|||
@Api(tags = "公告表") |
|||
@RequestMapping("v1/sysnatic") |
|||
@RestController |
|||
public class SysNoticeRest implements SysNoticeFeign { |
|||
|
|||
@Autowired |
|||
private SysNoticeService sysNoticeService; |
|||
|
|||
@Override |
|||
public ResultBean saveSysNotice(SysNotice sysNotice) { |
|||
return sysNoticeService.saveSysNotice(sysNotice); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean deleteSysNotice(String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = sysNoticeService.deleteBySid(sid); |
|||
if (i == 0){ |
|||
return rb.setMsg("删除失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean alterSysNotice(SysNotice sysNotice) { |
|||
return sysNoticeService.alterSysNotice(sysNotice); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean selectSysNotice() { |
|||
return sysNoticeService.selectSysNotice(); |
|||
} |
|||
} |
|||
|
@ -1,12 +1,47 @@ |
|||
package com.yxt.demo.system.biz.sys_notice; |
|||
|
|||
import com.yxt.demo.system.api.sys_notice.SysNotice; |
|||
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:13 |
|||
* @Description |
|||
*/ |
|||
@Service |
|||
public class SysNoticeService { |
|||
public class SysNoticeService extends MybatisBaseService<SysNoticeMapper, SysNotice> { |
|||
|
|||
@Autowired |
|||
private SysNoticeMapper sysNoticeMapper; |
|||
|
|||
public ResultBean saveSysNotice(SysNotice sysNotice) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int insert = baseMapper.insert(sysNotice); |
|||
if (insert == 0){ |
|||
return rb.setMsg("添加失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean alterSysNotice(SysNotice sysNotice) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
sysNotice.setModifyTime(new Date()); |
|||
int i = baseMapper.updateById(sysNotice); |
|||
if (i == 0){ |
|||
return rb.setMsg("修改失败"); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean selectSysNotice() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<SysNotice> sysNotices = sysNoticeMapper.selectSysNoticeList(); |
|||
return rb.success().setData(sysNotices); |
|||
} |
|||
} |
|||
|
@ -1,4 +1,16 @@ |
|||
<?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_schedule.SysPlanScheduleMapper"> |
|||
<update id="updateSysPlanScheduleBySid" parameterType="com.yxt.demo.system.api.sys_plan_schedule.SysPlanSchedule"> |
|||
update sys_plan_schedule |
|||
<set> |
|||
<if test="planContent != null"> |
|||
planContent = #{planContent}, |
|||
</if> |
|||
<if test="planOpinion != null"> |
|||
planOpinion=#{planOpinion}, |
|||
</if> |
|||
</set> |
|||
where planSid=#{planSid} |
|||
</update> |
|||
</mapper> |
Loading…
Reference in new issue