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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
29 deletions
+84
-29
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+57
-0
RetailController.java
...io/office/modules/manage/controller/RetailController.java
+22
-25
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,12 +18,11 @@ import io.office.common.utils.PageUtils;
import
io.office.common.utils.R
;
/**
* ${comments}
*
* @author wudi
* @email
* @email
* @date 2021-12-21 22:43:34
*/
@RestController
...
...
@@ -36,8 +35,8 @@ public class RetailController {
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:retail:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
// @RequiresPermissions("manage:retail:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageUtils
page
=
retailService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
...
...
@@ -48,9 +47,9 @@ public class RetailController {
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:retail:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
RetailEntity
retail
=
retailService
.
getById
(
id
);
// @RequiresPermissions("manage:retail:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
)
{
RetailEntity
retail
=
retailService
.
getById
(
id
);
return
R
.
ok
().
put
(
"retail"
,
retail
);
}
...
...
@@ -59,9 +58,9 @@ public class RetailController {
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:retail:save")
public
R
save
(
@RequestBody
RetailEntity
retail
){
retailService
.
save
(
retail
);
// @RequiresPermissions("manage:retail:save")
public
R
save
(
@RequestBody
RetailEntity
retail
)
{
retailService
.
save
(
retail
);
return
R
.
ok
();
}
...
...
@@ -70,9 +69,9 @@ public class RetailController {
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:retail:update")
public
R
update
(
@RequestBody
RetailEntity
retail
){
retailService
.
updateById
(
retail
);
// @RequiresPermissions("manage:retail:update")
public
R
update
(
@RequestBody
RetailEntity
retail
)
{
retailService
.
updateById
(
retail
);
return
R
.
ok
();
}
...
...
@@ -81,9 +80,9 @@ public class RetailController {
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:retail:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
retailService
.
removeByIds
(
Arrays
.
asList
(
ids
));
// @RequiresPermissions("manage:retail:delete")
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