| | |
| | | <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>
|
| | |
| | | <entry key="news_website.news_column_information">
|
| | | <value>
|
| | | <TableInfoDTO>
|
| | | <option name="comment" value="栏目频道中间表" />
|
| | | <option name="comment" value="栏目咨询中间表" />
|
| | | <option name="fullColumn">
|
| | | <list>
|
| | | <ColumnInfoDTO>
|
| | |
| | | <entry key="news_website.news_department">
|
| | | <value>
|
| | | <TableInfoDTO>
|
| | | <option name="comment" value="部门(机构)表" />
|
| | | <option name="fullColumn">
|
| | | <list>
|
| | | <ColumnInfoDTO>
|
| | |
| | | <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>
|
| | |
| | | <entry key="news_website.news_information">
|
| | | <value>
|
| | | <TableInfoDTO>
|
| | | <option name="comment" value="咨询表" />
|
| | | <option name="comment" value="资讯表" />
|
| | | <option name="fullColumn">
|
| | | <list>
|
| | | <ColumnInfoDTO>
|
| | |
| | | <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" />
|
| | |
| | | <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>
|
| | |
| | | * 后台用户表(NewsAdmin)表控制层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("newsAdmin")
|
| | |
| | | * 频道栏目中间表(NewsChannelColumn)表控制层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("newsChannelColumn")
|
| | |
| | | * 频道表(NewsChannel)表控制层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("newsChannel")
|
| | |
| | | * 栏目表(NewsColumn)表控制层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("newsColumn")
|
| | |
| | | * 栏目咨询中间表(NewsColumnInformation)表控制层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("newsColumnInformation")
|
| | |
| | | * 部门(机构)表(NewsDepartment)表控制层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("newsDepartment")
|
New file |
| | |
| | | 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));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | * 值班表(NewsDuty)表控制层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("newsDuty")
|
| | |
| | | * 资讯表(NewsInformation)表控制层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("newsInformation")
|
| | |
| | | * ip白名单表(NewsIp)表控制层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("newsIp")
|
| | |
| | | (NewsPolice)表控制层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:42
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("newsPolice")
|
| | |
| | | * 后台用户表(NewsAdmin)表数据库访问层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsAdminDao extends BaseMapper<NewsAdmin> {
|
| | |
|
| | |
| | | * 频道栏目中间表(NewsChannelColumn)表数据库访问层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsChannelColumnDao extends BaseMapper<NewsChannelColumn> {
|
| | |
|
| | |
| | | * 频道表(NewsChannel)表数据库访问层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsChannelDao extends BaseMapper<NewsChannel> {
|
| | |
|
| | |
| | | * 栏目表(NewsColumn)表数据库访问层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsColumnDao extends BaseMapper<NewsColumn> {
|
| | |
|
| | |
| | | * 栏目咨询中间表(NewsColumnInformation)表数据库访问层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsColumnInformationDao extends BaseMapper<NewsColumnInformation> {
|
| | |
|
| | |
| | | * 部门(机构)表(NewsDepartment)表数据库访问层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsDepartmentDao extends BaseMapper<NewsDepartment> {
|
| | |
|
New file |
| | |
| | | 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);
|
| | |
|
| | | }
|
| | |
|
| | |
| | | * 值班表(NewsDuty)表数据库访问层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsDutyDao extends BaseMapper<NewsDuty> {
|
| | |
|
| | |
| | | * 资讯表(NewsInformation)表数据库访问层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsInformationDao extends BaseMapper<NewsInformation> {
|
| | |
|
| | |
| | | * ip白名单表(NewsIp)表数据库访问层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsIpDao extends BaseMapper<NewsIp> {
|
| | |
|
| | |
| | | (NewsPolice)表数据库访问层
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:42
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsPoliceDao extends BaseMapper<NewsPolice> {
|
| | |
|
| | |
| | |
|
| | | 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> {
|
| | |
| | |
|
| | | 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> {
|
| | |
| | | * 频道栏目中间表(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> {
|
| | |
| | | * 栏目表(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;
|
| | | }
|
| | |
|
| | |
| | | * 栏目咨询中间表(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> {
|
| | |
| | | * 部门(机构)表(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> {
|
New file |
| | |
| | | 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;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | 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> {
|
| | |
| | |
|
| | | 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;
|
| | | //内容
|
| | |
| | | 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;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public void setImageUrl(String imageUrl) {
|
| | | this.imageUrl = imageUrl;
|
| | | }
|
| | |
|
| | | public String getNewsDepartmentId() {
|
| | | return newsDepartmentId;
|
| | | }
|
| | |
|
| | | public void setNewsDepartmentId(String newsDepartmentId) {
|
| | | this.newsDepartmentId = newsDepartmentId;
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | 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> {
|
| | |
| | |
|
| | | 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;
|
| | | }
|
| | |
|
| | |
| | | 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;
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | * 后台用户表(NewsAdmin)表服务接口
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsAdminService extends IService<NewsAdmin> {
|
| | |
|
| | |
| | | * 频道栏目中间表(NewsChannelColumn)表服务接口
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsChannelColumnService extends IService<NewsChannelColumn> {
|
| | |
|
| | |
| | | * 频道表(NewsChannel)表服务接口
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsChannelService extends IService<NewsChannel> {
|
| | |
|
| | |
| | | * 栏目咨询中间表(NewsColumnInformation)表服务接口
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsColumnInformationService extends IService<NewsColumnInformation> {
|
| | |
|
| | |
| | | * 栏目表(NewsColumn)表服务接口
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsColumnService extends IService<NewsColumn> {
|
| | |
|
New file |
| | |
| | | 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> {
|
| | |
|
| | | }
|
| | |
|
| | |
| | | * 部门(机构)表(NewsDepartment)表服务接口
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsDepartmentService extends IService<NewsDepartment> {
|
| | |
|
| | |
| | | * 值班表(NewsDuty)表服务接口
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsDutyService extends IService<NewsDuty> {
|
| | |
|
| | |
| | | * 资讯表(NewsInformation)表服务接口
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:41
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsInformationService extends IService<NewsInformation> {
|
| | |
|
| | |
| | | * ip白名单表(NewsIp)表服务接口
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:42
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsIpService extends IService<NewsIp> {
|
| | |
|
| | |
| | | (NewsPolice)表服务接口
|
| | | *
|
| | | * @author makejava
|
| | | * @since 2022-11-17 11:12:42
|
| | | * @since 2022-11-17 11:38:27
|
| | | */
|
| | | public interface NewsPoliceService extends IService<NewsPolice> {
|
| | |
|
| | |
| | | * 后台用户表(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 {
|
| | |
| | | * 频道栏目中间表(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 {
|
| | |
| | | * 频道表(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 {
|
| | |
| | | * 栏目咨询中间表(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 {
|
| | |
| | | * 栏目表(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 {
|
New file |
| | |
| | | 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 {
|
| | |
|
| | | }
|
| | |
|
| | |
| | | * 部门(机构)表(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 {
|
| | |
| | | * 值班表(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 {
|
| | |
| | | * 资讯表(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 {
|
| | |
| | | * 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 {
|
| | |
| | | (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 {
|
New file |
| | |
| | | <?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>
|
| | |
|
| | |
| | | <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>
|
| | |
|
| | |
| | | <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>
|
| | |
|