Administrator 1 vuosi sitten
vanhempi
commit
07bd0d49f9

+ 105 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/notice/XiaoyuanInfoController.java

@@ -0,0 +1,105 @@
+package com.ruoyi.web.controller.notice;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.notice.XiaoyuanInfo;
+import com.ruoyi.system.service.notice.IXiaoyuanInfoService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 校园安全信息Controller
+ * 
+ * @author boman
+ * @date 2023-08-01
+ */
+@RestController
+@RequestMapping("/system/xiaoYuanInfo")
+public class XiaoyuanInfoController extends BaseController
+{
+    @Autowired
+    private IXiaoyuanInfoService xiaoyuanInfoService;
+
+    /**
+     * 查询校园安全信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:xiaoYuanInfo:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(XiaoyuanInfo xiaoyuanInfo)
+    {
+        List<XiaoyuanInfo> list = xiaoyuanInfoService.selectXiaoyuanInfoList(xiaoyuanInfo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出校园安全信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:xiaoYuanInfo:export')")
+    @Log(title = "校园安全信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, XiaoyuanInfo xiaoyuanInfo)
+    {
+        List<XiaoyuanInfo> list = xiaoyuanInfoService.selectXiaoyuanInfoList(xiaoyuanInfo);
+        ExcelUtil<XiaoyuanInfo> util = new ExcelUtil<XiaoyuanInfo>(XiaoyuanInfo.class);
+        util.exportExcel(response, list, "校园安全信息数据");
+    }
+
+    /**
+     * 获取校园安全信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:xiaoYuanInfo:query')")
+    @GetMapping(value = "/{infoId}")
+    public AjaxResult getInfo(@PathVariable("infoId") Long infoId)
+    {
+        return success(xiaoyuanInfoService.selectXiaoyuanInfoByInfoId(infoId));
+    }
+
+    /**
+     * 新增校园安全信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:xiaoYuanInfo:add')")
+    @Log(title = "校园安全信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody XiaoyuanInfo xiaoyuanInfo)
+    {
+        return toAjax(xiaoyuanInfoService.insertXiaoyuanInfo(xiaoyuanInfo));
+    }
+
+    /**
+     * 修改校园安全信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:xiaoYuanInfo:edit')")
+    @Log(title = "校园安全信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody XiaoyuanInfo xiaoyuanInfo)
+    {
+        return toAjax(xiaoyuanInfoService.updateXiaoyuanInfo(xiaoyuanInfo));
+    }
+
+    /**
+     * 删除校园安全信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:xiaoYuanInfo:remove')")
+    @Log(title = "校园安全信息", businessType = BusinessType.DELETE)
+	@GetMapping("/delete/{infoIds}")
+    public AjaxResult remove(@PathVariable Long[] infoIds)
+    {
+        return toAjax(xiaoyuanInfoService.deleteXiaoyuanInfoByInfoIds(infoIds));
+    }
+}

+ 105 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/notice/XiaoyuanInfoDianzanController.java

@@ -0,0 +1,105 @@
+package com.ruoyi.web.controller.notice;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.notice.XiaoyuanInfoDianzan;
+import com.ruoyi.system.service.notice.IXiaoyuanInfoDianzanService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 校园安全信息点赞Controller
+ * 
+ * @author boman
+ * @date 2023-08-01
+ */
+@RestController
+@RequestMapping("/system/dianzan")
+public class XiaoyuanInfoDianzanController extends BaseController
+{
+    @Autowired
+    private IXiaoyuanInfoDianzanService xiaoyuanInfoDianzanService;
+
+    /**
+     * 查询校园安全信息点赞列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:dianzan:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(XiaoyuanInfoDianzan xiaoyuanInfoDianzan)
+    {
+        startPage();
+        List<XiaoyuanInfoDianzan> list = xiaoyuanInfoDianzanService.selectXiaoyuanInfoDianzanList(xiaoyuanInfoDianzan);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出校园安全信息点赞列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:dianzan:export')")
+    @Log(title = "校园安全信息点赞", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, XiaoyuanInfoDianzan xiaoyuanInfoDianzan)
+    {
+        List<XiaoyuanInfoDianzan> list = xiaoyuanInfoDianzanService.selectXiaoyuanInfoDianzanList(xiaoyuanInfoDianzan);
+        ExcelUtil<XiaoyuanInfoDianzan> util = new ExcelUtil<XiaoyuanInfoDianzan>(XiaoyuanInfoDianzan.class);
+        util.exportExcel(response, list, "校园安全信息点赞数据");
+    }
+
+    /**
+     * 获取校园安全信息点赞详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:dianzan:query')")
+    @GetMapping(value = "/{infoDianzanId}")
+    public AjaxResult getInfo(@PathVariable("infoDianzanId") Long infoDianzanId)
+    {
+        return success(xiaoyuanInfoDianzanService.selectXiaoyuanInfoDianzanByInfoDianzanId(infoDianzanId));
+    }
+
+    /**
+     * 新增校园安全信息点赞
+     */
+    @PreAuthorize("@ss.hasPermi('system:dianzan:add')")
+    @Log(title = "校园安全信息点赞", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody XiaoyuanInfoDianzan xiaoyuanInfoDianzan)
+    {
+        return toAjax(xiaoyuanInfoDianzanService.insertXiaoyuanInfoDianzan(xiaoyuanInfoDianzan));
+    }
+
+    /**
+     * 修改校园安全信息点赞
+     */
+    @PreAuthorize("@ss.hasPermi('system:dianzan:edit')")
+    @Log(title = "校园安全信息点赞", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody XiaoyuanInfoDianzan xiaoyuanInfoDianzan)
+    {
+        return toAjax(xiaoyuanInfoDianzanService.updateXiaoyuanInfoDianzan(xiaoyuanInfoDianzan));
+    }
+
+    /**
+     * 删除校园安全信息点赞
+     */
+    @PreAuthorize("@ss.hasPermi('system:dianzan:remove')")
+    @Log(title = "校园安全信息点赞", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{infoDianzanIds}")
+    public AjaxResult remove(@PathVariable Long[] infoDianzanIds)
+    {
+        return toAjax(xiaoyuanInfoDianzanService.deleteXiaoyuanInfoDianzanByInfoDianzanIds(infoDianzanIds));
+    }
+}

+ 182 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/notice/InfoPinglun.java

@@ -0,0 +1,182 @@
+package com.ruoyi.system.domain.notice;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 校园安全信息评论对象 info_pinglun
+ * 
+ * @author boman
+ * @date 2023-08-01
+ */
+public class InfoPinglun extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 校园安全信息评论id */
+    private Long infoPingLunId;
+
+    /** 校园安全信息id */
+    @Excel(name = "校园安全信息id")
+    private Long infoId;
+
+    /** 校园安全信息父id */
+    @Excel(name = "校园安全信息父id")
+    private Long infoPingLunParent;
+
+    /** 评论内容 */
+    @Excel(name = "评论内容")
+    private String infoPingLunContent;
+
+    /** 头像地址 */
+    @Excel(name = "头像地址")
+    private String avatar;
+
+    /** 评论人id */
+    @Excel(name = "评论人id")
+    private Long infoPingLunUserId;
+
+    /** 评论人名称 */
+    @Excel(name = "评论人名称")
+    private String infoPingLunUserName;
+
+    /** 被评论人id */
+    @Excel(name = "被评论人id")
+    private Long infoPingLunQuiltUserId;
+
+    /** 被评论人名称 */
+    @Excel(name = "被评论人名称")
+    private String infoPingLunQuiltUserName;
+
+    /** 评论时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "评论时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date pingLunTime;
+
+    /** 评论类型 1:评论 2:回复 */
+    @Excel(name = "评论类型 1:评论 2:回复")
+    private String infoPingLunType;
+
+    /** 是否通过 N:未通过 Y:通过 */
+    @Excel(name = "是否通过 N:未通过 Y:通过")
+    private String infoPingLunExamine;
+
+
+    @Override
+    public String toString() {
+        return "InfoPinglun{" +
+                "infoPingLunId=" + infoPingLunId +
+                ", infoId=" + infoId +
+                ", infoPingLunParent=" + infoPingLunParent +
+                ", infoPingLunContent='" + infoPingLunContent + '\'' +
+                ", avatar='" + avatar + '\'' +
+                ", infoPingLunUserId=" + infoPingLunUserId +
+                ", infoPingLunUserName='" + infoPingLunUserName + '\'' +
+                ", infoPingLunQuiltUserId=" + infoPingLunQuiltUserId +
+                ", infoPingLunQuiltUserName='" + infoPingLunQuiltUserName + '\'' +
+                ", pingLunTime=" + pingLunTime +
+                ", infoPingLunType='" + infoPingLunType + '\'' +
+                ", infoPingLunExamine='" + infoPingLunExamine + '\'' +
+                '}';
+    }
+
+    public Long getInfoPingLunId() {
+        return infoPingLunId;
+    }
+
+    public void setInfoPingLunId(Long infoPingLunId) {
+        this.infoPingLunId = infoPingLunId;
+    }
+
+    public Long getInfoId() {
+        return infoId;
+    }
+
+    public void setInfoId(Long infoId) {
+        this.infoId = infoId;
+    }
+
+    public Long getInfoPingLunParent() {
+        return infoPingLunParent;
+    }
+
+    public void setInfoPingLunParent(Long infoPingLunParent) {
+        this.infoPingLunParent = infoPingLunParent;
+    }
+
+    public String getInfoPingLunContent() {
+        return infoPingLunContent;
+    }
+
+    public void setInfoPingLunContent(String infoPingLunContent) {
+        this.infoPingLunContent = infoPingLunContent;
+    }
+
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
+    public Long getInfoPingLunUserId() {
+        return infoPingLunUserId;
+    }
+
+    public void setInfoPingLunUserId(Long infoPingLunUserId) {
+        this.infoPingLunUserId = infoPingLunUserId;
+    }
+
+    public String getInfoPingLunUserName() {
+        return infoPingLunUserName;
+    }
+
+    public void setInfoPingLunUserName(String infoPingLunUserName) {
+        this.infoPingLunUserName = infoPingLunUserName;
+    }
+
+    public Long getInfoPingLunQuiltUserId() {
+        return infoPingLunQuiltUserId;
+    }
+
+    public void setInfoPingLunQuiltUserId(Long infoPingLunQuiltUserId) {
+        this.infoPingLunQuiltUserId = infoPingLunQuiltUserId;
+    }
+
+    public String getInfoPingLunQuiltUserName() {
+        return infoPingLunQuiltUserName;
+    }
+
+    public void setInfoPingLunQuiltUserName(String infoPingLunQuiltUserName) {
+        this.infoPingLunQuiltUserName = infoPingLunQuiltUserName;
+    }
+
+    public Date getPingLunTime() {
+        return pingLunTime;
+    }
+
+    public void setPingLunTime(Date pingLunTime) {
+        this.pingLunTime = pingLunTime;
+    }
+
+    public String getInfoPingLunType() {
+        return infoPingLunType;
+    }
+
+    public void setInfoPingLunType(String infoPingLunType) {
+        this.infoPingLunType = infoPingLunType;
+    }
+
+    public String getInfoPingLunExamine() {
+        return infoPingLunExamine;
+    }
+
+    public void setInfoPingLunExamine(String infoPingLunExamine) {
+        this.infoPingLunExamine = infoPingLunExamine;
+    }
+}

+ 245 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/notice/XiaoyuanInfo.java

@@ -0,0 +1,245 @@
+package com.ruoyi.system.domain.notice;
+
+import java.util.List;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 校园安全信息对象 xiaoyuan_info
+ * 
+ * @author boman
+ * @date 2023-08-01
+ */
+public class XiaoyuanInfo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 校园安全信息id */
+    private Long infoId;
+
+    /** 校园安全信息标题 */
+    @Excel(name = "校园安全信息标题")
+    private String infoTitle;
+
+    /** 信息封面 */
+    @Excel(name = "信息封面")
+    private String infoPhoto;
+
+    /** 学校id */
+    @Excel(name = "学校id")
+    private String schoolId;
+
+    /** 学校名称 */
+    @Excel(name = "学校名称")
+    private String schoolName;
+
+    /** 信息类型(1校园广播 2校园安全) */
+    @Excel(name = "信息类型", readConverterExp = "1=校园广播,2=校园安全")
+    private String infoType;
+
+    /** 信息子分类 */
+    @Excel(name = "信息子分类")
+    private String infoTypeZi;
+
+    /** 信息内容 */
+    @Excel(name = "信息内容")
+    private String infoContent;
+
+    /** 信息状态(0正常 1关闭) */
+    @Excel(name = "信息状态", readConverterExp = "0=正常,1=关闭")
+    private String status;
+
+    /** 发布时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date faBuTime;
+
+    /** 已读人数 */
+    @Excel(name = "已读人数")
+    private String infoYiDu;
+
+    /** 点赞表id */
+    @Excel(name = "点赞表id")
+    private Long infoDianZanId;
+    /** 点赞人数 */
+    @Excel(name = "点赞人数")
+    private String infoDianZan;
+
+    /** 转发人数 */
+    @Excel(name = "转发人数")
+    private String infoZhuanFa;
+
+    /** 信息评论表id */
+    @Excel(name = "信息评论表id")
+    private Long infoPingLunId;
+
+    /** 校园安全信息评论信息 */
+    private List<InfoPinglun> infoPingLunList;
+
+
+
+    public void setInfoId(Long infoId)
+    {
+        this.infoId = infoId;
+    }
+
+    public Long getInfoId() 
+    {
+        return infoId;
+    }
+    public void setInfoTitle(String infoTitle) 
+    {
+        this.infoTitle = infoTitle;
+    }
+
+    public String getInfoTitle() 
+    {
+        return infoTitle;
+    }
+    public void setInfoPhoto(String infoPhoto) 
+    {
+        this.infoPhoto = infoPhoto;
+    }
+
+    public String getInfoPhoto() 
+    {
+        return infoPhoto;
+    }
+
+    public String getSchoolId() {
+        return schoolId;
+    }
+
+    public void setSchoolId(String schoolId) {
+        this.schoolId = schoolId;
+    }
+
+    public void setSchoolName(String schoolName)
+    {
+        this.schoolName = schoolName;
+    }
+
+    public String getSchoolName() 
+    {
+        return schoolName;
+    }
+    public void setInfoType(String infoType) 
+    {
+        this.infoType = infoType;
+    }
+
+    public String getInfoType() 
+    {
+        return infoType;
+    }
+    public void setInfoTypeZi(String infoTypeZi) 
+    {
+        this.infoTypeZi = infoTypeZi;
+    }
+
+    public String getInfoTypeZi() 
+    {
+        return infoTypeZi;
+    }
+    public void setInfoContent(String infoContent) 
+    {
+        this.infoContent = infoContent;
+    }
+
+    public String getInfoContent() 
+    {
+        return infoContent;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+
+
+    public List<InfoPinglun> getInfoPingLunList() {
+        return infoPingLunList;
+    }
+
+    public void setInfoPingLunList(List<InfoPinglun> infoPingLunList) {
+        this.infoPingLunList = infoPingLunList;
+    }
+
+    public Date getFaBuTime() {
+        return faBuTime;
+    }
+
+    public void setFaBuTime(Date faBuTime) {
+        this.faBuTime = faBuTime;
+    }
+
+    public String getInfoYiDu() {
+        return infoYiDu;
+    }
+
+    public void setInfoYiDu(String infoYiDu) {
+        this.infoYiDu = infoYiDu;
+    }
+
+    public Long getInfoDianZanId() {
+        return infoDianZanId;
+    }
+
+    public void setInfoDianZanId(Long infoDianZanId) {
+        this.infoDianZanId = infoDianZanId;
+    }
+
+    public String getInfoDianZan() {
+        return infoDianZan;
+    }
+
+    public void setInfoDianZan(String infoDianZan) {
+        this.infoDianZan = infoDianZan;
+    }
+
+    public String getInfoZhuanFa() {
+        return infoZhuanFa;
+    }
+
+    public void setInfoZhuanFa(String infoZhuanFa) {
+        this.infoZhuanFa = infoZhuanFa;
+    }
+
+    public Long getInfoPingLunId() {
+        return infoPingLunId;
+    }
+
+    public void setInfoPingLunId(Long infoPingLunId) {
+        this.infoPingLunId = infoPingLunId;
+    }
+
+    @Override
+    public String toString() {
+        return "XiaoyuanInfo{" +
+                "infoId=" + infoId +
+                ", infoTitle='" + infoTitle + '\'' +
+                ", infoPhoto='" + infoPhoto + '\'' +
+                ", schoolId=" + schoolId +
+                ", schoolName='" + schoolName + '\'' +
+                ", infoType='" + infoType + '\'' +
+                ", infoTypeZi='" + infoTypeZi + '\'' +
+                ", infoContent='" + infoContent + '\'' +
+                ", status='" + status + '\'' +
+                ", faBuTime=" + faBuTime +
+                ", infoYiDu='" + infoYiDu + '\'' +
+                ", infoDianZanId=" + infoDianZanId +
+                ", infoDianZan='" + infoDianZan + '\'' +
+                ", infoZhuanFa='" + infoZhuanFa + '\'' +
+                ", infoPingLunId=" + infoPingLunId +
+                ", infoPinglunList=" + infoPingLunList +
+                '}';
+    }
+}

+ 84 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/notice/XiaoyuanInfoDianzan.java

@@ -0,0 +1,84 @@
+package com.ruoyi.system.domain.notice;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 校园安全信息点赞对象 xiaoyuan_info_dianzan
+ * 
+ * @author boman
+ * @date 2023-08-01
+ */
+public class XiaoyuanInfoDianzan extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 校园安全信息点赞id */
+    private Long infoDianzanId;
+
+    /** 校园安全信息id */
+    @Excel(name = "校园安全信息id")
+    private Long infoId;
+
+    /** 点赞人id */
+    @Excel(name = "点赞人id")
+    private Long dianzanUserId;
+
+    /** 是否点赞 N:否 Y:是 */
+    @Excel(name = "是否点赞 N:否 Y:是")
+    private String dianzanType;
+
+    public void setInfoDianzanId(Long infoDianzanId) 
+    {
+        this.infoDianzanId = infoDianzanId;
+    }
+
+    public Long getInfoDianzanId() 
+    {
+        return infoDianzanId;
+    }
+    public void setInfoId(Long infoId) 
+    {
+        this.infoId = infoId;
+    }
+
+    public Long getInfoId() 
+    {
+        return infoId;
+    }
+    public void setDianzanUserId(Long dianzanUserId) 
+    {
+        this.dianzanUserId = dianzanUserId;
+    }
+
+    public Long getDianzanUserId() 
+    {
+        return dianzanUserId;
+    }
+    public void setDianzanType(String dianzanType) 
+    {
+        this.dianzanType = dianzanType;
+    }
+
+    public String getDianzanType() 
+    {
+        return dianzanType;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("infoDianzanId", getInfoDianzanId())
+            .append("infoId", getInfoId())
+            .append("dianzanUserId", getDianzanUserId())
+            .append("dianzanType", getDianzanType())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 62 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/notice/XiaoyuanInfoDianzanMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.mapper.notice;
+
+import com.ruoyi.system.domain.notice.XiaoyuanInfoDianzan;
+
+import java.util.List;
+
+/**
+ * 校园安全信息点赞Mapper接口
+ * 
+ * @author boman
+ * @date 2023-08-01
+ */
+public interface XiaoyuanInfoDianzanMapper 
+{
+    /**
+     * 查询校园安全信息点赞
+     * 
+     * @param infoDianzanId 校园安全信息点赞主键
+     * @return 校园安全信息点赞
+     */
+    public XiaoyuanInfoDianzan selectXiaoyuanInfoDianzanByInfoDianzanId(Long infoDianzanId);
+
+    /**
+     * 查询校园安全信息点赞列表
+     * 
+     * @param xiaoyuanInfoDianzan 校园安全信息点赞
+     * @return 校园安全信息点赞集合
+     */
+    public List<XiaoyuanInfoDianzan> selectXiaoyuanInfoDianzanList(XiaoyuanInfoDianzan xiaoyuanInfoDianzan);
+
+    /**
+     * 新增校园安全信息点赞
+     * 
+     * @param xiaoyuanInfoDianzan 校园安全信息点赞
+     * @return 结果
+     */
+    public int insertXiaoyuanInfoDianzan(XiaoyuanInfoDianzan xiaoyuanInfoDianzan);
+
+    /**
+     * 修改校园安全信息点赞
+     * 
+     * @param xiaoyuanInfoDianzan 校园安全信息点赞
+     * @return 结果
+     */
+    public int updateXiaoyuanInfoDianzan(XiaoyuanInfoDianzan xiaoyuanInfoDianzan);
+
+    /**
+     * 删除校园安全信息点赞
+     * 
+     * @param infoDianzanId 校园安全信息点赞主键
+     * @return 结果
+     */
+    public int deleteXiaoyuanInfoDianzanByInfoDianzanId(Long infoDianzanId);
+
+    /**
+     * 批量删除校园安全信息点赞
+     * 
+     * @param infoDianzanIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteXiaoyuanInfoDianzanByInfoDianzanIds(Long[] infoDianzanIds);
+}

+ 88 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/notice/XiaoyuanInfoMapper.java

@@ -0,0 +1,88 @@
+package com.ruoyi.system.mapper.notice;
+
+import com.ruoyi.system.domain.notice.InfoPinglun;
+import com.ruoyi.system.domain.notice.XiaoyuanInfo;
+
+import java.util.List;
+
+/**
+ * 校园安全信息Mapper接口
+ * 
+ * @author boman
+ * @date 2023-08-01
+ */
+public interface XiaoyuanInfoMapper 
+{
+    /**
+     * 查询校园安全信息
+     * 
+     * @param infoId 校园安全信息主键
+     * @return 校园安全信息
+     */
+    public XiaoyuanInfo selectXiaoyuanInfoByInfoId(Long infoId);
+
+    /**
+     * 查询校园安全信息列表
+     * 
+     * @param xiaoyuanInfo 校园安全信息
+     * @return 校园安全信息集合
+     */
+    public List<XiaoyuanInfo> selectXiaoyuanInfoList(XiaoyuanInfo xiaoyuanInfo);
+
+    /**
+     * 新增校园安全信息
+     * 
+     * @param xiaoyuanInfo 校园安全信息
+     * @return 结果
+     */
+    public int insertXiaoyuanInfo(XiaoyuanInfo xiaoyuanInfo);
+
+    /**
+     * 修改校园安全信息
+     * 
+     * @param xiaoyuanInfo 校园安全信息
+     * @return 结果
+     */
+    public int updateXiaoyuanInfo(XiaoyuanInfo xiaoyuanInfo);
+
+    /**
+     * 删除校园安全信息
+     * 
+     * @param infoId 校园安全信息主键
+     * @return 结果
+     */
+    public int deleteXiaoyuanInfoByInfoId(Long infoId);
+
+    /**
+     * 批量删除校园安全信息
+     * 
+     * @param infoIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteXiaoyuanInfoByInfoIds(Long[] infoIds);
+
+    /**
+     * 批量删除校园安全信息评论
+     * 
+     * @param infoIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteInfoPinglunByInfoIds(Long[] infoIds);
+    
+    /**
+     * 批量新增校园安全信息评论
+     * 
+     * @param infoPinglunList 校园安全信息评论列表
+     * @return 结果
+     */
+    public int batchInfoPinglun(List<InfoPinglun> infoPinglunList);
+    
+
+    /**
+     * 通过校园安全信息主键删除校园安全信息评论信息
+     * 
+     * @param infoId 校园安全信息ID
+     * @return 结果
+     */
+    public int deleteInfoPinglunByInfoId(Long infoId);
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/notice/XiaoyuanInfoDianzanServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl.notice;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.notice.XiaoyuanInfoDianzan;
+import com.ruoyi.system.mapper.notice.XiaoyuanInfoDianzanMapper;
+import com.ruoyi.system.service.notice.IXiaoyuanInfoDianzanService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 校园安全信息点赞Service业务层处理
+ * 
+ * @author boman
+ * @date 2023-08-01
+ */
+@Service
+public class XiaoyuanInfoDianzanServiceImpl implements IXiaoyuanInfoDianzanService
+{
+    @Autowired
+    private XiaoyuanInfoDianzanMapper xiaoyuanInfoDianzanMapper;
+
+    /**
+     * 查询校园安全信息点赞
+     * 
+     * @param infoDianzanId 校园安全信息点赞主键
+     * @return 校园安全信息点赞
+     */
+    @Override
+    public XiaoyuanInfoDianzan selectXiaoyuanInfoDianzanByInfoDianzanId(Long infoDianzanId)
+    {
+        return xiaoyuanInfoDianzanMapper.selectXiaoyuanInfoDianzanByInfoDianzanId(infoDianzanId);
+    }
+
+    /**
+     * 查询校园安全信息点赞列表
+     * 
+     * @param xiaoyuanInfoDianzan 校园安全信息点赞
+     * @return 校园安全信息点赞
+     */
+    @Override
+    public List<XiaoyuanInfoDianzan> selectXiaoyuanInfoDianzanList(XiaoyuanInfoDianzan xiaoyuanInfoDianzan)
+    {
+        return xiaoyuanInfoDianzanMapper.selectXiaoyuanInfoDianzanList(xiaoyuanInfoDianzan);
+    }
+
+    /**
+     * 新增校园安全信息点赞
+     * 
+     * @param xiaoyuanInfoDianzan 校园安全信息点赞
+     * @return 结果
+     */
+    @Override
+    public int insertXiaoyuanInfoDianzan(XiaoyuanInfoDianzan xiaoyuanInfoDianzan)
+    {
+        xiaoyuanInfoDianzan.setCreateTime(DateUtils.getNowDate());
+        return xiaoyuanInfoDianzanMapper.insertXiaoyuanInfoDianzan(xiaoyuanInfoDianzan);
+    }
+
+    /**
+     * 修改校园安全信息点赞
+     * 
+     * @param xiaoyuanInfoDianzan 校园安全信息点赞
+     * @return 结果
+     */
+    @Override
+    public int updateXiaoyuanInfoDianzan(XiaoyuanInfoDianzan xiaoyuanInfoDianzan)
+    {
+        xiaoyuanInfoDianzan.setUpdateTime(DateUtils.getNowDate());
+        return xiaoyuanInfoDianzanMapper.updateXiaoyuanInfoDianzan(xiaoyuanInfoDianzan);
+    }
+
+    /**
+     * 批量删除校园安全信息点赞
+     * 
+     * @param infoDianzanIds 需要删除的校园安全信息点赞主键
+     * @return 结果
+     */
+    @Override
+    public int deleteXiaoyuanInfoDianzanByInfoDianzanIds(Long[] infoDianzanIds)
+    {
+        return xiaoyuanInfoDianzanMapper.deleteXiaoyuanInfoDianzanByInfoDianzanIds(infoDianzanIds);
+    }
+
+    /**
+     * 删除校园安全信息点赞信息
+     * 
+     * @param infoDianzanId 校园安全信息点赞主键
+     * @return 结果
+     */
+    @Override
+    public int deleteXiaoyuanInfoDianzanByInfoDianzanId(Long infoDianzanId)
+    {
+        return xiaoyuanInfoDianzanMapper.deleteXiaoyuanInfoDianzanByInfoDianzanId(infoDianzanId);
+    }
+}

+ 193 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/notice/XiaoyuanInfoServiceImpl.java

@@ -0,0 +1,193 @@
+package com.ruoyi.system.service.impl.notice;
+
+import java.util.List;
+
+import com.ruoyi.common.core.domain.entity.FormalParentsStudent;
+import com.ruoyi.common.core.domain.entity.FormalTeacherClass;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.domain.notice.InfoPinglun;
+import com.ruoyi.system.domain.notice.XiaoyuanInfo;
+import com.ruoyi.system.mapper.FormalParentsStudentMapper;
+import com.ruoyi.system.mapper.FormalTeacherClassMapper;
+import com.ruoyi.system.mapper.notice.XiaoyuanInfoMapper;
+import com.ruoyi.system.service.notice.IXiaoyuanInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.ArrayList;
+import java.util.Map;
+
+import com.ruoyi.common.utils.StringUtils;
+import org.springframework.transaction.annotation.Transactional;
+
+import static com.ruoyi.common.utils.PageUtils.startPage;
+
+/**
+ * 校园安全信息Service业务层处理
+ * 
+ * @author boman
+ * @date 2023-08-01
+ */
+@Service
+public class XiaoyuanInfoServiceImpl implements IXiaoyuanInfoService
+{
+    @Autowired
+    private XiaoyuanInfoMapper xiaoyuanInfoMapper;
+
+    @Autowired
+    private FormalTeacherClassMapper formalTeacherClassMapper;
+    @Autowired
+    private FormalParentsStudentMapper formalParentsStudentMapper;
+
+    /**
+     * 查询校园安全信息
+     * 
+     * @param infoId 校园安全信息主键
+     * @return 校园安全信息
+     */
+    @Override
+    public XiaoyuanInfo selectXiaoyuanInfoByInfoId(Long infoId)
+    {
+        return xiaoyuanInfoMapper.selectXiaoyuanInfoByInfoId(infoId);
+    }
+
+    /**
+     * 查询校园安全信息列表
+     * 
+     * @param xiaoyuanInfo 校园安全信息
+     * @return 校园安全信息
+     */
+    @Override
+    public List<XiaoyuanInfo> selectXiaoyuanInfoList(XiaoyuanInfo xiaoyuanInfo)
+    {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        StringBuilder schoolId = new StringBuilder("0,");
+        Map<String, Object> params = xiaoyuanInfo.getParams();
+        String role = "admin";
+        if (params != null && params.size() > 0) {
+            role = (String) params.get("role");
+        }
+        List<XiaoyuanInfo> xiaoyuanInfoList = new ArrayList<>();
+        if ("teacher".equals(role)) {
+            FormalTeacherClass formalTeacherClass = new FormalTeacherClass();
+            formalTeacherClass.setTeacherId(user.getUserId());
+            List<FormalTeacherClass> formalTeacherClasses = formalTeacherClassMapper.selectFormalTeacherClassList(formalTeacherClass);
+            if (formalTeacherClasses != null && formalTeacherClasses.size() > 0) {
+                for (FormalTeacherClass teacherClass : formalTeacherClasses) {
+                    schoolId.append(teacherClass.getClassId()).append(",");
+                }
+            }
+            if (StringUtils.isNotBlank(schoolId.toString())) {
+                schoolId = new StringBuilder(schoolId.substring(0, schoolId.length() - 1));
+            }
+            startPage();
+            xiaoyuanInfo.setSchoolId(schoolId.toString());
+            xiaoyuanInfoList = xiaoyuanInfoMapper.selectXiaoyuanInfoList(xiaoyuanInfo);
+        } else if ("parents".equals(role)) {
+            FormalParentsStudent formalParentsStudent = new FormalParentsStudent();
+            formalParentsStudent.setParentsId(user.getUserId());
+            List<FormalParentsStudent> formalParentsStudents = formalParentsStudentMapper.selectFormalParentsStudentList(formalParentsStudent);
+            for (FormalParentsStudent parentsStudent : formalParentsStudents) {
+                schoolId.append(parentsStudent.getClassId()).append(",");
+            }
+            if (StringUtils.isNotBlank(schoolId.toString())) {
+                schoolId = new StringBuilder(schoolId.substring(0, schoolId.length() - 1));
+            }
+            startPage();
+            xiaoyuanInfo.setSchoolId(schoolId.toString());
+            xiaoyuanInfoList = xiaoyuanInfoMapper.selectXiaoyuanInfoList(xiaoyuanInfo);
+        } else if ("admin".equals(role)) {
+            startPage();
+            xiaoyuanInfoList = xiaoyuanInfoMapper.selectXiaoyuanInfoList(xiaoyuanInfo);
+        }
+        return xiaoyuanInfoList;
+    }
+
+    /**
+     * 新增校园安全信息
+     * 
+     * @param xiaoyuanInfo 校园安全信息
+     * @return 结果
+     */
+    @Transactional
+    @Override
+    public int insertXiaoyuanInfo(XiaoyuanInfo xiaoyuanInfo)
+    {
+        Long schoolId = SecurityUtils.getLoginUser().getDeptId();
+        xiaoyuanInfo.setSchoolId(String.valueOf(schoolId));
+        xiaoyuanInfo.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUser().getUserId()));
+        xiaoyuanInfo.setCreateTime(DateUtils.getNowDate());
+        int rows = xiaoyuanInfoMapper.insertXiaoyuanInfo(xiaoyuanInfo);
+        insertInfoPinglun(xiaoyuanInfo);
+        return rows;
+    }
+
+    /**
+     * 修改校园安全信息
+     * 
+     * @param xiaoyuanInfo 校园安全信息
+     * @return 结果
+     */
+    @Transactional
+    @Override
+    public int updateXiaoyuanInfo(XiaoyuanInfo xiaoyuanInfo)
+    {
+        xiaoyuanInfo.setUpdateTime(DateUtils.getNowDate());
+        xiaoyuanInfoMapper.deleteInfoPinglunByInfoId(xiaoyuanInfo.getInfoId());
+        insertInfoPinglun(xiaoyuanInfo);
+        return xiaoyuanInfoMapper.updateXiaoyuanInfo(xiaoyuanInfo);
+    }
+
+    /**
+     * 批量删除校园安全信息
+     * 
+     * @param infoIds 需要删除的校园安全信息主键
+     * @return 结果
+     */
+    @Transactional
+    @Override
+    public int deleteXiaoyuanInfoByInfoIds(Long[] infoIds)
+    {
+        xiaoyuanInfoMapper.deleteInfoPinglunByInfoIds(infoIds);
+        return xiaoyuanInfoMapper.deleteXiaoyuanInfoByInfoIds(infoIds);
+    }
+
+    /**
+     * 删除校园安全信息信息
+     * 
+     * @param infoId 校园安全信息主键
+     * @return 结果
+     */
+    @Transactional
+    @Override
+    public int deleteXiaoyuanInfoByInfoId(Long infoId)
+    {
+        xiaoyuanInfoMapper.deleteInfoPinglunByInfoId(infoId);
+        return xiaoyuanInfoMapper.deleteXiaoyuanInfoByInfoId(infoId);
+    }
+
+    /**
+     * 新增校园安全信息评论信息
+     * 
+     * @param xiaoyuanInfo 校园安全信息对象
+     */
+    public void insertInfoPinglun(XiaoyuanInfo xiaoyuanInfo)
+    {
+        List<InfoPinglun> infoPinglunList = xiaoyuanInfo.getInfoPingLunList();
+        Long infoId = xiaoyuanInfo.getInfoId();
+        if (StringUtils.isNotNull(infoPinglunList))
+        {
+            List<InfoPinglun> list = new ArrayList<InfoPinglun>();
+            for (InfoPinglun infoPinglun : infoPinglunList)
+            {
+                infoPinglun.setInfoId(infoId);
+                list.add(infoPinglun);
+            }
+            if (list.size() > 0)
+            {
+                xiaoyuanInfoMapper.batchInfoPinglun(list);
+            }
+        }
+    }
+}

+ 62 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/notice/IXiaoyuanInfoDianzanService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.service.notice;
+
+import com.ruoyi.system.domain.notice.XiaoyuanInfoDianzan;
+
+import java.util.List;
+
+/**
+ * 校园安全信息点赞Service接口
+ * 
+ * @author boman
+ * @date 2023-08-01
+ */
+public interface IXiaoyuanInfoDianzanService 
+{
+    /**
+     * 查询校园安全信息点赞
+     * 
+     * @param infoDianzanId 校园安全信息点赞主键
+     * @return 校园安全信息点赞
+     */
+    public XiaoyuanInfoDianzan selectXiaoyuanInfoDianzanByInfoDianzanId(Long infoDianzanId);
+
+    /**
+     * 查询校园安全信息点赞列表
+     * 
+     * @param xiaoyuanInfoDianzan 校园安全信息点赞
+     * @return 校园安全信息点赞集合
+     */
+    public List<XiaoyuanInfoDianzan> selectXiaoyuanInfoDianzanList(XiaoyuanInfoDianzan xiaoyuanInfoDianzan);
+
+    /**
+     * 新增校园安全信息点赞
+     * 
+     * @param xiaoyuanInfoDianzan 校园安全信息点赞
+     * @return 结果
+     */
+    public int insertXiaoyuanInfoDianzan(XiaoyuanInfoDianzan xiaoyuanInfoDianzan);
+
+    /**
+     * 修改校园安全信息点赞
+     * 
+     * @param xiaoyuanInfoDianzan 校园安全信息点赞
+     * @return 结果
+     */
+    public int updateXiaoyuanInfoDianzan(XiaoyuanInfoDianzan xiaoyuanInfoDianzan);
+
+    /**
+     * 批量删除校园安全信息点赞
+     * 
+     * @param infoDianzanIds 需要删除的校园安全信息点赞主键集合
+     * @return 结果
+     */
+    public int deleteXiaoyuanInfoDianzanByInfoDianzanIds(Long[] infoDianzanIds);
+
+    /**
+     * 删除校园安全信息点赞信息
+     * 
+     * @param infoDianzanId 校园安全信息点赞主键
+     * @return 结果
+     */
+    public int deleteXiaoyuanInfoDianzanByInfoDianzanId(Long infoDianzanId);
+}

+ 62 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/notice/IXiaoyuanInfoService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.service.notice;
+
+import com.ruoyi.system.domain.notice.XiaoyuanInfo;
+
+import java.util.List;
+
+/**
+ * 校园安全信息Service接口
+ * 
+ * @author boman
+ * @date 2023-08-01
+ */
+public interface IXiaoyuanInfoService 
+{
+    /**
+     * 查询校园安全信息
+     * 
+     * @param infoId 校园安全信息主键
+     * @return 校园安全信息
+     */
+    public XiaoyuanInfo selectXiaoyuanInfoByInfoId(Long infoId);
+
+    /**
+     * 查询校园安全信息列表
+     * 
+     * @param xiaoyuanInfo 校园安全信息
+     * @return 校园安全信息集合
+     */
+    public List<XiaoyuanInfo> selectXiaoyuanInfoList(XiaoyuanInfo xiaoyuanInfo);
+
+    /**
+     * 新增校园安全信息
+     * 
+     * @param xiaoyuanInfo 校园安全信息
+     * @return 结果
+     */
+    public int insertXiaoyuanInfo(XiaoyuanInfo xiaoyuanInfo);
+
+    /**
+     * 修改校园安全信息
+     * 
+     * @param xiaoyuanInfo 校园安全信息
+     * @return 结果
+     */
+    public int updateXiaoyuanInfo(XiaoyuanInfo xiaoyuanInfo);
+
+    /**
+     * 批量删除校园安全信息
+     * 
+     * @param infoIds 需要删除的校园安全信息主键集合
+     * @return 结果
+     */
+    public int deleteXiaoyuanInfoByInfoIds(Long[] infoIds);
+
+    /**
+     * 删除校园安全信息信息
+     * 
+     * @param infoId 校园安全信息主键
+     * @return 结果
+     */
+    public int deleteXiaoyuanInfoByInfoId(Long infoId);
+}

+ 86 - 0
ruoyi-system/src/main/resources/mapper/notice/XiaoyuanInfoDianzanMapper.xml

@@ -0,0 +1,86 @@
+<?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.ruoyi.system.mapper.notice.XiaoyuanInfoDianzanMapper">
+    
+    <resultMap type="XiaoyuanInfoDianzan" id="XiaoyuanInfoDianzanResult">
+        <result property="infoDianzanId"    column="info_dianzan_id"    />
+        <result property="infoId"    column="info_id"    />
+        <result property="dianzanUserId"    column="dianzan_user_id"    />
+        <result property="dianzanType"    column="dianzan_type"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectXiaoyuanInfoDianzanVo">
+        select info_dianzan_id, info_id, dianzan_user_id, dianzan_type, create_by, create_time, update_by, update_time, remark from xiaoyuan_info_dianzan
+    </sql>
+
+    <select id="selectXiaoyuanInfoDianzanList" parameterType="XiaoyuanInfoDianzan" resultMap="XiaoyuanInfoDianzanResult">
+        <include refid="selectXiaoyuanInfoDianzanVo"/>
+        <where>  
+            <if test="infoId != null "> and info_id = #{infoId}</if>
+            <if test="dianzanUserId != null "> and dianzan_user_id = #{dianzanUserId}</if>
+            <if test="dianzanType != null  and dianzanType != ''"> and dianzan_type = #{dianzanType}</if>
+        </where>
+    </select>
+    
+    <select id="selectXiaoyuanInfoDianzanByInfoDianzanId" parameterType="Long" resultMap="XiaoyuanInfoDianzanResult">
+        <include refid="selectXiaoyuanInfoDianzanVo"/>
+        where info_dianzan_id = #{infoDianzanId}
+    </select>
+        
+    <insert id="insertXiaoyuanInfoDianzan" parameterType="XiaoyuanInfoDianzan" useGeneratedKeys="true" keyProperty="infoDianzanId">
+        insert into xiaoyuan_info_dianzan
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="infoId != null">info_id,</if>
+            <if test="dianzanUserId != null">dianzan_user_id,</if>
+            <if test="dianzanType != null">dianzan_type,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="infoId != null">#{infoId},</if>
+            <if test="dianzanUserId != null">#{dianzanUserId},</if>
+            <if test="dianzanType != null">#{dianzanType},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateXiaoyuanInfoDianzan" parameterType="XiaoyuanInfoDianzan">
+        update xiaoyuan_info_dianzan
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="infoId != null">info_id = #{infoId},</if>
+            <if test="dianzanUserId != null">dianzan_user_id = #{dianzanUserId},</if>
+            <if test="dianzanType != null">dianzan_type = #{dianzanType},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where info_dianzan_id = #{infoDianzanId}
+    </update>
+
+    <delete id="deleteXiaoyuanInfoDianzanByInfoDianzanId" parameterType="Long">
+        delete from xiaoyuan_info_dianzan where info_dianzan_id = #{infoDianzanId}
+    </delete>
+
+    <delete id="deleteXiaoyuanInfoDianzanByInfoDianzanIds" parameterType="String">
+        delete from xiaoyuan_info_dianzan where info_dianzan_id in 
+        <foreach item="infoDianzanId" collection="array" open="(" separator="," close=")">
+            #{infoDianzanId}
+        </foreach>
+    </delete>
+</mapper>

+ 184 - 0
ruoyi-system/src/main/resources/mapper/notice/XiaoyuanInfoMapper.xml

@@ -0,0 +1,184 @@
+<?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.ruoyi.system.mapper.notice.XiaoyuanInfoMapper">
+    
+    <resultMap type="XiaoyuanInfo" id="XiaoyuanInfoResult">
+        <result property="infoId"    column="info_id"    />
+        <result property="infoTitle"    column="info_title"    />
+        <result property="infoPhoto"    column="info_photo"    />
+        <result property="schoolId"    column="school_id"    />
+        <result property="schoolName"    column="school_name"    />
+        <result property="infoType"    column="info_type"    />
+        <result property="infoTypeZi"    column="info_type_zi"    />
+        <result property="infoContent"    column="info_content"    />
+        <result property="status"    column="status"    />
+        <result property="faBuTime"    column="faBu_time"    />
+        <result property="infoYiDu"    column="info_yidu"    />
+        <result property="infoDianZanId"    column="info_DianZan_id"    />
+        <result property="infoDianZan"    column="info_DianZan"    />
+        <result property="infoZhuanFa"    column="info_ZhuanFa"    />
+        <result property="infoPingLunId"    column="info_PingLun_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <resultMap id="XiaoyuanInfoInfoPingLunResult" type="XiaoyuanInfo" extends="XiaoyuanInfoResult">
+        <collection property="infoPingLunList" notNullColumn="sub_info_PingLun_id" javaType="java.util.List" resultMap="InfoPingLunResult" />
+    </resultMap>
+
+    <resultMap type="InfoPingLun" id="InfoPingLunResult">
+        <result property="infoPingLunId"    column="sub_info_PingLun_id"    />
+        <result property="infoId"    column="sub_info_id"    />
+        <result property="infoPingLunParent"    column="sub_info_PingLun_parent"    />
+        <result property="infoPingLunContent"    column="sub_info_PingLun_content"    />
+        <result property="avatar"    column="sub_avatar"    />
+        <result property="infoPingLunUserId"    column="sub_info_PingLun_user_id"    />
+        <result property="infoPingLunUserName"    column="sub_info_PingLun_user_name"    />
+        <result property="infoPingLunQuiltUserId"    column="sub_info_PingLun_quilt_user_id"    />
+        <result property="infoPingLunQuiltUserName"    column="sub_info_PingLun_quilt_user_name"    />
+        <result property="pingLunTime"    column="sub_PingLun_time"    />
+        <result property="infoPingLunType"    column="sub_info_PingLun_type"    />
+        <result property="infoPingLunExamine"    column="sub_info_PingLun_examine"    />
+        <result property="createBy"    column="sub_create_by"    />
+        <result property="createTime"    column="sub_create_time"    />
+        <result property="updateBy"    column="sub_update_by"    />
+        <result property="updateTime"    column="sub_update_time"    />
+        <result property="remark"    column="sub_remark"    />
+    </resultMap>
+
+    <sql id="selectXiaoyuanInfoVo">
+        select info_id, info_title, info_photo, school_id, school_name, info_type, info_type_zi, info_content, status, fabu_time, info_yidu, info_dianzan_id,info_dianzan, info_zhuanfa, info_pinglun_id, create_by, create_time, update_by, update_time, remark from xiaoyuan_info
+    </sql>
+
+    <select id="selectXiaoyuanInfoList" parameterType="XiaoyuanInfo" resultMap="XiaoyuanInfoResult">
+        <include refid="selectXiaoyuanInfoVo"/>
+        <where>  
+            <if test="infoTitle != null  and infoTitle != ''"> and info_title = #{infoTitle}</if>
+            <if test="infoPhoto != null  and infoPhoto != ''"> and info_photo = #{infoPhoto}</if>
+            <if test="schoolId != null "> and school_id = #{schoolId}</if>
+            <if test="schoolName != null  and schoolName != ''"> and school_name like concat('%', #{schoolName}, '%')</if>
+            <if test="infoType != null  and infoType != ''"> and info_type = #{infoType}</if>
+            <if test="infoTypeZi != null  and infoTypeZi != ''"> and info_type_zi = #{infoTypeZi}</if>
+            <if test="infoContent != null  and infoContent != ''"> and info_content = #{infoContent}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="faBuTime != null "> and faBu_time = #{faBuTime}</if>
+            <if test="infoYiDu != null  and infoYiDu != ''"> and info_yidu = #{infoYiDu}</if>
+            <if test="infoZhuanFa != null  and infoZhuanFa != ''"> and info_zhuanfa = #{infoZhuanFa}</if>
+            <if test="createBy != null  and createBy != ''"> and create_by = #{createBy}</if>
+        </where>
+    </select>
+    
+    <select id="selectXiaoyuanInfoByInfoId" parameterType="Long" resultMap="XiaoyuanInfoInfoPingLunResult">
+        select a.info_id, a.info_title, a.info_photo, a.school_id, a.school_name, a.info_type, a.info_type_zi, a.info_content, a.status, a.fabu_time, a.info_yidu, a.info_dianzan_id,a.info_dianzan, a.info_zhuanfa, a.info_pinglun_id, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
+ b.info_PingLun_id as sub_info_PingLun_id, b.info_id as sub_info_id, b.info_PingLun_parent as sub_info_PingLun_parent, b.info_PingLun_content as sub_info_PingLun_content, b.avatar as sub_avatar, b.info_PingLun_user_id as sub_info_PingLun_user_id, b.info_PingLun_user_name as sub_info_PingLun_user_name, b.info_PingLun_quilt_user_id as sub_info_PingLun_quilt_user_id, b.info_PingLun_quilt_user_name as sub_info_PingLun_quilt_user_name, b.PingLun_time as sub_PingLun_time, b.info_PingLun_type as sub_info_PingLun_type, b.info_PingLun_examine as sub_info_PingLun_examine, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark
+        from xiaoyuan_info a
+        left join info_PingLun b on b.info_id = a.info_id
+        where a.info_id = #{infoId}
+    </select>
+        
+    <insert id="insertXiaoyuanInfo" parameterType="XiaoyuanInfo" useGeneratedKeys="true" keyProperty="infoId">
+        insert into xiaoyuan_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="infoTitle != null and infoTitle != ''">info_title,</if>
+            <if test="infoPhoto != null and infoPhoto != ''">info_photo,</if>
+            <if test="schoolId != null">school_id,</if>
+            <if test="schoolName != null and schoolName != ''">school_name,</if>
+            <if test="infoType != null and infoType != ''">info_type,</if>
+            <if test="infoTypeZi != null and infoTypeZi != ''">info_type_zi,</if>
+            <if test="infoContent != null">info_content,</if>
+            <if test="status != null">status,</if>
+            <if test="faBuTime != null">fabu_time,</if>
+            <if test="infoYiDu != null and infoYiDu != ''">info_yidu,</if>
+            <if test="infoDianZanId != null">info_dianzan_id,</if>
+            <if test="infoDianZan != null and infoDianZan != ''">info_dianzan,</if>
+            <if test="infoZhuanFa != null and infoZhuanFa != ''">info_zhuanfa,</if>
+            <if test="infoPingLunId != null">info_pinglun_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="infoTitle != null and infoTitle != ''">#{infoTitle},</if>
+            <if test="infoPhoto != null and infoPhoto != ''">#{infoPhoto},</if>
+            <if test="schoolId != null">#{schoolId},</if>
+            <if test="schoolName != null and schoolName != ''">#{schoolName},</if>
+            <if test="infoType != null and infoType != ''">#{infoType},</if>
+            <if test="infoTypeZi != null and infoTypeZi != ''">#{infoTypeZi},</if>
+            <if test="infoContent != null">#{infoContent},</if>
+            <if test="status != null">#{status},</if>
+            <if test="faBuTime != null">#{faBuTime},</if>
+            <if test="infoYiDu != null and infoYiDu != ''">#{infoYiDu},</if>
+            <if test="infoDianZanId != null">#{infoDianZanId},</if>
+            <if test="infoDianZan != null and infoDianZan != ''">#{infoDianZan},</if>
+            <if test="infoZhuanFa != null and infoZhuanFa != ''">#{infoZhuanFa},</if>
+            <if test="infoPingLunId != null">#{infoPingLunId},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateXiaoyuanInfo" parameterType="XiaoyuanInfo">
+        update xiaoyuan_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="infoTitle != null and infoTitle != ''">info_title = #{infoTitle},</if>
+            <if test="infoPhoto != null and infoPhoto != ''">info_photo = #{infoPhoto},</if>
+            <if test="schoolId != null">school_id = #{schoolId},</if>
+            <if test="schoolName != null and schoolName != ''">school_name = #{schoolName},</if>
+            <if test="infoType != null and infoType != ''">info_type = #{infoType},</if>
+            <if test="infoTypeZi != null and infoTypeZi != ''">info_type_zi = #{infoTypeZi},</if>
+            <if test="infoContent != null">info_content = #{infoContent},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="faBuTime != null">fabu_time = #{faBuTime},</if>
+            <if test="infoYiDu != null and infoYiDu != ''">info_yidu = #{infoYiDu},</if>
+            <if test="infoDianZanId != null">info_dianzan_id = #{infoDianZanId},</if>
+            <if test="infoDianZan != null and infoDianZan != ''">info_dianzan_id = #{infoDianZanId},</if>
+            <if test="infoZhuanFa != null and infoZhuanFa != ''">info_zhuanfa = #{infoZhuanFa},</if>
+            <if test="infoPingLunId != null">info_pinglun_id = #{infoPingLunId},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where info_id = #{infoId}
+    </update>
+
+    <delete id="deleteXiaoyuanInfoByInfoId" parameterType="Long">
+        delete from xiaoyuan_info where info_id = #{infoId}
+    </delete>
+
+    <delete id="deleteXiaoyuanInfoByInfoIds" parameterType="String">
+        delete from xiaoyuan_info where info_id in 
+        <foreach item="infoId" collection="array" open="(" separator="," close=")">
+            #{infoId}
+        </foreach>
+    </delete>
+    
+    <delete id="deleteInfoPingLunByInfoIds" parameterType="String">
+        delete from info_pinglun where info_id in
+        <foreach item="infoId" collection="array" open="(" separator="," close=")">
+            #{infoId}
+        </foreach>
+    </delete>
+
+    <delete id="deleteInfoPingLunByInfoId" parameterType="Long">
+        delete from info_pinglun where info_id = #{infoId}
+    </delete>
+
+    <insert id="batchInfoPingLun">
+        insert into info_pinglun( info_pinglun_id, info_id, info_pinglun_parent, info_pinglun_content, avatar, info_pinglun_user_id, info_pinglun_user_name, info_pinglun_quilt_user_id, info_pinglun_quilt_user_name, pinglun_time, info_pinglun_type, info_pinglun_examine, create_by, create_time, update_by, update_time, remark) values
+		<foreach item="item" index="index" collection="list" separator=",">
+            ( #{item.infopinglunId}, #{item.infoId}, #{item.infoPingLunParent}, #{item.infoPingLunContent}, #{item.avatar}, #{item.infoPingLunUserId}, #{item.infoPingLunUserName}, #{item.infoPingLunQuiltUserId}, #{item.infoPingLunQuiltUserName}, #{item.PingLunTime}, #{item.infoPingLunType}, #{item.infoPingLunExamine}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
+        </foreach>
+    </insert>
+</mapper>

+ 1 - 1
ruoyi-system/src/main/resources/mapper/score/ScoreDataMapper.xml

@@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="privacyType != null  and privacyType != ''"> and a.privacy_type = #{privacyType}</if>
             <if test="scoreClassId != null  and scoreClassId != ''"> and find_in_set(a.score_class_id,#{scoreClassId})</if>
         </where>
-        order by score_title DESC
+        order by score_time DESC
     </select>
     
     <select id="selectScoreDataByScoreId" parameterType="Long" resultMap="ScoreDataScoreDataDetailsResult">