Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
a89e9f4e
Commit
a89e9f4e
authored
Feb 24, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付配置新增/删除/查询接口
parent
1ea2b8e5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
287 additions
and
0 deletions
+287
-0
pom.xml
gic-platform-operation-web/pom.xml
+5
-0
AppPayController.java
...va/com/gic/operation/web/controller/AppPayController.java
+82
-0
AppVO.java
.../src/main/java/com/gic/operation/web/vo/apppay/AppVO.java
+36
-0
EnterpriseVO.java
...in/java/com/gic/operation/web/vo/apppay/EnterpriseVO.java
+46
-0
PayConfigVO.java
...ain/java/com/gic/operation/web/vo/apppay/PayConfigVO.java
+116
-0
dubbo-gic-platform-operation-web.xml
...b/src/main/resources/dubbo-gic-platform-operation-web.xml
+2
-0
No files found.
gic-platform-operation-web/pom.xml
View file @
a89e9f4e
...
...
@@ -178,6 +178,11 @@
<artifactId>
gic-marketing-process-api
</artifactId>
<version>
${gic-marketing-process-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-mall-share-api
</artifactId>
<version>
${gic-mall-share-api}
</version>
</dependency>
</dependencies>
<dependencyManagement>
...
...
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/AppPayController.java
0 → 100644
View file @
a89e9f4e
package
com
.
gic
.
operation
.
web
.
controller
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.service.EnterpriseApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.mall.share.api.dto.PayConfigDTO
;
import
com.gic.mall.share.api.service.PayConfigApiService
;
import
com.gic.operation.web.vo.apppay.AppVO
;
import
com.gic.operation.web.vo.apppay.EnterpriseVO
;
import
com.gic.operation.web.vo.apppay.PayConfigVO
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 支付配置
* @ClassName: AppPayController
* @Description:
* @author guojuxing
* @date 2020/2/21 9:10 AM
*/
@RestController
@RequestMapping
(
"/app-pay"
)
public
class
AppPayController
{
@Autowired
private
PayConfigApiService
payConfigApiService
;
@Autowired
private
EnterpriseApiService
enterpriseApiService
;
/**
* @Title: list
* @Description:
* @author guojuxing
* @param pageNum
* @param pageSize
* @param search 商户/公司名称
* @return com.gic.commons.webapi.reponse.RestResponse
*/
@RequestMapping
(
"/list"
)
public
RestResponse
list
(
Integer
pageNum
,
Integer
pageSize
,
String
search
)
{
ServiceResponse
<
Page
<
PayConfigDTO
>>
list
=
payConfigApiService
.
getGicBusinessPayConfig
(
pageNum
,
pageSize
,
search
);
return
ResultControllerUtils
.
commonResult
(
list
,
PayConfigVO
.
class
);
}
@RequestMapping
(
"/save"
)
public
RestResponse
save
(
PayConfigDTO
payConfigDTO
)
{
//1gic特邀商户
payConfigDTO
.
setPayConfigType
(
1
);
//小程序
payConfigDTO
.
setAppType
(
1
);
if
(
payConfigDTO
.
getEnterpriseId
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"商户ID不能为空"
);
}
if
(
payConfigDTO
.
getAppletConfigId
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"小程序配置ID不能为空"
);
}
if
(
StringUtils
.
isBlank
(
payConfigDTO
.
getSubMchId
()))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"字商户号不能为空"
);
}
return
ResultControllerUtils
.
commonResult
(
payConfigApiService
.
savePayConfig
(
payConfigDTO
));
}
@RequestMapping
(
"/list-app"
)
public
RestResponse
listApp
(
Integer
enterpriseId
)
{
return
ResultControllerUtils
.
commonResult
(
payConfigApiService
.
getApplets
(
enterpriseId
,
1
),
AppVO
.
class
);
}
@RequestMapping
(
"/delete"
)
public
RestResponse
save
(
Long
configId
,
Integer
enterpriseId
)
{
return
ResultControllerUtils
.
commonResult
(
payConfigApiService
.
deletePayConfig
(
configId
,
enterpriseId
));
}
@RequestMapping
(
"/list-enterprise-by-name"
)
public
RestResponse
listEnterpriseByName
(
String
search
)
{
return
ResultControllerUtils
.
commonResult
(
enterpriseApiService
.
listEnterpriseByName
(
search
),
EnterpriseVO
.
class
);
}
}
gic-platform-operation-web/src/main/java/com/gic/operation/web/vo/apppay/AppVO.java
0 → 100644
View file @
a89e9f4e
package
com
.
gic
.
operation
.
web
.
vo
.
apppay
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.io.Serializable
;
public
class
AppVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4493556752806002351L
;
/**
* 服务商、服务号名称
*/
private
String
serverProviderName
;
/**
* 小程序配置id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
appletConfigId
;
public
String
getServerProviderName
()
{
return
serverProviderName
;
}
public
void
setServerProviderName
(
String
serverProviderName
)
{
this
.
serverProviderName
=
serverProviderName
;
}
public
Long
getAppletConfigId
()
{
return
appletConfigId
;
}
public
void
setAppletConfigId
(
Long
appletConfigId
)
{
this
.
appletConfigId
=
appletConfigId
;
}
}
gic-platform-operation-web/src/main/java/com/gic/operation/web/vo/apppay/EnterpriseVO.java
0 → 100644
View file @
a89e9f4e
package
com
.
gic
.
operation
.
web
.
vo
.
apppay
;
import
java.io.Serializable
;
public
class
EnterpriseVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1264561336486340635L
;
/**
* 企业主键
*/
private
Integer
enterpriseId
;
/**
* 商户名称
*/
private
String
enterpriseName
;
/**
* 公司名称
*/
private
String
companyName
;
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getEnterpriseName
()
{
return
enterpriseName
;
}
public
void
setEnterpriseName
(
String
enterpriseName
)
{
this
.
enterpriseName
=
enterpriseName
;
}
public
String
getCompanyName
()
{
return
companyName
;
}
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
}
gic-platform-operation-web/src/main/java/com/gic/operation/web/vo/apppay/PayConfigVO.java
0 → 100644
View file @
a89e9f4e
package
com
.
gic
.
operation
.
web
.
vo
.
apppay
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.io.Serializable
;
public
class
PayConfigVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4455662541210390818L
;
/**
*
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
/**
* 支付配置id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
payConfigId
;
/**
* 企业名称
*/
private
String
enterpriseName
;
/**
* 企业id
*/
private
Integer
enterpriseId
;
/**
* 服务商、服务号名称
*/
private
String
serverProviderName
;
/**
* 小程序配置id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
appletConfigId
;
/**
* 商户号
*/
private
String
mchId
;
/**
* 子商户号
*/
private
String
subMchId
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getPayConfigId
()
{
return
payConfigId
;
}
public
void
setPayConfigId
(
Long
payConfigId
)
{
this
.
payConfigId
=
payConfigId
;
}
public
String
getEnterpriseName
()
{
return
enterpriseName
;
}
public
void
setEnterpriseName
(
String
enterpriseName
)
{
this
.
enterpriseName
=
enterpriseName
;
}
public
String
getServerProviderName
()
{
return
serverProviderName
;
}
public
void
setServerProviderName
(
String
serverProviderName
)
{
this
.
serverProviderName
=
serverProviderName
;
}
public
Long
getAppletConfigId
()
{
return
appletConfigId
;
}
public
void
setAppletConfigId
(
Long
appletConfigId
)
{
this
.
appletConfigId
=
appletConfigId
;
}
public
String
getMchId
()
{
return
mchId
;
}
public
void
setMchId
(
String
mchId
)
{
this
.
mchId
=
mchId
;
}
public
String
getSubMchId
()
{
return
subMchId
;
}
public
void
setSubMchId
(
String
subMchId
)
{
this
.
subMchId
=
subMchId
;
}
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
}
gic-platform-operation-web/src/main/resources/dubbo-gic-platform-operation-web.xml
View file @
a89e9f4e
...
...
@@ -83,4 +83,5 @@
<!-- 消息路由 -->
<dubbo:reference
interface=
"com.gic.mq.sdk.service.MQConfigService"
id=
"mQConfigService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.mq.sdk.service.MQStatusService"
id=
"mQStatusService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.mall.share.api.service.PayConfigApiService"
id=
"payConfigApiService"
timeout=
"6000"
/>
</beans>
\ 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