Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lwby_ad_data
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
maliang
lwby_ad_data
Commits
df7c68a5
Commit
df7c68a5
authored
Jul 09, 2020
by
maliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限控制
parent
44af56d4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
AdvertiserController.java
...boot/security/server/controller/AdvertiserController.java
+12
-3
AdvertiserUserList.html
src/main/resources/static/pages/user/AdvertiserUserList.html
+6
-1
No files found.
src/main/java/com/boot/security/server/controller/AdvertiserController.java
View file @
df7c68a5
...
...
@@ -15,6 +15,8 @@ import com.lwby.api.facade.ICmsAdvertiserFacade;
import
com.lwby.matrix.common.domain.BaseResult
;
import
com.lwby.util.PageData
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -23,6 +25,7 @@ import javax.annotation.Resource;
import
java.util.List
;
import
java.util.Set
;
@RestController
@RequestMapping
(
"/advertiserController"
)
public
class
AdvertiserController
{
...
...
@@ -38,6 +41,8 @@ public class AdvertiserController {
@Autowired
private
AdvertDao
advertDao
;
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
AdvertiserController
.
class
);
@PostMapping
(
"/table"
)
@ApiOperation
(
value
=
"获取广告商管理数据"
)
@ResponseBody
...
...
@@ -100,7 +105,8 @@ public class AdvertiserController {
@PostMapping
(
"/stopAdvertInAllAdPos"
)
@ApiOperation
(
value
=
"停止广告投放"
)
@ResponseBody
public
void
stopAdvertInAllAdPos
(
@RequestBody
PageTableRequest
request
)
{
public
String
stopAdvertInAllAdPos
(
@RequestBody
PageTableRequest
request
)
{
JSONObject
jsonObject
=
new
JSONObject
();
Integer
advertiserId
=
request
.
getAdvertiserId
();
String
advertId
=
request
.
getAdvertId
();
Integer
platformId
=
request
.
getPlatformId
();
...
...
@@ -110,11 +116,14 @@ public class AdvertiserController {
stopAdvertRequestBo
.
setPlatformId
(
platformId
);
BaseResult
baseResult
=
cmsAdvertFacade
.
stopAdvertInAllAdPos
(
stopAdvertRequestBo
);
if
(
baseResult
!=
null
&&
baseResult
.
isSucceeded
()){
System
.
out
.
println
(
"成功"
);
jsonObject
.
put
(
"code"
,
0
);
LOG
.
info
(
UserUtil
.
getLoginUser
().
getId
()+
":"
+
UserUtil
.
getLoginUser
().
getUsername
()+
":"
+
advertiserId
+
":"
+
advertId
+
":"
+
platformId
);
}
else
{
System
.
out
.
println
(
"失败"
);
jsonObject
.
put
(
"code"
,
1
);
LOG
.
info
(
UserUtil
.
getLoginUser
().
getId
()+
":"
+
UserUtil
.
getLoginUser
().
getUsername
()+
":"
+
advertiserId
+
":"
+
advertId
+
":"
+
platformId
);
}
//List<PageData> advertListInAllAdPos = cmsAdvertFacade.getAdvertListInAllAdPos(stopAdvertRequestBo);
//advertiserService.syncAdvertiserAndAdvert();
return
jsonObject
.
toJSONString
();
}
}
src/main/resources/static/pages/user/AdvertiserUserList.html
View file @
df7c68a5
...
...
@@ -82,10 +82,15 @@ $(".layui-btn").click(function() {
contentType
:
"application/json;charset=UTF-8"
,
//请求地址
url
:
"/advertiserController/stopAdvertInAllAdPos"
,
dataType
:
"json"
,
async
:
true
,
//请求成功
success
:
function
(
result
)
{
if
(
result
.
code
==
0
){
layer
.
msg
(
"停止成功"
);
}
else
{
layer
.
msg
(
"停止失败"
);
}
},
//请求失败
error
:
function
(
xhr
)
{
...
...
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