Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
661c8adf
Commit
661c8adf
authored
Jun 24, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加站点业务备注
parent
6c147def
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
30 deletions
+62
-30
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteBusinessServiceImpl.java
...xhx/module/site/service/impl/SiteBusinessServiceImpl.java
+1
-0
common-lib/src/main/java/com/mortals/xhx/feign/area/IApiAreaFeign.java
...c/main/java/com/mortals/xhx/feign/area/IApiAreaFeign.java
+38
-29
common-lib/src/main/java/com/mortals/xhx/feign/user/IApiUserFeign.java
...c/main/java/com/mortals/xhx/feign/user/IApiUserFeign.java
+23
-1
No files found.
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteBusinessServiceImpl.java
View file @
661c8adf
...
...
@@ -60,6 +60,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
item
.
setDatashow
(
businessEntity
.
getDatashow
());
item
.
setEnglishname
(
businessEntity
.
getEnglishname
());
item
.
setBusinessType
(
businessEntity
.
getBusinessType
());
item
.
setRemark
(
businessEntity
.
getRemark
());
//判断业务是否含有子业务
if
(
businessEntity
.
getIsBusiness
()
==
IsBusinessEnum
.
一级业务
.
getValue
())
{
//添加二级业务列表
...
...
common-lib/src/main/java/com/mortals/xhx/feign/area/IApiAreaFeign.java
View file @
661c8adf
package
com.mortals.xhx.feign.area
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.
xhx.common.code.ApiRespCodeEnum
;
import
com.mortals.
framework.common.Rest
;
import
com.mortals.xhx.common.pdu.SitePdu
;
import
com.mortals.xhx.feign.IFeign
;
import
com.mortals.xhx.module.area.model.AreaEntity
;
import
com.mortals.xhx.feign.rsp.ApiResp
;
import
feign.hystrix.FallbackFactory
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.cloud.openfeign.FeignClient
;
...
...
@@ -42,6 +41,25 @@ public interface IApiAreaFeign extends IFeign {
String
viewAreaInfo
(
@RequestParam
(
value
=
"id"
)
Long
id
);
/**
* 删除区域信息
*
* @param ids
* @return
*/
@GetMapping
(
value
=
"/area/delete"
)
String
delete
(
Long
[]
ids
,
@RequestHeader
(
"Authorization"
)
String
authorization
);
/**
* 区域信息保存更新
*
* @param entity
* @return
*/
@PostMapping
(
value
=
"/area/save"
)
String
save
(
@RequestBody
AreaEntity
entity
,
@RequestHeader
(
"Authorization"
)
String
authorization
);
/**
* 查看区域子信息
*
...
...
@@ -76,55 +94,46 @@ public interface IApiAreaFeign extends IFeign {
@Slf4j
@Component
class
AreaFeignFallbackFactory
implements
FallbackFactory
<
IApiAreaFeign
>
{
class
AreaFeignFallbackFactory
implements
FallbackFactory
<
IApiAreaFeign
>
{
@Override
public
IApiAreaFeign
create
(
Throwable
t
)
{
return
new
IApiAreaFeign
()
{
@Override
public
String
list
(
AreaEntity
query
)
{
log
.
error
(
"暂时无法获取区域列表信息,请稍后再试!query:{}"
,
JSON
.
toJSONString
(
query
));
log
.
error
(
t
.
getMessage
());
ApiResp
<
String
>
failResp
=
new
ApiResp
<>();
failResp
.
setCode
(
ApiRespCodeEnum
.
FAILED
.
getValue
());
failResp
.
setMsg
(
"暂时无法获取区域列表信息,请稍后再试!"
);
return
JSON
.
toJSONString
(
failResp
);
return
JSON
.
toJSONString
(
Rest
.
fail
(
"暂时无法获取站点列表,请稍后再试!"
));
}
@Override
public
String
viewAreaInfo
(
Long
id
)
{
log
.
error
(
"暂时无法获取区域信息,请稍后再试!parentId:{}"
,
id
);
log
.
error
(
t
.
getMessage
());
ApiResp
<
String
>
failResp
=
new
ApiResp
<>();
failResp
.
setCode
(
ApiRespCodeEnum
.
FAILED
.
getValue
());
failResp
.
setMsg
(
"暂时无法获取区域信息,请稍后再试!"
);
return
JSON
.
toJSONString
(
failResp
)
;
return
JSON
.
toJSONString
(
Rest
.
fail
(
"暂时无法获取站点列表,请稍后再试!"
)
);
}
@Override
public
String
delete
(
Long
[]
ids
,
String
authorization
)
{
return
null
;
}
@Override
public
String
getListByParentId
(
String
parentId
)
{
log
.
error
(
"暂时无法获取区域信息,请稍后再试!parentId:{}"
,
parentId
);
log
.
error
(
t
.
getMessage
());
ApiResp
<
String
>
failResp
=
new
ApiResp
<>();
failResp
.
setCode
(
ApiRespCodeEnum
.
FAILED
.
getValue
());
failResp
.
setMsg
(
"暂时无法获取区域信息,请稍后再试!"
);
return
JSON
.
toJSONString
(
failResp
);
return
JSON
.
toJSONString
(
Rest
.
fail
(
"暂时无法获取站点列表,请稍后再试!"
));
}
@Override
public
String
treeselect
()
{
ApiResp
<
String
>
failResp
=
new
ApiResp
<>();
failResp
.
setCode
(
ApiRespCodeEnum
.
FAILED
.
getValue
());
failResp
.
setMsg
(
"暂时无法获取区域信息,请稍后再试!"
);
return
JSON
.
toJSONString
(
failResp
);
return
JSON
.
toJSONString
(
Rest
.
fail
(
"暂时无法获取站点列表,请稍后再试!"
));
}
@Override
public
String
getFlatSitesByAreaIds
(
SitePdu
query
)
{
ApiResp
<
String
>
failResp
=
new
ApiResp
<>();
failResp
.
setCode
(
ApiRespCodeEnum
.
FAILED
.
getValue
());
failResp
.
setMsg
(
"暂时无法获取站点列表,请稍后再试!"
);
return
JSON
.
toJSONString
(
failResp
);
return
JSON
.
toJSONString
(
Rest
.
fail
(
"暂时无法获取站点列表,请稍后再试!"
));
}
@Override
public
String
save
(
AreaEntity
entity
,
String
authorization
)
{
return
null
;
}
};
}
}
...
...
common-lib/src/main/java/com/mortals/xhx/feign/user/IApiUserFeign.java
View file @
661c8adf
package
com.mortals.xhx.feign.user
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.xhx.common.code.ApiRespCodeEnum
;
import
com.mortals.xhx.feign.IFeign
;
import
com.mortals.xhx.feign.req.BaseUserQuery
;
import
com.mortals.xhx.feign.req.BaseUserReq
;
import
com.mortals.xhx.feign.rsp.ApiResp
;
import
com.mortals.xhx.feign.rsp.UserRsp
;
import
feign.hystrix.FallbackFactory
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -15,7 +20,7 @@ import org.springframework.web.bind.annotation.RequestBody;
* @author: zxfei
* @date: 2022/5/30 10:40
*/
@FeignClient
(
name
=
"portal-manager"
,
path
=
"/zwfw"
)
@FeignClient
(
name
=
"portal-manager"
,
path
=
"/zwfw"
,
fallback
=
UserFeignFallbackFactory
.
class
)
public
interface
IApiUserFeign
extends
IFeign
{
/**
...
...
@@ -29,3 +34,20 @@ public interface IApiUserFeign extends IFeign {
}
@Slf4j
@Component
class
UserFeignFallbackFactory
implements
FallbackFactory
<
IApiUserFeign
>
{
@Override
public
IApiUserFeign
create
(
Throwable
t
)
{
return
new
IApiUserFeign
()
{
@Override
public
ApiResp
<
UserRsp
>
findAllUser
(
BaseUserReq
<
BaseUserQuery
>
req
)
{
ApiResp
<
UserRsp
>
failResp
=
new
ApiResp
<>();
failResp
.
setCode
(
ApiRespCodeEnum
.
FAILED
.
getValue
());
failResp
.
setMsg
(
"暂时无法获取站点列表,请稍后再试!"
);
return
failResp
;
}
};
}
}
\ No newline at end of file
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