Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
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
liqin
chnmuseum-party
Commits
332008a1
Commit
332008a1
authored
Mar 29, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.203.232.171:8888/lee/chnmuseum-party
into master
parents
19693eb2
33fd0559
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
31 deletions
+34
-31
SystemOperationLogService.java
...chnmuseum/party/common/log/SystemOperationLogService.java
+13
-3
TOrgan.java
src/main/java/cn/wisenergy/chnmuseum/party/model/TOrgan.java
+2
-2
TBoxOperationServiceImpl.java
...hnmuseum/party/service/impl/TBoxOperationServiceImpl.java
+0
-5
TBoxOperationController.java
...nmuseum/party/web/controller/TBoxOperationController.java
+2
-2
TInteractionController.java
...hnmuseum/party/web/controller/TInteractionController.java
+8
-8
TOrganController.java
...ergy/chnmuseum/party/web/controller/TOrganController.java
+8
-11
TOrganMapper.xml
src/main/resources/mapper/TOrganMapper.xml
+1
-0
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/log/SystemOperationLogService.java
View file @
332008a1
...
...
@@ -2,6 +2,8 @@ package cn.wisenergy.chnmuseum.party.common.log;
import
cn.wisenergy.chnmuseum.party.auth.util.JwtTokenUtil
;
import
cn.wisenergy.chnmuseum.party.common.enums.RESPONSE_CODE_ENUM
;
import
cn.wisenergy.chnmuseum.party.common.enums.RESULT_INFO_ENUM
;
import
cn.wisenergy.chnmuseum.party.common.util.DateUtil80
;
import
cn.wisenergy.chnmuseum.party.core.annotations.OperationLog
;
import
cn.wisenergy.chnmuseum.party.mapper.SysLogMapper
;
...
...
@@ -34,6 +36,7 @@ import java.net.InetAddress;
import
java.time.LocalDateTime
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
...
...
@@ -96,20 +99,20 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> {
try
{
packages
=
packages
.
substring
(
0
,
packages
.
indexOf
(
"$$"
));
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
return
getFailResult
();
}
}
String
operatingcontent
=
""
;
Object
[]
method_param
=
null
;
Object
object
;
Object
object
=
null
;
try
{
method_param
=
point
.
getArgs
();
//获取方法参数
// String param=(String) point.proceed(point.getArgs());
object
=
point
.
proceed
();
}
catch
(
Exception
e
)
{
// 异常处理记录日志..log.error(e);
throw
e
;
return
getFailResult
()
;
}
if
(
methodLog
.
operModule
().
getMsg
().
contains
(
"运维"
))
{
TOperationLog
operationLog
=
new
TOperationLog
();
...
...
@@ -165,6 +168,13 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> {
return
null
;
}
protected
Map
<
String
,
Object
>
getFailResult
()
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
RESULT_INFO_ENUM
.
RESULT_CODE
.
getKey
(),
RESPONSE_CODE_ENUM
.
SERVER_ERROR
.
getCode
());
map
.
put
(
RESULT_INFO_ENUM
.
RESULT_MSG
.
getKey
(),
RESPONSE_CODE_ENUM
.
SERVER_ERROR
.
getMsg
());
return
map
;
}
/**
* 方法异常时调用
*
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/TOrgan.java
View file @
332008a1
...
...
@@ -43,10 +43,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
@ApiModel
(
value
=
"用户"
,
description
=
"用户"
)
public
class
TOrgan
implements
Serializable
{
//
private static final long serialVersionUID = 1L;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"机构ID"
)
@TableId
(
value
=
"id"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@NotNull
(
message
=
"机构IDID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/TBoxOperationServiceImpl.java
View file @
332008a1
...
...
@@ -38,10 +38,5 @@ public class TBoxOperationServiceImpl extends ServiceImpl<TBoxOperationMapper, T
public
Page
<
TBoxOperation
>
selectBoxPage
(
Page
<
TBoxOperation
>
page
,
TUser
user
)
{
return
page
.
setRecords
(
tBoxOperationMapper
.
selectBoxPage
(
page
,
user
));
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"110101"
.
substring
(
0
,
2
));
}
}
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TBoxOperationController.java
View file @
332008a1
...
...
@@ -134,9 +134,9 @@ public class TBoxOperationController extends BaseController {
@RequiresPermissions
(
"/boxOperation/delete"
)
@ApiOperation
(
value
=
"根据ID删除机顶盒运维信息"
,
notes
=
"根据ID删除机顶盒运维信息"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"
path
"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"
query
"
,
dataType
=
"String"
)
})
public
Map
<
String
,
Object
>
deleteTBoxOperation
(
@PathVariable
(
"id"
)
String
id
)
{
public
Map
<
String
,
Object
>
deleteTBoxOperation
(
String
id
)
{
boolean
result
=
false
;
try
{
result
=
tBoxOperationService
.
removeById
(
id
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TInteractionController.java
View file @
332008a1
...
...
@@ -69,26 +69,26 @@ public class TInteractionController extends BaseController {
try
{
Map
<
String
,
Object
>
resultMap
=
new
LinkedHashMap
<
String
,
Object
>();
if
(
StringUtils
.
isBlank
(
tInteraction
.
getName
())||
StringUtils
.
isBlank
(
tInteraction
.
getPassword
()))
{
resultMap
.
put
(
"
c
ode"
,
"400"
);
resultMap
.
put
(
"m
sg
"
,
"请输入用户名和密码"
);
resultMap
.
put
(
"
resultC
ode"
,
"400"
);
resultMap
.
put
(
"m
essage
"
,
"请输入用户名和密码"
);
return
resultMap
;
}
TUser
user
=
userService
.
selectByUsername
(
tInteraction
.
getName
());
if
(
user
==
null
)
{
resultMap
.
put
(
"
c
ode"
,
"500"
);
resultMap
.
put
(
"m
sg
"
,
"用户名错误"
);
resultMap
.
put
(
"
resultC
ode"
,
"500"
);
resultMap
.
put
(
"m
essage
"
,
"用户名错误"
);
return
resultMap
;
}
if
(
"2"
.
equals
(
user
.
getType
()))
{
resultMap
.
put
(
"
c
ode"
,
"500"
);
resultMap
.
put
(
"m
sg
"
,
"用户不是单位管理员"
);
resultMap
.
put
(
"
resultC
ode"
,
"500"
);
resultMap
.
put
(
"m
essage
"
,
"用户不是单位管理员"
);
return
resultMap
;
}
byte
[]
salt
=
user
.
getPasswordSalt
();
if
(!
new
String
(
SHA256PasswordEncryptionService
.
createPasswordHash
(
tInteraction
.
getPassword
(),
salt
))
.
equals
(
new
String
(
user
.
getPasswordHash
())))
{
resultMap
.
put
(
"
c
ode"
,
"500"
);
resultMap
.
put
(
"m
sg
"
,
"密码错误"
);
resultMap
.
put
(
"
resultC
ode"
,
"500"
);
resultMap
.
put
(
"m
essage
"
,
"密码错误"
);
return
resultMap
;
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TOrganController.java
View file @
332008a1
...
...
@@ -75,7 +75,6 @@ public class TOrganController extends BaseController {
String
organCode
=
getOrganCode
(
organ
.
getParentId
());
organ
.
setLevel
(
organCode
.
length
()/
3
);
organ
.
setCode
(
organCode
);
organ
.
setId
(
organCode
);
// 保存业务节点信息
boolean
result
=
tOrganService
.
save
(
organ
);
// 返回操作结果
...
...
@@ -124,19 +123,17 @@ public class TOrganController extends BaseController {
@DeleteMapping
(
"/delete"
)
@RequiresPermissions
(
"/organ/delete"
)
@ApiOperation
(
value
=
"根据ID删除机构"
,
notes
=
"根据ID删除机构"
)
@MethodLog
(
operModule
=
OperModule
.
ORG
,
operType
=
OperType
.
DELETE
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"
path
"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"
query
"
,
dataType
=
"String"
)
})
public
Map
<
String
,
Object
>
deleteTOrgan
(
@PathVariable
(
"id"
)
String
id
)
{
// @MethodLog(operModule = OperModule.ORG,operType = OperType.DELETE)
public
Map
<
String
,
Object
>
deleteTOrgan
(
String
id
)
{
boolean
result
=
false
;
try
{
UpdateWrapper
<
TOrgan
>
updateWrapper
=
new
UpdateWrapper
<>();
updateWrapper
.
eq
(
"id"
,
id
);
updateWrapper
.
eq
(
"is_deleted"
,
1
);
updateWrapper
.
eq
(
"update_time"
,
DateUtil80
.
getDateTimeOfTimestamp
(
System
.
currentTimeMillis
()));
result
=
tOrganService
.
update
(
updateWrapper
);
TOrgan
tOrgan
=
tOrganService
.
getById
(
id
);
tOrgan
.
setIsDeleted
(
true
);
tOrgan
.
setUpdateTime
(
DateUtil80
.
getDateTimeOfTimestamp
(
System
.
currentTimeMillis
()));
result
=
tOrganService
.
updateById
(
tOrgan
);
if
(!
result
)
{
return
getFailResult
();
}
...
...
@@ -144,7 +141,6 @@ public class TOrganController extends BaseController {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
getFailResult
();
}
...
...
@@ -197,6 +193,7 @@ public class TOrganController extends BaseController {
}
//设置用户数据权限
queryWrapper
.
likeRight
(
TOrgan:
:
getCode
,
user
.
getOrgCode
());
queryWrapper
.
eq
(
TOrgan:
:
getIsDeleted
,
false
);
// 设置排序规则
queryWrapper
.
orderByDesc
(
TOrgan:
:
getCreateTime
);
page
=
this
.
tOrganService
.
page
(
getPage
(),
queryWrapper
);
...
...
src/main/resources/mapper/TOrganMapper.xml
View file @
332008a1
...
...
@@ -46,6 +46,7 @@ where 1=1
<if
test=
" org.code != null and org.code != '' "
>
and o.code LIKE concat(#{org.code},'%')
</if>
and o.is_deleted = false
order by o.create_time desc
</select>
...
...
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