Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
2f7c1c31
Commit
2f7c1c31
authored
Oct 06, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加banner修改
parent
46fd063a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
Banner.java
...pi/src/main/java/com/xxfc/platform/app/entity/Banner.java
+18
-0
BannerAdminController.java
...m/xxfc/platform/app/rest/admin/BannerAdminController.java
+13
-1
No files found.
xx-app/xx-app-api/src/main/java/com/xxfc/platform/app/entity/Banner.java
View file @
2f7c1c31
...
@@ -123,4 +123,22 @@ public class Banner {
...
@@ -123,4 +123,22 @@ public class Banner {
* html 标签悬浮显示 seo 需要
* html 标签悬浮显示 seo 需要
*/
*/
private
String
alt
;
private
String
alt
;
/**
* 跳转类型 0--不跳转;1--商品详情页;2--店铺主页;
*/
@Column
(
name
=
"jump_type"
)
private
Integer
jumpType
;
/**
* 跳转 商品/店铺 id;
*/
@Column
(
name
=
"jump_id"
)
private
Integer
jumpId
;
/**
* 状态 1--上架;2--下架
*/
@Column
(
name
=
"status"
)
private
Integer
status
;
}
}
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/rest/admin/BannerAdminController.java
View file @
2f7c1c31
package
com
.
xxfc
.
platform
.
app
.
rest
.
admin
;
package
com
.
xxfc
.
platform
.
app
.
rest
.
admin
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.app.biz.BannerBiz
;
import
com.xxfc.platform.app.biz.BannerBiz
;
...
@@ -22,11 +24,19 @@ import org.springframework.web.bind.annotation.*;
...
@@ -22,11 +24,19 @@ import org.springframework.web.bind.annotation.*;
@RestController
@RestController
@RequestMapping
(
"/admin/banner"
)
@RequestMapping
(
"/admin/banner"
)
@Api
(
value
=
"banner后台接口"
,
tags
=
"banner后台接口"
)
@Api
(
value
=
"banner后台接口"
,
tags
=
"banner后台接口"
)
public
class
BannerAdminController
{
public
class
BannerAdminController
implements
UserRestInterface
{
@Autowired
@Autowired
private
BannerBiz
bannerBiz
;
private
BannerBiz
bannerBiz
;
@Autowired
private
UserFeign
userFeign
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
/**
/**
* 修改
* 修改
*
*
...
@@ -36,6 +46,7 @@ public class BannerAdminController {
...
@@ -36,6 +46,7 @@ public class BannerAdminController {
@PutMapping
@PutMapping
@ApiOperation
(
value
=
"banner修改"
,
notes
=
"修改"
)
@ApiOperation
(
value
=
"banner修改"
,
notes
=
"修改"
)
public
ObjectRestResponse
<
Banner
>
update
(
@RequestBody
Banner
banner
,
UserDTO
userInfo
)
{
public
ObjectRestResponse
<
Banner
>
update
(
@RequestBody
Banner
banner
,
UserDTO
userInfo
)
{
userInfo
=
getAdminUserInfo
();
int
effectRows
=
bannerBiz
.
save
(
banner
,
userInfo
);
int
effectRows
=
bannerBiz
.
save
(
banner
,
userInfo
);
if
(
effectRows
>
0
)
{
if
(
effectRows
>
0
)
{
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
...
@@ -87,6 +98,7 @@ public class BannerAdminController {
...
@@ -87,6 +98,7 @@ public class BannerAdminController {
@ApiOperation
(
value
=
"banner保存"
,
notes
=
"banner保存"
)
@ApiOperation
(
value
=
"banner保存"
,
notes
=
"banner保存"
)
@PostMapping
@PostMapping
public
ObjectRestResponse
<
Void
>
saveBanner
(
@RequestBody
Banner
banner
,
UserDTO
userDTO
)
{
public
ObjectRestResponse
<
Void
>
saveBanner
(
@RequestBody
Banner
banner
,
UserDTO
userDTO
)
{
userDTO
=
getAdminUserInfo
();
banner
.
setIsDel
(
0
);
banner
.
setIsDel
(
0
);
int
effectRows
=
bannerBiz
.
save
(
banner
,
userDTO
);
int
effectRows
=
bannerBiz
.
save
(
banner
,
userDTO
);
if
(
effectRows
>
0
)
{
if
(
effectRows
>
0
)
{
...
...
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