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
d282bc00
Commit
d282bc00
authored
Dec 24, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】
parent
9485e338
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
19 deletions
+74
-19
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+57
-0
RetailController.java
...io/office/modules/manage/controller/RetailController.java
+12
-15
RetailServiceImpl.java
...office/modules/manage/service/impl/RetailServiceImpl.java
+2
-1
logback-spring.xml
src/main/resources/logback-spring.xml
+2
-2
BikefirmDao.xml
src/main/resources/mapper/manage/BikefirmDao.xml
+1
-1
No files found.
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
d282bc00
...
...
@@ -5,6 +5,7 @@ import java.util.List;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.app.annotation.Login
;
...
...
@@ -543,4 +544,60 @@ public class NewsController extends AbstractController {
}
@Login
@PostMapping
(
"/api/retailTop7Info"
)
// @RequiresPermissions("manage:news:list")
public
R
RetailTop7Info
()
{
QueryWrapper
<
NewsEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
"top 7 * "
);
queryWrapper
.
gt
(
"levels"
,
"0"
);
queryWrapper
.
eq
(
"status"
,
"1"
);
//.or().like("content","零售").or().like("content","商品二维码").or().like("content","全渠道")
queryWrapper
.
eq
(
"classid"
,
"14"
).
or
().
like
(
"keyword"
,
"零售"
).
or
().
like
(
"keyword"
,
"全渠道"
).
like
(
"keyword"
,
"商品二维码"
);
queryWrapper
.
orderByDesc
(
"levels "
,
"id"
);
List
<
NewsEntity
>
lists
=
newsService
.
list
(
queryWrapper
);
/*Page<NewsEntity> page = this.newsService.selectRealTimeInfo(newsParams,
new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page);*/
return
R
.
ok
().
put
(
"data"
,
lists
);
}
@Login
@PostMapping
(
"/api/retailList"
)
// @RequiresPermissions("manage:news:list")
public
R
retailList
(
@RequestBody
Map
<
String
,
String
>
params
)
{
QueryWrapper
<
NewsEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
gt
(
"levels"
,
"0"
);
queryWrapper
.
eq
(
"status"
,
"1"
);
//or().like("content","零售").or().like("content","商品二维码").or().like("content","全渠道").
queryWrapper
.
eq
(
"classid"
,
"14"
).
or
().
like
(
"keyword"
,
"零售"
).
or
().
like
(
"keyword"
,
"全渠道"
).
like
(
"keyword"
,
"商品二维码"
);
queryWrapper
.
orderByDesc
(
"levels "
,
"id"
);
Page
page
=
newsService
.
page
(
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
)),
Integer
.
valueOf
(
params
.
get
(
"size"
))),
queryWrapper
);
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
//首页商品二维码在零售领域的应用
@Login
@PostMapping
(
"/api/retailCodeList"
)
// @RequiresPermissions("manage:news:list")
public
R
retailCodeTop6List
(
@RequestBody
Map
<
String
,
String
>
params
)
{
QueryWrapper
<
NewsEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
gt
(
"levels"
,
"0"
);
queryWrapper
.
eq
(
"status"
,
"1"
);
//or().like("content","零售").or().like("content","商品二维码").or().like("content","全渠道").
queryWrapper
.
eq
(
"classid"
,
"14"
).
or
().
like
(
"keyword"
,
"商品二维码"
);
queryWrapper
.
orderByDesc
(
"levels "
,
"id"
);
Page
page
=
newsService
.
page
(
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
)),
Integer
.
valueOf
(
params
.
get
(
"size"
))),
queryWrapper
);
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
src/main/java/io/office/modules/manage/controller/RetailController.java
View file @
d282bc00
...
...
@@ -18,7 +18,6 @@ import io.office.common.utils.PageUtils;
import
io.office.common.utils.R
;
/**
* ${comments}
*
...
...
@@ -37,7 +36,7 @@ public class RetailController {
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:retail:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageUtils
page
=
retailService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
...
...
@@ -49,7 +48,7 @@ public class RetailController {
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:retail:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
)
{
RetailEntity
retail
=
retailService
.
getById
(
id
);
return
R
.
ok
().
put
(
"retail"
,
retail
);
...
...
@@ -60,7 +59,7 @@ public class RetailController {
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:retail:save")
public
R
save
(
@RequestBody
RetailEntity
retail
){
public
R
save
(
@RequestBody
RetailEntity
retail
)
{
retailService
.
save
(
retail
);
return
R
.
ok
();
...
...
@@ -71,7 +70,7 @@ public class RetailController {
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:retail:update")
public
R
update
(
@RequestBody
RetailEntity
retail
){
public
R
update
(
@RequestBody
RetailEntity
retail
)
{
retailService
.
updateById
(
retail
);
return
R
.
ok
();
...
...
@@ -82,7 +81,7 @@ public class RetailController {
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:retail:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
public
R
delete
(
@RequestBody
Integer
[]
ids
)
{
retailService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
...
...
@@ -91,18 +90,16 @@ public class RetailController {
/**
* 应用指南列表
* @param retailEntityVo
*
* @param params
* @return
*/
/*
@Login
@Login
@PostMapping
(
"/api/guideList"
)
public R guideList(@RequestBody RetailEntityVo retailEntityVo) {
*//* Page<RetailEntity> page = this.retailService.queryPage(retailEntityVo,
new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page);
return R.ok().put("data", pageUtils);*//*
}*/
public
R
guideList
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageUtils
page
=
retailService
.
queryPageList
(
params
);
return
R
.
ok
().
put
(
"data"
,
page
);
}
}
src/main/java/io/office/modules/manage/service/impl/RetailServiceImpl.java
View file @
d282bc00
...
...
@@ -40,7 +40,7 @@ public class RetailServiceImpl extends ServiceImpl<RetailDao, RetailEntity> impl
new
Query
<
RetailEntity
>().
getPage
(
params
),
retailEntityQueryWrapper
);
return
n
ull
;
return
n
ew
PageUtils
(
page
)
;
}
}
\ No newline at end of file
src/main/resources/logback-spring.xml
View file @
d282bc00
...
...
@@ -199,7 +199,7 @@
<!-- 4 最终的策略:
基本策略(root级) + 根据profile在启动时, logger标签中定制化package日志级别(优先级高于上面的root级)-->
<springProfile
name=
"dev"
>
<root
level=
"
info
"
>
<root
level=
"
debug
"
>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"DEBUG_FILE"
/>
<appender-ref
ref=
"INFO_FILE"
/>
...
...
@@ -211,7 +211,7 @@
</springProfile>
<springProfile
name=
"test"
>
<root
level=
"
info
"
>
<root
level=
"
debug
"
>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"DEBUG_FILE"
/>
<appender-ref
ref=
"INFO_FILE"
/>
...
...
src/main/resources/mapper/manage/BikefirmDao.xml
View file @
d282bc00
...
...
@@ -52,7 +52,7 @@
<select
id=
"getBikeFirm"
parameterType=
"io.office.modules.manage.vo.request.BikeFirmVo"
resultType=
"io.office.modules.manage.vo.request.BikeFirmVo"
>
select a.firm_name,b.code,'注册' as status from ancc
_db2.dbo.bikefirm a left join ancc_db2
.dbo.bikecode b on a.id=b.bikeid where check_stat=1
select a.firm_name,b.code,'注册' as status from ancc
.dbo.bikefirm a left join ancc
.dbo.bikecode b on a.id=b.bikeid where check_stat=1
<if
test=
"code!='' and code!=null"
>
and b.code= #{code}
</if>
...
...
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