Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
roncoo
roncoo-education
提交
14f27fdd
R
roncoo-education
项目概览
roncoo
/
roncoo-education
大约 1 年 前同步成功
通知
146
Star
5
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roncoo-education
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
14f27fdd
编写于
9月 16, 2022
作者:
F
fengyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
轮播功能
上级
5bd9670c
变更
17
展开全部
隐藏空白更改
内联
并排
Showing
17 changed file
with
723 addition
and
434 deletion
+723
-434
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/WebsiteCarouselDao.java
...a/com/roncoo/education/system/dao/WebsiteCarouselDao.java
+12
-12
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/WebsiteCarouselDaoImpl.java
...coo/education/system/dao/impl/WebsiteCarouselDaoImpl.java
+13
-13
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/mapper/WebsiteCarouselMapper.java
...ucation/system/dao/impl/mapper/WebsiteCarouselMapper.java
+32
-0
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/mapper/entity/WebsiteCarousel.java
...cation/system/dao/impl/mapper/entity/WebsiteCarousel.java
+25
-47
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/mapper/entity/WebsiteCarouselExample.java
...system/dao/impl/mapper/entity/WebsiteCarouselExample.java
+114
-234
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/AdminWebsiteCarouselController.java
.../system/service/admin/AdminWebsiteCarouselController.java
+13
-13
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/biz/AdminWebsiteCarouselBiz.java
...ion/system/service/admin/biz/AdminWebsiteCarouselBiz.java
+22
-22
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/req/AdminWebsiteCarouselEditReq.java
...system/service/admin/req/AdminWebsiteCarouselEditReq.java
+8
-15
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/req/AdminWebsiteCarouselPageReq.java
...system/service/admin/req/AdminWebsiteCarouselPageReq.java
+8
-15
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/req/AdminWebsiteCarouselSaveReq.java
...system/service/admin/req/AdminWebsiteCarouselSaveReq.java
+8
-15
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/resp/AdminWebsiteCarouselPageResp.java
...stem/service/admin/resp/AdminWebsiteCarouselPageResp.java
+8
-15
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/resp/AdminWebsiteCarouselViewResp.java
...stem/service/admin/resp/AdminWebsiteCarouselViewResp.java
+8
-15
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/api/ApiWebsiteCarouselController.java
...tion/system/service/api/ApiWebsiteCarouselController.java
+8
-6
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/api/biz/ApiWebsiteCarouselBiz.java
...ucation/system/service/api/biz/ApiWebsiteCarouselBiz.java
+11
-12
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/api/req/ApiWebsiteCarouselReq.java
...ucation/system/service/api/req/ApiWebsiteCarouselReq.java
+62
-0
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/api/resp/ApiWebsiteCarouselResp.java
...ation/system/service/api/resp/ApiWebsiteCarouselResp.java
+62
-0
roncoo-education-system/roncoo-education-system-service/src/main/resources/mybatis/WebsiteCarouselMapper.xml
...vice/src/main/resources/mybatis/WebsiteCarouselMapper.xml
+309
-0
未找到文件。
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/Website
Adv
Dao.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/Website
Carousel
Dao.java
浏览文件 @
14f27fdd
package
com.roncoo.education.system.dao
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Adv
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Adv
Example
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Carousel
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Carousel
Example
;
import
java.util.List
;
...
...
@@ -10,9 +10,9 @@ import java.util.List;
* 广告信息 服务类
*
* @author wujing
* @date 2022-0
8-25
* @date 2022-0
9-16
*/
public
interface
Website
Adv
Dao
{
public
interface
Website
Carousel
Dao
{
/**
* 保存广告信息
...
...
@@ -20,7 +20,7 @@ public interface WebsiteAdvDao {
* @param record 广告信息
* @return 影响记录数
*/
int
save
(
Website
Adv
record
);
int
save
(
Website
Carousel
record
);
/**
* 根据ID删除广告信息
...
...
@@ -36,7 +36,7 @@ public interface WebsiteAdvDao {
* @param record 广告信息
* @return 影响记录数
*/
int
updateById
(
Website
Adv
record
);
int
updateById
(
Website
Carousel
record
);
/**
* 根据ID获取广告信息
...
...
@@ -44,7 +44,7 @@ public interface WebsiteAdvDao {
* @param id 主键ID
* @return 广告信息
*/
Website
Adv
getById
(
Long
id
);
Website
Carousel
getById
(
Long
id
);
/**
* 广告信息--分页查询
...
...
@@ -54,21 +54,21 @@ public interface WebsiteAdvDao {
* @param example 查询条件
* @return 分页结果
*/
Page
<
Website
Adv
>
page
(
int
pageCurrent
,
int
pageSize
,
WebsiteAdv
Example
example
);
Page
<
Website
Carousel
>
page
(
int
pageCurrent
,
int
pageSize
,
WebsiteCarousel
Example
example
);
/**
* 广告信息--条件列出
*
* @param example 查询条件
* @param example
查询条件
* @return 广告信息列表
*/
List
<
Website
Adv
>
listByExample
(
WebsiteAdv
Example
example
);
List
<
Website
Carousel
>
listByExample
(
WebsiteCarousel
Example
example
);
/**
* 广告信息--条件统计
*
* @param example 统计条件
* @param example
统计条件
* @return 广告信息数量
*/
int
countByExample
(
Website
Adv
Example
example
);
int
countByExample
(
Website
Carousel
Example
example
);
}
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/Website
Adv
DaoImpl.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/Website
Carousel
DaoImpl.java
浏览文件 @
14f27fdd
...
...
@@ -3,10 +3,10 @@ package com.roncoo.education.system.dao.impl;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.common.core.base.PageUtil
;
import
com.roncoo.education.common.core.tools.IdWorker
;
import
com.roncoo.education.system.dao.Website
Adv
Dao
;
import
com.roncoo.education.system.dao.impl.mapper.Website
Adv
Mapper
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Adv
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Adv
Example
;
import
com.roncoo.education.system.dao.Website
Carousel
Dao
;
import
com.roncoo.education.system.dao.impl.mapper.Website
Carousel
Mapper
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Carousel
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Carousel
Example
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -17,17 +17,17 @@ import java.util.List;
* 广告信息 服务实现类
*
* @author wujing
* @date 2022-0
8-25
* @date 2022-0
9-16
*/
@Repository
@RequiredArgsConstructor
public
class
Website
AdvDaoImpl
implements
WebsiteAdv
Dao
{
public
class
Website
CarouselDaoImpl
implements
WebsiteCarousel
Dao
{
@NotNull
private
final
Website
Adv
Mapper
mapper
;
private
final
Website
Carousel
Mapper
mapper
;
@Override
public
int
save
(
Website
Adv
record
)
{
public
int
save
(
Website
Carousel
record
)
{
if
(
record
.
getId
()
==
null
)
{
record
.
setId
(
IdWorker
.
getId
());
}
...
...
@@ -40,19 +40,19 @@ public class WebsiteAdvDaoImpl implements WebsiteAdvDao {
}
@Override
public
int
updateById
(
Website
Adv
record
)
{
public
int
updateById
(
Website
Carousel
record
)
{
record
.
setGmtCreate
(
null
);
record
.
setGmtModified
(
null
);
return
this
.
mapper
.
updateByPrimaryKeySelective
(
record
);
}
@Override
public
Website
Adv
getById
(
Long
id
)
{
public
Website
Carousel
getById
(
Long
id
)
{
return
this
.
mapper
.
selectByPrimaryKey
(
id
);
}
@Override
public
Page
<
Website
Adv
>
page
(
int
pageCurrent
,
int
pageSize
,
WebsiteAdv
Example
example
)
{
public
Page
<
Website
Carousel
>
page
(
int
pageCurrent
,
int
pageSize
,
WebsiteCarousel
Example
example
)
{
int
count
=
this
.
mapper
.
countByExample
(
example
);
pageSize
=
PageUtil
.
checkPageSize
(
pageSize
);
pageCurrent
=
PageUtil
.
checkPageCurrent
(
count
,
pageSize
,
pageCurrent
);
...
...
@@ -63,12 +63,12 @@ public class WebsiteAdvDaoImpl implements WebsiteAdvDao {
}
@Override
public
List
<
Website
Adv
>
listByExample
(
WebsiteAdv
Example
example
)
{
public
List
<
Website
Carousel
>
listByExample
(
WebsiteCarousel
Example
example
)
{
return
this
.
mapper
.
selectByExample
(
example
);
}
@Override
public
int
countByExample
(
Website
AdvExample
example
)
{
public
int
countByExample
(
Website
CarouselExample
example
)
{
return
this
.
mapper
.
countByExample
(
example
);
}
}
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/mapper/Website
Adv
Mapper.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/mapper/Website
Carousel
Mapper.java
浏览文件 @
14f27fdd
package
com.roncoo.education.system.dao.impl.mapper
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Adv
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Adv
Example
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Carousel
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Carousel
Example
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
Website
Adv
Mapper
{
int
countByExample
(
Website
Adv
Example
example
);
public
interface
Website
Carousel
Mapper
{
int
countByExample
(
Website
Carousel
Example
example
);
int
deleteByExample
(
Website
Adv
Example
example
);
int
deleteByExample
(
Website
Carousel
Example
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
Website
Adv
record
);
int
insert
(
Website
Carousel
record
);
int
insertSelective
(
Website
Adv
record
);
int
insertSelective
(
Website
Carousel
record
);
List
<
Website
Adv
>
selectByExample
(
WebsiteAdv
Example
example
);
List
<
Website
Carousel
>
selectByExample
(
WebsiteCarousel
Example
example
);
Website
Adv
selectByPrimaryKey
(
Long
id
);
Website
Carousel
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
Website
Adv
record
,
@Param
(
"example"
)
WebsiteAdv
Example
example
);
int
updateByExampleSelective
(
@Param
(
"record"
)
Website
Carousel
record
,
@Param
(
"example"
)
WebsiteCarousel
Example
example
);
int
updateByExample
(
@Param
(
"record"
)
Website
Adv
record
,
@Param
(
"example"
)
WebsiteAdv
Example
example
);
int
updateByExample
(
@Param
(
"record"
)
Website
Carousel
record
,
@Param
(
"example"
)
WebsiteCarousel
Example
example
);
int
updateByPrimaryKeySelective
(
Website
Adv
record
);
int
updateByPrimaryKeySelective
(
Website
Carousel
record
);
int
updateByPrimaryKey
(
Website
Adv
record
);
int
updateByPrimaryKey
(
Website
Carousel
record
);
}
\ No newline at end of file
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/mapper/entity/Website
Adv
.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/mapper/entity/Website
Carousel
.java
浏览文件 @
14f27fdd
...
...
@@ -3,7 +3,7 @@ package com.roncoo.education.system.dao.impl.mapper.entity;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
Website
Adv
implements
Serializable
{
public
class
Website
Carousel
implements
Serializable
{
private
Long
id
;
private
Date
gmtCreate
;
...
...
@@ -14,22 +14,18 @@ public class WebsiteAdv implements Serializable {
private
Integer
sort
;
private
String
adv
Title
;
private
String
carousel
Title
;
private
String
adv
Img
;
private
String
carousel
Img
;
private
String
adv
Url
;
private
String
carousel
Url
;
private
String
advTarget
;
private
Integer
advLocation
;
private
String
carouselTarget
;
private
Date
beginTime
;
private
Date
endTime
;
private
Integer
platShow
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
...
...
@@ -72,44 +68,36 @@ public class WebsiteAdv implements Serializable {
this
.
sort
=
sort
;
}
public
String
getAdvTitle
()
{
return
advTitle
;
}
public
void
setAdvTitle
(
String
advTitle
)
{
this
.
advTitle
=
advTitle
==
null
?
null
:
advTitle
.
trim
();
}
public
String
getAdvImg
()
{
return
advImg
;
public
String
getCarouselTitle
()
{
return
carouselTitle
;
}
public
void
set
AdvImg
(
String
advImg
)
{
this
.
advImg
=
advImg
==
null
?
null
:
advImg
.
trim
();
public
void
set
CarouselTitle
(
String
carouselTitle
)
{
this
.
carouselTitle
=
carouselTitle
==
null
?
null
:
carouselTitle
.
trim
();
}
public
String
get
AdvUrl
()
{
return
advUrl
;
public
String
get
CarouselImg
()
{
return
carouselImg
;
}
public
void
set
AdvUrl
(
String
advUrl
)
{
this
.
advUrl
=
advUrl
==
null
?
null
:
advUrl
.
trim
();
public
void
set
CarouselImg
(
String
carouselImg
)
{
this
.
carouselImg
=
carouselImg
==
null
?
null
:
carouselImg
.
trim
();
}
public
String
get
AdvTarget
()
{
return
advTarget
;
public
String
get
CarouselUrl
()
{
return
carouselUrl
;
}
public
void
set
AdvTarget
(
String
advTarget
)
{
this
.
advTarget
=
advTarget
==
null
?
null
:
advTarget
.
trim
();
public
void
set
CarouselUrl
(
String
carouselUrl
)
{
this
.
carouselUrl
=
carouselUrl
==
null
?
null
:
carouselUrl
.
trim
();
}
public
Integer
getAdvLocation
()
{
return
advLocation
;
public
String
getCarouselTarget
()
{
return
carouselTarget
;
}
public
void
set
AdvLocation
(
Integer
advLocation
)
{
this
.
advLocation
=
advLocation
;
public
void
set
CarouselTarget
(
String
carouselTarget
)
{
this
.
carouselTarget
=
carouselTarget
==
null
?
null
:
carouselTarget
.
trim
()
;
}
public
Date
getBeginTime
()
{
...
...
@@ -128,14 +116,6 @@ public class WebsiteAdv implements Serializable {
this
.
endTime
=
endTime
;
}
public
Integer
getPlatShow
()
{
return
platShow
;
}
public
void
setPlatShow
(
Integer
platShow
)
{
this
.
platShow
=
platShow
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
...
...
@@ -147,14 +127,12 @@ public class WebsiteAdv implements Serializable {
sb
.
append
(
", gmtModified="
).
append
(
gmtModified
);
sb
.
append
(
", statusId="
).
append
(
statusId
);
sb
.
append
(
", sort="
).
append
(
sort
);
sb
.
append
(
", advTitle="
).
append
(
advTitle
);
sb
.
append
(
", advImg="
).
append
(
advImg
);
sb
.
append
(
", advUrl="
).
append
(
advUrl
);
sb
.
append
(
", advTarget="
).
append
(
advTarget
);
sb
.
append
(
", advLocation="
).
append
(
advLocation
);
sb
.
append
(
", carouselTitle="
).
append
(
carouselTitle
);
sb
.
append
(
", carouselImg="
).
append
(
carouselImg
);
sb
.
append
(
", carouselUrl="
).
append
(
carouselUrl
);
sb
.
append
(
", carouselTarget="
).
append
(
carouselTarget
);
sb
.
append
(
", beginTime="
).
append
(
beginTime
);
sb
.
append
(
", endTime="
).
append
(
endTime
);
sb
.
append
(
", platShow="
).
append
(
platShow
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
...
...
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/mapper/entity/Website
Adv
Example.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/dao/impl/mapper/entity/Website
Carousel
Example.java
浏览文件 @
14f27fdd
此差异已折叠。
点击以展开。
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/AdminWebsite
Adv
Controller.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/AdminWebsite
Carousel
Controller.java
浏览文件 @
14f27fdd
...
...
@@ -2,12 +2,12 @@ package com.roncoo.education.system.service.admin;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.common.core.base.Result
;
import
com.roncoo.education.system.service.admin.biz.AdminWebsite
Adv
Biz
;
import
com.roncoo.education.system.service.admin.req.AdminWebsite
Adv
EditReq
;
import
com.roncoo.education.system.service.admin.req.AdminWebsite
Adv
PageReq
;
import
com.roncoo.education.system.service.admin.req.AdminWebsite
Adv
SaveReq
;
import
com.roncoo.education.system.service.admin.resp.AdminWebsite
Adv
PageResp
;
import
com.roncoo.education.system.service.admin.resp.AdminWebsite
Adv
ViewResp
;
import
com.roncoo.education.system.service.admin.biz.AdminWebsite
Carousel
Biz
;
import
com.roncoo.education.system.service.admin.req.AdminWebsite
Carousel
EditReq
;
import
com.roncoo.education.system.service.admin.req.AdminWebsite
Carousel
PageReq
;
import
com.roncoo.education.system.service.admin.req.AdminWebsite
Carousel
SaveReq
;
import
com.roncoo.education.system.service.admin.resp.AdminWebsite
Carousel
PageResp
;
import
com.roncoo.education.system.service.admin.resp.AdminWebsite
Carousel
ViewResp
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -25,34 +25,34 @@ import javax.validation.constraints.NotNull;
@Api
(
tags
=
"ADMIN-广告信息"
)
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/system/admin/website/
adv
"
)
public
class
AdminWebsite
Adv
Controller
{
@RequestMapping
(
"/system/admin/website/
carousel
"
)
public
class
AdminWebsite
Carousel
Controller
{
@NotNull
private
final
AdminWebsite
Adv
Biz
biz
;
private
final
AdminWebsite
Carousel
Biz
biz
;
@ApiOperation
(
value
=
"广告信息分页"
,
notes
=
"广告信息分页"
)
@PostMapping
(
value
=
"/page"
)
public
Result
<
Page
<
AdminWebsite
AdvPageResp
>>
page
(
@RequestBody
AdminWebsiteAdv
PageReq
req
)
{
public
Result
<
Page
<
AdminWebsite
CarouselPageResp
>>
page
(
@RequestBody
AdminWebsiteCarousel
PageReq
req
)
{
return
biz
.
page
(
req
);
}
@ApiOperation
(
value
=
"广告信息添加"
,
notes
=
"广告信息添加"
)
@PostMapping
(
value
=
"/save"
)
public
Result
<
String
>
save
(
@RequestBody
@Valid
AdminWebsite
Adv
SaveReq
req
)
{
public
Result
<
String
>
save
(
@RequestBody
@Valid
AdminWebsite
Carousel
SaveReq
req
)
{
return
biz
.
save
(
req
);
}
@ApiOperation
(
value
=
"广告信息查看"
,
notes
=
"广告信息查看"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"主键ID"
,
dataTypeClass
=
Long
.
class
,
paramType
=
"query"
,
required
=
true
)
@GetMapping
(
value
=
"/view"
)
public
Result
<
AdminWebsite
Adv
ViewResp
>
view
(
@RequestParam
Long
id
)
{
public
Result
<
AdminWebsite
Carousel
ViewResp
>
view
(
@RequestParam
Long
id
)
{
return
biz
.
view
(
id
);
}
@ApiOperation
(
value
=
"广告信息修改"
,
notes
=
"广告信息修改"
)
@PutMapping
(
value
=
"/edit"
)
public
Result
<
String
>
edit
(
@RequestBody
@Valid
AdminWebsite
Adv
EditReq
req
)
{
public
Result
<
String
>
edit
(
@RequestBody
@Valid
AdminWebsite
Carousel
EditReq
req
)
{
return
biz
.
edit
(
req
);
}
...
...
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/biz/AdminWebsite
Adv
Biz.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/biz/AdminWebsite
Carousel
Biz.java
浏览文件 @
14f27fdd
package
com.roncoo.education.system.service.admin.biz
;
import
com.roncoo.education.common.service.BaseBiz
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.common.core.base.PageUtil
;
import
com.roncoo.education.common.core.base.Result
;
import
com.roncoo.education.common.core.tools.BeanUtil
;
import
com.roncoo.education.common.service.BaseBiz
;
import
com.roncoo.education.system.dao.WebsiteAdvDao
;
import
com.roncoo.education.system.dao.impl.mapper.entity.WebsiteAdv
;
import
com.roncoo.education.system.dao.impl.mapper.entity.WebsiteAdvExample
;
import
com.roncoo.education.system.dao.impl.mapper.entity.WebsiteAdvExample.Criteria
;
import
com.roncoo.education.system.service.admin.req.AdminWebsiteAdvEditReq
;
import
com.roncoo.education.system.service.admin.req.AdminWebsiteAdvPageReq
;
import
com.roncoo.education.system.service.admin.req.AdminWebsiteAdvSaveReq
;
import
com.roncoo.education.system.service.admin.resp.AdminWebsiteAdvPageResp
;
import
com.roncoo.education.system.service.admin.resp.AdminWebsiteAdvViewResp
;
import
com.roncoo.education.system.service.admin.req.AdminWebsiteCarouselEditReq
;
import
com.roncoo.education.system.service.admin.req.AdminWebsiteCarouselPageReq
;
import
com.roncoo.education.system.service.admin.req.AdminWebsiteCarouselSaveReq
;
import
com.roncoo.education.system.service.admin.resp.AdminWebsiteCarouselPageResp
;
import
com.roncoo.education.system.service.admin.resp.AdminWebsiteCarouselViewResp
;
import
com.roncoo.education.system.dao.WebsiteCarouselDao
;
import
com.roncoo.education.system.dao.impl.mapper.entity.WebsiteCarousel
;
import
com.roncoo.education.system.dao.impl.mapper.entity.WebsiteCarouselExample
;
import
com.roncoo.education.system.dao.impl.mapper.entity.WebsiteCarouselExample.Criteria
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Component
;
...
...
@@ -26,10 +26,10 @@ import javax.validation.constraints.NotNull;
*/
@Component
@RequiredArgsConstructor
public
class
AdminWebsite
Adv
Biz
extends
BaseBiz
{
public
class
AdminWebsite
Carousel
Biz
extends
BaseBiz
{
@NotNull
private
final
Website
Adv
Dao
dao
;
private
final
Website
Carousel
Dao
dao
;
/**
* 广告信息分页
...
...
@@ -37,12 +37,12 @@ public class AdminWebsiteAdvBiz extends BaseBiz {
* @param req 广告信息分页查询参数
* @return 广告信息分页查询结果
*/
public
Result
<
Page
<
AdminWebsite
AdvPageResp
>>
page
(
AdminWebsiteAdv
PageReq
req
)
{
Website
AdvExample
example
=
new
WebsiteAdv
Example
();
public
Result
<
Page
<
AdminWebsite
CarouselPageResp
>>
page
(
AdminWebsiteCarousel
PageReq
req
)
{
Website
CarouselExample
example
=
new
WebsiteCarousel
Example
();
Criteria
c
=
example
.
createCriteria
();
example
.
setOrderByClause
(
"sort asc, id desc"
);
Page
<
Website
Adv
>
page
=
dao
.
page
(
req
.
getPageCurrent
(),
req
.
getPageSize
(),
example
);
Page
<
AdminWebsite
AdvPageResp
>
respPage
=
PageUtil
.
transform
(
page
,
AdminWebsiteAdv
PageResp
.
class
);
Page
<
Website
Carousel
>
page
=
dao
.
page
(
req
.
getPageCurrent
(),
req
.
getPageSize
(),
example
);
Page
<
AdminWebsite
CarouselPageResp
>
respPage
=
PageUtil
.
transform
(
page
,
AdminWebsiteCarousel
PageResp
.
class
);
return
Result
.
success
(
respPage
);
}
...
...
@@ -52,8 +52,8 @@ public class AdminWebsiteAdvBiz extends BaseBiz {
* @param req 广告信息
* @return 添加结果
*/
public
Result
<
String
>
save
(
AdminWebsite
Adv
SaveReq
req
)
{
Website
Adv
record
=
BeanUtil
.
copyProperties
(
req
,
WebsiteAdv
.
class
);
public
Result
<
String
>
save
(
AdminWebsite
Carousel
SaveReq
req
)
{
Website
Carousel
record
=
BeanUtil
.
copyProperties
(
req
,
WebsiteCarousel
.
class
);
if
(
dao
.
save
(
record
)
>
0
)
{
return
Result
.
success
(
"操作成功"
);
}
...
...
@@ -66,8 +66,8 @@ public class AdminWebsiteAdvBiz extends BaseBiz {
* @param id 主键ID
* @return 广告信息
*/
public
Result
<
AdminWebsite
Adv
ViewResp
>
view
(
Long
id
)
{
return
Result
.
success
(
BeanUtil
.
copyProperties
(
dao
.
getById
(
id
),
AdminWebsite
Adv
ViewResp
.
class
));
public
Result
<
AdminWebsite
Carousel
ViewResp
>
view
(
Long
id
)
{
return
Result
.
success
(
BeanUtil
.
copyProperties
(
dao
.
getById
(
id
),
AdminWebsite
Carousel
ViewResp
.
class
));
}
/**
...
...
@@ -76,8 +76,8 @@ public class AdminWebsiteAdvBiz extends BaseBiz {
* @param req 广告信息修改对象
* @return 修改结果
*/
public
Result
<
String
>
edit
(
AdminWebsite
Adv
EditReq
req
)
{
Website
Adv
record
=
BeanUtil
.
copyProperties
(
req
,
WebsiteAdv
.
class
);
public
Result
<
String
>
edit
(
AdminWebsite
Carousel
EditReq
req
)
{
Website
Carousel
record
=
BeanUtil
.
copyProperties
(
req
,
WebsiteCarousel
.
class
);
if
(
dao
.
updateById
(
record
)
>
0
)
{
return
Result
.
success
(
"操作成功"
);
}
...
...
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/req/AdminWebsite
Adv
EditReq.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/req/AdminWebsite
Carousel
EditReq.java
浏览文件 @
14f27fdd
package
com.roncoo.education.system.service.admin.req
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* ADMIN-广告信息
...
...
@@ -18,8 +17,8 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"AdminWebsite
Adv
EditReq"
,
description
=
"ADMIN-广告信息修改"
)
public
class
AdminWebsite
Adv
EditReq
implements
Serializable
{
@ApiModel
(
value
=
"AdminWebsite
Carousel
EditReq"
,
description
=
"ADMIN-广告信息修改"
)
public
class
AdminWebsite
Carousel
EditReq
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -41,19 +40,16 @@ public class AdminWebsiteAdvEditReq implements Serializable {
private
Integer
sort
;
@ApiModelProperty
(
value
=
"广告标题"
)
private
String
adv
Title
;
private
String
carousel
Title
;
@ApiModelProperty
(
value
=
"广告图片"
)
private
String
adv
Img
;
private
String
carousel
Img
;
@ApiModelProperty
(
value
=
"广告链接"
)
private
String
adv
Url
;
private
String
carousel
Url
;
@ApiModelProperty
(
value
=
"广告跳转方式"
)
private
String
advTarget
;
@ApiModelProperty
(
value
=
"广告位置(1首页轮播)"
)
private
Integer
advLocation
;
private
String
carouselTarget
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"开始时间"
)
...
...
@@ -62,7 +58,4 @@ public class AdminWebsiteAdvEditReq implements Serializable {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"结束时间"
)
private
LocalDateTime
endTime
;
@ApiModelProperty
(
value
=
"位置(0电脑端,1微信端)"
)
private
Integer
platShow
;
}
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/req/AdminWebsite
Adv
PageReq.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/req/AdminWebsite
Carousel
PageReq.java
浏览文件 @
14f27fdd
package
com.roncoo.education.system.service.admin.req
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* ADMIN-广告信息
...
...
@@ -18,8 +17,8 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"AdminWebsite
Adv
PageReq"
,
description
=
"ADMIN-广告信息分页"
)
public
class
AdminWebsite
Adv
PageReq
implements
Serializable
{
@ApiModel
(
value
=
"AdminWebsite
Carousel
PageReq"
,
description
=
"ADMIN-广告信息分页"
)
public
class
AdminWebsite
Carousel
PageReq
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -41,19 +40,16 @@ public class AdminWebsiteAdvPageReq implements Serializable {
private
Integer
sort
;
@ApiModelProperty
(
value
=
"广告标题"
)
private
String
adv
Title
;
private
String
carousel
Title
;
@ApiModelProperty
(
value
=
"广告图片"
)
private
String
adv
Img
;
private
String
carousel
Img
;
@ApiModelProperty
(
value
=
"广告链接"
)
private
String
adv
Url
;
private
String
carousel
Url
;
@ApiModelProperty
(
value
=
"广告跳转方式"
)
private
String
advTarget
;
@ApiModelProperty
(
value
=
"广告位置(1首页轮播)"
)
private
Integer
advLocation
;
private
String
carouselTarget
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"开始时间"
)
...
...
@@ -63,9 +59,6 @@ public class AdminWebsiteAdvPageReq implements Serializable {
@ApiModelProperty
(
value
=
"结束时间"
)
private
LocalDateTime
endTime
;
@ApiModelProperty
(
value
=
"位置(0电脑端,1微信端)"
)
private
Integer
platShow
;
@ApiModelProperty
(
value
=
"当前页"
)
private
int
pageCurrent
=
1
;
...
...
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/req/AdminWebsite
Adv
SaveReq.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/req/AdminWebsite
Carousel
SaveReq.java
浏览文件 @
14f27fdd
package
com.roncoo.education.system.service.admin.req
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* ADMIN-广告信息
...
...
@@ -18,8 +17,8 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"AdminWebsite
Adv
SaveReq"
,
description
=
"ADMIN-广告信息添加"
)
public
class
AdminWebsite
Adv
SaveReq
implements
Serializable
{
@ApiModel
(
value
=
"AdminWebsite
Carousel
SaveReq"
,
description
=
"ADMIN-广告信息添加"
)
public
class
AdminWebsite
Carousel
SaveReq
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -41,19 +40,16 @@ public class AdminWebsiteAdvSaveReq implements Serializable {
private
Integer
sort
;
@ApiModelProperty
(
value
=
"广告标题"
)
private
String
adv
Title
;
private
String
carousel
Title
;
@ApiModelProperty
(
value
=
"广告图片"
)
private
String
adv
Img
;
private
String
carousel
Img
;
@ApiModelProperty
(
value
=
"广告链接"
)
private
String
adv
Url
;
private
String
carousel
Url
;
@ApiModelProperty
(
value
=
"广告跳转方式"
)
private
String
advTarget
;
@ApiModelProperty
(
value
=
"广告位置(1首页轮播)"
)
private
Integer
advLocation
;
private
String
carouselTarget
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"开始时间"
)
...
...
@@ -62,7 +58,4 @@ public class AdminWebsiteAdvSaveReq implements Serializable {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"结束时间"
)
private
LocalDateTime
endTime
;
@ApiModelProperty
(
value
=
"位置(0电脑端,1微信端)"
)
private
Integer
platShow
;
}
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/resp/AdminWebsite
AdvView
Resp.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/resp/AdminWebsite
CarouselPage
Resp.java
浏览文件 @
14f27fdd
package
com.roncoo.education.system.service.admin.resp
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* ADMIN-广告信息
...
...
@@ -18,8 +17,8 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"AdminWebsite
AdvViewResp"
,
description
=
"ADMIN-广告信息查看
"
)
public
class
AdminWebsite
AdvView
Resp
implements
Serializable
{
@ApiModel
(
value
=
"AdminWebsite
CarouselPageResp"
,
description
=
"ADMIN-广告信息分页
"
)
public
class
AdminWebsite
CarouselPage
Resp
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -41,19 +40,16 @@ public class AdminWebsiteAdvViewResp implements Serializable {
private
Integer
sort
;
@ApiModelProperty
(
value
=
"广告标题"
)
private
String
adv
Title
;
private
String
carousel
Title
;
@ApiModelProperty
(
value
=
"广告图片"
)
private
String
adv
Img
;
private
String
carousel
Img
;
@ApiModelProperty
(
value
=
"广告链接"
)
private
String
adv
Url
;
private
String
carousel
Url
;
@ApiModelProperty
(
value
=
"广告跳转方式"
)
private
String
advTarget
;
@ApiModelProperty
(
value
=
"广告位置(1首页轮播)"
)
private
Integer
advLocation
;
private
String
carouselTarget
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"开始时间"
)
...
...
@@ -62,7 +58,4 @@ public class AdminWebsiteAdvViewResp implements Serializable {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"结束时间"
)
private
LocalDateTime
endTime
;
@ApiModelProperty
(
value
=
"位置(0电脑端,1微信端)"
)
private
Integer
platShow
;
}
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/resp/AdminWebsite
AdvPage
Resp.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/admin/resp/AdminWebsite
CarouselView
Resp.java
浏览文件 @
14f27fdd
package
com.roncoo.education.system.service.admin.resp
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* ADMIN-广告信息
...
...
@@ -18,8 +17,8 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"AdminWebsite
AdvPageResp"
,
description
=
"ADMIN-广告信息分页
"
)
public
class
AdminWebsite
AdvPage
Resp
implements
Serializable
{
@ApiModel
(
value
=
"AdminWebsite
CarouselViewResp"
,
description
=
"ADMIN-广告信息查看
"
)
public
class
AdminWebsite
CarouselView
Resp
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -41,19 +40,16 @@ public class AdminWebsiteAdvPageResp implements Serializable {
private
Integer
sort
;
@ApiModelProperty
(
value
=
"广告标题"
)
private
String
adv
Title
;
private
String
carousel
Title
;
@ApiModelProperty
(
value
=
"广告图片"
)
private
String
adv
Img
;
private
String
carousel
Img
;
@ApiModelProperty
(
value
=
"广告链接"
)
private
String
adv
Url
;
private
String
carousel
Url
;
@ApiModelProperty
(
value
=
"广告跳转方式"
)
private
String
advTarget
;
@ApiModelProperty
(
value
=
"广告位置(1首页轮播)"
)
private
Integer
advLocation
;
private
String
carouselTarget
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"开始时间"
)
...
...
@@ -62,7 +58,4 @@ public class AdminWebsiteAdvPageResp implements Serializable {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"结束时间"
)
private
LocalDateTime
endTime
;
@ApiModelProperty
(
value
=
"位置(0电脑端,1微信端)"
)
private
Integer
platShow
;
}
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/api/ApiWebsite
Adv
Controller.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/api/ApiWebsite
Carousel
Controller.java
浏览文件 @
14f27fdd
package
com.roncoo.education.system.service.api
;
import
com.roncoo.education.common.core.base.Result
;
import
com.roncoo.education.system.service.api.biz.ApiWebsite
Adv
Biz
;
import
com.roncoo.education.system.service.api.biz.ApiWebsite
Carousel
Biz
;
import
com.roncoo.education.system.service.api.resp.ApiWebsiteAdvResp
;
import
com.roncoo.education.system.service.api.resp.ApiWebsiteCarouselResp
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -17,20 +18,21 @@ import java.util.List;
* API-广告信息
*
* @author wujing
* @date 2022-0
8-25
* @date 2022-0
9-16
*/
@Api
(
tags
=
"API-广告信息"
)
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/system/api/website/
adv
"
)
public
class
ApiWebsite
Adv
Controller
{
@RequestMapping
(
"/system/api/website/
carousel
"
)
public
class
ApiWebsite
Carousel
Controller
{
@NotNull
private
final
ApiWebsite
Adv
Biz
biz
;
private
final
ApiWebsite
Carousel
Biz
biz
;
@ApiOperation
(
value
=
"广告列表接口"
,
notes
=
"首页轮播广告列出"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
Result
<
List
<
ApiWebsite
Adv
Resp
>>
list
()
{
public
Result
<
List
<
ApiWebsite
Carousel
Resp
>>
list
()
{
return
biz
.
list
();
}
}
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/api/biz/ApiWebsite
Adv
Biz.java
→
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/api/biz/ApiWebsite
Carousel
Biz.java
浏览文件 @
14f27fdd
...
...
@@ -4,12 +4,11 @@ import com.roncoo.education.common.core.base.PageUtil;
import
com.roncoo.education.common.core.base.Result
;
import
com.roncoo.education.common.core.enums.StatusIdEnum
;
import
com.roncoo.education.common.service.BaseBiz
;
import
com.roncoo.education.system.dao.Website
Adv
Dao
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Adv
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Adv
Example
;
import
com.roncoo.education.system.service.api.resp.ApiWebsite
Adv
Resp
;
import
com.roncoo.education.system.dao.Website
Carousel
Dao
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Carousel
;
import
com.roncoo.education.system.dao.impl.mapper.entity.Website
Carousel
Example
;
import
com.roncoo.education.system.service.api.resp.ApiWebsite
Carousel
Resp
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.cache.annotation.CacheConfig
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.stereotype.Component
;
...
...
@@ -22,18 +21,18 @@ import java.util.List;
* @author wujing
*/
@Component
@CacheConfig
(
cacheNames
=
{
"system"
})
@RequiredArgsConstructor
public
class
ApiWebsite
Adv
Biz
extends
BaseBiz
{
public
class
ApiWebsite
Carousel
Biz
extends
BaseBiz
{
@NotNull
private
final
Website
Adv
Dao
dao
;
private
final
Website
Carousel
Dao
dao
;
@Cacheable
public
Result
<
List
<
ApiWebsite
Adv
Resp
>>
list
()
{
Website
AdvExample
example
=
new
WebsiteAdv
Example
();
public
Result
<
List
<
ApiWebsite
Carousel
Resp
>>
list
()
{
Website
CarouselExample
example
=
new
WebsiteCarousel
Example
();
example
.
createCriteria
().
andStatusIdEqualTo
(
StatusIdEnum
.
YES
.
getCode
());
List
<
WebsiteAdv
>
advList
=
dao
.
listByExample
(
example
);
return
Result
.
success
(
PageUtil
.
copyList
(
advList
,
ApiWebsiteAdvResp
.
class
));
example
.
setOrderByClause
(
"sort asc, id desc"
);
List
<
WebsiteCarousel
>
CarouselList
=
dao
.
listByExample
(
example
);
return
Result
.
success
(
PageUtil
.
copyList
(
CarouselList
,
ApiWebsiteCarouselResp
.
class
));
}
}
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/api/req/ApiWebsiteCarouselReq.java
0 → 100644
浏览文件 @
14f27fdd
package
com.roncoo.education.system.service.api.req
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
/**
* <p>
* API-广告信息
* </p>
*
* @author wujing
* @date 2022-09-16
*/
@Data
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"ApiWebsiteCarouselReq"
,
description
=
"API-广告信息"
)
public
class
ApiWebsiteCarouselReq
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主键"
)
private
Long
id
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
LocalDateTime
gmtCreate
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"修改时间"
)
private
LocalDateTime
gmtModified
;
@ApiModelProperty
(
value
=
"状态(1:正常,0:禁用)"
)
private
Integer
statusId
;
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
@ApiModelProperty
(
value
=
"广告标题"
)
private
String
carouselTitle
;
@ApiModelProperty
(
value
=
"广告图片"
)
private
String
carouselImg
;
@ApiModelProperty
(
value
=
"广告链接"
)
private
String
carouselUrl
;
@ApiModelProperty
(
value
=
"广告跳转方式"
)
private
String
carouselTarget
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"开始时间"
)
private
LocalDateTime
beginTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"结束时间"
)
private
LocalDateTime
endTime
;
}
roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/api/resp/ApiWebsiteCarouselResp.java
0 → 100644
浏览文件 @
14f27fdd
package
com.roncoo.education.system.service.api.resp
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
/**
* <p>
* API-广告信息
* </p>
*
* @author wujing
* @date 2022-09-16
*/
@Data
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"ApiWebsiteCarouselResp"
,
description
=
"API-广告信息"
)
public
class
ApiWebsiteCarouselResp
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主键"
)
private
Long
id
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
LocalDateTime
gmtCreate
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"修改时间"
)
private
LocalDateTime
gmtModified
;
@ApiModelProperty
(
value
=
"状态(1:正常,0:禁用)"
)
private
Integer
statusId
;
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
@ApiModelProperty
(
value
=
"广告标题"
)
private
String
carouselTitle
;
@ApiModelProperty
(
value
=
"广告图片"
)
private
String
carouselImg
;
@ApiModelProperty
(
value
=
"广告链接"
)
private
String
carouselUrl
;
@ApiModelProperty
(
value
=
"广告跳转方式"
)
private
String
carouselTarget
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"开始时间"
)
private
LocalDateTime
beginTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"结束时间"
)
private
LocalDateTime
endTime
;
}
roncoo-education-system/roncoo-education-system-service/src/main/resources/mybatis/WebsiteCarouselMapper.xml
0 → 100644
浏览文件 @
14f27fdd
<?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.roncoo.education.system.dao.impl.mapper.WebsiteCarouselMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.roncoo.education.system.dao.impl.mapper.entity.WebsiteCarousel"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"gmt_create"
jdbcType=
"TIMESTAMP"
property=
"gmtCreate"
/>
<result
column=
"gmt_modified"
jdbcType=
"TIMESTAMP"
property=
"gmtModified"
/>
<result
column=
"status_id"
jdbcType=
"TINYINT"
property=
"statusId"
/>
<result
column=
"sort"
jdbcType=
"INTEGER"
property=
"sort"
/>
<result
column=
"carousel_title"
jdbcType=
"VARCHAR"
property=
"carouselTitle"
/>
<result
column=
"carousel_img"
jdbcType=
"VARCHAR"
property=
"carouselImg"
/>
<result
column=
"carousel_url"
jdbcType=
"VARCHAR"
property=
"carouselUrl"
/>
<result
column=
"carousel_target"
jdbcType=
"VARCHAR"
property=
"carouselTarget"
/>
<result
column=
"begin_time"
jdbcType=
"TIMESTAMP"
property=
"beginTime"
/>
<result
column=
"end_time"
jdbcType=
"TIMESTAMP"
property=
"endTime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, gmt_create, gmt_modified, status_id, sort, carousel_title, carousel_img, carousel_url,
carousel_target, begin_time, end_time
</sql>
<select
id=
"selectByExample"
parameterType=
"com.roncoo.education.system.dao.impl.mapper.entity.WebsiteCarouselExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from website_carousel
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
<if
test=
"limitStart >= 0"
>
limit ${limitStart} , ${pageSize}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from website_carousel
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from website_carousel
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.roncoo.education.system.dao.impl.mapper.entity.WebsiteCarouselExample"
>
delete from website_carousel
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.roncoo.education.system.dao.impl.mapper.entity.WebsiteCarousel"
>
insert into website_carousel (id, gmt_create, gmt_modified,
status_id, sort, carousel_title,
carousel_img, carousel_url, carousel_target,
begin_time, end_time)
values (#{id,jdbcType=BIGINT}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP},
#{statusId,jdbcType=TINYINT}, #{sort,jdbcType=INTEGER}, #{carouselTitle,jdbcType=VARCHAR},
#{carouselImg,jdbcType=VARCHAR}, #{carouselUrl,jdbcType=VARCHAR}, #{carouselTarget,jdbcType=VARCHAR},
#{beginTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.roncoo.education.system.dao.impl.mapper.entity.WebsiteCarousel"
>
insert into website_carousel
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"gmtCreate != null"
>
gmt_create,
</if>
<if
test=
"gmtModified != null"
>
gmt_modified,
</if>
<if
test=
"statusId != null"
>
status_id,
</if>
<if
test=
"sort != null"
>
sort,
</if>
<if
test=
"carouselTitle != null"
>
carousel_title,
</if>
<if
test=
"carouselImg != null"
>
carousel_img,
</if>
<if
test=
"carouselUrl != null"
>
carousel_url,
</if>
<if
test=
"carouselTarget != null"
>
carousel_target,
</if>
<if
test=
"beginTime != null"
>
begin_time,
</if>
<if
test=
"endTime != null"
>
end_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"gmtCreate != null"
>
#{gmtCreate,jdbcType=TIMESTAMP},
</if>
<if
test=
"gmtModified != null"
>
#{gmtModified,jdbcType=TIMESTAMP},
</if>
<if
test=
"statusId != null"
>
#{statusId,jdbcType=TINYINT},
</if>
<if
test=
"sort != null"
>
#{sort,jdbcType=INTEGER},
</if>
<if
test=
"carouselTitle != null"
>
#{carouselTitle,jdbcType=VARCHAR},
</if>
<if
test=
"carouselImg != null"
>
#{carouselImg,jdbcType=VARCHAR},
</if>
<if
test=
"carouselUrl != null"
>
#{carouselUrl,jdbcType=VARCHAR},
</if>
<if
test=
"carouselTarget != null"
>
#{carouselTarget,jdbcType=VARCHAR},
</if>
<if
test=
"beginTime != null"
>
#{beginTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"endTime != null"
>
#{endTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.roncoo.education.system.dao.impl.mapper.entity.WebsiteCarouselExample"
resultType=
"java.lang.Integer"
>
select count(*) from website_carousel
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update website_carousel
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.gmtCreate != null"
>
gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.gmtModified != null"
>
gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.statusId != null"
>
status_id = #{record.statusId,jdbcType=TINYINT},
</if>
<if
test=
"record.sort != null"
>
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if
test=
"record.carouselTitle != null"
>
carousel_title = #{record.carouselTitle,jdbcType=VARCHAR},
</if>
<if
test=
"record.carouselImg != null"
>
carousel_img = #{record.carouselImg,jdbcType=VARCHAR},
</if>
<if
test=
"record.carouselUrl != null"
>
carousel_url = #{record.carouselUrl,jdbcType=VARCHAR},
</if>
<if
test=
"record.carouselTarget != null"
>
carousel_target = #{record.carouselTarget,jdbcType=VARCHAR},
</if>
<if
test=
"record.beginTime != null"
>
begin_time = #{record.beginTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.endTime != null"
>
end_time = #{record.endTime,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update website_carousel
set id = #{record.id,jdbcType=BIGINT},
gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
status_id = #{record.statusId,jdbcType=TINYINT},
sort = #{record.sort,jdbcType=INTEGER},
carousel_title = #{record.carouselTitle,jdbcType=VARCHAR},
carousel_img = #{record.carouselImg,jdbcType=VARCHAR},
carousel_url = #{record.carouselUrl,jdbcType=VARCHAR},
carousel_target = #{record.carouselTarget,jdbcType=VARCHAR},
begin_time = #{record.beginTime,jdbcType=TIMESTAMP},
end_time = #{record.endTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.roncoo.education.system.dao.impl.mapper.entity.WebsiteCarousel"
>
update website_carousel
<set>
<if
test=
"gmtCreate != null"
>
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
</if>
<if
test=
"gmtModified != null"
>
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
</if>
<if
test=
"statusId != null"
>
status_id = #{statusId,jdbcType=TINYINT},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
<if
test=
"carouselTitle != null"
>
carousel_title = #{carouselTitle,jdbcType=VARCHAR},
</if>
<if
test=
"carouselImg != null"
>
carousel_img = #{carouselImg,jdbcType=VARCHAR},
</if>
<if
test=
"carouselUrl != null"
>
carousel_url = #{carouselUrl,jdbcType=VARCHAR},
</if>
<if
test=
"carouselTarget != null"
>
carousel_target = #{carouselTarget,jdbcType=VARCHAR},
</if>
<if
test=
"beginTime != null"
>
begin_time = #{beginTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"endTime != null"
>
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.roncoo.education.system.dao.impl.mapper.entity.WebsiteCarousel"
>
update website_carousel
set gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
status_id = #{statusId,jdbcType=TINYINT},
sort = #{sort,jdbcType=INTEGER},
carousel_title = #{carouselTitle,jdbcType=VARCHAR},
carousel_img = #{carouselImg,jdbcType=VARCHAR},
carousel_url = #{carouselUrl,jdbcType=VARCHAR},
carousel_target = #{carouselTarget,jdbcType=VARCHAR},
begin_time = #{beginTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录