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
ba8a473e
Commit
ba8a473e
authored
Dec 28, 2023
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】请求gds接口限制
parent
da037ca7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
22 deletions
+47
-22
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+12
-1
NewsDao.java
src/main/java/io/office/modules/manage/dao/NewsDao.java
+5
-2
ClickDetailDTO.java
...a/io/office/modules/manage/entity/dto/ClickDetailDTO.java
+1
-1
NewsService.java
...in/java/io/office/modules/manage/service/NewsService.java
+6
-2
NewsServiceImpl.java
...o/office/modules/manage/service/impl/NewsServiceImpl.java
+13
-12
ClickDetailDao.xml
src/main/resources/mapper/manage/ClickDetailDao.xml
+2
-2
NewsDao.xml
src/main/resources/mapper/manage/NewsDao.xml
+8
-2
No files found.
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
ba8a473e
...
...
@@ -723,7 +723,7 @@ public class NewsController extends AbstractController {
//首页商品二维码在零售领域的应用
@Login
@RequestMapping
(
"/api/retailCodeList"
)
// @RequiresPermissions("manage:news:list")
// @RequiresPermissions("manage:news:list")
public
R
retailCodeTop6List
(
@RequestBody
Map
<
String
,
String
>
params
)
{
QueryWrapper
<
NewsEntity
>
queryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -873,4 +873,15 @@ public class NewsController extends AbstractController {
}
/**
* 获取专题数据
*/
@RequestMapping
(
"/api/getTop9ByYear"
)
public
R
getTop9ByYear
(
@RequestBody
Map
<
String
,
String
>
map
){
List
<
NewsEntity
>
top9ByYear
=
newsService
.
getTop9ByYear
(
map
.
get
(
"year"
));
return
R
.
ok
().
put
(
"data"
,
top9ByYear
);
}
}
src/main/java/io/office/modules/manage/dao/NewsDao.java
View file @
ba8a473e
...
...
@@ -13,9 +13,9 @@ import java.util.Map;
/**
* ${comments}
*
*
* @author wudi
* @email
* @email
* @date 2021-10-11 14:53:31
*/
@Mapper
...
...
@@ -113,4 +113,7 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List
<
Map
<
String
,
Object
>>
sydjwhTop4
();
List
<
Map
<
String
,
Object
>>
sydjwhTop1
();
List
<
NewsEntity
>
getTop9ByYear
(
@Param
(
"year"
)
String
year
);
}
src/main/java/io/office/modules/manage/entity/dto/ClickDetailDTO.java
View file @
ba8a473e
...
...
@@ -21,7 +21,7 @@ public class ClickDetailDTO implements Serializable {
/**
* 点击的知识id
*/
private
Long
cI
d
;
private
String
ci
d
;
/**
* $column.comments
*/
...
...
src/main/java/io/office/modules/manage/service/NewsService.java
View file @
ba8a473e
...
...
@@ -9,13 +9,14 @@ import io.office.modules.manage.entity.dto.NewsParams;
import
io.office.modules.manage.vo.response.SearchVo
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @email
* @date 2021-10-11 14:53:31
*/
public
interface
NewsService
extends
IService
<
NewsEntity
>
{
...
...
@@ -109,5 +110,8 @@ public interface NewsService extends IService<NewsEntity> {
List
<
Map
<
String
,
Object
>>
sydjwhTop4
();
List
<
Map
<
String
,
Object
>>
sydjwhTop1
();
List
<
NewsEntity
>
getTop9ByYear
(
String
year
);
}
src/main/java/io/office/modules/manage/service/impl/NewsServiceImpl.java
View file @
ba8a473e
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.dao.News
class
Dao
;
import
io.office.modules.manage.dao.NewsDao
;
import
io.office.modules.manage.entity.*
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.service.NewsService
;
import
io.office.modules.manage.vo.response.SearchVo
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -17,15 +23,6 @@ import org.springframework.stereotype.Service;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.NewsDao
;
import
io.office.modules.manage.service.NewsService
;
@Slf4j
@Service
(
"newsService"
)
...
...
@@ -643,5 +640,10 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
return
retList
;
}
@Override
public
List
<
NewsEntity
>
getTop9ByYear
(
String
year
)
{
return
newsDao
.
getTop9ByYear
(
year
);
}
}
\ No newline at end of file
}
src/main/resources/mapper/manage/ClickDetailDao.xml
View file @
ba8a473e
...
...
@@ -535,8 +535,8 @@
client_browser clientBrowser
from click_detail
<where>
<if
test=
"clickDetailDTO.c
Id!=null and clickDetailDTO.cI
d!=''"
>
c_id = #{clickDetailDTO.c
I
d}
<if
test=
"clickDetailDTO.c
id!=null and clickDetailDTO.ci
d!=''"
>
c_id = #{clickDetailDTO.c
i
d}
</if>
<if
test=
"clickDetailDTO.typeValue!=null and clickDetailDTO.typeValue!=''"
>
and type_Value = #{clickDetailDTO.typeValue}
...
...
src/main/resources/mapper/manage/NewsDao.xml
View file @
ba8a473e
...
...
@@ -811,4 +811,11 @@ ORDER BY
levels DESC,
releasedate DESC
</select>
</mapper>
\ No newline at end of file
<select
id=
"getTop9ByYear"
parameterType=
"string"
resultType=
"io.office.modules.manage.entity.NewsEntity"
>
select top 9 * from news where status=1 and levels>0 and classid = 6 and YEAR(publicdate) = #{year} ORDER BY levels DESC,id DESC
</select>
</mapper>
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