fangyuan
2022-11-17 4f33a6133b54d873dc794bdebcfd783597ea0595
表结构更新
53个文件已修改
6个文件已添加
501 ■■■■ 已修改文件
.idea/easyCodeTableSetting.xml 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/NewsAdminController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/NewsChannelColumnController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/NewsChannelController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/NewsColumnController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/NewsColumnInformationController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/NewsDepartmentController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/NewsDepartmentInformationController.java 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/NewsDutyController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/NewsInformationController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/NewsIpController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/NewsPoliceController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dao/NewsAdminDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dao/NewsChannelColumnDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dao/NewsChannelDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dao/NewsColumnDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dao/NewsColumnInformationDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dao/NewsDepartmentDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dao/NewsDepartmentInformationDao.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dao/NewsDutyDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dao/NewsInformationDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dao/NewsIpDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dao/NewsPoliceDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/NewsAdmin.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/NewsChannel.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/NewsChannelColumn.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/NewsColumn.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/NewsColumnInformation.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/NewsDepartment.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/NewsDepartmentInformation.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/NewsDuty.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/NewsInformation.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/NewsIp.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/NewsPolice.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/NewsAdminService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/NewsChannelColumnService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/NewsChannelService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/NewsColumnInformationService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/NewsColumnService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/NewsDepartmentInformationService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/NewsDepartmentService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/NewsDutyService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/NewsInformationService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/NewsIpService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/NewsPoliceService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/impl/NewsAdminServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/impl/NewsChannelColumnServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/impl/NewsChannelServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/impl/NewsColumnInformationServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/impl/NewsColumnServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/impl/NewsDepartmentInformationServiceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/impl/NewsDepartmentServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/impl/NewsDutyServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/impl/NewsInformationServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/impl/NewsIpServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/impl/NewsPoliceServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/NewsDepartmentInformationDao.xml 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/NewsInformationDao.xml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/NewsPoliceDao.xml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/easyCodeTableSetting.xml
@@ -86,10 +86,10 @@
                    <option name="type" value="java.lang.Integer" />
                  </ColumnInfoDTO>
                  <ColumnInfoDTO>
                    <option name="comment" value="部门id" />
                    <option name="comment" value="警员id" />
                    <option name="custom" value="false" />
                    <option name="ext" value="{}" />
                    <option name="name" value="newsDepartmentId" />
                    <option name="name" value="newsPoliceId" />
                    <option name="type" value="java.lang.Integer" />
                  </ColumnInfoDTO>
                </list>
@@ -219,7 +219,7 @@
        <entry key="news_website.news_column_information">
          <value>
            <TableInfoDTO>
              <option name="comment" value="栏目频道中间表" />
              <option name="comment" value="栏目咨询中间表" />
              <option name="fullColumn">
                <list>
                  <ColumnInfoDTO>
@@ -256,6 +256,7 @@
        <entry key="news_website.news_department">
          <value>
            <TableInfoDTO>
              <option name="comment" value="部门(机构)表" />
              <option name="fullColumn">
                <list>
                  <ColumnInfoDTO>
@@ -279,6 +280,50 @@
              <option name="savePackageName" value="com.ycl" />
              <option name="savePath" value="./ycl-platform/src/main/java/com/ycl" />
              <option name="templateGroupName" value="MybatisPlus-Mixed" />
            </TableInfoDTO>
          </value>
        </entry>
        <entry key="news_website.news_department_information">
          <value>
            <TableInfoDTO>
              <option name="comment" value="机构(部门)中间表" />
              <option name="fullColumn">
                <list>
                  <ColumnInfoDTO>
                    <option name="custom" value="false" />
                    <option name="ext" value="{}" />
                    <option name="name" value="id" />
                    <option name="type" value="java.lang.Integer" />
                  </ColumnInfoDTO>
                  <ColumnInfoDTO>
                    <option name="comment" value="机构(部门id)" />
                    <option name="custom" value="false" />
                    <option name="ext" value="{}" />
                    <option name="name" value="newsDepartmentId" />
                    <option name="type" value="java.lang.Integer" />
                  </ColumnInfoDTO>
                  <ColumnInfoDTO>
                    <option name="comment" value="警员id" />
                    <option name="custom" value="false" />
                    <option name="ext" value="{}" />
                    <option name="name" value="newsPoliceId" />
                    <option name="type" value="java.lang.Integer" />
                  </ColumnInfoDTO>
                  <ColumnInfoDTO>
                    <option name="comment" value="是否签收0未签收1签收2不需要签收" />
                    <option name="custom" value="false" />
                    <option name="ext" value="{}" />
                    <option name="name" value="isSign" />
                    <option name="type" value="java.lang.Integer" />
                  </ColumnInfoDTO>
                </list>
              </option>
              <option name="name" value="NewsDepartmentInformation" />
              <option name="preName" value="" />
              <option name="saveModelName" value="ycl-platform" />
              <option name="savePackageName" value="com.ycl" />
              <option name="savePath" value="./ycl-platform/src/main/java/com/ycl" />
              <option name="templateGroupName" value="" />
            </TableInfoDTO>
          </value>
        </entry>
