Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fit-finance
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fitness-server
fit-finance
Commits
716ab0fe
Commit
716ab0fe
authored
Mar 01, 2024
by
程裕兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:api
parent
dd13617c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
4 additions
and
46 deletions
+4
-46
api/src/main/java/com/jiejing/fitness/finance/api/cashier/BrandCashierApi.java
+0
-1
api/src/main/java/com/jiejing/fitness/finance/api/merchant/BrandMerchantApi.java
+0
-4
api/src/main/java/com/jiejing/fitness/finance/api/merchant/BrandMerchantApiFallback.java
+0
-6
app/src/main/java/com/jiejing/fitness/finance/app/controller/merchant/BrandMerchantController.java
+0
-9
service/src/main/java/com/jiejing/fitness/finance/service/enums/FinanceErrorEnums.java
+1
-0
service/src/main/java/com/jiejing/fitness/finance/service/merchant/BrandMerchantService.java
+0
-9
service/src/main/java/com/jiejing/fitness/finance/service/merchant/convert/MerchantConvert.java
+0
-10
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/BrandMerchantServiceImpl.java
+3
-7
No files found.
api/src/main/java/com/jiejing/fitness/finance/api/cashier/BrandCashierApi.java
View file @
716ab0fe
...
@@ -6,7 +6,6 @@ import com.jiejing.fitness.finance.api.cashier.request.GetBrandCashierByIdReques
...
@@ -6,7 +6,6 @@ import com.jiejing.fitness.finance.api.cashier.request.GetBrandCashierByIdReques
import
com.jiejing.fitness.finance.api.cashier.request.ListBrandCashierByOrderNoRequest
;
import
com.jiejing.fitness.finance.api.cashier.request.ListBrandCashierByOrderNoRequest
;
import
com.jiejing.fitness.finance.api.cashier.request.PageBrandCashierRequest
;
import
com.jiejing.fitness.finance.api.cashier.request.PageBrandCashierRequest
;
import
com.jiejing.fitness.finance.api.cashier.vo.BrandCashierRecordVO
;
import
com.jiejing.fitness.finance.api.cashier.vo.BrandCashierRecordVO
;
import
com.jiejing.fitness.finance.api.merchant.BrandMerchantApi
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
...
...
api/src/main/java/com/jiejing/fitness/finance/api/merchant/BrandMerchantApi.java
View file @
716ab0fe
...
@@ -53,10 +53,6 @@ public interface BrandMerchantApi {
...
@@ -53,10 +53,6 @@ public interface BrandMerchantApi {
@PostMapping
(
value
=
"/private/brandMerchant/bindXcxAppId"
)
@PostMapping
(
value
=
"/private/brandMerchant/bindXcxAppId"
)
JsonResult
<
BrandMerchantBindXcxAppIdVO
>
bindXcxAppId
(
BindBrandMerchantXcxAppIdRequest
request
);
JsonResult
<
BrandMerchantBindXcxAppIdVO
>
bindXcxAppId
(
BindBrandMerchantXcxAppIdRequest
request
);
@ApiOperation
(
value
=
"校验微信小程序appId绑定结果"
,
tags
=
{
TAG
})
@PostMapping
(
value
=
"/private/brandMerchant/checkBindXcxAppId"
)
JsonResult
<
BrandMerchantBindXcxAppIdVO
>
checkBindXcxAppId
(
BindBrandMerchantXcxAppIdRequest
request
);
@ApiOperation
(
value
=
"授权子渠道"
,
tags
=
{
TAG
})
@ApiOperation
(
value
=
"授权子渠道"
,
tags
=
{
TAG
})
@PostMapping
(
value
=
"/private/brandMerchant/authSubChannel"
)
@PostMapping
(
value
=
"/private/brandMerchant/authSubChannel"
)
JsonResult
<
BrandMerchantAuthSubChannelVO
>
authSubChannel
(
AuthBrandMerchantSubChannelRequest
request
);
JsonResult
<
BrandMerchantAuthSubChannelVO
>
authSubChannel
(
AuthBrandMerchantSubChannelRequest
request
);
...
...
api/src/main/java/com/jiejing/fitness/finance/api/merchant/BrandMerchantApiFallback.java
View file @
716ab0fe
...
@@ -57,12 +57,6 @@ public class BrandMerchantApiFallback implements FallbackFactory<BrandMerchantAp
...
@@ -57,12 +57,6 @@ public class BrandMerchantApiFallback implements FallbackFactory<BrandMerchantAp
}
}
@Override
@Override
public
JsonResult
<
BrandMerchantBindXcxAppIdVO
>
checkBindXcxAppId
(
BindBrandMerchantXcxAppIdRequest
request
)
{
return
JsonResult
.
rpcError
();
}
@Override
public
JsonResult
<
BrandMerchantAuthSubChannelVO
>
authSubChannel
(
public
JsonResult
<
BrandMerchantAuthSubChannelVO
>
authSubChannel
(
AuthBrandMerchantSubChannelRequest
request
)
{
AuthBrandMerchantSubChannelRequest
request
)
{
return
JsonResult
.
rpcError
();
return
JsonResult
.
rpcError
();
...
...
app/src/main/java/com/jiejing/fitness/finance/app/controller/merchant/BrandMerchantController.java
View file @
716ab0fe
...
@@ -86,15 +86,6 @@ public class BrandMerchantController implements BrandMerchantApi {
...
@@ -86,15 +86,6 @@ public class BrandMerchantController implements BrandMerchantApi {
return
JsonResult
.
success
(
brandMerchantService
.
bindXcxAppId
(
request
.
getBrandId
(),
request
.
getAppId
()));
return
JsonResult
.
success
(
brandMerchantService
.
bindXcxAppId
(
request
.
getBrandId
(),
request
.
getAppId
()));
}
}
@ApiOperation
(
value
=
"校验微信小程序appId绑定结果"
,
tags
=
{
TAG
})
@PostMapping
(
value
=
"/private/brandMerchant/checkBindXcxAppId"
)
@Override
public
JsonResult
<
BrandMerchantBindXcxAppIdVO
>
checkBindXcxAppId
(
@RequestBody
@Valid
BindBrandMerchantXcxAppIdRequest
request
)
{
return
JsonResult
.
success
(
brandMerchantService
.
checkBindXcxAppId
(
request
.
getBrandId
(),
request
.
getAppId
()));
}
@ApiOperation
(
value
=
"授权子渠道"
,
tags
=
{
TAG
})
@ApiOperation
(
value
=
"授权子渠道"
,
tags
=
{
TAG
})
@PostMapping
(
value
=
"/private/brandMerchant/authSubChannel"
)
@PostMapping
(
value
=
"/private/brandMerchant/authSubChannel"
)
@Override
@Override
...
...
service/src/main/java/com/jiejing/fitness/finance/service/enums/FinanceErrorEnums.java
View file @
716ab0fe
...
@@ -20,6 +20,7 @@ public enum FinanceErrorEnums implements BaseBizError {
...
@@ -20,6 +20,7 @@ public enum FinanceErrorEnums implements BaseBizError {
NOT_SUPPORT_METHOD
(
"不支持的方法"
),
NOT_SUPPORT_METHOD
(
"不支持的方法"
),
NOT_SUPPORT_TYPE
(
"不支持的类型"
),
NOT_SUPPORT_TYPE
(
"不支持的类型"
),
CHANNEL_NOT_OPEN
(
"未开通当前支付通道"
),
CHANNEL_NOT_OPEN
(
"未开通当前支付通道"
),
MERCHANT_NOT_OPEN
(
"未进件"
),
NOT_SUPPORT_FILE_TYPE
(
"不支持的文件类型"
),
NOT_SUPPORT_FILE_TYPE
(
"不支持的文件类型"
),
;
;
...
...
service/src/main/java/com/jiejing/fitness/finance/service/merchant/BrandMerchantService.java
View file @
716ab0fe
...
@@ -68,15 +68,6 @@ public interface BrandMerchantService {
...
@@ -68,15 +68,6 @@ public interface BrandMerchantService {
BrandMerchantBindXcxAppIdVO
bindXcxAppId
(
Long
brandId
,
String
appId
);
BrandMerchantBindXcxAppIdVO
bindXcxAppId
(
Long
brandId
,
String
appId
);
/**
/**
* 绑定小程序AppId结果
*
* @param brandId 品牌ID
* @param appId 小程序appId
* @return 结果
*/
BrandMerchantBindXcxAppIdVO
checkBindXcxAppId
(
Long
brandId
,
String
appId
);
/**
* 授权子渠道
* 授权子渠道
*
*
* @param brandId 品牌ID
* @param brandId 品牌ID
...
...
service/src/main/java/com/jiejing/fitness/finance/service/merchant/convert/MerchantConvert.java
View file @
716ab0fe
...
@@ -39,7 +39,6 @@ import com.jiejing.paycenter.common.model.Legal;
...
@@ -39,7 +39,6 @@ import com.jiejing.paycenter.common.model.Legal;
import
com.jiejing.paycenter.common.model.License
;
import
com.jiejing.paycenter.common.model.License
;
import
com.jiejing.paycenter.common.model.ResourceInfo
;
import
com.jiejing.paycenter.common.model.ResourceInfo
;
import
com.jiejing.paycenter.common.model.SubChannelAuthInfo
;
import
com.jiejing.paycenter.common.model.SubChannelAuthInfo
;
import
com.jiejing.paycenter.common.model.SubChannelConfigInfo
;
import
com.jiejing.paycenter.common.model.SubChannelInfo
;
import
com.jiejing.paycenter.common.model.SubChannelInfo
;
import
com.jiejing.studio.api.studio.vo.StudioVO
;
import
com.jiejing.studio.api.studio.vo.StudioVO
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -473,13 +472,4 @@ public class MerchantConvert {
...
@@ -473,13 +472,4 @@ public class MerchantConvert {
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
}
}
public
static
BrandMerchantBindXcxAppIdVO
convertBrandBindWxAppIdApply
(
List
<
SubChannelConfigInfo
>
configs
,
String
appId
)
{
SubChannelConfigInfo
config
=
Optional
.
ofNullable
(
configs
).
orElse
(
new
ArrayList
<>(
1
)).
stream
()
.
filter
(
e
->
e
.
getAppId
().
equals
(
appId
)).
findFirst
().
orElse
(
new
SubChannelConfigInfo
());
return
BrandMerchantBindXcxAppIdVO
.
builder
()
.
state
(
config
.
getState
())
.
failMessage
(
config
.
getFailMessage
())
.
build
();
}
}
}
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/BrandMerchantServiceImpl.java
View file @
716ab0fe
...
@@ -161,6 +161,9 @@ public class BrandMerchantServiceImpl implements BrandMerchantService {
...
@@ -161,6 +161,9 @@ public class BrandMerchantServiceImpl implements BrandMerchantService {
@Override
@Override
public
BrandMerchantBindXcxAppIdVO
bindXcxAppId
(
Long
brandId
,
String
appId
)
{
public
BrandMerchantBindXcxAppIdVO
bindXcxAppId
(
Long
brandId
,
String
appId
)
{
BrandToMerchant
relation
=
brandToMerchantRpService
.
getByBrandId
(
brandId
,
channel
);
BrandToMerchant
relation
=
brandToMerchantRpService
.
getByBrandId
(
brandId
,
channel
);
if
(
null
==
relation
)
{
throw
new
BizException
(
FinanceErrorEnums
.
MERCHANT_NOT_OPEN
);
}
ConfigSubChannelVO
vo
=
merchantRpcService
.
bindAppIdWxXcxOffline
(
channel
,
IdWorker
.
getIdStr
(),
ConfigSubChannelVO
vo
=
merchantRpcService
.
bindAppIdWxXcxOffline
(
channel
,
IdWorker
.
getIdStr
(),
relation
.
getMerchantId
(),
appId
);
relation
.
getMerchantId
(),
appId
);
...
@@ -170,13 +173,6 @@ public class BrandMerchantServiceImpl implements BrandMerchantService {
...
@@ -170,13 +173,6 @@ public class BrandMerchantServiceImpl implements BrandMerchantService {
}
}
@Override
@Override
public
BrandMerchantBindXcxAppIdVO
checkBindXcxAppId
(
Long
brandId
,
String
appId
)
{
BrandToMerchant
relation
=
brandToMerchantRpService
.
getByBrandId
(
brandId
,
channel
);
MerchantVO
merchant
=
merchantRpcService
.
getByMerchantId
(
relation
.
getMerchantId
());
return
MerchantConvert
.
convertBrandBindWxAppIdApply
(
merchant
.
getSubChannelConfigs
(),
appId
);
}
@Override
public
BrandMerchantAuthSubChannelVO
authSubChannel
(
Long
brandId
,
SubChannelEnums
subChannel
,
public
BrandMerchantAuthSubChannelVO
authSubChannel
(
Long
brandId
,
SubChannelEnums
subChannel
,
SubChannelAuthTypeEnums
authType
)
{
SubChannelAuthTypeEnums
authType
)
{
BrandToMerchant
relation
=
brandToMerchantRpService
.
getByBrandId
(
brandId
,
channel
);
BrandToMerchant
relation
=
brandToMerchantRpService
.
getByBrandId
(
brandId
,
channel
);
...
...
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