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
351b8253
Commit
351b8253
authored
Jan 19, 2022
by
吴迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
fc3ba90b
2dc11e06
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
231 additions
and
19 deletions
+231
-19
KnowledgeinfoController.java
...ce/modules/manage/controller/KnowledgeinfoController.java
+39
-12
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+20
-0
KnowledgeinfoDao.java
...n/java/io/office/modules/manage/dao/KnowledgeinfoDao.java
+7
-0
NewsDao.java
src/main/java/io/office/modules/manage/dao/NewsDao.java
+4
-0
TycpdmFirmDao.java
...main/java/io/office/modules/manage/dao/TycpdmFirmDao.java
+3
-0
KnowledgeinfoEntity.java
.../io/office/modules/manage/entity/KnowledgeinfoEntity.java
+11
-0
NewsParams.java
.../java/io/office/modules/manage/entity/dto/NewsParams.java
+5
-0
KnowledgeinfoService.java
...o/office/modules/manage/service/KnowledgeinfoService.java
+5
-0
NewsService.java
...in/java/io/office/modules/manage/service/NewsService.java
+4
-0
KnowledgeinfoServiceImpl.java
...modules/manage/service/impl/KnowledgeinfoServiceImpl.java
+18
-0
NewsServiceImpl.java
...o/office/modules/manage/service/impl/NewsServiceImpl.java
+13
-0
TycpdmFirmServiceImpl.java
...ce/modules/manage/service/impl/TycpdmFirmServiceImpl.java
+4
-0
AnnounceDao.xml
src/main/resources/mapper/manage/AnnounceDao.xml
+1
-1
KnowledgeinfoDao.xml
src/main/resources/mapper/manage/KnowledgeinfoDao.xml
+39
-1
NewsDao.xml
src/main/resources/mapper/manage/NewsDao.xml
+53
-1
NewsMovieDao.xml
src/main/resources/mapper/manage/NewsMovieDao.xml
+3
-2
PictureDao.xml
src/main/resources/mapper/manage/PictureDao.xml
+2
-2
No files found.
src/main/java/io/office/modules/manage/controller/KnowledgeinfoController.java
View file @
351b8253
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Date
;
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.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.ProductEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.sys.controller.AbstractController
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -27,7 +35,7 @@ import io.office.common.utils.R;
*/
@RestController
@RequestMapping
(
"/knowledgeinfo"
)
public
class
KnowledgeinfoController
{
public
class
KnowledgeinfoController
extends
AbstractController
{
@Autowired
private
KnowledgeinfoService
knowledgeinfoService
;
...
...
@@ -36,10 +44,11 @@ public class KnowledgeinfoController {
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:knowledgeinfo:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
knowledgeinfoService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
public
R
list
(
@RequestBody
NewsParams
params
){
Page
<
KnowledgeinfoEntity
>
page
=
this
.
knowledgeinfoService
.
knowledgeinfoList
(
params
,
new
Page
(
params
.
getPage
(),
params
.
getLimit
()));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
...
...
@@ -60,9 +69,10 @@ public class KnowledgeinfoController {
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:knowledgeinfo:save")
public
R
save
(
@RequestBody
KnowledgeinfoEntity
knowledgeinfo
){
knowledgeinfo
.
setInputdate
(
new
Date
());
knowledgeinfo
.
setEditor
(
getUser
().
getUsername
());
knowledgeinfoService
.
save
(
knowledgeinfo
);
return
R
.
ok
();
return
R
.
ok
(
"新增成功!"
);
}
/**
...
...
@@ -71,9 +81,9 @@ public class KnowledgeinfoController {
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:knowledgeinfo:update")
public
R
update
(
@RequestBody
KnowledgeinfoEntity
knowledgeinfo
){
knowledgeinfo
.
setEditor
(
getUser
().
getUsername
());
knowledgeinfoService
.
updateById
(
knowledgeinfo
);
return
R
.
ok
();
return
R
.
ok
(
"修改成功!"
);
}
/**
...
...
@@ -81,10 +91,27 @@ public class KnowledgeinfoController {
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:knowledgeinfo:delete")
public
R
delete
(
@RequestBody
Integer
[]
knowledgeinfoids
){
knowledgeinfoService
.
removeByIds
(
Arrays
.
asList
(
knowledgeinfoids
));
public
R
delete
(
@RequestBody
List
<
String
>
knowledgeinfoids
){
KnowledgeinfoEntity
knowledgeinfo
=
new
KnowledgeinfoEntity
();
knowledgeinfo
.
setEditor
(
getUser
().
getUsername
());
knowledgeinfo
.
setLevels
(
0
);
QueryWrapper
<
KnowledgeinfoEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
in
(
"knowledgeinfoid"
,
knowledgeinfoids
);
knowledgeinfoService
.
update
(
knowledgeinfo
,
queryWrapper
);
return
R
.
ok
(
"删除成功!"
);
}
return
R
.
ok
();
/**
* 删除
*/
@RequestMapping
(
"/verify"
)
// @RequiresPermissions("manage:knowledgeinfo:delete")
public
R
verify
(
@RequestBody
KnowledgeinfoEntity
knowledgeinfo
){
knowledgeinfo
.
setAuditor
(
getUser
().
getUsername
());
QueryWrapper
<
KnowledgeinfoEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"knowledgeinfoid"
,
knowledgeinfo
.
getKnowledgeinfoid
());
knowledgeinfoService
.
update
(
knowledgeinfo
,
queryWrapper
);
return
R
.
ok
(
"审核成功!"
);
}
}
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
351b8253
...
...
@@ -706,6 +706,26 @@ public class NewsController extends AbstractController {
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
/**
*首页党建文化
*/
@RequestMapping
(
"/api/sydjwhTop4"
)
// @RequiresPermissions("manage:newsmovie:info")
public
R
sydjwhTop4
(){
List
<
Map
<
String
,
Object
>>
retList
=
this
.
newsService
.
sydjwhTop4
();
return
R
.
ok
().
put
(
"data"
,
retList
);
}
/**
*首页党建文化
*/
@RequestMapping
(
"/api/sydjwhTop1"
)
// @RequiresPermissions("manage:newsmovie:info")
public
R
sydjwhTop1
(){
List
<
Map
<
String
,
Object
>>
retList
=
this
.
newsService
.
sydjwhTop1
();
return
R
.
ok
().
put
(
"data"
,
retList
);
}
...
...
src/main/java/io/office/modules/manage/dao/KnowledgeinfoDao.java
View file @
351b8253
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.KnowledgeinfoEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* ${comments}
...
...
@@ -14,4 +20,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
KnowledgeinfoDao
extends
BaseMapper
<
KnowledgeinfoEntity
>
{
List
<
KnowledgeinfoEntity
>
knowledgeinfoList
(
@Param
(
"newsParams"
)
NewsParams
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/dao/NewsDao.java
View file @
351b8253
...
...
@@ -107,4 +107,8 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List
<
Map
<
String
,
Object
>>
columnList
();
List
<
NewsEntity
>
selectYylyList
(
@Param
(
"newsParams"
)
NewsParams
newsParams
,
Page
page
);
List
<
Map
<
String
,
Object
>>
sydjwhTop4
();
List
<
Map
<
String
,
Object
>>
sydjwhTop1
();
}
src/main/java/io/office/modules/manage/dao/TycpdmFirmDao.java
View file @
351b8253
...
...
@@ -49,6 +49,9 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> {
@Select
(
"select count(1) from tycpdm_firm where firmName=#{firmname} and logout_flag=1"
)
int
selectByIdFirmNameSC
(
@Param
(
"firmname"
)
String
firmname
);
@Select
(
"select count(1) from tycpdm_firm where certificateCode=#{certificateCode} and logout_flag=1"
)
int
selectByIdCertificateCode
(
@Param
(
"certificateCode"
)
String
certificateCode
);
@Select
(
"select count(1) from firm where firm_name=#{firmname} and (logout_flag=2 or logout_flag=0)"
)
int
selectByIdFirmNameXTSC
(
@Param
(
"firmname"
)
String
firmname
);
...
...
src/main/java/io/office/modules/manage/entity/KnowledgeinfoEntity.java
View file @
351b8253
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
...
...
@@ -65,4 +66,14 @@ public class KnowledgeinfoEntity implements Serializable {
*/
private
String
auditor
;
@TableField
(
exist
=
false
)
private
String
parentCategoryName
;
@TableField
(
exist
=
false
)
private
String
CategoryName
;
@TableField
(
exist
=
false
)
private
String
class1id
;
@TableField
(
exist
=
false
)
private
String
class2id
;
}
src/main/java/io/office/modules/manage/entity/dto/NewsParams.java
View file @
351b8253
...
...
@@ -38,4 +38,9 @@ public class NewsParams extends PageParams {
private
String
firmname
;
private
String
technology
;
private
String
service
;
/**一级分类*/
private
String
parentCategoryId
;
/**二级分类*/
private
String
categoryId
;
}
src/main/java/io/office/modules/manage/service/KnowledgeinfoService.java
View file @
351b8253
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.KnowledgeinfoEntity
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
java.util.Map
;
...
...
@@ -16,5 +19,7 @@ import java.util.Map;
public
interface
KnowledgeinfoService
extends
IService
<
KnowledgeinfoEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
Page
<
KnowledgeinfoEntity
>
knowledgeinfoList
(
NewsParams
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/NewsService.java
View file @
351b8253
...
...
@@ -105,5 +105,9 @@ public interface NewsService extends IService<NewsEntity> {
List
<
Map
<
String
,
Object
>>
columnList
();
Page
<
NewsEntity
>
selectYylyList
(
NewsParams
newsParams
,
Page
page
);
List
<
Map
<
String
,
Object
>>
sydjwhTop4
();
List
<
Map
<
String
,
Object
>>
sydjwhTop1
();
}
src/main/java/io/office/modules/manage/service/impl/KnowledgeinfoServiceImpl.java
View file @
351b8253
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -16,6 +22,10 @@ import io.office.modules.manage.service.KnowledgeinfoService;
@Service
(
"knowledgeinfoService"
)
public
class
KnowledgeinfoServiceImpl
extends
ServiceImpl
<
KnowledgeinfoDao
,
KnowledgeinfoEntity
>
implements
KnowledgeinfoService
{
@Autowired
KnowledgeinfoDao
knowledgeinfoDao
;
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
KnowledgeinfoEntity
>
page
=
this
.
page
(
...
...
@@ -26,4 +36,11 @@ public class KnowledgeinfoServiceImpl extends ServiceImpl<KnowledgeinfoDao, Know
return
new
PageUtils
(
page
);
}
@Override
public
Page
<
KnowledgeinfoEntity
>
knowledgeinfoList
(
NewsParams
params
,
Page
page
)
{
List
<
KnowledgeinfoEntity
>
retList
=
this
.
knowledgeinfoDao
.
knowledgeinfoList
(
params
,
page
);
page
.
setRecords
(
retList
);
return
page
;
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/NewsServiceImpl.java
View file @
351b8253
...
...
@@ -615,5 +615,17 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
return
page
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
sydjwhTop4
()
{
List
<
Map
<
String
,
Object
>>
retList
=
this
.
newsDao
.
sydjwhTop4
();
return
retList
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
sydjwhTop1
()
{
List
<
Map
<
String
,
Object
>>
retList
=
this
.
newsDao
.
sydjwhTop1
();
return
retList
;
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/TycpdmFirmServiceImpl.java
View file @
351b8253
...
...
@@ -319,9 +319,13 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
TycpdmFirmChangeEntity
tycpdmFirmChangeEntity
=
new
TycpdmFirmChangeEntity
();
Integer
status
=
body
.
get
(
"status"
)==
null
?
0
:
Integer
.
valueOf
(
String
.
valueOf
(
body
.
get
(
"status"
)));
Object
certificateCode
=
body
.
get
(
"certificatecode"
);
//填统一社会信用代码
if
(!
AlgorithmUtils
.
checkUSCC
(
certificateCode
.
toString
())){
throw
new
RRException
(
"统一社会信用代码输入错误"
);
}
if
(
tycpdmFirmDao
.
selectByIdCertificateCode
(
String
.
valueOf
(
certificateCode
))>
0
){
throw
new
RRException
(
"统一社会信用代码已存在"
);
}
//写入死值
body
.
put
(
"useddesc"
,
"企业产品描述信息"
);
body
.
put
(
"wishusednum"
,
100
);
...
...
src/main/resources/mapper/manage/AnnounceDao.xml
View file @
351b8253
...
...
@@ -54,7 +54,7 @@
and a.editor =#{newsParams.editor}
</if>
<if
test=
"newsParams.type !=null and newsParams.type !=''"
>
and
b
.announcetype =#{newsParams.type}
and
a
.announcetype =#{newsParams.type}
</if>
ORDER BY
a.id DESC
...
...
src/main/resources/mapper/manage/KnowledgeinfoDao.xml
View file @
351b8253
...
...
@@ -18,5 +18,42 @@
<result
property=
"auditor"
column=
"auditor"
/>
</resultMap>
<select
id=
"knowledgeinfoList"
resultMap=
"knowledgeinfoMap"
>
SELECT
c.knowledgeCategoryID class1id,
c.description parentCategoryName,
b.knowledgeCategoryID class2id,
b.description CategoryName,
a.*
FROM
knowledgeInfo a
LEFT JOIN knowledgeCategory b ON a.knowledgeCategoryID = b.knowledgeCategoryID
LEFT JOIN knowledgeCategory c ON b.parentCategoryID = c.knowledgeCategoryID
WHERE 1=1
<choose>
<when
test=
"newsParams.levels !=null"
>
AND a.levels = #{newsParams.levels}
</when>
<otherwise>
AND a.levels > 0
</otherwise>
</choose>
<if
test=
"newsParams.title !=null and newsParams.title !=''"
>
and a.title like concat('%',#{newsParams.title},'%')
</if>
<if
test=
"newsParams.status !=null and newsParams.status !=''"
>
and a.status =#{newsParams.status}
</if>
<if
test=
"newsParams.releaseTimeStart !=null and newsParams.releaseTimeEnd !=null"
>
and a.inputdate BETWEEN #{newsParams.releaseTimeStart} AND #{newsParams.releaseTimeEnd}
</if>
<if
test=
"newsParams.parentCategoryId !=null and newsParams.parentCategoryId !=''"
>
and c.knowledgeCategoryID = #{newsParams.parentCategoryId}
</if>
<if
test=
"newsParams.categoryId !=null and newsParams.categoryId !=''"
>
and b.knowledgeCategoryID = #{newsParams.categoryId}
</if>
ORDER BY
inputdate DESC
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/manage/NewsDao.xml
View file @
351b8253
...
...
@@ -418,6 +418,8 @@
knowledgeInfo t
LEFT JOIN knowledgeCategory tt ON t.knowledgeCategoryID = tt.knowledgeCategoryID
where 1=1
and t.status = 1
AND t.levels > 0
<if
test=
"title !=null and title !=''"
>
and t.Title like concat(concat('%',#{title}),'%')
</if>
...
...
@@ -425,7 +427,7 @@
<foreach
collection=
"list"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
order by
knowledgeInfoID desc
order by
t.levels DESC,t.knowledgeInfoid DESC
</select>
<select
id=
"searchKnowledgeInfoList"
resultType=
"java.util.Map"
>
SELECT
...
...
@@ -463,6 +465,8 @@ order by knowledgeInfoID desc
knowledgeInfo t
LEFT JOIN knowledgeCategory tt ON t.knowledgeCategoryID = tt.knowledgeCategoryID
where 1=1
and t.status = 1
AND t.levels > 0
<if
test=
"params.title !=null and params.title !=''"
>
and t.Title like concat(concat('%',#{title}),'%')
</if>
...
...
@@ -470,6 +474,7 @@ order by knowledgeInfoID desc
<foreach
collection=
"params.list"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
order by t.levels DESC,t.knowledgeInfoid DESC
</select>
<select
id=
"dsxxjyTop8"
resultMap=
"newsMap"
>
...
...
@@ -715,4 +720,50 @@ ORDER BY
</if>
order by id desc
</select>
<select
id=
"sydjwhTop4"
resultType=
"java.util.Map"
>
SELECT
TOP 4 a.classid,
a.newsid as id,
a.id AS yid,
a.newslevels,
a. TIME,
b.title,
b.author,
b.updatedate,
b.levels,
b.id
FROM
TopIcNews AS a
LEFT JOIN news AS b ON a.newsid = b.id
WHERE
status = 1
AND a.classid = 428
ORDER BY
levels DESC,
releasedate DESC
</select>
<select
id=
"sydjwhTop1"
resultType=
"java.util.Map"
>
SELECT
TOP 1 a.classid,
a.newsid as id,
a.id AS yid,
a.newslevels,
a. TIME,
b.title,
b.author,
b.updatedate,
b.levels,
b.id
FROM
TopIcNews AS a
LEFT JOIN news AS b ON a.newsid = b.id
WHERE
status = 1
AND a.classid = 429
ORDER BY
levels DESC,
releasedate DESC
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/manage/NewsMovieDao.xml
View file @
351b8253
...
...
@@ -45,7 +45,8 @@
showtime,
auditor,
status,
editor
editor,
levels
from news_movie
where 1=1
<if
test=
"params.title !=null and params.title !=''"
>
...
...
@@ -66,7 +67,7 @@
<if
test=
"params.clanguage !=null and params.clanguage !=''"
>
and clanguage =#{params.clanguage}
</if>
<if
test=
"params.levels !=null
and params.levels !=''
"
>
<if
test=
"params.levels !=null"
>
and levels = #{params.levels}
</if>
ORDER BY releasedate desc
...
...
src/main/resources/mapper/manage/PictureDao.xml
View file @
351b8253
...
...
@@ -58,8 +58,8 @@
and inputDate BETWEEN #{params.inputDateStart} AND #{params.inputDateEnd}
</if>
<choose>
<when
test=
"params.
levels !=null and params.levels
!=''"
>
AND PicLevel = #{params.
levels
}
<when
test=
"params.
pictureLevel !=null and params.pictureLevel
!=''"
>
AND PicLevel = #{params.
pictureLevel
}
</when>
<otherwise>
AND PicLevel = 0
...
...
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