Commit 770e23e4 by 邓实川 Committed by chenzg

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

parent 5ce3683a
......@@ -13,7 +13,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import cn.timer.api.config.swagger.IgnoreSwaggerParameter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......
......@@ -293,12 +293,16 @@ public class CmsController {
qyxxQueryDto.getTotalPage() == null ? 10 : qyxxQueryDto.getTotalPage());
QueryWrapper<CmsContent> queryWrapper = new QueryWrapper<>();
queryWrapper.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",
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",
!StrUtil.hasBlank(s) ? s : "1000-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))
.orderByDesc("addeddate");
.and(!StrUtil.hasBlank(q), wq -> wq.like("userid", q)
.or().like("author", q).or().like("title", q))
.orderByDesc("addeddate");
IPage<CmsContent> cmsContentPage = CmsContent.builder().build().selectPage(page, queryWrapper);
List<CmsContent> cmsContents = cmsContentPage.getRecords();
cmsContentPage.getCurrent();
......
......@@ -4,7 +4,6 @@ import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.dto.yggl.YgCityDto;
import cn.timer.api.dto.yggl.YgProDto;
......
......@@ -3,10 +3,8 @@ package cn.timer.api.dto.yggl;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -3,10 +3,8 @@ package cn.timer.api.dto.yggl;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -3,10 +3,8 @@ package cn.timer.api.dto.yggl;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -3,7 +3,6 @@ package cn.timer.api.dto.yggl;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
......
......@@ -10,19 +10,19 @@ spring:
multipart:
max-file-size: 20MB
max-request-size: 20MB
# jpa:
# 11配置生成表 存储引擎InnoDB
jpa:
# 配置生成表 存储引擎InnoDB
# database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
# database:
# open-in-view: false
#naming:
# database:
# open-in-view: false
# naming:
# spring boot jpa hibernate 根据实体类生成表以及字段的命名策略
# 无修改命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
# 遇到大写字母 加”_”的命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
#physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
# hibernate:
# ddl-auto: update
# show-sql: true
# physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
hibernate:
ddl-auto: update
show-sql: true
datasource:
username: root
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