Commit caa147be authored by tangwei's avatar tangwei

修改bug'

parent 644a0a50
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;
}
}
...@@ -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())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment