字典查询子节点接口

yun-zuoyi
汪云昊 6 years ago
parent 97c78467e2
commit 983fbf268e

@ -438,4 +438,23 @@ public class SysDictionaryController extends CoreBaseController{
return ImppExceptionBuilder.newInstance().buildExceptionResult(e); return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
} }
} }
/**
* id
* @param parentId id
* @return
*/
@GetMapping("/find-child/{parentId}")
@ApiOperation(value = "根据父级id查询字典",notes = "根据父级id查询字典")
public ResultBean<SysDictionary> findSysDictionaryByParentId(@PathVariable("parentId") String parentId){
try {
List<SysDictionary> dictionaryList = sysDictionaryService.findSysDictionaryByParentId(Long.parseLong(parentId));
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(dictionaryList);
}catch(ImppBusiException busExcep){
return ResultBean.fail(busExcep);
}catch(Exception e){
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
} }

@ -126,11 +126,13 @@ public class MessageWebSocket {
try { try {
MessageWebSocket websocket = webSocketMap.get(userLoginSid); MessageWebSocket websocket = webSocketMap.get(userLoginSid);
if (websocket != null && websocket.session.isOpen()) { if (websocket != null && websocket.session.isOpen()) {
if (message.equals("heartBit")) { synchronized (websocket.session) {
websocket.session.getBasicRemote().sendText(message + "=" + sendCount); if (message.equals("heartBit")) {
sendCount++; websocket.session.getBasicRemote().sendText(message + "=" + sendCount);
} else { sendCount++;
websocket.session.getBasicRemote().sendText(message); } else {
websocket.session.getBasicRemote().sendText(message);
}
} }
} }
} catch (IOException e) { } catch (IOException e) {

Loading…
Cancel
Save