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
54ec490a
Commit
54ec490a
authored
Jan 12, 2022
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】应用领域新增
parent
b18c4f67
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
1 deletions
+110
-1
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+28
-0
NewsDao.java
src/main/java/io/office/modules/manage/dao/NewsDao.java
+4
-0
ProductEntity.java
...n/java/io/office/modules/manage/entity/ProductEntity.java
+2
-0
NewsService.java
...in/java/io/office/modules/manage/service/NewsService.java
+4
-0
NewsServiceImpl.java
...o/office/modules/manage/service/impl/NewsServiceImpl.java
+17
-0
NewsDao.xml
src/main/resources/mapper/manage/NewsDao.xml
+55
-1
No files found.
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
54ec490a
...
...
@@ -666,4 +666,32 @@ public class NewsController extends AbstractController {
NewsMovieEntity
newsMovie
=
newsMovieService
.
getById
(
id
);
return
R
.
ok
().
put
(
"data"
,
newsMovie
);
}
/***********************************应用领域*********************************/
/**
*应用领域栏目接口
*/
@RequestMapping
(
"/columnList"
)
// @RequiresPermissions("manage:newsmovie:info")
public
R
columnList
(){
List
<
Map
<
String
,
Object
>>
retList
=
this
.
newsService
.
columnList
();
return
R
.
ok
().
put
(
"data"
,
retList
);
}
/**
*应用领域列表
*/
@PostMapping
(
"/yylyList"
)
// @RequiresPermissions("manage:news:list")
public
R
yylyList
(
@RequestBody
NewsParams
newsParams
)
{
Page
<
NewsEntity
>
page
=
this
.
newsService
.
selectYylyList
(
newsParams
,
new
Page
(
newsParams
.
getPage
(),
newsParams
.
getLimit
()));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
}
src/main/java/io/office/modules/manage/dao/NewsDao.java
View file @
54ec490a
...
...
@@ -103,4 +103,8 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List
<
NewtopicEntity
>
sdztList
(
NewsParams
newsParams
,
Page
page
);
List
<
NewsMovieEntity
>
jcspList
(
NewsParams
newsParams
,
Page
page
);
List
<
Map
<
String
,
Object
>>
columnList
();
List
<
NewsEntity
>
selectYylyList
(
@Param
(
"newsParams"
)
NewsParams
newsParams
,
Page
page
);
}
src/main/java/io/office/modules/manage/entity/ProductEntity.java
View file @
54ec490a
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
...
...
@@ -182,6 +183,7 @@ public class ProductEntity implements Serializable {
*/
private
String
auditor
;
@TableField
(
exist
=
false
)
private
String
categoryName
;
}
src/main/java/io/office/modules/manage/service/NewsService.java
View file @
54ec490a
...
...
@@ -101,5 +101,9 @@ public interface NewsService extends IService<NewsEntity> {
Page
<
NewtopicEntity
>
sdztList
(
NewsParams
newsParams
,
Page
page
);
Page
<
NewsMovieEntity
>
jcspList
(
NewsParams
newsParams
,
Page
page
);
List
<
Map
<
String
,
Object
>>
columnList
();
Page
<
NewsEntity
>
selectYylyList
(
NewsParams
newsParams
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/impl/NewsServiceImpl.java
View file @
54ec490a
...
...
@@ -598,5 +598,21 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
return
page
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
columnList
()
{
List
<
Map
<
String
,
Object
>>
retList
=
this
.
newsDao
.
columnList
();
retList
.
stream
().
forEach
(
item
->{
item
.
put
(
"name"
,
String
.
valueOf
(
item
.
get
(
"name"
)).
trim
());
});
return
retList
;
}
@Override
public
Page
<
NewsEntity
>
selectYylyList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewsEntity
>
list
=
this
.
newsDao
.
selectYylyList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
}
\ No newline at end of file
src/main/resources/mapper/manage/NewsDao.xml
View file @
54ec490a
...
...
@@ -123,7 +123,7 @@
and auditor =#{newsParams.auditor}
</if>
ORDER BY
releasedate DESC
id desc ,
releasedate DESC
</select>
...
...
@@ -658,5 +658,58 @@ ORDER BY
id DESC
</select>
<select
id=
"columnList"
resultType=
"java.util.Map"
>
select * from newsclass where p_id=2
</select>
<select
id=
"selectYylyList"
resultMap=
"newsMap"
>
SELECT
*
FROM
news
WHERE
(
classid IN (
SELECT
id
FROM
newsclass
WHERE
p_id = 2
)
)
<choose>
<when
test=
"newsParams.levels !=null and newsParams.levels !=''"
>
AND levels = #{newsParams.levels}
</when>
<otherwise>
AND levels > 0
</otherwise>
</choose>
<if
test=
"newsParams.releaseTimeStart !=null and newsParams.releaseTimeEnd !=null"
>
and releasedate BETWEEN #{newsParams.releaseTimeStart} AND #{newsParams.releaseTimeEnd}
</if>
<if
test=
"newsParams.updateTimeStart !=null and newsParams.updateTimeEnd !=null"
>
and updatedate BETWEEN #{newsParams.updateTimeStart} AND #{newsParams.updateTimeEnd}
</if>
<if
test=
"newsParams.keyword !=null and newsParams.keyword !=''"
>
and keyword like concat('%',#{newsParams.keyword},'%')
</if>
<if
test=
"newsParams.title !=null and newsParams.title !=''"
>
and title like concat('%',#{newsParams.title},'%')
</if>
<if
test=
"newsParams.author !=null and newsParams.author !=''"
>
and author like concat('%',#{newsParams.author},'%')
</if>
<if
test=
"newsParams.status !=null"
>
and status =#{newsParams.status}
</if>
<if
test=
"newsParams.auditor !=null and newsParams.auditor !=''"
>
and auditor =#{newsParams.auditor}
</if>
<if
test=
"newsParams.editor !=null and newsParams.editor !=''"
>
and editor =#{newsParams.editor}
</if>
order by id desc
</select>
</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