@@ -336,7 +381,7 @@
        <entry key="news_website.news_information">
          <value>
            <TableInfoDTO>
              <option name="comment" value="咨询表" />
              <option name="comment" value="资讯表" />
              <option name="fullColumn">
                <list>
                  <ColumnInfoDTO>
@@ -368,7 +413,7 @@
                    <option name="type" value="java.util.Date" />
                  </ColumnInfoDTO>
                  <ColumnInfoDTO>
                    <option name="comment" value="是否签收1签收0未签收" />
                    <option name="comment" value="是否签收0未签收1签收2不需要签收" />
                    <option name="custom" value="false" />
                    <option name="ext" value="{}" />
                    <option name="name" value="isSign" />
@@ -478,10 +523,17 @@
                    <option name="type" value="java.util.Date" />
                  </ColumnInfoDTO>
                  <ColumnInfoDTO>
                    <option name="comment" value="机构名称" />
                    <option name="comment" value="机构id" />
                    <option name="custom" value="false" />
                    <option name="ext" value="{}" />
                    <option name="name" value="organizationName" />
                    <option name="name" value="newsDepartmentId" />
                    <option name="type" value="java.lang.String" />
                  </ColumnInfoDTO>
                  <ColumnInfoDTO>
                    <option name="comment" value="手机号码" />
                    <option name="custom" value="false" />
                    <option name="ext" value="{}" />
                    <option name="name" value="phone" />
                    <option name="type" value="java.lang.String" />
                  </ColumnInfoDTO>
                </list>
ycl-platform/src/main/java/com/ycl/controller/NewsAdminController.java
@@ -18,7 +18,7 @@
 * 后台用户表(NewsAdmin)表控制层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@RestController
@RequestMapping("newsAdmin")
ycl-platform/src/main/java/com/ycl/controller/NewsChannelColumnController.java
@@ -18,7 +18,7 @@
 * 频道栏目中间表(NewsChannelColumn)表控制层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@RestController
@RequestMapping("newsChannelColumn")
ycl-platform/src/main/java/com/ycl/controller/NewsChannelController.java
@@ -18,7 +18,7 @@
 * 频道表(NewsChannel)表控制层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@RestController
@RequestMapping("newsChannel")
ycl-platform/src/main/java/com/ycl/controller/NewsColumnController.java
@@ -18,7 +18,7 @@
 * 栏目表(NewsColumn)表控制层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@RestController
@RequestMapping("newsColumn")
ycl-platform/src/main/java/com/ycl/controller/NewsColumnInformationController.java
@@ -18,7 +18,7 @@
 * 栏目咨询中间表(NewsColumnInformation)表控制层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@RestController
@RequestMapping("newsColumnInformation")
ycl-platform/src/main/java/com/ycl/controller/NewsDepartmentController.java
@@ -18,7 +18,7 @@
 * 部门(机构)表(NewsDepartment)表控制层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@RestController
@RequestMapping("newsDepartment")
ycl-platform/src/main/java/com/ycl/controller/NewsDepartmentInformationController.java
New file
@@ -0,0 +1,88 @@
package com.ycl.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ycl.entity.NewsDepartmentInformation;
import com.ycl.service.NewsDepartmentInformationService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
 * 机构(部门)中间表(NewsDepartmentInformation)表控制层
 *
 * @author makejava
 * @since 2022-11-17 11:38:27
 */
