Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
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
吴迪
gs1-office-web-sit
Commits
5285653b
Commit
5285653b
authored
May 21, 2023
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug 05.16-05.18
parent
d0037d5e
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
80 additions
and
8 deletions
+80
-8
BikecodeController.java
.../office/modules/manage/controller/BikecodeController.java
+1
-0
CasesController.java
.../io/office/modules/manage/controller/CasesController.java
+3
-0
DocController.java
...va/io/office/modules/manage/controller/DocController.java
+1
-0
IndexCarouselManageController.java
...ules/manage/controller/IndexCarouselManageController.java
+2
-0
KnowledgeinfoController.java
...ce/modules/manage/controller/KnowledgeinfoController.java
+1
-0
LogisticsController.java
...office/modules/manage/controller/LogisticsController.java
+1
-0
MedicalController.java
...o/office/modules/manage/controller/MedicalController.java
+4
-1
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+20
-1
PartnersController.java
.../office/modules/manage/controller/PartnersController.java
+2
-0
PictureController.java
...o/office/modules/manage/controller/PictureController.java
+2
-0
PolicyController.java
...io/office/modules/manage/controller/PolicyController.java
+10
-0
ProductController.java
...o/office/modules/manage/controller/ProductController.java
+8
-2
RetailController.java
...io/office/modules/manage/controller/RetailController.java
+1
-0
RetailpictureController.java
...ce/modules/manage/controller/RetailpictureController.java
+2
-0
TokenController.java
.../io/office/modules/manage/controller/TokenController.java
+5
-0
ProductDao.java
src/main/java/io/office/modules/manage/dao/ProductDao.java
+1
-1
TokenCount.java
...main/java/io/office/modules/manage/entity/TokenCount.java
+3
-0
ProductService.java
...java/io/office/modules/manage/service/ProductService.java
+1
-1
IndexCarouselManageServiceImpl.java
...s/manage/service/impl/IndexCarouselManageServiceImpl.java
+1
-0
NewsMovieServiceImpl.java
...ice/modules/manage/service/impl/NewsMovieServiceImpl.java
+1
-0
NewsServiceImpl.java
...o/office/modules/manage/service/impl/NewsServiceImpl.java
+1
-0
ProductServiceImpl.java
...ffice/modules/manage/service/impl/ProductServiceImpl.java
+3
-2
TopicnewsServiceImpl.java
...ice/modules/manage/service/impl/TopicnewsServiceImpl.java
+1
-0
ProductDao.xml
src/main/resources/mapper/manage/ProductDao.xml
+5
-0
No files found.
src/main/java/io/office/modules/manage/controller/BikecodeController.java
View file @
5285653b
...
@@ -60,6 +60,7 @@ public class BikecodeController {
...
@@ -60,6 +60,7 @@ public class BikecodeController {
@RequestMapping
(
"/save"
)
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:bikecode:save")
// @RequiresPermissions("manage:bikecode:save")
public
R
save
(
@RequestBody
BikecodeEntity
bikecode
){
public
R
save
(
@RequestBody
BikecodeEntity
bikecode
){
bikecodeService
.
save
(
bikecode
);
bikecodeService
.
save
(
bikecode
);
return
R
.
ok
();
return
R
.
ok
();
...
...
src/main/java/io/office/modules/manage/controller/CasesController.java
View file @
5285653b
...
@@ -93,6 +93,7 @@ public class CasesController extends AbstractController {
...
@@ -93,6 +93,7 @@ public class CasesController extends AbstractController {
cases
.
setLasteditor
(
getUser
().
getUsername
());
cases
.
setLasteditor
(
getUser
().
getUsername
());
cases
.
setRegisterdate
(
new
Date
());
cases
.
setRegisterdate
(
new
Date
());
cases
.
setUpdatedate
(
new
Date
());
cases
.
setUpdatedate
(
new
Date
());
cases
.
setStatus
(
0
);
casesService
.
save
(
cases
);
casesService
.
save
(
cases
);
return
R
.
ok
(
"新增成功!"
);
return
R
.
ok
(
"新增成功!"
);
}
}
...
@@ -171,6 +172,8 @@ public class CasesController extends AbstractController {
...
@@ -171,6 +172,8 @@ public class CasesController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
casesEntity
.
getStatus
()
!=
1
)
{
if
(
casesEntity
.
getStatus
()
!=
1
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
...
...
src/main/java/io/office/modules/manage/controller/DocController.java
View file @
5285653b
...
@@ -70,6 +70,7 @@ public class DocController extends AbstractController {
...
@@ -70,6 +70,7 @@ public class DocController extends AbstractController {
@RequestMapping
(
"/save"
)
@RequestMapping
(
"/save"
)
@RequiresPermissions
(
"manage:doc:save"
)
@RequiresPermissions
(
"manage:doc:save"
)
public
R
save
(
@RequestBody
DocEntity
doc
){
public
R
save
(
@RequestBody
DocEntity
doc
){
doc
.
setStatus
(
0
);
docService
.
save
(
doc
);
docService
.
save
(
doc
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
src/main/java/io/office/modules/manage/controller/IndexCarouselManageController.java
View file @
5285653b
...
@@ -93,6 +93,8 @@ public class IndexCarouselManageController extends AbstractController {
...
@@ -93,6 +93,8 @@ public class IndexCarouselManageController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
indexCarouselManage
.
getCheckflagIndex
()
!=
1
)
{
if
(
indexCarouselManage
.
getCheckflagIndex
()
!=
1
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
...
...
src/main/java/io/office/modules/manage/controller/KnowledgeinfoController.java
View file @
5285653b
...
@@ -76,6 +76,7 @@ public class KnowledgeinfoController extends AbstractController {
...
@@ -76,6 +76,7 @@ public class KnowledgeinfoController extends AbstractController {
public
R
save
(
@RequestBody
KnowledgeinfoEntity
knowledgeinfo
){
public
R
save
(
@RequestBody
KnowledgeinfoEntity
knowledgeinfo
){
knowledgeinfo
.
setInputdate
(
new
Date
());
knowledgeinfo
.
setInputdate
(
new
Date
());
knowledgeinfo
.
setEditor
(
getUser
().
getUsername
());
knowledgeinfo
.
setEditor
(
getUser
().
getUsername
());
knowledgeinfo
.
setStatus
(
0
);
knowledgeinfoService
.
save
(
knowledgeinfo
);
knowledgeinfoService
.
save
(
knowledgeinfo
);
return
R
.
ok
(
"新增成功!"
);
return
R
.
ok
(
"新增成功!"
);
}
}
...
...
src/main/java/io/office/modules/manage/controller/LogisticsController.java
View file @
5285653b
...
@@ -69,6 +69,7 @@ public class LogisticsController extends AbstractController {
...
@@ -69,6 +69,7 @@ public class LogisticsController extends AbstractController {
String
username
=
getUser
().
getUsername
();
String
username
=
getUser
().
getUsername
();
logistics
.
setEditor
(
username
);
logistics
.
setEditor
(
username
);
logistics
.
setLasteditor
(
username
);
logistics
.
setLasteditor
(
username
);
logistics
.
setStatus
(
"0"
);
logisticsService
.
save
(
logistics
);
logisticsService
.
save
(
logistics
);
return
R
.
ok
(
"新增成功!"
);
return
R
.
ok
(
"新增成功!"
);
}
}
...
...
src/main/java/io/office/modules/manage/controller/MedicalController.java
View file @
5285653b
...
@@ -72,6 +72,7 @@ public class MedicalController extends AbstractController {
...
@@ -72,6 +72,7 @@ public class MedicalController extends AbstractController {
medical
.
setInputDate
(
new
Date
());
medical
.
setInputDate
(
new
Date
());
medical
.
setEditor
(
username
);
medical
.
setEditor
(
username
);
medical
.
setLasteditor
(
username
);
medical
.
setLasteditor
(
username
);
medical
.
setStatus
(
"0"
);
if
(
medical
.
getReleasetime
()==
null
)
{
if
(
medical
.
getReleasetime
()==
null
)
{
medical
.
setReleasetime
(
new
Date
());
medical
.
setReleasetime
(
new
Date
());
}
}
...
@@ -181,7 +182,7 @@ public class MedicalController extends AbstractController {
...
@@ -181,7 +182,7 @@ public class MedicalController extends AbstractController {
@Value
(
"${token.count}"
)
@Value
(
"${token.count}"
)
private
int
tokenCountConfig
;
private
int
tokenCountConfig
;
@PostMapping
(
"/api/getDetailById"
)
@PostMapping
(
{
"/api/getDetailById"
}
)
public
R
getDetailById
(
@RequestBody
MedicalEntity
medical
)
{
public
R
getDetailById
(
@RequestBody
MedicalEntity
medical
)
{
MedicalEntity
medicalEntity
=
medicalService
.
getById
(
medical
.
getId
());
MedicalEntity
medicalEntity
=
medicalService
.
getById
(
medical
.
getId
());
if
(
medicalEntity
==
null
)
{
if
(
medicalEntity
==
null
)
{
...
@@ -198,6 +199,8 @@ public class MedicalController extends AbstractController {
...
@@ -198,6 +199,8 @@ public class MedicalController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
medicalEntity
.
getStatus
()!=
null
&&
!
medicalEntity
.
getStatus
().
equals
(
"1"
))
{
if
(
medicalEntity
.
getStatus
()!=
null
&&
!
medicalEntity
.
getStatus
().
equals
(
"1"
))
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
...
...
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
5285653b
...
@@ -5,7 +5,9 @@ import java.util.List;
...
@@ -5,7 +5,9 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.annotation.SysLog
;
import
io.office.common.annotation.SysLog
;
...
@@ -220,10 +222,19 @@ public class NewsController extends AbstractController {
...
@@ -220,10 +222,19 @@ public class NewsController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
news
.
getStatus
()
!=
1
)
{
if
(
news
.
getStatus
()
!=
1
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
}
}
//点击量+1
NewsEntity
newsUpdate
=
new
NewsEntity
();
newsUpdate
.
setHits
(
news
.
getHits
()+
1
);
UpdateWrapper
<
NewsEntity
>
updateWrapper
=
new
UpdateWrapper
();
updateWrapper
.
eq
(
"id"
,
id
);
newsService
.
update
(
newsUpdate
,
updateWrapper
);
}
}
return
R
.
ok
().
put
(
"data"
,
news
);
return
R
.
ok
().
put
(
"data"
,
news
);
}
}
...
@@ -386,6 +397,8 @@ public class NewsController extends AbstractController {
...
@@ -386,6 +397,8 @@ public class NewsController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
announceEntity
.
getStatus
()
!=
1
)
{
if
(
announceEntity
.
getStatus
()
!=
1
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
...
@@ -501,6 +514,8 @@ public class NewsController extends AbstractController {
...
@@ -501,6 +514,8 @@ public class NewsController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
retMap
.
getStatus
()
!=
1
)
{
if
(
retMap
.
getStatus
()
!=
1
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
...
@@ -604,7 +619,7 @@ public class NewsController extends AbstractController {
...
@@ -604,7 +619,7 @@ public class NewsController extends AbstractController {
* 专题推荐
* 专题推荐
*/
*/
@Login
@Login
@GetMapping
({
"/api/newsTopicInfo/{id}"
,
"
,
/api/newsTopicInfo/{id}/{token}"
})
@GetMapping
({
"/api/newsTopicInfo/{id}"
,
"/api/newsTopicInfo/{id}/{token}"
})
public
R
newsTopicInfo
(
@PathVariable
(
"id"
)
String
id
,
@PathVariable
(
value
=
"token"
,
required
=
false
)
String
token
)
{
public
R
newsTopicInfo
(
@PathVariable
(
"id"
)
String
id
,
@PathVariable
(
value
=
"token"
,
required
=
false
)
String
token
)
{
NewtopicEntity
newtopic
=
newtopicService
.
getById
(
id
);
NewtopicEntity
newtopic
=
newtopicService
.
getById
(
id
);
if
(
newtopic
==
null
)
{
if
(
newtopic
==
null
)
{
...
@@ -621,6 +636,8 @@ public class NewsController extends AbstractController {
...
@@ -621,6 +636,8 @@ public class NewsController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
newtopic
.
getCheckflag
()
!=
1
)
{
if
(
newtopic
.
getCheckflag
()
!=
1
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
...
@@ -779,6 +796,8 @@ public class NewsController extends AbstractController {
...
@@ -779,6 +796,8 @@ public class NewsController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
newsMovie
.
getStatus
()
!=
1
)
{
if
(
newsMovie
.
getStatus
()
!=
1
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
...
...
src/main/java/io/office/modules/manage/controller/PartnersController.java
View file @
5285653b
...
@@ -168,6 +168,8 @@ public class PartnersController extends AbstractController {
...
@@ -168,6 +168,8 @@ public class PartnersController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
partners
.
getStatus
()
!=
1
)
{
if
(
partners
.
getStatus
()
!=
1
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
...
...
src/main/java/io/office/modules/manage/controller/PictureController.java
View file @
5285653b
...
@@ -211,6 +211,8 @@ public class PictureController extends AbstractController {
...
@@ -211,6 +211,8 @@ public class PictureController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
picture
.
getStatus
()
!=
1
)
{
if
(
picture
.
getStatus
()
!=
1
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
...
...
src/main/java/io/office/modules/manage/controller/PolicyController.java
View file @
5285653b
...
@@ -4,11 +4,13 @@ import java.util.List;
...
@@ -4,11 +4,13 @@ import java.util.List;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.annotation.SysLog
;
import
io.office.common.annotation.SysLog
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.common.utils.R
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.PictureEntity
;
import
io.office.modules.manage.entity.PictureEntity
;
import
io.office.modules.manage.entity.PolicyEntity
;
import
io.office.modules.manage.entity.PolicyEntity
;
import
io.office.modules.manage.entity.TokenCount
;
import
io.office.modules.manage.entity.TokenCount
;
...
@@ -207,10 +209,18 @@ public class PolicyController extends AbstractController {
...
@@ -207,10 +209,18 @@ public class PolicyController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
StrUtil
.
equals
(
"0"
,
policy
.
getStatus
()))
{
if
(
StrUtil
.
equals
(
"0"
,
policy
.
getStatus
()))
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
}
}
//点击量+1
PolicyEntity
policyUpdate
=
new
PolicyEntity
();
policyUpdate
.
setHits
(
policy
.
getHits
()+
1
);
UpdateWrapper
<
PolicyEntity
>
updateWrapper
=
new
UpdateWrapper
();
updateWrapper
.
eq
(
"id"
,
id
);
policyService
.
update
(
policyUpdate
,
updateWrapper
);
}
}
...
...
src/main/java/io/office/modules/manage/controller/ProductController.java
View file @
5285653b
...
@@ -142,9 +142,9 @@ public class ProductController extends AbstractController {
...
@@ -142,9 +142,9 @@ public class ProductController extends AbstractController {
public
R
findPage
(
@RequestBody
Map
<
String
,
String
>
param
){
public
R
findPage
(
@RequestBody
Map
<
String
,
String
>
param
){
Page
<
ProductEntity
>
pag
=
this
.
productService
.
findPage
(
Page
<
ProductEntity
>
pag
=
this
.
productService
.
findPage
(
new
Page
(
Integer
.
valueOf
(
param
.
get
(
"page"
)),
new
Page
(
Integer
.
valueOf
(
param
.
get
(
"page"
)),
Integer
.
valueOf
(
param
.
get
(
"size"
))),
param
.
get
(
"id"
));
Integer
.
valueOf
(
param
.
get
(
"size"
))),
param
.
get
(
"id"
)
,
param
.
get
(
"token"
)
);
PageUtils
pageUtils
=
new
PageUtils
(
pag
);
PageUtils
pageUtils
=
new
PageUtils
(
pag
);
if
(
pageUtils
.
getTotalCount
()
!
=
0
)
{
if
(
pageUtils
.
getTotalCount
()
=
=
0
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
}
}
if
(
param
.
get
(
"token"
)
!=
null
&&
StringUtils
.
isNotBlank
(
param
.
get
(
"token"
).
toString
()))
{
if
(
param
.
get
(
"token"
)
!=
null
&&
StringUtils
.
isNotBlank
(
param
.
get
(
"token"
).
toString
()))
{
...
@@ -158,12 +158,18 @@ public class ProductController extends AbstractController {
...
@@ -158,12 +158,18 @@ public class ProductController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
pageUtils
.
getTotalCount
()
==
0
)
{
return
R
.
error
(
"没有可显示的内容"
);
}
else
if
(
pageUtils
.
getTotalCount
()
==
1
){
ProductEntity
productEntity
=
(
ProductEntity
)
pageUtils
.
getList
().
get
(
0
);
ProductEntity
productEntity
=
(
ProductEntity
)
pageUtils
.
getList
().
get
(
0
);
if
(
productEntity
.
getStatus
()
!=
1
)
{
if
(
productEntity
.
getStatus
()
!=
1
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
}
}
}
}
}
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
}
...
...
src/main/java/io/office/modules/manage/controller/RetailController.java
View file @
5285653b
...
@@ -60,6 +60,7 @@ public class RetailController {
...
@@ -60,6 +60,7 @@ public class RetailController {
@RequestMapping
(
"/save"
)
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:retail:save")
// @RequiresPermissions("manage:retail:save")
public
R
save
(
@RequestBody
RetailEntity
retail
)
{
public
R
save
(
@RequestBody
RetailEntity
retail
)
{
retail
.
setStatus
(
0
);
retailService
.
save
(
retail
);
retailService
.
save
(
retail
);
return
R
.
ok
();
return
R
.
ok
();
...
...
src/main/java/io/office/modules/manage/controller/RetailpictureController.java
View file @
5285653b
...
@@ -157,6 +157,8 @@ public class RetailpictureController extends AbstractController {
...
@@ -157,6 +157,8 @@ public class RetailpictureController extends AbstractController {
//删除无用token
//删除无用token
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
return
R
.
error
(
"预览链接次数已达上限,请联系相关人员重新获取预览链接!"
);
}
}
tokenCount
.
setCountFlag
(
tokenCount
.
getCountFlag
()
+
1
);
tokenCountService
.
updateById
(
tokenCount
);
}
else
{
}
else
{
if
(
picture
.
getStatus
()
!=
1
)
{
if
(
picture
.
getStatus
()
!=
1
)
{
return
R
.
error
(
"没有可显示的内容"
);
return
R
.
error
(
"没有可显示的内容"
);
...
...
src/main/java/io/office/modules/manage/controller/TokenController.java
View file @
5285653b
...
@@ -41,6 +41,11 @@ public class TokenController extends AbstractController {
...
@@ -41,6 +41,11 @@ public class TokenController extends AbstractController {
tokenCount
.
setCreateTime
(
DateUtils
.
getCurrentTime
(
DateUtils
.
FORMAT1
));
tokenCount
.
setCreateTime
(
DateUtils
.
getCurrentTime
(
DateUtils
.
FORMAT1
));
tokenCount
.
setId
(
Long
.
parseLong
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
)));
tokenCount
.
setId
(
Long
.
parseLong
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
)));
tokenCount
.
setCountFlag
(
0
);
tokenCount
.
setCountFlag
(
0
);
tokenCountService
.
save
(
tokenCount
);
return
R
.
ok
().
put
(
"data"
,
token
);
return
R
.
ok
().
put
(
"data"
,
token
);
}
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
}
}
}
src/main/java/io/office/modules/manage/dao/ProductDao.java
View file @
5285653b
...
@@ -19,5 +19,5 @@ import java.util.Map;
...
@@ -19,5 +19,5 @@ import java.util.Map;
public
interface
ProductDao
extends
BaseMapper
<
ProductEntity
>
{
public
interface
ProductDao
extends
BaseMapper
<
ProductEntity
>
{
List
<
ProductEntity
>
selectProductList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
,
Page
page
);
List
<
ProductEntity
>
selectProductList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
,
Page
page
);
List
<
ProductEntity
>
findPage
(
Page
page
,
@Param
(
"id"
)
Object
id
);
List
<
ProductEntity
>
findPage
(
Page
page
,
@Param
(
"id"
)
Object
id
,
@Param
(
"token"
)
String
token
);
}
}
src/main/java/io/office/modules/manage/entity/TokenCount.java
View file @
5285653b
package
io
.
office
.
modules
.
manage
.
entity
;
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -16,6 +18,7 @@ import java.io.Serializable;
...
@@ -16,6 +18,7 @@ import java.io.Serializable;
public
class
TokenCount
implements
Serializable
{
public
class
TokenCount
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
type
=
IdType
.
INPUT
)
private
long
id
;
private
long
id
;
private
String
token
;
private
String
token
;
...
...
src/main/java/io/office/modules/manage/service/ProductService.java
View file @
5285653b
...
@@ -28,6 +28,6 @@ public interface ProductService extends IService<ProductEntity> {
...
@@ -28,6 +28,6 @@ public interface ProductService extends IService<ProductEntity> {
Page
<
ProductEntity
>
selectProductList
(
Map
<
String
,
Object
>
params
,
Page
page
);
Page
<
ProductEntity
>
selectProductList
(
Map
<
String
,
Object
>
params
,
Page
page
);
Page
<
ProductEntity
>
findPage
(
Page
page
,
Object
id
);
Page
<
ProductEntity
>
findPage
(
Page
page
,
Object
id
,
String
token
);
}
}
src/main/java/io/office/modules/manage/service/impl/IndexCarouselManageServiceImpl.java
View file @
5285653b
...
@@ -47,6 +47,7 @@ public class IndexCarouselManageServiceImpl extends ServiceImpl<IndexCarouselMan
...
@@ -47,6 +47,7 @@ public class IndexCarouselManageServiceImpl extends ServiceImpl<IndexCarouselMan
indexCarouselManage
.
setCheckIndexAuthor
(
user
.
getUsername
());
indexCarouselManage
.
setCheckIndexAuthor
(
user
.
getUsername
());
indexCarouselManage
.
setBriefShow
(
indexCarouselManage
.
getBrief
());
indexCarouselManage
.
setBriefShow
(
indexCarouselManage
.
getBrief
());
indexCarouselManage
.
setLevelsIndex
(
indexCarouselManage
.
getLevels
()-
1
);
indexCarouselManage
.
setLevelsIndex
(
indexCarouselManage
.
getLevels
()-
1
);
indexCarouselManage
.
setCheckflagIndex
(
0
);
int
insert
=
baseMapper
.
insert
(
indexCarouselManage
);
int
insert
=
baseMapper
.
insert
(
indexCarouselManage
);
if
(
insert
>
0
){
if
(
insert
>
0
){
return
R
.
ok
(
"新增成功!"
);
return
R
.
ok
(
"新增成功!"
);
...
...
src/main/java/io/office/modules/manage/service/impl/NewsMovieServiceImpl.java
View file @
5285653b
...
@@ -67,6 +67,7 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
...
@@ -67,6 +67,7 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
newtopicEntityVo
.
setLittlepic
(
newtopicEntityVo
.
getPic
());
newtopicEntityVo
.
setLittlepic
(
newtopicEntityVo
.
getPic
());
newtopicEntityVo
.
setBigpic
(
newtopicEntityVo
.
getPic
());
newtopicEntityVo
.
setBigpic
(
newtopicEntityVo
.
getPic
());
}
}
newtopicEntityVo
.
setStatus
(
0
);
NewsMovieEntity
newsMovieEntity
=
new
NewsMovieEntity
();
NewsMovieEntity
newsMovieEntity
=
new
NewsMovieEntity
();
BeanUtils
.
copyProperties
(
newtopicEntityVo
,
newsMovieEntity
);
BeanUtils
.
copyProperties
(
newtopicEntityVo
,
newsMovieEntity
);
baseMapper
.
insert
(
newsMovieEntity
);
baseMapper
.
insert
(
newsMovieEntity
);
...
...
src/main/java/io/office/modules/manage/service/impl/NewsServiceImpl.java
View file @
5285653b
...
@@ -50,6 +50,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -50,6 +50,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
news
.
setLasteditor
(
user
.
getUsername
());
news
.
setLasteditor
(
user
.
getUsername
());
news
.
setStartdate
(
new
Date
());
news
.
setStartdate
(
new
Date
());
news
.
setPublicdate
(
new
Date
());
news
.
setPublicdate
(
new
Date
());
news
.
setStatus
(
0
);
//二级栏目不为空时 classid取值二级栏目id值
//二级栏目不为空时 classid取值二级栏目id值
if
(
news
.
getCclassid
()
!=
null
&&
StringUtils
.
isNotBlank
(
news
.
getCclassid
().
toString
()))
{
if
(
news
.
getCclassid
()
!=
null
&&
StringUtils
.
isNotBlank
(
news
.
getCclassid
().
toString
()))
{
news
.
setClassid
(
news
.
getCclassid
());
news
.
setClassid
(
news
.
getCclassid
());
...
...
src/main/java/io/office/modules/manage/service/impl/ProductServiceImpl.java
View file @
5285653b
...
@@ -38,6 +38,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductDao, ProductEntity> i
...
@@ -38,6 +38,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductDao, ProductEntity> i
@Override
@Override
public
R
insertProduct
(
ProductEntity
product
,
SysUserEntity
user
)
{
public
R
insertProduct
(
ProductEntity
product
,
SysUserEntity
user
)
{
product
.
setAdddate
(
new
Date
());
product
.
setAdddate
(
new
Date
());
product
.
setStatus
(
0
);
int
insert
=
baseMapper
.
insert
(
product
);
int
insert
=
baseMapper
.
insert
(
product
);
if
(
insert
>
0
){
if
(
insert
>
0
){
return
R
.
ok
(
"新增成功!"
);
return
R
.
ok
(
"新增成功!"
);
...
@@ -81,8 +82,8 @@ public class ProductServiceImpl extends ServiceImpl<ProductDao, ProductEntity> i
...
@@ -81,8 +82,8 @@ public class ProductServiceImpl extends ServiceImpl<ProductDao, ProductEntity> i
}
}
@Override
@Override
public
Page
<
ProductEntity
>
findPage
(
Page
page
,
Object
id
)
{
public
Page
<
ProductEntity
>
findPage
(
Page
page
,
Object
id
,
String
token
)
{
List
<
ProductEntity
>
list
=
this
.
productDao
.
findPage
(
page
,
id
);
List
<
ProductEntity
>
list
=
this
.
productDao
.
findPage
(
page
,
id
,
token
);
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
}
...
...
src/main/java/io/office/modules/manage/service/impl/TopicnewsServiceImpl.java
View file @
5285653b
...
@@ -54,6 +54,7 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt
...
@@ -54,6 +54,7 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt
TopicnewsEntity
topicnewsEntity
=
new
TopicnewsEntity
();
TopicnewsEntity
topicnewsEntity
=
new
TopicnewsEntity
();
topicnewsEntity
.
setClassid
(
news
.
getClassid
());
topicnewsEntity
.
setClassid
(
news
.
getClassid
());
news
.
setClassid
(
35
);
news
.
setClassid
(
35
);
news
.
setStatus
(
0
);
newsService
.
insertNews
(
news
,
user
);
newsService
.
insertNews
(
news
,
user
);
topicnewsEntity
.
setNewsid
(
news
.
getId
());
topicnewsEntity
.
setNewsid
(
news
.
getId
());
topicnewsEntity
.
setNewslevels
(
news
.
getLevels
());
topicnewsEntity
.
setNewslevels
(
news
.
getLevels
());
...
...
src/main/resources/mapper/manage/ProductDao.xml
View file @
5285653b
...
@@ -69,6 +69,10 @@
...
@@ -69,6 +69,10 @@
<if
test=
"id!=null and id !=''"
>
<if
test=
"id!=null and id !=''"
>
and id =#{id}
and id =#{id}
</if>
</if>
<if
test=
"token==null ||token==''"
>
and status > 0
</if>
ORDER BY levels DESC, adddate DESC
ORDER BY levels DESC, adddate DESC
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
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