Commit 975069f8 authored by 冷玲鹏's avatar 冷玲鹏

公告管理、banner管理:修改数据库字段

parent 29a036be
...@@ -22,83 +22,133 @@ import java.util.Date; ...@@ -22,83 +22,133 @@ import java.util.Date;
public class CmsActivity extends CyIdIncreEntity<CmsActivity> { public class CmsActivity extends CyIdIncreEntity<CmsActivity> {
/** /**
* @desc 标题 * @desc 创建人
* @column title * @column create_by
* @default * @default
*/ */
@Excel(name = "标题") @Excel(name = "创建人")
private String title; @TableField("create_by")
private String createBy;
/** /**
* @desc 摘要 * @desc 创建时间
* @column summary * @column create_date
* @default * @default
*/ */
@Excel(name = "摘要") @Excel(name = "创建时间")
private String summary; @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@TableField("create_date")
private Date createDate;
/** /**
* @desc 封面 * @desc 更新人
* @column picture_id * @column update_by
* @default * @default
*/ */
@Excel(name = "封面") @Excel(name = "更新人")
private String pictureId; @TableField("update_by")
private String updateBy;
/** /**
* @desc 是否置顶 * @desc 更新时间
* @column is_top * @column update_date
* @default * @default
*/ */
@Excel(name = "是否置顶") @Excel(name = "更新时间")
private Integer isTop; @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@TableField("update_date")
private Date updateDate;
/**
* @desc 启动状态(0禁用、1启动)
* @column flag
* @default
*/
@Excel(name = "启动状态(0禁用、1启动)")
@TableField("flag")
private String flag;
/** /**
* @desc 是否推荐 * @desc 删除标志(0删除,1已删除)
* @column is_recommended * @column del_flag
* @default * @default
*/ */
@Excel(name = "是否推荐") @Excel(name = "删除标志(0删除,1已删除)")
private Integer isRecommended; @TableField("del_flag")
private String delFlag;
/**
* @desc 备注
* @column remarks
* @default
*/
@JsonIgnore
@Excel(name = "备注")
@TableField("remarks")
private String remarks;
/**
* @desc 活动标题
* @column title
* @default
*/
@Excel(name = "活动标题")
private String title;
/** /**
* @desc 报名人数 * @desc 内容
* @column participant_count * @column details
* @default * @default
*/ */
@Excel(name = "报名人数") @Excel(name = "内容", orderNum = "11", width = 20)
private String participantCount; private String details;
/** /**
* @desc 是否需要报名 * @desc 权重(排序)
* @column is_registration * @column weight
* @default * @default
*/ */
@Excel(name = "是否需要报名") @Excel(name = "权重(排序)")
private Integer isRegistration; private Integer weight;
/** /**
* @desc 是否需要实名认证 * @desc 封面
* @column is_authentication * @column picture_id
* @default * @default
*/ */
@Excel(name = "是否需要实名认证") @Excel(name = "封面")
private Integer isAuthentication; private Integer pictureId;
/** /**
* @desc 报名所需费用 * @desc 男生数量
* @column registration_fee * @column male_count
* @default * @default
*/ */
@Excel(name = "报名所需费用") @Excel(name = "男生数量")
private BigDecimal registrationFee; private Integer maleCount;
/** /**
* @desc 排序 * @desc 女生数量
* @column weight * @column female_count
* @default * @default
*/ */
@Excel(name = "排序") @Excel(name = "女生数量")
private Integer weight; private Integer femaleCount;
/**
* @desc 报名人数
* @column application_count
* @default
*/
@Excel(name = "报名人数")
private String applicationCount;
/**
* @desc 报名所需费用
* @column application_fee
* @default
*/
@Excel(name = "报名所需费用")
private BigDecimal applicationFee;
/** /**
* @desc 发布日期 * @desc 发布日期
...@@ -110,43 +160,77 @@ public class CmsActivity extends CyIdIncreEntity<CmsActivity> { ...@@ -110,43 +160,77 @@ public class CmsActivity extends CyIdIncreEntity<CmsActivity> {
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date publishDate; private Date publishDate;
/**
* @desc 发布状态(1启用、0禁用)
* @column publish_status
* @default
*/
@Excel(name = "发布状态(1启用、0禁用)", orderNum = "11", width = 20)
private String publishStatus;
/** /**
* @desc 内容 * @desc 是否置顶
* @column details * @column is_top
* @default * @default
*/ */
@Excel(name = "内容", orderNum = "11", width = 20) @Excel(name = "是否置顶")
private String details; private Integer isTop;
/** /**
* @desc 发布状态(1启用、0禁用) * @desc 是否推荐
* @column publish_status * @column is_recommended
* @default * @default
*/ */
@Excel(name = "发布状态(1启用、0禁用)", orderNum = "11", width = 20) @Excel(name = "是否推荐")
private String publishStatus; private Integer isRecommended;
/** /**
* @desc 备注 * @desc 是否需要报名
* @column remarks * @column is_application
* @default * @default
*/ */
@Excel(name = "备注", orderNum = "11", width = 20) @Excel(name = "是否需要报名")
private String remarks; private Integer isApplication;
/**
* @desc 是否需要实名认证
* @column is_authentication
* @default
*/
@Excel(name = "是否需要实名认证")
private Integer isAuthentication;
/** /**
* 开始时间 * 开始时间
* start_time
*/ */
@JsonIgnore @JsonIgnore
@TableField(exist = false) @TableField(exist = false)
private String beginTime; private Date startTime;
/** /**
* 结束时间 * 结束时间
* end_time
*/ */
@JsonIgnore @JsonIgnore
@TableField(exist = false) @TableField(exist = false)
private String endTime; private Date endTime;
/*
*//**
* 开始时间
*//*
@JsonIgnore
@TableField(exist = false)
private String beginTime;
*//**
* 结束时间
*//*
@JsonIgnore
@TableField(exist = false)
private String endTime;*/
@TableField(exist = false) @TableField(exist = false)
private String nickName; private String nickName;
......
...@@ -44,9 +44,9 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C ...@@ -44,9 +44,9 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
//增加操作 //增加操作
cmsActivity.setDelFlag("0"); cmsActivity.setDelFlag("0");
//当图片字段没有时增加默认1 //当图片字段没有时增加默认1
if (ObjectUtil.isNull(cmsActivity.getPictureId())) { /* if (ObjectUtil.isNull(cmsActivity.getPictureId())) {
cmsActivity.setPictureId(global.getDEFAULT_NEWS_LOCATION()); cmsActivity.setPictureId(global.getDEFAULT_NEWS_LOCATION());
} }*/
CmsActivity check = baseMapper.checkWeight(cmsActivity.getWeight()); CmsActivity check = baseMapper.checkWeight(cmsActivity.getWeight());
if (ObjectUtil.isNotNull(check)) { if (ObjectUtil.isNotNull(check)) {
throw new CyServiceException(500, "权重已存在"); throw new CyServiceException(500, "权重已存在");
......
...@@ -16,7 +16,7 @@ import java.util.Date; ...@@ -16,7 +16,7 @@ import java.util.Date;
/** /**
* Created with cy on 2024年3月25日 下午1:42:40. * Created with cy on 2024年3月25日 下午1:42:40.
* *
* @author llp * @author
*/ */
@Data @Data
@TableName("cms_application") @TableName("cms_application")
......
...@@ -17,11 +17,11 @@ public class CmsBanner extends CyIdIncreEntity<CmsBanner> { ...@@ -17,11 +17,11 @@ public class CmsBanner extends CyIdIncreEntity<CmsBanner> {
/** /**
* @desc 图片 * @desc 图片
* @column banner_picture * @column picture_id
* @default * @default
*/ */
@Excel(name = "图片", orderNum = "0", width = 20) @Excel(name = "图片", orderNum = "0", width = 20)
private String bannerPicture; private Integer pictureId;
/** /**
* @desc banner名字 * @desc banner名字
......
...@@ -15,12 +15,78 @@ import java.util.Date; ...@@ -15,12 +15,78 @@ import java.util.Date;
/** /**
* Created with cy on 2024年3月25日 下午1:42:40. * Created with cy on 2024年3月25日 下午1:42:40.
* *
* @author wangFeilong * @author
*/ */
@Data @Data
@TableName("cms_notice") @TableName("cms_notice")
public class CmsNotice extends CyIdIncreEntity<CmsNotice> { public class CmsNotice extends CyIdIncreEntity<CmsNotice> {
/**
* @desc 创建人
* @column create_by
* @default
*/
@Excel(name = "创建人")
@TableField("create_by")
private String createBy;
/**
* @desc 创建时间
* @column create_date
* @default
*/
@Excel(name = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@TableField("create_date")
private Date createDate;
/**
* @desc 更新人
* @column update_by
* @default
*/
@Excel(name = "更新人")
@TableField("update_by")
private String updateBy;
/**
* @desc 更新时间
* @column update_date
* @default
*/
@Excel(name = "更新时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@TableField("update_date")
private Date updateDate;
/**
* @desc 备注
* @column remarks
* @default
*/
@JsonIgnore
@Excel(name = "备注")
@TableField("remarks")
private String remarks;
/**
* @desc 启动状态(0禁用、1启动)
* @column flag
* @default
*/
@Excel(name = "启动状态(0禁用、1启动)")
@TableField("flag")
private String flag;
/**
* @desc 删除标志(0删除,1已删除)
* @column del_flag
* @default
*/
@Excel(name = "删除标志(0删除,1已删除)")
@TableField("del_flag")
private String delFlag;
/** /**
* @desc 标题 * @desc 标题
...@@ -30,20 +96,13 @@ public class CmsNotice extends CyIdIncreEntity<CmsNotice> { ...@@ -30,20 +96,13 @@ public class CmsNotice extends CyIdIncreEntity<CmsNotice> {
@Excel(name = "标题") @Excel(name = "标题")
private String title; private String title;
/**
* @desc 摘要
* @column summary
* @default
*/
@Excel(name = "摘要")
private String summary;
/** /**
* @desc 封面 * @desc 封面
* @column picture_id * @column picture_id
* @default * @default
*/ */
@Excel(name = "封面") @Excel(name = "封面")
private String pictureId; private Integer pictureId;
/** /**
* @desc 是否置顶 * @desc 是否置顶
...@@ -85,7 +144,7 @@ public class CmsNotice extends CyIdIncreEntity<CmsNotice> { ...@@ -85,7 +144,7 @@ public class CmsNotice extends CyIdIncreEntity<CmsNotice> {
* @column details * @column details
* @default * @default
*/ */
@Excel(name = "内容", orderNum = "11", width = 20) @Excel(name = "内容")
private String details; private String details;
......
...@@ -44,9 +44,9 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo ...@@ -44,9 +44,9 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
//增加操作 //增加操作
cmsNotice.setDelFlag("0"); cmsNotice.setDelFlag("0");
//当图片字段没有时增加默认1 //当图片字段没有时增加默认1
if (ObjectUtil.isNull(cmsNotice.getPictureId())) { /* if (ObjectUtil.isNull(cmsNotice.getPictureId())) {
cmsNotice.setPictureId(global.getDEFAULT_NEWS_LOCATION()); cmsNotice.setPictureId(global.getDEFAULT_NEWS_LOCATION());
} }*/
CmsNotice check = baseMapper.checkWeight(cmsNotice.getWeight()); CmsNotice check = baseMapper.checkWeight(cmsNotice.getWeight());
if (ObjectUtil.isNotNull(check)) { if (ObjectUtil.isNotNull(check)) {
throw new CyServiceException(500, "权重已存在"); throw new CyServiceException(500, "权重已存在");
......
...@@ -3,54 +3,62 @@ ...@@ -3,54 +3,62 @@
<mapper namespace="org.rcisoft.business.cmsActivity.dao.CmsActivityRepository"> <mapper namespace="org.rcisoft.business.cmsActivity.dao.CmsActivityRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.business.cmsActivity.entity.CmsActivity"> <resultMap id="BaseResultMap" type="org.rcisoft.business.cmsActivity.entity.CmsActivity">
<id column="business_id" jdbcType="INTEGER" property="businessId"/> <id column="business_id" jdbcType="INTEGER" property="businessId"/>
<result column="summary" jdbcType="VARCHAR" property="summary"/>
<result column="publish_date" jdbcType="DATE" property="publishDate"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/> <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> <result column="create_date" jdbcType="DATE" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/> <result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="DATE" property="updateDate"/> <result column="update_date" jdbcType="DATE" property="updateDate"/>
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/> <result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/> <result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="title" jdbcType="VARCHAR" property="title"/> <result column="title" jdbcType="VARCHAR" property="title"/>
<result column="details" jdbcType="VARCHAR" property="details"/> <result column="details" jdbcType="VARCHAR" property="details"/>
<result column="weight" jdbcType="INTEGER" property="weight"/> <result column="weight" jdbcType="INTEGER" property="weight"/>
<result column="picture_id" jdbcType="VARCHAR" property="pictureId"/> <result column="picture_id" jdbcType="INTEGER" property="pictureId"/>
<result column="is_recommended" jdbcType="INTEGER" property="isRecommended"/> <result column="maleCount" jdbcType="INTEGER" property="maleCount"/>
<result column="female_count" jdbcType="INTEGER" property="femaleCount"/>
<result column="application_count" jdbcType="VARCHAR" property="applicationCount"/>
<result column="application_fee" jdbcType="FLOAT" property="applicationFee"/>
<result column="publish_date" jdbcType="DATE" property="publishDate"/>
<result column="publish_status" jdbcType="VARCHAR" property="publishStatus"/>
<result column="is_top" jdbcType="INTEGER" property="isTop"/> <result column="is_top" jdbcType="INTEGER" property="isTop"/>
<result column="is_recommended" jdbcType="INTEGER" property="isRecommended"/>
<result column="participant_count" jdbcType="VARCHAR" property="participantCount"/> <result column="is_application" jdbcType="INTEGER" property="isApplication"/>
<result column="is_registration" jdbcType="INTEGER" property="isRegistration"/>
<result column="is_authentication" jdbcType="INTEGER" property="isAuthentication"/> <result column="is_authentication" jdbcType="INTEGER" property="isAuthentication"/>
<result column="registration_fee" jdbcType="FLOAT" property="registrationFee"/> <result column="start_time" jdbcType="DATE" property="startTime"/>
<result column="end_time" jdbcType="DATE" property="endTime"/>
</resultMap> </resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>--> <!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryCmsActivity" resultMap="BaseResultMap"> <select id="queryCmsActivity" resultMap="BaseResultMap">
select * from cms_activity select * from cms_activity
where 1=1 where 1=1
<if test="entity.beginTime !=null and entity.beginTime != '' "> <!-- <if test="entity.beginTime !=null and entity.beginTime != '' ">
and publish_date &gt;= #{entity.beginTime} and publish_date &gt;= #{entity.beginTime}
</if> </if>
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.endTime !=null and entity.endTime != '' ">
and publish_date &lt;= #{entity.endTime} and publish_date &lt;= #{entity.endTime}
</if> </if>
<if test="entity.createBy !=null and entity.createBy != '' ">
and create_by like concat('%',#{entity.createBy},'%')
</if>
<if test="entity.beginTime !=null and entity.beginTime != '' "> <if test="entity.beginTime !=null and entity.beginTime != '' ">
and create_date &gt;= #{entity.beginTime} and create_date &gt;= #{entity.beginTime}
</if> </if>
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.endTime !=null and entity.endTime != '' ">
and create_date &lt;= #{entity.endTime} and create_date &lt;= #{entity.endTime}
</if>-->
<if test="entity.createBy !=null and entity.createBy != '' ">
and create_by like concat('%',#{entity.createBy},'%')
</if> </if>
<if test="entity.createDate !=null and entity.createDate != '' ">
and create_date = #{entity.createDate}
</if>
<if test="entity.updateBy !=null and entity.updateBy != '' "> <if test="entity.updateBy !=null and entity.updateBy != '' ">
and update_by like concat('%',#{entity.updateBy},'%') and update_by like concat('%',#{entity.updateBy},'%')
</if> </if>
<if test="entity.beginTime !=null and entity.beginTime != '' "> <if test="entity.updateDate !=null and entity.updateDate != '' ">
and update_date &gt;= #{entity.beginTime} and update_date = #{entity.updateDate}
</if> </if>
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.remarks !=null and entity.remarks != '' ">
and update_date &lt;= #{entity.endTime} and remarks like concat('%',#{entity.remarks},'%')
</if> </if>
<if test="entity.title !=null and entity.title != '' "> <if test="entity.title !=null and entity.title != '' ">
and title like concat('%',#{entity.title},'%') and title like concat('%',#{entity.title},'%')
...@@ -58,14 +66,16 @@ ...@@ -58,14 +66,16 @@
<if test="entity.details !=null and entity.details != '' "> <if test="entity.details !=null and entity.details != '' ">
and details like concat('%',#{entity.details},'%') and details like concat('%',#{entity.details},'%')
</if> </if>
<if test="entity.registrationFee !=null and entity.registrationFee != '' ">
and registration_fee like concat('%',#{entity.registrationFee},'%')
</if>
<if test="entity.weight !=null and entity.weight != '' "> <if test="entity.weight !=null and entity.weight != '' ">
and weight like concat('%',#{entity.weight},'%') and weight like concat('%',#{entity.weight},'%')
</if> </if>
<if test="entity.applicationFee !=null and entity.applicationFee != '' ">
and application_fee like concat('%',#{entity.applicationFee},'%')
</if>
<if test="entity.pictureId !=null and entity.pictureId != '' "> <if test="entity.pictureId !=null and entity.pictureId != '' ">
and picture_id like concat('%',#{entity.pictureId},'%') and picture_id = #{entity.pictureId}
</if> </if>
ORDER BY business_id DESC ORDER BY business_id DESC
</select> </select>
...@@ -76,35 +86,39 @@ ...@@ -76,35 +86,39 @@
ca.create_by, ca.create_by,
ca.create_date, ca.create_date,
ca.update_by, ca.update_by,
ca.update_date,
ca.del_flag, ca.del_flag,
ca.flag, ca.flag,
ca.summary,
ca.title, ca.title,
ca.details,
ca.weight, ca.weight,
ca.picture_id, ca.picture_id,
applicationList.application_count,
ca.application_fee,
ca.publish_status,
ca.is_recommended, ca.is_recommended,
applicationList.participant_count,
ca.is_top, ca.is_top,
ca.is_registration, ca.is_application,
ca.is_authentication, ca.is_authentication,
ca.registration_fee, ca.start_time,
ca.end_time,
su.nick_name as nickName, su.nick_name as nickName,
oi.path oi.path
FROM cms_activity ca FROM cms_activity ca
LEFT JOIN LEFT JOIN
(SELECT activity_id, COUNT(*) AS participant_count (SELECT activity_id, COUNT(*) AS application_count
FROM cms_application FROM cms_application
GROUP BY activity_id) AS applicationList GROUP BY activity_id) AS applicationList
ON ca.business_id = applicationList.activity_id ON ca.business_id = applicationList.activity_id
LEFT JOIN oss_info oi on oi.business_id = ca.picture_id LEFT JOIN oss_info oi on ca.picture_id = oi.business_id
LEFT JOIN sys_user su on su.business_id = ca.create_by LEFT JOIN sys_user su on su.business_id = ca.create_by
where ca.del_flag='0' where ca.del_flag='0'
<if test="entity.beginTime !=null and entity.beginTime != '' "> <!-- <if test="entity.beginTime !=null and entity.beginTime != '' ">
and publish_date &gt;= #{entity.beginTime} and publish_date &gt;= #{entity.beginTime}
</if> </if>
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.endTime !=null and entity.endTime != '' ">
and publish_date &lt;= #{entity.endTime} and publish_date &lt;= #{entity.endTime}
</if> </if>-->
<if test="entity.flag!=null and entity.flag != '' "> <if test="entity.flag!=null and entity.flag != '' ">
and ca.flag = #{entity.flag} and ca.flag = #{entity.flag}
</if> </if>
...@@ -112,26 +126,26 @@ ...@@ -112,26 +126,26 @@
<if test="entity.createBy !=null and entity.createBy != '' "> <if test="entity.createBy !=null and entity.createBy != '' ">
and create_by like concat('%',#{entity.createBy},'%') and create_by like concat('%',#{entity.createBy},'%')
</if> </if>
<if test="entity.beginTime !=null "> <!-- <if test="entity.beginTime !=null ">
and ca.publish_date &gt;= #{entity.beginTime} and ca.publish_date &gt;= #{entity.beginTime}
</if> </if>
<if test="entity.endTime !=null "> <if test="entity.endTime !=null ">
and ca.publish_date &lt;= #{entity.endTime} and ca.publish_date &lt;= #{entity.endTime}
</if> </if>-->
<if test="entity.updateBy !=null and entity.updateBy != '' "> <if test="entity.updateBy !=null and entity.updateBy != '' ">
and update_by like concat('%',#{entity.updateBy},'%') and update_by like concat('%',#{entity.updateBy},'%')
</if> </if>
<if test="entity.title !=null and entity.title != '' "> <if test="entity.title !=null and entity.title != '' ">
and title like concat('%',#{entity.title},'%') and title like concat('%',#{entity.title},'%')
</if> </if>
<if test="entity.registrationFee !=null and entity.registrationFee != '' "> <if test="entity.applicationFee !=null and entity.applicationFee != '' ">
and registration_fee = #{entity.registrationFee} and application_fee = #{entity.applicationFee}
</if> </if>
<if test="entity.pictureId !=null and entity.pictureId != '' "> <if test="entity.pictureId !=null and entity.pictureId != '' ">
and picture_id like concat('%',#{entity.pictureId},'%') and picture_id = #{entity.pictureId}
</if> </if>
<if test="entity.isRegistration !=null and entity.isRegistration != '' "> <if test="entity.isApplication !=null and entity.isApplication != '' ">
and is_registration = #{entity.isRegistration} and is_application = #{entity.isApplication}
</if> </if>
<if test="entity.isAuthentication !=null and entity.isAuthentication != '' "> <if test="entity.isAuthentication !=null and entity.isAuthentication != '' ">
and is_authentication = #{entity.isAuthentication} and is_authentication = #{entity.isAuthentication}
......
...@@ -91,25 +91,25 @@ ...@@ -91,25 +91,25 @@
and create_by like concat('%',#{entity.createBy},'%') and create_by like concat('%',#{entity.createBy},'%')
</if> </if>
<if test="entity.createDate != null and entity.createDate != '' "> <if test="entity.createDate != null and entity.createDate != '' ">
and create_date >= #{entity.createDate} and create_date = #{entity.createDate}
</if> </if>
<if test="entity.updateBy !=null and entity.updateBy != '' "> <if test="entity.updateBy !=null and entity.updateBy != '' ">
and update_by like concat('%',#{entity.updateBy},'%') and update_by like concat('%',#{entity.updateBy},'%')
</if> </if>
<if test="entity.updateDate !=null and entity.updateDate != '' "> <if test="entity.updateDate !=null and entity.updateDate != '' ">
and update_date &lt;= #{entity.updateDate} and update_date = #{entity.updateDate}
</if> </if>
<if test="entity.flag !=null and entity.flag != '' "> <if test="entity.flag !=null and entity.flag != '' ">
and flag &lt;= #{entity.flag} and flag = #{entity.flag}
</if> </if>
<if test="entity.delFlag !=null and entity.delFlag != '' "> <if test="entity.delFlag !=null and entity.delFlag != '' ">
and del_flag &lt;= #{entity.delFlag} and del_flag = #{entity.delFlag}
</if> </if>
<if test="entity.userId !=null and entity.userId != '' "> <if test="entity.userId !=null and entity.userId != '' ">
and user_id &lt;= #{entity.userId} and user_id = #{entity.userId}
</if> </if>
<if test="entity.activityId !=null and entity.activityId != '' "> <if test="entity.activityId !=null and entity.activityId != '' ">
and activity_id &lt;= #{entity.activityId} and activity_id = #{entity.activityId}
</if> </if>
<if test="entity.name !=null and entity.name != '' "> <if test="entity.name !=null and entity.name != '' ">
and name like concat('%',#{entity.name},'%') and name like concat('%',#{entity.name},'%')
...@@ -118,10 +118,10 @@ ...@@ -118,10 +118,10 @@
and phone like concat('%',#{entity.phone},'%') and phone like concat('%',#{entity.phone},'%')
</if> </if>
<if test="entity.status !=null and entity.status != '' "> <if test="entity.status !=null and entity.status != '' ">
and status &lt;= #{entity.status} and status = #{entity.status}
</if> </if>
<if test="entity.applicationFee != null"> <if test="entity.applicationFee != null">
and application_fee &lt;= #{entity.applicationFee} and application_fee = #{entity.applicationFee}
</if> </if>
<if test="entity.remarks !=null and entity.remarks != '' "> <if test="entity.remarks !=null and entity.remarks != '' ">
and remarks like concat('%',#{entity.remarks},'%') and remarks like concat('%',#{entity.remarks},'%')
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<mapper namespace="org.rcisoft.business.cmsNotice.dao.CmsNoticeRepository"> <mapper namespace="org.rcisoft.business.cmsNotice.dao.CmsNoticeRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.business.cmsNotice.entity.CmsNotice"> <resultMap id="BaseResultMap" type="org.rcisoft.business.cmsNotice.entity.CmsNotice">
<id column="business_id" jdbcType="INTEGER" property="businessId"/> <id column="business_id" jdbcType="INTEGER" property="businessId"/>
<result column="summary" jdbcType="VARCHAR" property="summary"/>
<result column="publish_date" jdbcType="DATE" property="publishDate"/> <result column="publish_date" jdbcType="DATE" property="publishDate"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/> <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
...@@ -15,7 +14,7 @@ ...@@ -15,7 +14,7 @@
<result column="details" jdbcType="VARCHAR" property="details"/> <result column="details" jdbcType="VARCHAR" property="details"/>
<result column="weight" jdbcType="INTEGER" property="weight"/> <result column="weight" jdbcType="INTEGER" property="weight"/>
<result column="picture_id" jdbcType="VARCHAR" property="pictureId"/> <result column="picture_id" jdbcType="INTEGER" property="pictureId"/>
<result column="is_recommended" jdbcType="INTEGER" property="isRecommended"/> <result column="is_recommended" jdbcType="INTEGER" property="isRecommended"/>
<result column="is_top" jdbcType="INTEGER" property="isTop"/> <result column="is_top" jdbcType="INTEGER" property="isTop"/>
</resultMap> </resultMap>
...@@ -59,7 +58,7 @@ ...@@ -59,7 +58,7 @@
and weight like concat('%',#{entity.weight},'%') and weight like concat('%',#{entity.weight},'%')
</if> </if>
<if test="entity.pictureId !=null and entity.pictureId != '' "> <if test="entity.pictureId !=null and entity.pictureId != '' ">
and picture_id like concat('%',#{entity.pictureId},'%') and picture_id = #{entity.pictureId}
</if> </if>
ORDER BY business_id DESC ORDER BY business_id DESC
</select> </select>
...@@ -72,7 +71,6 @@ ...@@ -72,7 +71,6 @@
cn.update_by, cn.update_by,
cn.del_flag, cn.del_flag,
cn.flag, cn.flag,
cn.summary,
cn.title, cn.title,
cn.weight, cn.weight,
cn.picture_id, cn.picture_id,
...@@ -81,7 +79,7 @@ ...@@ -81,7 +79,7 @@
su.nick_name as nickName, su.nick_name as nickName,
oi.path oi.path
FROM cms_notice cn FROM cms_notice cn
LEFT JOIN oss_info oi on oi.business_id = cn.picture_id LEFT JOIN oss_info oi on cn.picture_id = oi.business_id
LEFT JOIN sys_user su on su.business_id = cn.create_by LEFT JOIN sys_user su on su.business_id = cn.create_by
where cn.del_flag='0' where cn.del_flag='0'
<if test="entity.beginTime !=null and entity.beginTime != '' "> <if test="entity.beginTime !=null and entity.beginTime != '' ">
...@@ -109,7 +107,7 @@ ...@@ -109,7 +107,7 @@
and title like concat('%',#{entity.title},'%') and title like concat('%',#{entity.title},'%')
</if> </if>
<if test="entity.pictureId !=null and entity.pictureId != '' "> <if test="entity.pictureId !=null and entity.pictureId != '' ">
and picture_id like concat('%',#{entity.pictureId},'%') and picture_id = #{entity.pictureId}
</if> </if>
<if test="entity.isRecommended !=null and entity.isRecommended != '' "> <if test="entity.isRecommended !=null and entity.isRecommended != '' ">
and is_recommended = #{entity.isRecommended} and is_recommended = #{entity.isRecommended}
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<resultMap id="BaseResultMap" type="org.rcisoft.business.cmsBanner.entity.CmsBanner"> <resultMap id="BaseResultMap" type="org.rcisoft.business.cmsBanner.entity.CmsBanner">
<id column="business_id" jdbcType="INTEGER" property="businessId"/> <id column="business_id" jdbcType="INTEGER" property="businessId"/>
<result column="banner_picture" jdbcType="VARCHAR" property="bannerPicture"/> <result column="picture_id" jdbcType="INTEGER" property="pictureId"/>
<result column="banner_name" jdbcType="VARCHAR" property="bannerName"/> <result column="banner_name" jdbcType="VARCHAR" property="bannerName"/>
<result column="type" jdbcType="VARCHAR" property="type"/> <result column="type" jdbcType="VARCHAR" property="type"/>
<result column="weight" jdbcType="INTEGER" property="weight"/> <result column="weight" jdbcType="INTEGER" property="weight"/>
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<if test="entity.flag !=null and entity.flag != '' "> <if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag} and flag = #{entity.flag}
</if> </if>
<if test="entity.bannerPicture !=null and entity.bannerPicture != '' "> <if test="entity.pictureId !=null and entity.pictureId != '' ">
and banner_picture like concat('%',#{entity.bannerPicture},'%') and picture_id = #{entity.pictureId}
</if> </if>
<if test="entity.bannerName !=null and entity.bannerName != '' "> <if test="entity.bannerName !=null and entity.bannerName != '' ">
and banner_name like concat('%',#{entity.bannerName},'%') and banner_name like concat('%',#{entity.bannerName},'%')
...@@ -43,14 +43,14 @@ ...@@ -43,14 +43,14 @@
<select id="queryCmsBannersPaged" resultMap="BaseResultMap"> <select id="queryCmsBannersPaged" resultMap="BaseResultMap">
select smb.*,oi.url from cms_banner smb select smb.*,oi.url from cms_banner smb
left join oss_info oi on smb.banner_picture = oi.business_id left join oss_info oi on smb.picture_id = oi.business_id
where 1=1 where 1=1
and smb.del_flag = '0' and smb.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' "> <if test="entity.flag !=null and entity.flag != '' ">
and smb.flag = #{entity.flag} and smb.flag = #{entity.flag}
</if> </if>
<if test="entity.bannerPicture !=null and entity.bannerPicture != '' "> <if test="entity.pictureId !=null and entity.pictureId != '' ">
and smb.banner_picture like concat('%',#{entity.bannerPicture},'%') and smb.picture_id = #{entity.pictureId}
</if> </if>
<if test="entity.bannerName !=null and entity.bannerName != '' "> <if test="entity.bannerName !=null and entity.bannerName != '' ">
and smb.banner_name like concat('%',#{entity.bannerName},'%') and smb.banner_name like concat('%',#{entity.bannerName},'%')
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
SELECT smb.*, SELECT smb.*,
oi.url oi.url
FROM cms_banner smb FROM cms_banner smb
LEFT JOIN oss_info oi ON oi.business_id = smb.banner_picture LEFT JOIN oss_info oi ON oi.business_id = smb.picture_id
where 1 = 1 where 1 = 1
and smb.del_flag = '0' and smb.del_flag = '0'
and smb.business_id = #{businessId} and smb.business_id = #{businessId}
......
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