@RestController
@RequestMapping("newsDepartmentInformation")
public class NewsDepartmentInformationController extends ApiController {
    /**
     * 服务对象
     */
    @Resource
    private NewsDepartmentInformationService newsDepartmentInformationService;
    /**
     * 分页查询所有数据
     *
     * @param page 分页对象
     * @param newsDepartmentInformation 查询实体
     * @return 所有数据
     */
    @GetMapping
    public R selectAll(Page<NewsDepartmentInformation> page, NewsDepartmentInformation newsDepartmentInformation) {
        return success(this.newsDepartmentInformationService.page(page, new QueryWrapper<>(newsDepartmentInformation)));
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public R selectOne(@PathVariable Serializable id) {
        return success(this.newsDepartmentInformationService.getById(id));
    }
    /**
     * 新增数据
     *
     * @param newsDepartmentInformation 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody NewsDepartmentInformation newsDepartmentInformation) {
        return success(this.newsDepartmentInformationService.save(newsDepartmentInformation));
    }
    /**
     * 修改数据
     *
     * @param newsDepartmentInformation 实体对象
     * @return 修改结果
     */
    @PutMapping
    public R update(@RequestBody NewsDepartmentInformation newsDepartmentInformation) {
        return success(this.newsDepartmentInformationService.updateById(newsDepartmentInformation));
    }
    /**
     * 删除数据
     *
     * @param idList 主键结合
     * @return 删除结果
     */
    @DeleteMapping
    public R delete(@RequestParam("idList") List<Long> idList) {
        return success(this.newsDepartmentInformationService.removeByIds(idList));
    }
}
ycl-platform/src/main/java/com/ycl/controller/NewsDutyController.java
@@ -18,7 +18,7 @@
 * 值班表(NewsDuty)表控制层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@RestController
@RequestMapping("newsDuty")
ycl-platform/src/main/java/com/ycl/controller/NewsInformationController.java
@@ -18,7 +18,7 @@
 * 资讯表(NewsInformation)表控制层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@RestController
@RequestMapping("newsInformation")
ycl-platform/src/main/java/com/ycl/controller/NewsIpController.java
@@ -18,7 +18,7 @@
 * ip白名单表(NewsIp)表控制层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@RestController
@RequestMapping("newsIp")
ycl-platform/src/main/java/com/ycl/controller/NewsPoliceController.java
@@ -19,7 +19,7 @@
(NewsPolice)表控制层
 *
 * @author makejava
 * @since 2022-11-17 11:12:42
 * @since 2022-11-17 11:38:27
 */
@RestController
@RequestMapping("newsPolice")
ycl-platform/src/main/java/com/ycl/dao/NewsAdminDao.java
@@ -10,7 +10,7 @@
 * 后台用户表(NewsAdmin)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsAdminDao extends BaseMapper<NewsAdmin> {
ycl-platform/src/main/java/com/ycl/dao/NewsChannelColumnDao.java
@@ -10,7 +10,7 @@
 * 频道栏目中间表(NewsChannelColumn)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsChannelColumnDao extends BaseMapper<NewsChannelColumn> {
ycl-platform/src/main/java/com/ycl/dao/NewsChannelDao.java
@@ -10,7 +10,7 @@
 * 频道表(NewsChannel)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsChannelDao extends BaseMapper<NewsChannel> {
ycl-platform/src/main/java/com/ycl/dao/NewsColumnDao.java
@@ -10,7 +10,7 @@
 * 栏目表(NewsColumn)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsColumnDao extends BaseMapper<NewsColumn> {
ycl-platform/src/main/java/com/ycl/dao/NewsColumnInformationDao.java
@@ -10,7 +10,7 @@
 * 栏目咨询中间表(NewsColumnInformation)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsColumnInformationDao extends BaseMapper<NewsColumnInformation> {
ycl-platform/src/main/java/com/ycl/dao/NewsDepartmentDao.java
@@ -10,7 +10,7 @@
 * 部门(机构)表(NewsDepartment)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsDepartmentDao extends BaseMapper<NewsDepartment> {
ycl-platform/src/main/java/com/ycl/dao/NewsDepartmentInformationDao.java
New file
@@ -0,0 +1,35 @@
package com.ycl.dao;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.ycl.entity.NewsDepartmentInformation;
/**
 * 机构(部门)中间表(NewsDepartmentInformation)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-17 11:38:27
 */
public interface NewsDepartmentInformationDao extends BaseMapper<NewsDepartmentInformation> {
/**
* 批量新增数据(MyBatis原生foreach方法)
*
* @param entities List<NewsDepartmentInformation> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<NewsDepartmentInformation> entities);
/**
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
*
* @param entities List<NewsDepartmentInformation> 实例对象列表
* @return 影响行数
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
*/
int insertOrUpdateBatch(@Param("entities") List<NewsDepartmentInformation> entities);
}
ycl-platform/src/main/java/com/ycl/dao/NewsDutyDao.java
@@ -10,7 +10,7 @@
 * 值班表(NewsDuty)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsDutyDao extends BaseMapper<NewsDuty> {
ycl-platform/src/main/java/com/ycl/dao/NewsInformationDao.java
@@ -10,7 +10,7 @@
 * 资讯表(NewsInformation)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsInformationDao extends BaseMapper<NewsInformation> {
ycl-platform/src/main/java/com/ycl/dao/NewsIpDao.java
@@ -10,7 +10,7 @@
 * ip白名单表(NewsIp)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsIpDao extends BaseMapper<NewsIp> {
ycl-platform/src/main/java/com/ycl/dao/NewsPoliceDao.java
@@ -11,7 +11,7 @@
(NewsPolice)表数据库访问层
 *
 * @author makejava
 * @since 2022-11-17 11:12:42
 * @since 2022-11-17 11:38:27
 */
public interface NewsPoliceDao extends BaseMapper<NewsPolice> {
ycl-platform/src/main/java/com/ycl/entity/NewsAdmin.java
@@ -3,12 +3,13 @@
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.sql.Date;
/**
 * 后台用户表(NewsAdmin)表实体类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@SuppressWarnings("serial")
public class NewsAdmin extends Model<NewsAdmin> {
ycl-platform/src/main/java/com/ycl/entity/NewsChannel.java
@@ -3,12 +3,13 @@
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.sql.Date;
/**
 * 频道表(NewsChannel)表实体类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@SuppressWarnings("serial")
public class NewsChannel extends Model<NewsChannel> {
ycl-platform/src/main/java/com/ycl/entity/NewsChannelColumn.java
@@ -8,7 +8,7 @@
 * 频道栏目中间表(NewsChannelColumn)表实体类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@SuppressWarnings("serial")
public class NewsChannelColumn extends Model<NewsChannelColumn> {
ycl-platform/src/main/java/com/ycl/entity/NewsColumn.java
@@ -8,21 +8,21 @@
 * 栏目表(NewsColumn)表实体类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@SuppressWarnings("serial")
public class NewsColumn extends Model<NewsColumn> {
    //id
    private Object id;
    private Integer id;
    //栏目名称
    private String name;
    public Object getId() {
    public Integer getId() {
        return id;
    }
    public void setId(Object id) {
    public void setId(Integer id) {
        this.id = id;
    }
ycl-platform/src/main/java/com/ycl/entity/NewsColumnInformation.java
@@ -8,7 +8,7 @@
 * 栏目咨询中间表(NewsColumnInformation)表实体类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@SuppressWarnings("serial")
public class NewsColumnInformation extends Model<NewsColumnInformation> {
ycl-platform/src/main/java/com/ycl/entity/NewsDepartment.java
@@ -8,7 +8,7 @@
 * 部门(机构)表(NewsDepartment)表实体类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@SuppressWarnings("serial")
public class NewsDepartment extends Model<NewsDepartment> {
ycl-platform/src/main/java/com/ycl/entity/NewsDepartmentInformation.java
New file
@@ -0,0 +1,67 @@
package com.ycl.entity;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
/**
 * 机构(部门)中间表(NewsDepartmentInformation)表实体类
 *
 * @author makejava
 * @since 2022-11-17 11:38:27
 */
@SuppressWarnings("serial")
public class NewsDepartmentInformation extends Model<NewsDepartmentInformation> {
    private Integer id;
    //机构(部门id)
    private Integer newsDepartmentId;
    //警员id
    private Integer newsPoliceId;
    //是否签收0未签收1签收2不需要签收
    private Integer isSign;
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getNewsDepartmentId() {
        return newsDepartmentId;
    }
    public void setNewsDepartmentId(Integer newsDepartmentId) {
        this.newsDepartmentId = newsDepartmentId;
    }
    public Integer getNewsPoliceId() {
        return newsPoliceId;
    }
    public void setNewsPoliceId(Integer newsPoliceId) {
        this.newsPoliceId = newsPoliceId;
    }
    public Integer getIsSign() {
        return isSign;
    }
    public void setIsSign(Integer isSign) {
        this.isSign = isSign;
    }
    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
    }
ycl-platform/src/main/java/com/ycl/entity/NewsDuty.java
@@ -3,12 +3,13 @@
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.sql.Date;
/**
 * 值班表(NewsDuty)表实体类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@SuppressWarnings("serial")
public class NewsDuty extends Model<NewsDuty> {
ycl-platform/src/main/java/com/ycl/entity/NewsInformation.java
@@ -3,17 +3,18 @@
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.sql.Date;
/**
 * 资讯表(NewsInformation)表实体类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@SuppressWarnings("serial")
public class NewsInformation extends Model<NewsInformation> {
    //id
    private Object id;
    private Integer id;
    //标题
    private String title;
    //内容
@@ -28,15 +29,13 @@
    private Object sendTo;
    //图片地址
    private String imageUrl;
    //部门(机构)id
    private String newsDepartmentId;
    public Object getId() {
    public Integer getId() {
        return id;
    }
    public void setId(Object id) {
    public void setId(Integer id) {
        this.id = id;
    }
@@ -94,14 +93,6 @@
    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }
    public String getNewsDepartmentId() {
        return newsDepartmentId;
    }
    public void setNewsDepartmentId(String newsDepartmentId) {
        this.newsDepartmentId = newsDepartmentId;
    }
    /**
ycl-platform/src/main/java/com/ycl/entity/NewsIp.java
@@ -3,12 +3,13 @@
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.sql.Date;
/**
 * ip白名单表(NewsIp)表实体类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@SuppressWarnings("serial")
public class NewsIp extends Model<NewsIp> {
ycl-platform/src/main/java/com/ycl/entity/NewsPolice.java
@@ -3,33 +3,36 @@
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.sql.Date;
/**
 * 警员表
(NewsPolice)表实体类
 *
 * @author makejava
 * @since 2022-11-17 11:12:42
 * @since 2022-11-17 11:38:27
 */
@SuppressWarnings("serial")
public class NewsPolice extends Model<NewsPolice> {
    //自增主键
    private Object id;
    private Integer id;
    //警员名称
    private String rname;
    //创建时间
    private Date createTime;
    //修改时间
    private Date updateTime;
    //机构名称
    private String organizationName;
    //机构id
    private String newsDepartmentId;
    //手机号码
    private String phone;
    public Object getId() {
    public Integer getId() {
        return id;
    }
    public void setId(Object id) {
    public void setId(Integer id) {
        this.id = id;
    }
@@ -57,12 +60,20 @@
        this.updateTime = updateTime;
    }
    public String getOrganizationName() {
        return organizationName;
    public String getNewsDepartmentId() {
        return newsDepartmentId;
    }
    public void setOrganizationName(String organizationName) {
        this.organizationName = organizationName;
    public void setNewsDepartmentId(String newsDepartmentId) {
        this.newsDepartmentId = newsDepartmentId;
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    /**
ycl-platform/src/main/java/com/ycl/service/NewsAdminService.java
@@ -7,7 +7,7 @@
 * 后台用户表(NewsAdmin)表服务接口
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsAdminService extends IService<NewsAdmin> {
ycl-platform/src/main/java/com/ycl/service/NewsChannelColumnService.java
@@ -7,7 +7,7 @@
 * 频道栏目中间表(NewsChannelColumn)表服务接口
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsChannelColumnService extends IService<NewsChannelColumn> {
ycl-platform/src/main/java/com/ycl/service/NewsChannelService.java
@@ -7,7 +7,7 @@
 * 频道表(NewsChannel)表服务接口
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsChannelService extends IService<NewsChannel> {
ycl-platform/src/main/java/com/ycl/service/NewsColumnInformationService.java
@@ -7,7 +7,7 @@
 * 栏目咨询中间表(NewsColumnInformation)表服务接口
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsColumnInformationService extends IService<NewsColumnInformation> {
ycl-platform/src/main/java/com/ycl/service/NewsColumnService.java
@@ -7,7 +7,7 @@
 * 栏目表(NewsColumn)表服务接口
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsColumnService extends IService<NewsColumn> {
ycl-platform/src/main/java/com/ycl/service/NewsDepartmentInformationService.java
New file
@@ -0,0 +1,15 @@
package com.ycl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ycl.entity.NewsDepartmentInformation;
/**
 * 机构(部门)中间表(NewsDepartmentInformation)表服务接口
 *
 * @author makejava
 * @since 2022-11-17 11:38:27
 */
public interface NewsDepartmentInformationService extends IService<NewsDepartmentInformation> {
}
ycl-platform/src/main/java/com/ycl/service/NewsDepartmentService.java
@@ -7,7 +7,7 @@
 * 部门(机构)表(NewsDepartment)表服务接口
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsDepartmentService extends IService<NewsDepartment> {
ycl-platform/src/main/java/com/ycl/service/NewsDutyService.java
@@ -7,7 +7,7 @@
 * 值班表(NewsDuty)表服务接口
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsDutyService extends IService<NewsDuty> {
ycl-platform/src/main/java/com/ycl/service/NewsInformationService.java
@@ -7,7 +7,7 @@
 * 资讯表(NewsInformation)表服务接口
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
public interface NewsInformationService extends IService<NewsInformation> {
ycl-platform/src/main/java/com/ycl/service/NewsIpService.java
@@ -7,7 +7,7 @@
 * ip白名单表(NewsIp)表服务接口
 *
 * @author makejava
 * @since 2022-11-17 11:12:42
 * @since 2022-11-17 11:38:27
 */
public interface NewsIpService extends IService<NewsIp> {
ycl-platform/src/main/java/com/ycl/service/NewsPoliceService.java
@@ -8,7 +8,7 @@
(NewsPolice)表服务接口
 *
 * @author makejava
 * @since 2022-11-17 11:12:42
 * @since 2022-11-17 11:38:27
 */
public interface NewsPoliceService extends IService<NewsPolice> {
ycl-platform/src/main/java/com/ycl/service/impl/NewsAdminServiceImpl.java
@@ -10,7 +10,7 @@
 * 后台用户表(NewsAdmin)表服务实现类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@Service("newsAdminService")
public class NewsAdminServiceImpl extends ServiceImpl<NewsAdminDao, NewsAdmin> implements NewsAdminService {
ycl-platform/src/main/java/com/ycl/service/impl/NewsChannelColumnServiceImpl.java
@@ -10,7 +10,7 @@
 * 频道栏目中间表(NewsChannelColumn)表服务实现类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@Service("newsChannelColumnService")
public class NewsChannelColumnServiceImpl extends ServiceImpl<NewsChannelColumnDao, NewsChannelColumn> implements NewsChannelColumnService {
ycl-platform/src/main/java/com/ycl/service/impl/NewsChannelServiceImpl.java
@@ -10,7 +10,7 @@
 * 频道表(NewsChannel)表服务实现类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@Service("newsChannelService")
public class NewsChannelServiceImpl extends ServiceImpl<NewsChannelDao, NewsChannel> implements NewsChannelService {
ycl-platform/src/main/java/com/ycl/service/impl/NewsColumnInformationServiceImpl.java
@@ -10,7 +10,7 @@
 * 栏目咨询中间表(NewsColumnInformation)表服务实现类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@Service("newsColumnInformationService")
public class NewsColumnInformationServiceImpl extends ServiceImpl<NewsColumnInformationDao, NewsColumnInformation> implements NewsColumnInformationService {
ycl-platform/src/main/java/com/ycl/service/impl/NewsColumnServiceImpl.java
@@ -10,7 +10,7 @@
 * 栏目表(NewsColumn)表服务实现类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@Service("newsColumnService")
public class NewsColumnServiceImpl extends ServiceImpl<NewsColumnDao, NewsColumn> implements NewsColumnService {
ycl-platform/src/main/java/com/ycl/service/impl/NewsDepartmentInformationServiceImpl.java
New file
@@ -0,0 +1,19 @@
package com.ycl.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ycl.dao.NewsDepartmentInformationDao;
import com.ycl.entity.NewsDepartmentInformation;
import com.ycl.service.NewsDepartmentInformationService;
import org.springframework.stereotype.Service;
/**
 * 机构(部门)中间表(NewsDepartmentInformation)表服务实现类
 *
 * @author makejava
 * @since 2022-11-17 11:38:27
 */
@Service("newsDepartmentInformationService")
public class NewsDepartmentInformationServiceImpl extends ServiceImpl<NewsDepartmentInformationDao, NewsDepartmentInformation> implements NewsDepartmentInformationService {
}
ycl-platform/src/main/java/com/ycl/service/impl/NewsDepartmentServiceImpl.java
@@ -10,7 +10,7 @@
 * 部门(机构)表(NewsDepartment)表服务实现类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@Service("newsDepartmentService")
public class NewsDepartmentServiceImpl extends ServiceImpl<NewsDepartmentDao, NewsDepartment> implements NewsDepartmentService {
ycl-platform/src/main/java/com/ycl/service/impl/NewsDutyServiceImpl.java
@@ -10,7 +10,7 @@
 * 值班表(NewsDuty)表服务实现类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@Service("newsDutyService")
public class NewsDutyServiceImpl extends ServiceImpl<NewsDutyDao, NewsDuty> implements NewsDutyService {
ycl-platform/src/main/java/com/ycl/service/impl/NewsInformationServiceImpl.java
@@ -10,7 +10,7 @@
 * 资讯表(NewsInformation)表服务实现类
 *
 * @author makejava
 * @since 2022-11-17 11:12:41
 * @since 2022-11-17 11:38:27
 */
@Service("newsInformationService")
public class NewsInformationServiceImpl extends ServiceImpl<NewsInformationDao, NewsInformation> implements NewsInformationService {
ycl-platform/src/main/java/com/ycl/service/impl/NewsIpServiceImpl.java
@@ -10,7 +10,7 @@
 * ip白名单表(NewsIp)表服务实现类
 *
 * @author makejava
 * @since 2022-11-17 11:12:42
 * @since 2022-11-17 11:38:27
 */
@Service("newsIpService")
public class NewsIpServiceImpl extends ServiceImpl<NewsIpDao, NewsIp> implements NewsIpService {
ycl-platform/src/main/java/com/ycl/service/impl/NewsPoliceServiceImpl.java
@@ -11,7 +11,7 @@
(NewsPolice)表服务实现类
 *
 * @author makejava
 * @since 2022-11-17 11:12:42
 * @since 2022-11-17 11:38:27
 */
@Service("newsPoliceService")
public class NewsPoliceServiceImpl extends ServiceImpl<NewsPoliceDao, NewsPolice> implements NewsPoliceService {
ycl-platform/src/main/resources/mapper/NewsDepartmentInformationDao.xml
New file
@@ -0,0 +1,31 @@
<?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.ycl.dao.NewsDepartmentInformationDao">
    <resultMap type="com.ycl.entity.NewsDepartmentInformation" id="NewsDepartmentInformationMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="newsDepartmentId" column="news_department_id" jdbcType="INTEGER"/>
        <result property="newsPoliceId" column="news_police_id" jdbcType="INTEGER"/>
        <result property="isSign" column="is_sign" jdbcType="INTEGER"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into news_website.news_department_information(news_department_id, news_police_id, is_sign)
        values
        <foreach collection="entities" item="entity" separator=",">
        (#{entity.newsDepartmentId}, #{entity.newsPoliceId}, #{entity.isSign})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into news_website.news_department_information(news_department_id, news_police_id, is_sign)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.newsDepartmentId}, #{entity.newsPoliceId}, #{entity.isSign})
        </foreach>
        on duplicate key update
         news_department_id = values(news_department_id) , news_police_id = values(news_police_id) , is_sign = values(is_sign)     </insert>
</mapper>
ycl-platform/src/main/resources/mapper/NewsInformationDao.xml
@@ -11,26 +11,25 @@
        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
        <result property="sendTo" column="send_to" jdbcType="VARCHAR"/>
        <result property="imageUrl" column="image_url" jdbcType="VARCHAR"/>
        <result property="newsDepartmentId" column="news_department_id" jdbcType="VARCHAR"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into news_website.news_information(title, content, publish_time, is_sign, create_time, send_to, image_url, news_department_id)
        insert into news_website.news_information(title, content, publish_time, is_sign, create_time, send_to, image_url)
        values
        <foreach collection="entities" item="entity" separator=",">
        (#{entity.title}, #{entity.content}, #{entity.publishTime}, #{entity.isSign}, #{entity.createTime}, #{entity.sendTo}, #{entity.imageUrl}, #{entity.newsDepartmentId})
        (#{entity.title}, #{entity.content}, #{entity.publishTime}, #{entity.isSign}, #{entity.createTime}, #{entity.sendTo}, #{entity.imageUrl})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into news_website.news_information(title, content, publish_time, is_sign, create_time, send_to, image_url, news_department_id)
        insert into news_website.news_information(title, content, publish_time, is_sign, create_time, send_to, image_url)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.title}, #{entity.content}, #{entity.publishTime}, #{entity.isSign}, #{entity.createTime}, #{entity.sendTo}, #{entity.imageUrl}, #{entity.newsDepartmentId})
            (#{entity.title}, #{entity.content}, #{entity.publishTime}, #{entity.isSign}, #{entity.createTime}, #{entity.sendTo}, #{entity.imageUrl})
        </foreach>
        on duplicate key update
         title = values(title) , content = values(content) , publish_time = values(publish_time) , is_sign = values(is_sign) , create_time = values(create_time) , send_to = values(send_to) , image_url = values(image_url) , news_department_id = values(news_department_id)     </insert>
         title = values(title) , content = values(content) , publish_time = values(publish_time) , is_sign = values(is_sign) , create_time = values(create_time) , send_to = values(send_to) , image_url = values(image_url)     </insert>
</mapper>
ycl-platform/src/main/resources/mapper/NewsPoliceDao.xml
@@ -7,26 +7,27 @@
        <result property="rname" column="rname" jdbcType="VARCHAR"/>
        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
        <result property="organizationName" column="organization_name" jdbcType="VARCHAR"/>
        <result property="newsDepartmentId" column="news_department_id" jdbcType="VARCHAR"/>
        <result property="phone" column="phone" jdbcType="VARCHAR"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into news_website.news_police(rname, create_time, update_time, organization_name)
        insert into news_website.news_police(rname, create_time, update_time, news_department_id, phone)
        values
        <foreach collection="entities" item="entity" separator=",">
        (#{entity.rname}, #{entity.createTime}, #{entity.updateTime}, #{entity.organizationName})
        (#{entity.rname}, #{entity.createTime}, #{entity.updateTime}, #{entity.newsDepartmentId}, #{entity.phone})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into news_website.news_police(rname, create_time, update_time, organization_name)
        insert into news_website.news_police(rname, create_time, update_time, news_department_id, phone)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.rname}, #{entity.createTime}, #{entity.updateTime}, #{entity.organizationName})
            (#{entity.rname}, #{entity.createTime}, #{entity.updateTime}, #{entity.newsDepartmentId}, #{entity.phone})
        </foreach>
        on duplicate key update
         rname = values(rname) , create_time = values(create_time) , update_time = values(update_time) , organization_name = values(organization_name)     </insert>
         rname = values(rname) , create_time = values(create_time) , update_time = values(update_time) , news_department_id = values(news_department_id) , phone = values(phone)     </insert>
</mapper>