Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
caa147be
Commit
caa147be
authored
Nov 17, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug'
parent
644a0a50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
+70
-0
UserLoginController.java
...s/boot/module/jcs/biz/controller/UserLoginController.java
+66
-0
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+4
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/UserLoginController.java
0 → 100644
View file @
caa147be
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrSafeReportDto
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.IdPasswordAuthModel
;
import
io.swagger.annotations.Api
;
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
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.LinkedHashMap
;
/**
* @description:
* @author: tw
* @createDate: 2022/11/16
*/
@RestController
@RequestMapping
(
value
=
"/user"
)
@Api
(
tags
=
"用户登录"
)
public
class
UserLoginController
extends
BaseController
{
@Autowired
OrgUsrMapper
orgUsrMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/login"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"用户登录"
,
notes
=
"用户登录"
)
public
Object
save
(
@RequestBody
IdPasswordAuthModel
var1
)
{
FeignClientResult
result
=
Privilege
.
authClient
.
idpassword
(
var1
);
if
(
result
.
getResult
()
!=
null
)
{
LinkedHashMap
<
String
,
Object
>
jd
=
(
LinkedHashMap
<
String
,
Object
>)
result
.
getResult
();
String
id
=
jd
.
get
(
"userId"
).
toString
();
//验证用户是否绑定机场单位
OrgUsr
or
=
orgUsrMapper
.
queryByUserId
(
Long
.
valueOf
(
id
));
if
(
or
!=
null
){
return
result
;
}
else
{
result
.
setDevMessage
(
"FAILED"
);
result
.
setMessage
(
"未绑定机场单位用户,请联系管理员!"
);
result
.
setStatus
(
401
);
return
result
;
}
}
return
null
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
caa147be
...
@@ -139,6 +139,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -139,6 +139,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
@Value
(
"${mqtt.topic.command.alert.noticeData}"
)
@Value
(
"${mqtt.topic.command.alert.noticeData}"
)
private
String
topicData
;
private
String
topicData
;
@Value
(
"${mqtt.topic.command.alert.noticeData120}"
)
private
String
topicData120
;
@Value
(
"${redis.cache.failure.time}"
)
@Value
(
"${redis.cache.failure.time}"
)
private
long
time
;
private
long
time
;
...
@@ -614,6 +616,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -614,6 +616,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
//120系统暂时未对规则进行需求定义 且不需要作战指挥 暂时屏蔽对应mqtt及规则
//120系统暂时未对规则进行需求定义 且不需要作战指挥 暂时屏蔽对应mqtt及规则
if
(!
alertCalled
.
getAlertTypeCode
().
equals
(
AlertStageEnums
.
JJJQ
.
getCode
())){
if
(!
alertCalled
.
getAlertTypeCode
().
equals
(
AlertStageEnums
.
JJJQ
.
getCode
())){
emqKeeper
.
getMqttClient
().
publish
(
topicData
,
json
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
topicData
,
json
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
else
{
emqKeeper
.
getMqttClient
().
publish
(
topicData120
,
json
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
}
// 航空报警器报警通知
// 航空报警器报警通知
if
(
AlertStageEnums
.
HKJY
.
getCode
().
equals
(
alertCalled
.
getAlertTypeCode
()))
{
if
(
AlertStageEnums
.
HKJY
.
getCode
().
equals
(
alertCalled
.
getAlertTypeCode
()))
{
...
...
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