Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
scrm
/
rop-merchant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit eb43d736
authored
Jul 31, 2024
by
yelq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Merge all from rop-merchant scrm_v4.42.0_20240801
1 parent
b9495268
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
0 deletions
src/main/java/cn/com/glsx/merchants/config/DubboConfig.java
src/main/java/cn/com/glsx/merchants/controller/MerchantCommonController.java
src/main/java/cn/com/glsx/merchants/request/car/CarTypeIdRequest.java
src/main/java/cn/com/glsx/merchants/service/MerchantCommonService.java
src/main/java/cn/com/glsx/merchants/config/DubboConfig.java
View file @
eb43d73
...
...
@@ -6,6 +6,7 @@ import cn.com.glsx.stoassistant.remote.MerchantStaffWithdrawalRemote;
import
cn.com.glsx.stoassistant.remote.PlatformMerchantMissionRemote
;
import
cn.com.glsx.stoassistant.remote.PlatformMerchantStaffMissionRemote
;
import
com.glsx.biz.common.base.service.CarbrandService
;
import
com.glsx.biz.common.base.service.CartypeService
;
import
org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -105,4 +106,9 @@ public class DubboConfig {
return
factory
.
builder
(
PlatformMerchantStaffMissionRemote
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"1.0.0"
).
build
();
}
@Bean
public
CartypeService
getCartypeService
(){
return
factory
.
builder
(
CartypeService
.
class
).
check
(
false
).
version
(
"2.2.0"
).
timeout
(
30000
).
build
();
}
}
src/main/java/cn/com/glsx/merchants/controller/MerchantCommonController.java
View file @
eb43d73
...
...
@@ -4,10 +4,12 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
cn.com.glsx.merchants.request.accounttype.AccountTypeSearchRequest
;
import
cn.com.glsx.merchants.request.car.CarTypeIdRequest
;
import
cn.com.glsx.merchants.response.AccountTypeResponse
;
import
cn.com.glsx.merchants.response.CarbrandResponse
;
import
cn.com.glsx.merchants.response.ChannelResponse
;
import
cn.com.glsx.merchants.service.MerchantCommonService
;
import
com.glsx.biz.common.base.entity.Cartype
;
import
com.rop.AbstractRopRequest
;
import
com.rop.annotation.NeedInSessionType
;
import
com.rop.annotation.ServiceMethod
;
...
...
@@ -67,4 +69,15 @@ public class MerchantCommonController {
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
@ServiceMethod
(
method
=
"merchants.api.merchantCommon.getCarType"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"通过id获取车型信息"
)
public
RopResponse
<
List
<
Cartype
>>
getCarTypeInfo
(
CarTypeIdRequest
request
){
try
{
return
RopResponse
.
success
(
merchantCommonService
.
getCarTypeInfo
(
request
));
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantCommonController__invoke__getCarTypeInfo__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
src/main/java/cn/com/glsx/merchants/request/car/CarTypeIdRequest.java
0 → 100644
View file @
eb43d73
package
cn
.
com
.
glsx
.
merchants
.
request
.
car
;
import
com.rop.AbstractRopRequest
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
CarTypeIdRequest
extends
AbstractRopRequest
{
/**
* 车型id集合
*/
private
List
<
Integer
>
carTypeIdList
;
}
src/main/java/cn/com/glsx/merchants/service/MerchantCommonService.java
View file @
eb43d73
...
...
@@ -5,12 +5,16 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
import
cn.com.glsx.merchants.convert.ConvertResponse
;
import
cn.com.glsx.merchants.model.response.MerchantChannelResponse
;
import
cn.com.glsx.merchants.remote.MerchantRemote
;
import
cn.com.glsx.merchants.request.car.CarTypeIdRequest
;
import
cn.com.glsx.merchants.response.CarbrandResponse
;
import
cn.com.glsx.merchants.response.ChannelResponse
;
import
cn.com.glsx.merchants.response.MerchantTreeRopResponse
;
import
com.glsx.biz.common.base.entity.CarBrandSelected
;
import
com.glsx.biz.common.base.entity.Carbrand
;
import
com.glsx.biz.common.base.entity.Cartype
;
import
com.glsx.biz.common.base.service.CarbrandService
;
import
com.glsx.biz.common.base.service.CartypeService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -33,6 +37,9 @@ public class MerchantCommonService {
@Autowired
private
MerchantRemote
merchantRemote
;
@Autowired
private
CartypeService
cartypeService
;
public
List
<
CarbrandResponse
>
getCarbrandTree
()
{
List
<
Carbrand
>
parentCarbrandList
=
carbrandService
.
getParentCarbrandList
();
List
<
Carbrand
>
allList
=
carbrandService
.
getAllList
();
...
...
@@ -87,4 +94,10 @@ public class MerchantCommonService {
}
throw
new
RpcServiceException
(
allChannel
.
getException
().
getErrId
(),
allChannel
.
getMessage
());
}
public
List
<
Cartype
>
getCarTypeInfo
(
CarTypeIdRequest
request
){
List
<
Integer
>
carTypeIdList
=
request
.
getCarTypeIdList
();
if
(
CollectionUtils
.
isEmpty
(
carTypeIdList
))
return
new
ArrayList
<>();
return
cartypeService
.
getCarTypeInfoById
(
carTypeIdList
);
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment