Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
V
volunteer_service
Project
Project
Details
Activity
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
licc
volunteer_service
Commits
118c79dc
Commit
118c79dc
authored
Jan 18, 2021
by
liaoanyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理端功能修改
parent
d418deb0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
30 deletions
+16
-30
BannerMapper.java
...apper/src/main/java/cn/wisenergy/mapper/BannerMapper.java
+1
-1
UserInfo.java
...-model/src/main/java/cn/wisenergy/model/app/UserInfo.java
+0
-6
BannerService.java
...src/main/java/cn/wisenergy/service/app/BannerService.java
+3
-2
RefillCardService.java
...main/java/cn/wisenergy/service/app/RefillCardService.java
+2
-2
BannerServiceImpl.java
...java/cn/wisenergy/service/app/impl/BannerServiceImpl.java
+7
-16
BannerController.java
.../wisenergy/web/admin/controller/app/BannerController.java
+3
-3
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/BannerMapper.java
View file @
118c79dc
...
...
@@ -59,5 +59,5 @@ public interface BannerMapper extends BaseMapper<Banner> {
* @param status
* @return
*/
int
a
ditStatus
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"status"
)
Integer
status
);
int
e
ditStatus
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"status"
)
Integer
status
);
}
wisenergy-model/src/main/java/cn/wisenergy/model/app/UserInfo.java
View file @
118c79dc
...
...
@@ -37,12 +37,6 @@ public class UserInfo extends BaseEntity implements Serializable {
@ApiModelProperty
(
name
=
"password"
,
value
=
"用户密码"
)
private
String
password
;
/**
* 登录来源
*/
@ApiModelProperty
(
name
=
"source"
,
value
=
"登录来源:1 PC,2 WAP"
)
private
Integer
source
;
/**
* 电话号码
*/
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/BannerService.java
View file @
118c79dc
...
...
@@ -5,6 +5,7 @@ import cn.wisenergy.model.app.Banner;
import
cn.wisenergy.model.dto.BannerDto
;
import
cn.wisenergy.model.vo.AdvertisingQueryVo
;
import
com.github.pagehelper.PageInfo
;
import
com.sun.org.apache.xpath.internal.operations.Bool
;
/**
* @ Description: 广告接口定义
...
...
@@ -26,7 +27,7 @@ public interface BannerService {
* @param advertising 广告信息
* @return true 成功 false 失败
*/
R
edit
(
Banner
advertising
);
R
<
Boolean
>
edit
(
Banner
advertising
);
/**
* 获取详情
...
...
@@ -51,6 +52,6 @@ public interface BannerService {
* @param status 1 :投放 2:暂停投放
* @return true 成功 false 失败
*/
R
<
Boolean
>
a
ditStatus
(
Integer
id
,
Integer
status
);
R
<
Boolean
>
e
ditStatus
(
Integer
id
,
Integer
status
);
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/RefillCardService.java
View file @
118c79dc
...
...
@@ -10,14 +10,14 @@ public interface RefillCardService {
* @param refillCard
* @return
*/
R
add
(
RefillCard
refillCard
);
R
<
Boolean
>
add
(
RefillCard
refillCard
);
/**
* 改变激活状态
* @param batchNumber
* @return
*/
R
update
(
String
batchNumber
);
R
<
Boolean
>
update
(
String
batchNumber
);
/**
* 查询充值卡信息
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/BannerServiceImpl.java
View file @
118c79dc
...
...
@@ -8,6 +8,7 @@ import cn.wisenergy.model.vo.AdvertisingQueryVo;
import
cn.wisenergy.service.app.BannerService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageInfo
;
import
com.sun.org.apache.xpath.internal.operations.Bool
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -49,17 +50,13 @@ public class BannerServiceImpl extends ServiceImpl<BannerMapper, Banner> impleme
}
@Override
public
R
edit
(
Banner
advertising
)
{
public
R
<
Boolean
>
edit
(
Banner
advertising
)
{
log
.
info
(
"BannerServiceImpl[].getById[].input.param:advertising"
+
advertising
);
if
(
null
==
advertising
)
{
return
R
.
error
(
"输入的参数有误"
);
}
if
(
advertising
.
getStatus
()
<
0
||
advertising
.
getStatus
()
>
1
)
{
return
R
.
error
(
"缺少重要数据"
);
}
int
edit
=
bannerMapper
.
edit
(
advertising
);
//判断数据是否修改成功
...
...
@@ -67,7 +64,7 @@ public class BannerServiceImpl extends ServiceImpl<BannerMapper, Banner> impleme
return
R
.
error
(
"数据修改失败"
);
}
return
R
.
ok
();
return
R
.
ok
(
0
,
true
);
}
@Override
...
...
@@ -124,26 +121,20 @@ public class BannerServiceImpl extends ServiceImpl<BannerMapper, Banner> impleme
}
@Override
public
R
<
Boolean
>
putIn
(
Integer
id
,
Integer
status
)
{
public
R
<
Boolean
>
editStatus
(
Integer
id
,
Integer
status
)
{
log
.
info
(
"BannerServiceImpl[].putIn[].input.param,status:{},id"
+
status
,
id
);
//判断数据是否正确
if
(
null
==
id
)
{
return
R
.
error
(
"缺少重要数据"
);
}
if
(
status
==
null
)
{
return
R
.
error
(
"缺少重要数据"
);
}
if
(
status
<
0
||
status
>
1
)
{
if
(
null
==
id
||
null
==
status
)
{
return
R
.
error
(
"缺少重要数据"
);
}
//修改广告状态
int
i
=
bannerMapper
.
putIn
(
id
,
status
);
int
i
=
bannerMapper
.
editStatus
(
id
,
status
);
//判断数据是否修改成功
if
(
i
==
0
)
{
return
R
.
error
(
"数据修改失败"
);
}
return
R
.
ok
();
return
R
.
ok
(
0
,
true
);
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/BannerController.java
View file @
118c79dc
...
...
@@ -50,7 +50,7 @@ public class BannerController {
@GetMapping
(
"/getById"
)
public
R
<
Banner
>
getById
(
Integer
id
)
{
log
.
info
(
"BannerController[].getById[].input.param:id"
+
id
);
R
<
Banner
>
bannerR
=
bannerService
.
getById
(
id
);
R
bannerR
=
bannerService
.
getById
(
id
);
return
bannerR
;
}
...
...
@@ -60,9 +60,9 @@ public class BannerController {
@ApiImplicitParam
(
name
=
"status"
,
value
=
"广告状态:0:暂停中 1:投放中"
,
dataType
=
"int"
,
required
=
true
)
})
@GetMapping
(
"/putIn"
)
public
R
<
Boolean
>
putIn
(
Integer
id
,
Integer
status
)
{
public
R
<
Boolean
>
editStatus
(
Integer
id
,
Integer
status
)
{
log
.
info
(
"BannerController[].putIn[].input.param:id,status"
+
id
,
status
);
R
<
Boolean
>
booleanR
=
bannerService
.
putIn
(
id
,
status
);
R
<
Boolean
>
booleanR
=
bannerService
.
editStatus
(
id
,
status
);
return
booleanR
;
}
...
...
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