Commit 770e23e4 by 邓实川 Committed by chenzg

企业讯息bug优化,项目配置文件jpa自动生成表

parent 5ce3683a
...@@ -13,7 +13,6 @@ import com.baomidou.mybatisplus.annotation.TableField; ...@@ -13,7 +13,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import cn.timer.api.config.swagger.IgnoreSwaggerParameter;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
......
...@@ -293,11 +293,15 @@ public class CmsController { ...@@ -293,11 +293,15 @@ public class CmsController {
qyxxQueryDto.getTotalPage() == null ? 10 : qyxxQueryDto.getTotalPage()); qyxxQueryDto.getTotalPage() == null ? 10 : qyxxQueryDto.getTotalPage());
QueryWrapper<CmsContent> queryWrapper = new QueryWrapper<>(); QueryWrapper<CmsContent> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("status", 1).eq(t != null && t > -1, "modularid", t).eq(r != null && r > -1, "releasestate", r) queryWrapper
.eq("organization_id", userBean.getOrgCode())
.eq("status", 1).eq(t != null && t > -1, "modularid", t)
.eq(r != null && r > -1, "releasestate", r)
.between(!StrUtil.hasBlank(s) && !StrUtil.hasBlank(e), "releasetime", .between(!StrUtil.hasBlank(s) && !StrUtil.hasBlank(e), "releasetime",
!StrUtil.hasBlank(s) ? s : "1000-01-01 00:00:00", !StrUtil.hasBlank(s) ? s : "1000-01-01 00:00:00",
!StrUtil.hasBlank(e) ? e : "9999-01-01 00:00:00") !StrUtil.hasBlank(e) ? e : "9999-01-01 00:00:00")
.and(!StrUtil.hasBlank(q), wq -> wq.like("userid", q).or().like("author", q).or().like("title", q)) .and(!StrUtil.hasBlank(q), wq -> wq.like("userid", q)
.or().like("author", q).or().like("title", q))
.orderByDesc("addeddate"); .orderByDesc("addeddate");
IPage<CmsContent> cmsContentPage = CmsContent.builder().build().selectPage(page, queryWrapper); IPage<CmsContent> cmsContentPage = CmsContent.builder().build().selectPage(page, queryWrapper);
List<CmsContent> cmsContents = cmsContentPage.getRecords(); List<CmsContent> cmsContents = cmsContentPage.getRecords();
......
...@@ -4,7 +4,6 @@ import org.springframework.stereotype.Repository; ...@@ -4,7 +4,6 @@ import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.dto.yggl.YgCityDto; import cn.timer.api.dto.yggl.YgCityDto;
import cn.timer.api.dto.yggl.YgProDto;
......
...@@ -3,10 +3,8 @@ package cn.timer.api.dto.yggl; ...@@ -3,10 +3,8 @@ package cn.timer.api.dto.yggl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -3,10 +3,8 @@ package cn.timer.api.dto.yggl; ...@@ -3,10 +3,8 @@ package cn.timer.api.dto.yggl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -3,10 +3,8 @@ package cn.timer.api.dto.yggl; ...@@ -3,10 +3,8 @@ package cn.timer.api.dto.yggl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -3,7 +3,6 @@ package cn.timer.api.dto.yggl; ...@@ -3,7 +3,6 @@ package cn.timer.api.dto.yggl;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
......
...@@ -10,19 +10,19 @@ spring: ...@@ -10,19 +10,19 @@ spring:
multipart: multipart:
max-file-size: 20MB max-file-size: 20MB
max-request-size: 20MB max-request-size: 20MB
# jpa: jpa:
# 11配置生成表 存储引擎InnoDB # 配置生成表 存储引擎InnoDB
# database-platform: org.hibernate.dialect.MySQL5InnoDBDialect # database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
# database: # database:
# open-in-view: false # open-in-view: false
#naming: # naming:
# spring boot jpa hibernate 根据实体类生成表以及字段的命名策略 # spring boot jpa hibernate 根据实体类生成表以及字段的命名策略
# 无修改命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # 无修改命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
# 遇到大写字母 加”_”的命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # 遇到大写字母 加”_”的命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
#physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
# hibernate: hibernate:
# ddl-auto: update ddl-auto: update
# show-sql: true show-sql: true
datasource: datasource:
username: root username: root
password: youlingHR73! password: youlingHR73!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment