Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
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
常超
map-parent
Commits
9bc1a91f
Commit
9bc1a91f
authored
Nov 04, 2022
by
宋珺琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务管理列表排序、时空桌面bug、添加统计第三方接口(西藏)
parent
5aa3071c
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
12 deletions
+57
-12
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/SkypDesktopEntity/SkMenu.java
+3
-0
common/service_base/src/main/java/com/founder/servicebase/logs/controller/SkSysLogController.java
+12
-0
common/service_base/src/main/java/com/founder/servicebase/logs/mapper/mysqlMapper/SkServiceApplyMapper.xml
+1
-0
common/service_base/src/main/java/com/founder/servicebase/logs/mapper/mysqlMapper/SkSysLogMapper.java
+3
-0
common/service_base/src/main/java/com/founder/servicebase/logs/mapper/mysqlMapper/SkSysLogMapper.xml
+12
-0
common/service_base/src/main/java/com/founder/servicebase/logs/service/SkSysLogService.java
+3
-0
common/service_base/src/main/java/com/founder/servicebase/logs/service/impl/SkSysLogServiceImpl.java
+4
-0
service/publicapi/src/main/java/com/founder/publicapi/controller/SkypDesktop/SkypDesktopController.java
+19
-12
No files found.
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/SkypDesktopEntity/SkMenu.java
View file @
9bc1a91f
...
...
@@ -66,6 +66,9 @@ public class SkMenu {
@TableField
(
"isFixedMenu"
)
private
String
isFixedMenu
;
@ApiModelProperty
(
value
=
"菜单"
)
@TableField
(
"menuTop"
)
private
String
menuTop
;
}
...
...
common/service_base/src/main/java/com/founder/servicebase/logs/controller/SkSysLogController.java
View file @
9bc1a91f
...
...
@@ -7,10 +7,13 @@ import com.founder.commonutils.model.newPublicEntity.MapRestResult;
import
com.founder.commonutils.util.DateUtil
;
import
com.founder.commonutils.util.StringUtil
;
import
com.founder.servicebase.logs.LogMoudleCount
;
import
com.founder.servicebase.logs.OperLog
;
import
com.founder.servicebase.logs.OperationType
;
import
com.founder.servicebase.logs.SkSysLog
;
import
com.founder.servicebase.logs.param.LogCountParam
;
import
com.founder.servicebase.logs.param.LogParam
;
import
com.founder.servicebase.logs.service.SkSysLogService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -96,4 +99,13 @@ public class SkSysLogController {
return
new
MapRestResult
(
200
,
"ok"
,
logMoudleCounts
.
size
(),
logMoudleCounts
);
}
@ApiOperation
(
value
=
"只统计含第三方的userid"
)
@OperLog
(
message
=
"只统计含第三方的userid"
,
operation
=
OperationType
.
QUERY
)
@PostMapping
(
"countThreeUserId"
)
public
MapRestResult
countThreeUserId
(
@RequestBody
LogCountParam
param
)
throws
ParseException
{
List
<
LogMoudleCount
>
logMoudleCounts
=
service
.
countThreeUserId
(
param
);
return
new
MapRestResult
(
200
,
"ok"
,
logMoudleCounts
.
size
(),
logMoudleCounts
);
}
}
common/service_base/src/main/java/com/founder/servicebase/logs/mapper/mysqlMapper/SkServiceApplyMapper.xml
View file @
9bc1a91f
...
...
@@ -39,6 +39,7 @@
<if
test=
"applyurl!= null and applyurl!=''"
>
AND a.applyUrl like "%"#{ applyurl , jdbcType=VARCHAR }"%"
</if>
order by a.sqsj desc
limit #{page},#{pageSize}
</select>
</mapper>
common/service_base/src/main/java/com/founder/servicebase/logs/mapper/mysqlMapper/SkSysLogMapper.java
View file @
9bc1a91f
...
...
@@ -20,4 +20,7 @@ public interface SkSysLogMapper extends BaseMapper<SkSysLog> {
LogCount
countOne
(
@Param
(
"date"
)
String
date
);
List
<
LogMoudleCount
>
countMoudle
(
LogCountParam
param
);
List
<
LogMoudleCount
>
countThreeUserId
(
LogCountParam
param
);
}
common/service_base/src/main/java/com/founder/servicebase/logs/mapper/mysqlMapper/SkSysLogMapper.xml
View file @
9bc1a91f
...
...
@@ -40,6 +40,18 @@
message is not NULL group by SUBSTRING_INDEX(message,'_',1)
</select>
<select
id=
"countThreeUserId"
resultType=
"com.founder.servicebase.logs.LogMoudleCount"
parameterType=
"com.founder.servicebase.logs.param.LogCountParam"
>
select COUNT(*) as count,userId as moudle from sk_sys_log
where userId like '%第三方%'
<if
test=
"startTime!=null and startTime!='' "
>
and str_to_date(#{startTime},'%Y-%m-%d')
<![CDATA[ <= ]]>
date_format(createDate,'%Y-%m-%d')
</if>
<if
test=
"endTime!=null and endTime!='' "
>
and str_to_date(#{endTime},'%Y-%m-%d')
<![CDATA[ >= ]]>
date_format(createDate,'%Y-%m-%d')
</if>
and
userId is not NULL group BY userId
</select>
</mapper>
common/service_base/src/main/java/com/founder/servicebase/logs/service/SkSysLogService.java
View file @
9bc1a91f
...
...
@@ -14,4 +14,7 @@ public interface SkSysLogService extends IService<SkSysLog> {
List
<
LogCount
>
countTotal
(
LogCountParam
param
)
throws
ParseException
;
List
<
LogMoudleCount
>
countMoudle
(
LogCountParam
param
);
List
<
LogMoudleCount
>
countThreeUserId
(
LogCountParam
param
)
throws
ParseException
;
}
common/service_base/src/main/java/com/founder/servicebase/logs/service/impl/SkSysLogServiceImpl.java
View file @
9bc1a91f
...
...
@@ -44,6 +44,10 @@ public class SkSysLogServiceImpl extends ServiceImpl<SkSysLogMapper, SkSysLog> i
return
baseMapper
.
countMoudle
(
param
);
}
@Override
public
List
<
LogMoudleCount
>
countThreeUserId
(
LogCountParam
param
)
throws
ParseException
{
return
baseMapper
.
countThreeUserId
(
param
);
}
/**
* 计算两个日期得时间差
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/SkypDesktop/SkypDesktopController.java
View file @
9bc1a91f
...
...
@@ -14,9 +14,9 @@ import com.founder.servicebase.logs.OperationType;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -41,15 +41,21 @@ public class SkypDesktopController {
@PostMapping
(
"menuAdd"
)
@ApiOperation
(
value
=
"时空桌面菜单新增"
)
@OperLog
(
message
=
"时空桌面菜单新增"
,
operation
=
OperationType
.
ADD
)
public
MapRestResult
menuAdd
(
SkMenu
skMenu
,
MultipartFile
photoFile
)
throws
IOException
{
public
MapRestResult
menuAdd
(
SkMenu
skMenu
,
MultipartFile
[]
photoFile
)
throws
IOException
{
QueryWrapper
wrapper
=
new
QueryWrapper
();
wrapper
.
eq
(!
StringUtil
.
isEmpty
(
skMenu
.
getMenu
()),
"menu"
,
skMenu
.
getMenu
());
wrapper
.
eq
(
"isDeleted"
,
"0"
);
Integer
count
=
skMenuMapper
.
selectCount
(
wrapper
);
if
(
count
!=
0
){
return
new
MapRestResult
(
200
,
"已经存在该菜单名称"
,
null
);
}
else
{
if
(
photoFile
==
null
){
return
new
MapRestResult
(
200
,
"请上传菜单图片"
,
null
);
}
skMenu
.
setState
(
"1"
);
// 桌面
skMenu
.
setPhoto
(
"data:image/jpg;base64,"
+
Base64Util
.
getBase64
(
photoFile
));
for
(
MultipartFile
file
:
photoFile
)
{
skMenu
.
setPhoto
(
"data:image/jpg;base64,"
+
Base64Util
.
getBase64
(
file
));
}
skMenu
.
setDjsj
(
nowTime
());
skMenu
.
setGxsj
(
nowTime
());
String
xxzjbh
=
KeyUtilNaotu
.
getJzKey
(
"me"
);
...
...
@@ -88,18 +94,18 @@ public class SkypDesktopController {
@PostMapping
(
"menuUpdate"
)
@ApiOperation
(
value
=
"时空桌面菜单修改"
)
@OperLog
(
message
=
"时空桌面菜单修改"
,
operation
=
OperationType
.
UPDATE
)
public
MapRestResult
menuUpdate
(
SkMenu
skMenu
,
@RequestParam
(
required
=
false
)
MultipartFile
photoFile
)
throws
IOException
{
public
MapRestResult
menuUpdate
(
SkMenu
skMenu
,
@RequestParam
(
required
=
false
)
MultipartFile
photoFile
)
throws
IOException
{
if
(
photoFile
!=
null
){
skMenu
.
setPhoto
(
"data:image/jpg;base64,"
+
Base64Util
.
getBase64
(
photoFile
));
skMenu
.
setPhoto
(
"data:image/jpg;base64,"
+
Base64Util
.
getBase64
(
photoFile
));
}
skMenu
.
setGxsj
(
nowTime
());
int
i
=
skMenuMapper
.
updateById
(
skMenu
);
if
(
i
>
0
){
return
new
MapRestResult
();
return
new
MapRestResult
(
200
,
"修改成功"
,
null
);
}
else
{
return
new
MapRestResult
(
).
error
(
);
return
new
MapRestResult
(
200
,
"不存在该菜单"
,
null
);
}
}
/**
...
...
@@ -117,12 +123,12 @@ public class SkypDesktopController {
}
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
// 十个固定的
/*
// 十个固定的
QueryWrapper wrapper2 = new QueryWrapper<>();
wrapper2.eq(!StringUtil.isEmpty(zjhm),"zjhm", zjhm);
wrapper2.eq("isDeleted","0");
wrapper2.eq("isFixedMenu","1");
List
list2
=
skMenuMapper
.
selectList
(
wrapper2
);
List list2 = skMenuMapper.selectList(wrapper2);
*/
// 新增的
QueryWrapper
wrapper
=
new
QueryWrapper
<>();
...
...
@@ -138,11 +144,11 @@ public class SkypDesktopController {
wrapper3.eq("state","2");
List list3 = skMenuMapper.selectList(wrapper3);*/
List
<
Object
>
collect
=
Stream
.
of
(
list2
,
list
)
/*
List<Object> collect = Stream.of(list2, list)
.flatMap(Collection::stream)
.distinct()
.
collect
(
Collectors
.
toList
());
map
.
put
(
"桌面"
,
collec
t
);
.collect(Collectors.toList());
*/
map
.
put
(
"桌面"
,
lis
t
);
//查询移入的
QueryWrapper
wrapper1
=
new
QueryWrapper
<>();
...
...
@@ -275,6 +281,7 @@ public class SkypDesktopController {
wrapper
.
eq
(
"state"
,
state
);
wrapper
.
eq
(
"zjhm"
,
zjhm
);
wrapper
.
eq
(
"isDeleted"
,
"0"
);
wrapper
.
orderByDesc
(
"time"
);
List
list
=
skScheduleMapper
.
selectList
(
wrapper
);
return
new
MapRestResult
(
200
,
"ok"
,
list
.
size
(),
list
);
}
...
...
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