Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
0d1bea0d
Commit
0d1bea0d
authored
Jun 17, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业中心操作日志
parent
c7385cb0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
10 deletions
+81
-10
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+26
-7
src/main/java/cn/timer/api/controller/qyzx/service/QyzxOperLogServiceImpl.java
+1
-1
src/main/java/cn/timer/api/dao/qyzx/QyzxOperLogMapper.java
+2
-1
src/main/java/cn/timer/api/dto/qyzx/QyzxOperLogQuaryDto.java
+5
-0
src/main/resources/mapping/qyzx/QyzxOperLogMapper.xml
+47
-1
No files found.
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
0d1bea0d
package
cn
.
timer
.
api
.
controller
.
qyzx
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
javax.servlet.http.HttpSession
;
...
...
@@ -37,6 +40,7 @@ import cn.timer.api.bean.qyzx.QyzxLogBuy;
import
cn.timer.api.bean.qyzx.QyzxOperLog
;
import
cn.timer.api.bean.qyzx.QyzxPayServe
;
import
cn.timer.api.bean.qyzx.QyzxSuggestionFeeback
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zzgl.ZzglAuth
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.config.annotation.CurrentUser
;
...
...
@@ -253,10 +257,9 @@ public class QyzxController {
@GetMapping
(
value
=
"/entlist"
)
@ApiOperation
(
value
=
"企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxEntInfoM
>>
entlist1
(
@CurrentUser
UserBean
userBean
)
{
List
<
Object
>
orgCodes
=
qyzxEmpEntAssoMapper
.
selectObjs
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
()
.
select
(
QyzxEmpEntAsso:
:
getOrgCode
)
.
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
.
select
(
QyzxEmpEntAsso:
:
getOrgCode
).
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
List
<
QyzxEntInfoM
>
qyzxEntInfoMs
=
new
LambdaQueryChainWrapper
<
QyzxEntInfoM
>(
qyzxEntInfoMMapper
)
.
in
(
CollUtil
.
isNotEmpty
(
orgCodes
),
QyzxEntInfoM:
:
getId
,
orgCodes
).
list
();
return
ResultUtil
.
data
(
qyzxEntInfoMs
,
"获取企业信息成功"
);
...
...
@@ -281,7 +284,7 @@ public class QyzxController {
if
(
ctrl
==
null
)
{
return
ResultUtil
.
data
(
menus
,
"你不是该企业的用户!"
);
}
if
(
SysRoleType
.
U_TYPE_ADMIN
.
getType
().
equals
(
ctrl
.
getUserType
())
||
SysRoleType
.
U_TYPE_C_ADMIN
.
getType
().
equals
(
ctrl
.
getUserType
()))
{
}
else
{
...
...
@@ -400,8 +403,8 @@ public class QyzxController {
@GetMapping
(
value
=
"/fwjs"
)
@ApiOperation
(
value
=
"查看服务计算"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxAttaFwjsb
>>
fwjs
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxAttaFwjsb
>
qyzxAttaFpgl
=
QyzxAttaFwjsb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxAttaFwjsb
>().
lambda
().
eq
(
QyzxAttaFwjsb:
:
getEmpNum
,
userBean
.
getEmpNum
()));
List
<
QyzxAttaFwjsb
>
qyzxAttaFpgl
=
QyzxAttaFwjsb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxAttaFwjsb
>().
lambda
().
eq
(
QyzxAttaFwjsb:
:
getEmpNum
,
userBean
.
getEmpNum
()));
return
ResultUtil
.
data
(
qyzxAttaFpgl
,
"获取服务计算成功"
);
}
...
...
@@ -473,7 +476,23 @@ public class QyzxController {
qyzxOperLogQuaryDto
.
getTotalPage
()
==
null
?
10
:
qyzxOperLogQuaryDto
.
getTotalPage
());
qyzxOperLogQuaryDto
.
setOrgCode
(
userBean
.
getOrgCode
());
IPage
<
QyzxOperLog
>
pages
=
qyzxOperLogMapper
.
selectPageByQuery
(
page
,
qyzxOperLogQuaryDto
);
// IPage<QyzxOperLog> pages = qyzxOperLogMapper.selectPageByQuery(page, qyzxOperLogQuaryDto);
if
(
qyzxOperLogQuaryDto
.
getEmpNums
()
==
null
)
{
YgglMainEmp
main
=
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
LambdaQueryWrapper
<
YgglMainEmp
>().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglMainEmp:
:
getIsManager
,
1
)
.
select
(
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getIsManager
));
List
<
YgglMainEmp
>
child
=
YgglMainEmp
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
YgglMainEmp
>().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglMainEmp:
:
getIsManager
,
2
)
.
select
(
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getIsManager
));
child
.
add
(
main
);
Collections
.
sort
(
child
,
Comparator
.
comparing
(
YgglMainEmp:
:
getIsManager
));
List
<
Integer
>
empNums
=
child
.
stream
().
map
(
YgglMainEmp:
:
getEmpNum
).
collect
(
Collectors
.
toList
());
qyzxOperLogQuaryDto
.
setEmpNums
(
empNums
);
}
IPage
<
QyzxOperLog
>
pages
=
qyzxOperLogMapper
.
selectPageByQuery2
(
page
,
qyzxOperLogQuaryDto
);
List
<
QyzxOperLog
>
listOl
=
pages
.
getRecords
();
return
ResultUtil
.
data
(
pages
,
listOl
,
"操作成功!"
);
...
...
src/main/java/cn/timer/api/controller/qyzx/service/QyzxOperLogServiceImpl.java
View file @
0d1bea0d
...
...
@@ -42,7 +42,7 @@ public class QyzxOperLogServiceImpl implements QyzxOperLogService
@Override
public
IPage
<
QyzxOperLog
>
selectPageByQuery
(
IPage
<
QyzxOperLog
>
page
,
QyzxOperLogQuaryDto
operLog
)
{
return
operLogMapper
.
selectPageByQuery
(
page
,
operLog
);
return
operLogMapper
.
selectPageByQuery
2
(
page
,
operLog
);
}
/**
...
...
src/main/java/cn/timer/api/dao/qyzx/QyzxOperLogMapper.java
View file @
0d1bea0d
...
...
@@ -27,7 +27,8 @@ public interface QyzxOperLogMapper extends BaseMapper<QyzxOperLog> {
* @param operLog 操作日志对象
* @return 操作日志集合
*/
public
IPage
<
QyzxOperLog
>
selectPageByQuery
(
IPage
<
QyzxOperLog
>
page
,
@Param
(
"param"
)
QyzxOperLogQuaryDto
operLog
);
// public IPage<QyzxOperLog> selectPageByQuery(IPage<QyzxOperLog> page,@Param("param") QyzxOperLogQuaryDto operLog);
public
IPage
<
QyzxOperLog
>
selectPageByQuery2
(
IPage
<
QyzxOperLog
>
page
,
@Param
(
"param"
)
QyzxOperLogQuaryDto
operLog
);
//
// /**
// * 批量删除系统操作日志
...
...
src/main/java/cn/timer/api/dto/qyzx/QyzxOperLogQuaryDto.java
View file @
0d1bea0d
package
cn
.
timer
.
api
.
dto
.
qyzx
;
import
java.util.List
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
...
...
@@ -19,6 +21,9 @@ public class QyzxOperLogQuaryDto extends Page{
@ApiModelProperty
(
value
=
"企业id"
,
example
=
"101"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"员工id"
,
example
=
"101"
)
private
List
<
Integer
>
empNums
;
@ApiModelProperty
(
value
=
"业务类型(0其它 1新增 2修改 3删除)"
,
example
=
"101"
)
private
Integer
businessType
;
...
...
src/main/resources/mapping/qyzx/QyzxOperLogMapper.xml
View file @
0d1bea0d
...
...
@@ -39,7 +39,7 @@
oper_ip,
oper_location,
<!-- oper_param, -->
json_result,
<!-- json_result, -->
status,
error_msg,
oper_time
...
...
@@ -96,6 +96,52 @@
ORDER BY a.oper_time DESC
</select>
<select
id=
"selectPageByQuery2"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM qyzx_oper_log a
WHERE a.org_code = #{param.orgCode}
<if
test=
"param.empNums != null and param.empNums.size() > 0"
>
<choose>
<when
test=
"param.empNums.size() > 1"
>
AND a.emp_num IN
(
<foreach
item=
"it"
index=
"index"
collection=
"param.empNums"
separator=
","
close=
""
>
#{it}
</foreach>
)
</when>
<otherwise>
AND a.emp_num = #{param.empNums[0]}
</otherwise>
</choose>
</if>
<if
test=
"param.query != null and param.query != ''"
>
and (
a.title like CONCAT('%',#{param.query},'%') or
a.oper_name like CONCAT('%',#{param.query},'%') or
a.oper_id like CONCAT('%',#{param.query},'%')
)
</if>
<if
test=
"param.businessType != null"
>
and a.business_type = #{param.businessType}
</if>
<if
test=
"param.operatorType != null"
>
and a.operator_type = #{param.operatorType}
</if>
<if
test=
"param.requestMethod != null"
>
and a.request_method = #{param.requestMethod}
</if>
<if
test=
"param.startTime != null and param.startTime != ''"
>
and a.oper_time
<![CDATA[ >= ]]>
#{param.startTime}
</if>
<if
test=
"param.endTime != null and param.endTime != ''"
>
and a.oper_time
<![CDATA[ <= ]]>
#{param.endTime}
</if>
ORDER BY a.oper_time DESC
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.qyzx.QyzxOperLog">
...
...
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