Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟
cust-api
Commits
975069f8
Commit
975069f8
authored
Dec 23, 2024
by
冷玲鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公告管理、banner管理:修改数据库字段
parent
29a036be
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
309 additions
and
154 deletions
+309
-154
CmsActivity.java
.../org/rcisoft/business/cmsActivity/entity/CmsActivity.java
+138
-54
CmsActivityServiceImpl.java
...ness/cmsActivity/service/impl/CmsActivityServiceImpl.java
+2
-2
CmsApplication.java
...cisoft/business/cmsApplication/entity/CmsApplication.java
+1
-1
CmsBanner.java
...java/org/rcisoft/business/cmsBanner/entity/CmsBanner.java
+2
-2
CmsNotice.java
...java/org/rcisoft/business/cmsNotice/entity/CmsNotice.java
+69
-10
CmsNoticeServiceImpl.java
...business/cmsNotice/service/impl/CmsNoticeServiceImpl.java
+2
-2
CmsActivityMapper.xml
.../mapper/business/cmsActivity.mapper/CmsActivityMapper.xml
+76
-62
CmsApplicationMapper.xml
...r/business/cmsApplication.mapper/CmsApplicationMapper.xml
+8
-8
CmsNoticeMapper.xml
...rces/mapper/business/cmsNotice.mapper/CmsNoticeMapper.xml
+4
-6
CmsBannerMapper.xml
...rces/mapper/business/cmsbanner/mapper/CmsBannerMapper.xml
+7
-7
No files found.
src/main/java/org/rcisoft/business/cmsActivity/entity/CmsActivity.java
View file @
975069f8
...
...
@@ -22,83 +22,133 @@ import java.util.Date;
public
class
CmsActivity
extends
CyIdIncreEntity
<
CmsActivity
>
{
/**
* @desc
标题
* @column
title
* @desc
创建人
* @column
create_by
* @default
*/
@Excel
(
name
=
"标题"
)
private
String
title
;
@Excel
(
name
=
"创建人"
)
@TableField
(
"create_by"
)
private
String
createBy
;
/**
* @desc
摘要
* @column
summary
* @desc
创建时间
* @column
create_date
* @default
*/
@Excel
(
name
=
"摘要"
)
private
String
summary
;
@Excel
(
name
=
"创建时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
@TableField
(
"create_date"
)
private
Date
createDate
;
/**
* @desc
封面
* @column
picture_id
* @desc
更新人
* @column
update_by
* @default
*/
@Excel
(
name
=
"封面"
)
private
String
pictureId
;
@Excel
(
name
=
"更新人"
)
@TableField
(
"update_by"
)
private
String
updateBy
;
/**
* @desc
是否置顶
* @column
is_top
* @desc
更新时间
* @column
update_date
* @default
*/
@Excel
(
name
=
"是否置顶"
)
private
Integer
isTop
;
@Excel
(
name
=
"更新时间"
)
@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
是否推荐
* @column
is_recommended
* @desc
删除标志(0删除,1已删除)
* @column
del_flag
* @default
*/
@Excel
(
name
=
"是否推荐"
)
private
Integer
isRecommended
;
@Excel
(
name
=
"删除标志(0删除,1已删除)"
)
@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
报名人数
* @column
participant_count
* @desc
内容
* @column
details
* @default
*/
@Excel
(
name
=
"
报名人数"
)
private
String
participantCount
;
@Excel
(
name
=
"
内容"
,
orderNum
=
"11"
,
width
=
20
)
private
String
details
;
/**
* @desc
是否需要报名
* @column
is_registration
* @desc
权重(排序)
* @column
weight
* @default
*/
@Excel
(
name
=
"
是否需要报名
"
)
private
Integer
isRegistration
;
@Excel
(
name
=
"
权重(排序)
"
)
private
Integer
weight
;
/**
* @desc
是否需要实名认证
* @column
is_authentication
* @desc
封面
* @column
picture_id
* @default
*/
@Excel
(
name
=
"
是否需要实名认证
"
)
private
Integer
isAuthentication
;
@Excel
(
name
=
"
封面
"
)
private
Integer
pictureId
;
/**
* @desc
报名所需费用
* @column
registration_fee
* @desc
男生数量
* @column
male_count
* @default
*/
@Excel
(
name
=
"
报名所需费用
"
)
private
BigDecimal
registrationFee
;
@Excel
(
name
=
"
男生数量
"
)
private
Integer
maleCount
;
/**
* @desc
排序
* @column
weigh
t
* @desc
女生数量
* @column
female_coun
t
* @default
*/
@Excel
(
name
=
"排序"
)
private
Integer
weight
;
@Excel
(
name
=
"女生数量"
)
private
Integer
femaleCount
;
/**
* @desc 报名人数
* @column application_count
* @default
*/
@Excel
(
name
=
"报名人数"
)
private
String
applicationCount
;
/**
* @desc 报名所需费用
* @column application_fee
* @default
*/
@Excel
(
name
=
"报名所需费用"
)
private
BigDecimal
applicationFee
;
/**
* @desc 发布日期
...
...
@@ -110,43 +160,77 @@ public class CmsActivity extends CyIdIncreEntity<CmsActivity> {
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
publishDate
;
/**
* @desc 发布状态(1启用、0禁用)
* @column publish_status
* @default
*/
@Excel
(
name
=
"发布状态(1启用、0禁用)"
,
orderNum
=
"11"
,
width
=
20
)
private
String
publishStatus
;
/**
* @desc
内容
* @column
details
* @desc
是否置顶
* @column
is_top
* @default
*/
@Excel
(
name
=
"
内容"
,
orderNum
=
"11"
,
width
=
20
)
private
String
details
;
@Excel
(
name
=
"
是否置顶"
)
private
Integer
isTop
;
/**
* @desc
发布状态(1启用、0禁用)
* @column
publish_status
* @desc
是否推荐
* @column
is_recommended
* @default
*/
@Excel
(
name
=
"发布状态(1启用、0禁用)"
,
orderNum
=
"11"
,
width
=
20
)
private
String
publishStatus
;
@Excel
(
name
=
"是否推荐"
)
private
Integer
isRecommended
;
/**
* @desc
备注
* @column
remarks
* @desc
是否需要报名
* @column
is_application
* @default
*/
@Excel
(
name
=
"备注"
,
orderNum
=
"11"
,
width
=
20
)
private
String
remarks
;
@Excel
(
name
=
"是否需要报名"
)
private
Integer
isApplication
;
/**
* @desc 是否需要实名认证
* @column is_authentication
* @default
*/
@Excel
(
name
=
"是否需要实名认证"
)
private
Integer
isAuthentication
;
/**
* 开始时间
* start_time
*/
@JsonIgnore
@TableField
(
exist
=
false
)
private
String
begin
Time
;
private
Date
start
Time
;
/**
* 结束时间
* end_time
*/
@JsonIgnore
@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
)
private
String
nickName
;
...
...
src/main/java/org/rcisoft/business/cmsActivity/service/impl/CmsActivityServiceImpl.java
View file @
975069f8
...
...
@@ -44,9 +44,9 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
//增加操作
cmsActivity
.
setDelFlag
(
"0"
);
//当图片字段没有时增加默认1
if
(
ObjectUtil
.
isNull
(
cmsActivity
.
getPictureId
()))
{
/*
if (ObjectUtil.isNull(cmsActivity.getPictureId())) {
cmsActivity.setPictureId(global.getDEFAULT_NEWS_LOCATION());
}
}
*/
CmsActivity
check
=
baseMapper
.
checkWeight
(
cmsActivity
.
getWeight
());
if
(
ObjectUtil
.
isNotNull
(
check
))
{
throw
new
CyServiceException
(
500
,
"权重已存在"
);
...
...
src/main/java/org/rcisoft/business/cmsApplication/entity/CmsApplication.java
View file @
975069f8
...
...
@@ -16,7 +16,7 @@ import java.util.Date;
/**
* Created with cy on 2024年3月25日 下午1:42:40.
*
* @author
llp
* @author
*/
@Data
@TableName
(
"cms_application"
)
...
...
src/main/java/org/rcisoft/business/cmsBanner/entity/CmsBanner.java
View file @
975069f8
...
...
@@ -17,11 +17,11 @@ public class CmsBanner extends CyIdIncreEntity<CmsBanner> {
/**
* @desc 图片
* @column
banner_picture
* @column
picture_id
* @default
*/
@Excel
(
name
=
"图片"
,
orderNum
=
"0"
,
width
=
20
)
private
String
bannerPicture
;
private
Integer
pictureId
;
/**
* @desc banner名字
...
...
src/main/java/org/rcisoft/business/cmsNotice/entity/CmsNotice.java
View file @
975069f8
...
...
@@ -15,12 +15,78 @@ import java.util.Date;
/**
* Created with cy on 2024年3月25日 下午1:42:40.
*
* @author
wangFeilong
* @author
*/
@Data
@TableName
(
"cms_notice"
)
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 标题
...
...
@@ -30,20 +96,13 @@ public class CmsNotice extends CyIdIncreEntity<CmsNotice> {
@Excel
(
name
=
"标题"
)
private
String
title
;
/**
* @desc 摘要
* @column summary
* @default
*/
@Excel
(
name
=
"摘要"
)
private
String
summary
;
/**
* @desc 封面
* @column picture_id
* @default
*/
@Excel
(
name
=
"封面"
)
private
String
pictureId
;
private
Integer
pictureId
;
/**
* @desc 是否置顶
...
...
@@ -85,7 +144,7 @@ public class CmsNotice extends CyIdIncreEntity<CmsNotice> {
* @column details
* @default
*/
@Excel
(
name
=
"内容"
,
orderNum
=
"11"
,
width
=
20
)
@Excel
(
name
=
"内容"
)
private
String
details
;
...
...
src/main/java/org/rcisoft/business/cmsNotice/service/impl/CmsNoticeServiceImpl.java
View file @
975069f8
...
...
@@ -44,9 +44,9 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
//增加操作
cmsNotice
.
setDelFlag
(
"0"
);
//当图片字段没有时增加默认1
if
(
ObjectUtil
.
isNull
(
cmsNotice
.
getPictureId
()))
{
/*
if (ObjectUtil.isNull(cmsNotice.getPictureId())) {
cmsNotice.setPictureId(global.getDEFAULT_NEWS_LOCATION());
}
}
*/
CmsNotice
check
=
baseMapper
.
checkWeight
(
cmsNotice
.
getWeight
());
if
(
ObjectUtil
.
isNotNull
(
check
))
{
throw
new
CyServiceException
(
500
,
"权重已存在"
);
...
...
src/main/resources/mapper/business/cmsActivity.mapper/CmsActivityMapper.xml
View file @
975069f8
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/business/cmsApplication.mapper/CmsApplicationMapper.xml
View file @
975069f8
...
...
@@ -91,25 +91,25 @@
and create_by like concat('%',#{entity.createBy},'%')
</if>
<if
test=
"entity.createDate != null and entity.createDate != '' "
>
and create_date
>
= #{entity.createDate}
and create_date = #{entity.createDate}
</if>
<if
test=
"entity.updateBy !=null and entity.updateBy != '' "
>
and update_by like concat('%',#{entity.updateBy},'%')
</if>
<if
test=
"entity.updateDate !=null and entity.updateDate != '' "
>
and update_date
<
= #{entity.updateDate}
and update_date = #{entity.updateDate}
</if>
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag
<
= #{entity.flag}
and flag = #{entity.flag}
</if>
<if
test=
"entity.delFlag !=null and entity.delFlag != '' "
>
and del_flag
<
= #{entity.delFlag}
and del_flag = #{entity.delFlag}
</if>
<if
test=
"entity.userId !=null and entity.userId != '' "
>
and user_id
<
= #{entity.userId}
and user_id = #{entity.userId}
</if>
<if
test=
"entity.activityId !=null and entity.activityId != '' "
>
and activity_id
<
= #{entity.activityId}
and activity_id = #{entity.activityId}
</if>
<if
test=
"entity.name !=null and entity.name != '' "
>
and name like concat('%',#{entity.name},'%')
...
...
@@ -118,10 +118,10 @@
and phone like concat('%',#{entity.phone},'%')
</if>
<if
test=
"entity.status !=null and entity.status != '' "
>
and status
<
= #{entity.status}
and status = #{entity.status}
</if>
<if
test=
"entity.applicationFee != null"
>
and application_fee
<
= #{entity.applicationFee}
and application_fee = #{entity.applicationFee}
</if>
<if
test=
"entity.remarks !=null and entity.remarks != '' "
>
and remarks like concat('%',#{entity.remarks},'%')
...
...
src/main/resources/mapper/business/cmsNotice.mapper/CmsNoticeMapper.xml
View file @
975069f8
...
...
@@ -3,7 +3,6 @@
<mapper
namespace=
"org.rcisoft.business.cmsNotice.dao.CmsNoticeRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.cmsNotice.entity.CmsNotice"
>
<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_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
...
...
@@ -15,7 +14,7 @@
<result
column=
"details"
jdbcType=
"VARCHAR"
property=
"details"
/>
<result
column=
"weight"
jdbcType=
"INTEGER"
property=
"weight"
/>
<result
column=
"picture_id"
jdbcType=
"
VARCHA
R"
property=
"pictureId"
/>
<result
column=
"picture_id"
jdbcType=
"
INTEGE
R"
property=
"pictureId"
/>
<result
column=
"is_recommended"
jdbcType=
"INTEGER"
property=
"isRecommended"
/>
<result
column=
"is_top"
jdbcType=
"INTEGER"
property=
"isTop"
/>
</resultMap>
...
...
@@ -59,7 +58,7 @@
and weight like concat('%',#{entity.weight},'%')
</if>
<if
test=
"entity.pictureId !=null and entity.pictureId != '' "
>
and picture_id
like concat('%',#{entity.pictureId},'%')
and picture_id
= #{entity.pictureId}
</if>
ORDER BY business_id DESC
</select>
...
...
@@ -72,7 +71,6 @@
cn.update_by,
cn.del_flag,
cn.flag,
cn.summary,
cn.title,
cn.weight,
cn.picture_id,
...
...
@@ -81,7 +79,7 @@
su.nick_name as nickName,
oi.path
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
where cn.del_flag='0'
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
...
...
@@ -109,7 +107,7 @@
and title like concat('%',#{entity.title},'%')
</if>
<if
test=
"entity.pictureId !=null and entity.pictureId != '' "
>
and picture_id
like concat('%',#{entity.pictureId},'%')
and picture_id
= #{entity.pictureId}
</if>
<if
test=
"entity.isRecommended !=null and entity.isRecommended != '' "
>
and is_recommended = #{entity.isRecommended}
...
...
src/main/resources/mapper/business/cmsbanner/mapper/CmsBannerMapper.xml
View file @
975069f8
...
...
@@ -4,7 +4,7 @@
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.cmsBanner.entity.CmsBanner"
>
<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=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"weight"
jdbcType=
"INTEGER"
property=
"weight"
/>
...
...
@@ -26,8 +26,8 @@
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<if
test=
"entity.
bannerPicture !=null and entity.bannerPicture
!= '' "
>
and
banner_picture like concat('%',#{entity.bannerPicture},'%')
<if
test=
"entity.
pictureId !=null and entity.pictureId
!= '' "
>
and
picture_id = #{entity.pictureId}
</if>
<if
test=
"entity.bannerName !=null and entity.bannerName != '' "
>
and banner_name like concat('%',#{entity.bannerName},'%')
...
...
@@ -43,14 +43,14 @@
<select
id=
"queryCmsBannersPaged"
resultMap=
"BaseResultMap"
>
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
and smb.del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and smb.flag = #{entity.flag}
</if>
<if
test=
"entity.
bannerPicture !=null and entity.bannerPicture
!= '' "
>
and smb.
banner_picture like concat('%',#{entity.bannerPicture},'%')
<if
test=
"entity.
pictureId !=null and entity.pictureId
!= '' "
>
and smb.
picture_id = #{entity.pictureId}
</if>
<if
test=
"entity.bannerName !=null and entity.bannerName != '' "
>
and smb.banner_name like concat('%',#{entity.bannerName},'%')
...
...
@@ -67,7 +67,7 @@
SELECT smb.*,
oi.url
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
and smb.del_flag = '0'
and smb.business_id = #{businessId}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment