Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Jeepay
Commits
0627791b
Commit
0627791b
authored
Jun 16, 2023
by
yurong
Browse files
商户系统完善knife4j接口描述
parent
496865c8
Changes
27
Hide whitespace changes
Inline
Side-by-side
jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayInterfaceConfig.java
View file @
0627791b
...
...
@@ -67,7 +67,7 @@ public class PayInterfaceConfig extends BaseModel implements Serializable {
/**
* 服务商或商户No
*/
@ApiModelProperty
(
value
=
"服务商
或商户No
"
)
@ApiModelProperty
(
value
=
"服务商
号(服务商支付参数)或应用AppId(商户支付参数)
"
)
private
String
infoId
;
/**
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/CurrentUserController.java
View file @
0627791b
...
...
@@ -60,6 +60,9 @@ public class CurrentUserController extends CommonCtrl{
@Autowired
private
SysUserAuthService
sysUserAuthService
;
@ApiOperation
(
"查询当前登录者的用户信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
)
})
@RequestMapping
(
value
=
"/user"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
currentUserInfo
()
{
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/config/MainChartController.java
View file @
0627791b
...
...
@@ -55,6 +55,9 @@ public class MainChartController extends CommonCtrl {
* @describe: 周交易总金额
*/
@ApiOperation
(
"周交易总金额"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
)
})
@PreAuthorize
(
"hasAuthority('ENT_C_MAIN_PAY_AMOUNT_WEEK')"
)
@RequestMapping
(
value
=
"/payAmountWeek"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
payAmountWeek
()
{
...
...
@@ -67,6 +70,9 @@ public class MainChartController extends CommonCtrl {
* @describe: 商户总数量、服务商总数量、总交易金额、总交易笔数
*/
@ApiOperation
(
"商户总数量、服务商总数量、总交易金额、总交易笔数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
)
})
@PreAuthorize
(
"hasAuthority('ENT_C_MAIN_NUMBER_COUNT')"
)
@RequestMapping
(
value
=
"/numCount"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
numCount
()
{
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchPayInterfaceConfigController.java
View file @
0627791b
...
...
@@ -128,7 +128,7 @@ public class MchPayInterfaceConfigController extends CommonCtrl {
@ApiOperation
(
"更新应用支付参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"infoId"
,
value
=
"
商户号
"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"infoId"
,
value
=
"
应用AppId
"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"接口类型代码"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_PAY_CONFIG_ADD')"
)
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysEntController.java
View file @
0627791b
...
...
@@ -43,7 +43,7 @@ import java.util.List;
* @site https://www.jeequan.com
* @date 2021/6/8 17:13
*/
@Api
(
tags
=
"系统管理
--
用户权限"
)
@Api
(
tags
=
"系统管理
(
用户权限
)
"
)
@RestController
@RequestMapping
(
"api/sysEnts"
)
public
class
SysEntController
extends
CommonCtrl
{
...
...
@@ -52,7 +52,7 @@ public class SysEntController extends CommonCtrl {
/** getOne */
@ApiOperation
(
"
用户角色--权限--
查询菜单权限详情"
)
@ApiOperation
(
"查询菜单权限详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"entId"
,
value
=
"权限ID[ENT_功能模块_子模块_操作], eg: ENT_ROLE_LIST_ADD"
,
required
=
true
),
...
...
@@ -69,7 +69,7 @@ public class SysEntController extends CommonCtrl {
}
/** updateById */
@ApiOperation
(
"
用户角色--权限--
更新权限资源"
)
@ApiOperation
(
"更新权限资源"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"entId"
,
value
=
"权限ID[ENT_功能模块_子模块_操作], eg: ENT_ROLE_LIST_ADD"
,
required
=
true
),
...
...
@@ -91,7 +91,7 @@ public class SysEntController extends CommonCtrl {
/** 查询权限集合 */
@ApiOperation
(
"
用户角色--权限--
查询权限集合"
)
@ApiOperation
(
"查询权限集合"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"sysType"
,
value
=
"所属系统: MGR-运营平台, MCH-商户中心"
,
required
=
true
)
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/CurrentUserController.java
View file @
0627791b
...
...
@@ -31,6 +31,10 @@ import com.jeequan.jeepay.core.utils.TreeDataBuilder;
import
com.jeequan.jeepay.service.impl.SysEntitlementService
;
import
com.jeequan.jeepay.service.impl.SysUserAuthService
;
import
com.jeequan.jeepay.service.impl.SysUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -49,6 +53,7 @@ import java.util.List;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"登录者信息"
)
@RestController
@RequestMapping
(
"api/current"
)
public
class
CurrentUserController
extends
CommonCtrl
{
...
...
@@ -57,6 +62,10 @@ public class CurrentUserController extends CommonCtrl{
@Autowired
private
SysUserService
sysUserService
;
@Autowired
private
SysUserAuthService
sysUserAuthService
;
@ApiOperation
(
"查询当前登录者的用户信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
)
})
@RequestMapping
(
value
=
"/user"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
currentUserInfo
()
{
...
...
@@ -94,6 +103,13 @@ public class CurrentUserController extends CommonCtrl{
/** 修改个人信息 */
@ApiOperation
(
"修改个人信息--基本信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"avatarUrl"
,
value
=
"头像地址"
),
@ApiImplicitParam
(
name
=
"realname"
,
value
=
"真实姓名"
),
@ApiImplicitParam
(
name
=
"sex"
,
value
=
"性别 0-未知, 1-男, 2-女"
)
})
@MethodLog
(
remark
=
"修改个人信息"
)
@RequestMapping
(
value
=
"/user"
,
method
=
RequestMethod
.
PUT
)
public
ApiRes
modifyCurrentUserInfo
()
{
...
...
@@ -126,6 +142,12 @@ public class CurrentUserController extends CommonCtrl{
/** modifyPwd */
@ApiOperation
(
"修改个人信息--安全信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"confirmPwd"
,
value
=
"新密码"
),
@ApiImplicitParam
(
name
=
"originalPwd"
,
value
=
"原密码"
)
})
@MethodLog
(
remark
=
"修改密码"
)
@RequestMapping
(
value
=
"modifyPwd"
,
method
=
RequestMethod
.
PUT
)
public
ApiRes
modifyPwd
()
throws
BizException
{
...
...
@@ -152,6 +174,10 @@ public class CurrentUserController extends CommonCtrl{
}
/** 登出 */
@ApiOperation
(
"退出登录"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
)
})
@MethodLog
(
remark
=
"退出"
)
@RequestMapping
(
value
=
"logout"
,
method
=
RequestMethod
.
POST
)
public
ApiRes
logout
()
throws
BizException
{
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/anon/AuthController.java
View file @
0627791b
...
...
@@ -27,6 +27,10 @@ import com.jeequan.jeepay.core.exception.BizException;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mch.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.mch.service.AuthService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -40,6 +44,7 @@ import org.springframework.web.bind.annotation.RestController;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"认证模块"
)
@RestController
@RequestMapping
(
"/api/anon/auth"
)
public
class
AuthController
extends
CommonCtrl
{
...
...
@@ -47,11 +52,17 @@ public class AuthController extends CommonCtrl {
@Autowired
private
AuthService
authService
;
/** 用户信息认证 获取iToken **/
@ApiOperation
(
"登录认证"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"ia"
,
value
=
"用户名 i account, 需要base64处理"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"ip"
,
value
=
"密码 i passport, 需要base64处理"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"vc"
,
value
=
"证码 vercode, 需要base64处理"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"vt"
,
value
=
"验证码token, vercode token , 需要base64处理"
,
required
=
true
)
})
@RequestMapping
(
value
=
"/validate"
,
method
=
RequestMethod
.
POST
)
@MethodLog
(
remark
=
"登录认证"
)
public
ApiRes
validate
()
throws
BizException
{
String
account
=
Base64
.
decodeStr
(
getValStringRequired
(
"ia"
));
//用户名 i account, 已做base64处理
String
ipassport
=
Base64
.
decodeStr
(
getValStringRequired
(
"ip"
));
//密码 i passport, 已做base64处理
String
vercode
=
Base64
.
decodeStr
(
getValStringRequired
(
"vc"
));
//验证码 vercode, 已做base64处理
...
...
@@ -72,6 +83,7 @@ public class AuthController extends CommonCtrl {
}
/** 图片验证码 **/
@ApiOperation
(
"图片验证码"
)
@RequestMapping
(
value
=
"/vercode"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
vercode
()
throws
BizException
{
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/division/MchDivisionReceiverController.java
View file @
0627791b
...
...
@@ -26,6 +26,7 @@ import com.jeequan.jeepay.core.entity.MchApp;
import
com.jeequan.jeepay.core.entity.MchDivisionReceiver
;
import
com.jeequan.jeepay.core.entity.MchDivisionReceiverGroup
;
import
com.jeequan.jeepay.core.exception.BizException
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.exception.JeepayException
;
import
com.jeequan.jeepay.mch.ctrl.CommonCtrl
;
...
...
@@ -36,6 +37,10 @@ import com.jeequan.jeepay.service.impl.MchAppService;
import
com.jeequan.jeepay.service.impl.MchDivisionReceiverGroupService
;
import
com.jeequan.jeepay.service.impl.MchDivisionReceiverService
;
import
com.jeequan.jeepay.service.impl.SysConfigService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -53,6 +58,7 @@ import java.math.BigDecimal;
* @site https://www.jeequan.com
* @date 2021-08-23 11:50
*/
@Api
(
tags
=
"分账管理(收款账号)"
)
@RestController
@RequestMapping
(
"api/divisionReceivers"
)
public
class
MchDivisionReceiverController
extends
CommonCtrl
{
...
...
@@ -64,9 +70,21 @@ public class MchDivisionReceiverController extends CommonCtrl {
/** list */
@ApiOperation
(
"收款账号列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"pageNumber"
,
value
=
"分页页码"
,
dataType
=
"int"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"分页条数(-1时查全部数据)"
,
dataType
=
"int"
,
defaultValue
=
"20"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
),
@ApiImplicitParam
(
name
=
"receiverId"
,
value
=
"账号快照》 分账接收者ID"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"receiverAlias"
,
value
=
"账号快照》 分账接收者别名"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-待分账 1-分账成功, 2-分账失败"
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"receiverGroupId"
,
value
=
"账号组ID"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"receiverGroupName"
,
value
=
"组名称"
)
})
@PreAuthorize
(
"hasAnyAuthority( 'ENT_DIVISION_RECEIVER_LIST' )"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
Api
Res
list
()
{
public
Api
PageRes
<
MchDivisionReceiver
>
list
()
{
MchDivisionReceiver
queryObject
=
getObject
(
MchDivisionReceiver
.
class
);
...
...
@@ -100,11 +118,16 @@ public class MchDivisionReceiverController extends CommonCtrl {
condition
.
orderByDesc
(
MchDivisionReceiver:
:
getCreatedAt
);
//时间倒序
IPage
<
MchDivisionReceiver
>
pages
=
mchDivisionReceiverService
.
page
(
getIPage
(
true
),
condition
);
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
/** detail */
@ApiOperation
(
"收款账号详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"recordId"
,
value
=
"分账接收者ID"
,
required
=
true
,
dataType
=
"Long"
)
})
@PreAuthorize
(
"hasAuthority( 'ENT_DIVISION_RECEIVER_VIEW' )"
)
@RequestMapping
(
value
=
"/{recordId}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
detail
(
@PathVariable
(
"recordId"
)
Long
recordId
)
{
...
...
@@ -119,6 +142,20 @@ public class MchDivisionReceiverController extends CommonCtrl {
}
/** add */
@ApiOperation
(
"新增分账接收账号"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"accName"
,
value
=
"接收方姓名"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"accNo"
,
value
=
"接收方账号"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"accType"
,
value
=
"账接收账号类型: 0-个人(对私) 1-商户(对公)"
,
required
=
true
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"divisionProfit"
,
value
=
"分账比例"
,
required
=
true
,
dataType
=
"BigDecimal"
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"支付接口代码"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"receiverAlias"
,
value
=
"接收者账号别名"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"receiverGroupId"
,
value
=
"组ID(便于商户接口使用)"
,
required
=
true
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"relationType"
,
value
=
"分账关系类型(参考微信), 如: SERVICE_PROVIDER 服务商等"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"relationTypeName"
,
value
=
"当选择自定义时,需要录入该字段。 否则为对应的名称"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority( 'ENT_DIVISION_RECEIVER_ADD' )"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
@MethodLog
(
remark
=
"新增分账接收账号"
)
...
...
@@ -151,6 +188,21 @@ public class MchDivisionReceiverController extends CommonCtrl {
}
/** update */
@ApiOperation
(
"更新分账接收账号"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"recordId"
,
value
=
"分账接收者ID"
,
required
=
true
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"accName"
,
value
=
"接收方姓名"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"accNo"
,
value
=
"接收方账号"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"accType"
,
value
=
"账接收账号类型: 0-个人(对私) 1-商户(对公)"
,
required
=
true
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"divisionProfit"
,
value
=
"分账比例"
,
required
=
true
,
dataType
=
"BigDecimal"
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"支付接口代码"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"receiverAlias"
,
value
=
"接收者账号别名"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"receiverGroupId"
,
value
=
"组ID(便于商户接口使用)"
,
required
=
true
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"relationType"
,
value
=
"分账关系类型(参考微信), 如: SERVICE_PROVIDER 服务商等"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"relationTypeName"
,
value
=
"当选择自定义时,需要录入该字段。 否则为对应的名称"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority( 'ENT_DIVISION_RECEIVER_EDIT' )"
)
@RequestMapping
(
value
=
"/{recordId}"
,
method
=
RequestMethod
.
PUT
)
@MethodLog
(
remark
=
"更新分账接收账号"
)
...
...
@@ -186,6 +238,11 @@ public class MchDivisionReceiverController extends CommonCtrl {
}
/** delete */
@ApiOperation
(
"删除分账接收账号"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"recordId"
,
value
=
"分账接收者ID"
,
required
=
true
,
dataType
=
"Long"
)
})
@PreAuthorize
(
"hasAuthority('ENT_DIVISION_RECEIVER_DELETE')"
)
@RequestMapping
(
value
=
"/{recordId}"
,
method
=
RequestMethod
.
DELETE
)
@MethodLog
(
remark
=
"删除分账接收账号"
)
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/division/MchDivisionReceiverGroupController.java
View file @
0627791b
...
...
@@ -24,10 +24,15 @@ import com.jeequan.jeepay.core.constants.CS;
import
com.jeequan.jeepay.core.entity.MchDivisionReceiver
;
import
com.jeequan.jeepay.core.entity.MchDivisionReceiverGroup
;
import
com.jeequan.jeepay.core.exception.BizException
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mch.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.MchDivisionReceiverGroupService
;
import
com.jeequan.jeepay.service.impl.MchDivisionReceiverService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -43,6 +48,7 @@ import org.springframework.web.bind.annotation.RestController;
* @site https://www.jeequan.com
* @date 2021-08-23 11:50
*/
@Api
(
tags
=
"分账管理(账号组)"
)
@RestController
@RequestMapping
(
"api/divisionReceiverGroups"
)
public
class
MchDivisionReceiverGroupController
extends
CommonCtrl
{
...
...
@@ -51,9 +57,17 @@ public class MchDivisionReceiverGroupController extends CommonCtrl {
@Autowired
private
MchDivisionReceiverService
mchDivisionReceiverService
;
/** list */
@ApiOperation
(
"账号组列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"pageNumber"
,
value
=
"分页页码"
,
dataType
=
"int"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"分页条数(-1时查全部数据)"
,
dataType
=
"int"
,
defaultValue
=
"20"
),
@ApiImplicitParam
(
name
=
"receiverGroupId"
,
value
=
"账号组ID"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"receiverGroupName"
,
value
=
"组名称"
)
})
@PreAuthorize
(
"hasAnyAuthority( 'ENT_DIVISION_RECEIVER_GROUP_LIST' )"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
Api
Res
list
()
{
public
Api
PageRes
<
MchDivisionReceiverGroup
>
list
()
{
MchDivisionReceiverGroup
queryObject
=
getObject
(
MchDivisionReceiverGroup
.
class
);
...
...
@@ -71,11 +85,16 @@ public class MchDivisionReceiverGroupController extends CommonCtrl {
condition
.
orderByDesc
(
MchDivisionReceiverGroup:
:
getCreatedAt
);
//时间倒序
IPage
<
MchDivisionReceiverGroup
>
pages
=
mchDivisionReceiverGroupService
.
page
(
getIPage
(
true
),
condition
);
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
/** detail */
@ApiOperation
(
"账号组详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"recordId"
,
value
=
"账号组ID"
,
required
=
true
,
dataType
=
"Long"
)
})
@PreAuthorize
(
"hasAuthority( 'ENT_DIVISION_RECEIVER_GROUP_VIEW' )"
)
@RequestMapping
(
value
=
"/{recordId}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
detail
(
@PathVariable
(
"recordId"
)
Long
recordId
)
{
...
...
@@ -90,6 +109,12 @@ public class MchDivisionReceiverGroupController extends CommonCtrl {
}
/** add */
@ApiOperation
(
"新增分账账号组"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"autoDivisionFlag"
,
value
=
"自动分账组(当订单分账模式为自动分账,改组将完成分账逻辑) 0-否 1-是"
,
required
=
true
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"receiverGroupName"
,
value
=
"组名称"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority( 'ENT_DIVISION_RECEIVER_GROUP_ADD' )"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
@MethodLog
(
remark
=
"新增分账账号组"
)
...
...
@@ -113,6 +138,13 @@ public class MchDivisionReceiverGroupController extends CommonCtrl {
}
/** update */
@ApiOperation
(
"更新分账账号组"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"recordId"
,
value
=
"账号组ID"
,
required
=
true
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"autoDivisionFlag"
,
value
=
"自动分账组(当订单分账模式为自动分账,改组将完成分账逻辑) 0-否 1-是"
,
required
=
true
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"receiverGroupName"
,
value
=
"组名称"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority( 'ENT_DIVISION_RECEIVER_GROUP_EDIT' )"
)
@RequestMapping
(
value
=
"/{recordId}"
,
method
=
RequestMethod
.
PUT
)
@MethodLog
(
remark
=
"更新分账账号组"
)
...
...
@@ -144,6 +176,11 @@ public class MchDivisionReceiverGroupController extends CommonCtrl {
}
/** delete */
@ApiOperation
(
"删除分账账号组"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"recordId"
,
value
=
"账号组ID"
,
required
=
true
,
dataType
=
"Long"
)
})
@PreAuthorize
(
"hasAuthority('ENT_DIVISION_RECEIVER_GROUP_DELETE')"
)
@RequestMapping
(
value
=
"/{recordId}"
,
method
=
RequestMethod
.
DELETE
)
@MethodLog
(
remark
=
"删除分账账号组"
)
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/division/PayOrderDivisionRecordController.java
View file @
0627791b
...
...
@@ -21,12 +21,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.jeequan.jeepay.components.mq.model.PayOrderDivisionMQ
;
import
com.jeequan.jeepay.components.mq.vender.IMQSender
;
import
com.jeequan.jeepay.core.constants.ApiCodeEnum
;
import
com.jeequan.jeepay.core.entity.PayOrder
;
import
com.jeequan.jeepay.core.entity.PayOrderDivisionRecord
;
import
com.jeequan.jeepay.core.exception.BizException
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mch.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.PayOrderDivisionRecordService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -42,6 +46,7 @@ import org.springframework.web.bind.annotation.RestController;
* @site https://www.jeequan.com
* @date 2021-08-25 11:50
*/
@Api
(
tags
=
"分账管理(分账记录)"
)
@RestController
@RequestMapping
(
"api/division/records"
)
public
class
PayOrderDivisionRecordController
extends
CommonCtrl
{
...
...
@@ -51,9 +56,23 @@ public class PayOrderDivisionRecordController extends CommonCtrl {
/** list */
@ApiOperation
(
"分账记录列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"pageNumber"
,
value
=
"分页页码"
,
dataType
=
"int"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"分页条数(-1时查全部数据)"
,
dataType
=
"int"
,
defaultValue
=
"20"
),
@ApiImplicitParam
(
name
=
"createdStart"
,
value
=
"日期格式字符串(yyyy-MM-dd HH:mm:ss),时间范围查询--开始时间,查询范围:大于等于此时间"
),
@ApiImplicitParam
(
name
=
"createdEnd"
,
value
=
"日期格式字符串(yyyy-MM-dd HH:mm:ss),时间范围查询--结束时间,查询范围:小于等于此时间"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
),
@ApiImplicitParam
(
name
=
"receiverId"
,
value
=
"账号快照》 分账接收者ID"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-待分账 1-分账成功, 2-分账失败"
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"receiverGroupId"
,
value
=
"账号组ID"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"accNo"
,
value
=
"账号快照》 分账接收账号"
),
@ApiImplicitParam
(
name
=
"payOrderId"
,
value
=
"系统支付订单号"
)
})
@PreAuthorize
(
"hasAnyAuthority( 'ENT_DIVISION_RECORD_LIST' )"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
Api
Res
list
()
{
public
Api
PageRes
<
PayOrderDivisionRecord
>
list
()
{
PayOrderDivisionRecord
queryObject
=
getObject
(
PayOrderDivisionRecord
.
class
);
JSONObject
paramJSON
=
getReqParamJSON
();
...
...
@@ -97,11 +116,16 @@ public class PayOrderDivisionRecordController extends CommonCtrl {
condition
.
orderByDesc
(
PayOrderDivisionRecord:
:
getCreatedAt
);
//时间倒序
IPage
<
PayOrderDivisionRecord
>
pages
=
payOrderDivisionRecordService
.
page
(
getIPage
(
true
),
condition
);
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
/** detail */
@ApiOperation
(
"分账记录详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"recordId"
,
value
=
"分账记录ID"
,
required
=
true
,
dataType
=
"Long"
)
})
@PreAuthorize
(
"hasAuthority( 'ENT_DIVISION_RECORD_VIEW' )"
)
@RequestMapping
(
value
=
"/{recordId}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
detail
(
@PathVariable
(
"recordId"
)
Long
recordId
)
{
...
...
@@ -118,6 +142,11 @@ public class PayOrderDivisionRecordController extends CommonCtrl {
/** 分账接口重试 */
@ApiOperation
(
"分账接口重试"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"recordId"
,
value
=
"分账记录ID"
,
required
=
true
,
dataType
=
"Long"
)
})
@PreAuthorize
(
"hasAuthority( 'ENT_DIVISION_RECORD_RESEND' )"
)
@RequestMapping
(
value
=
"/resend/{recordId}"
,
method
=
RequestMethod
.
POST
)
public
ApiRes
resend
(
@PathVariable
(
"recordId"
)
Long
recordId
)
{
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MainChartController.java
View file @
0627791b
...
...
@@ -24,6 +24,10 @@ import com.jeequan.jeepay.mch.ctrl.CommonCtrl;
import
com.jeequan.jeepay.service.impl.MchInfoService
;
import
com.jeequan.jeepay.service.impl.PayOrderService
;
import
com.jeequan.jeepay.service.impl.SysUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -42,6 +46,7 @@ import java.util.Map;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"主页统计"
)
@Slf4j
@RestController
@RequestMapping
(
"api/mainChart"
)
...
...
@@ -55,6 +60,10 @@ public class MainChartController extends CommonCtrl {
/** 周交易总金额 */
@ApiOperation
(
"周交易总金额"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_MAIN_PAY_AMOUNT_WEEK')"
)
@RequestMapping
(
value
=
"/payAmountWeek"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
payAmountWeek
()
{
...
...
@@ -65,6 +74,10 @@ public class MainChartController extends CommonCtrl {
* 商户总数量、服务商总数量、总交易金额、总交易笔数
* @return
*/
@ApiOperation
(
"商户总数量、服务商总数量、总交易金额、总交易笔数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_MAIN_NUMBER_COUNT')"
)
@RequestMapping
(
value
=
"/numCount"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
numCount
()
{
...
...
@@ -72,9 +85,15 @@ public class MainChartController extends CommonCtrl {
}
/** 交易统计 */
@ApiOperation
(
"交易统计"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"createdStart"
,
value
=
"日期格式字符串(yyyy-MM-dd),时间范围查询--开始时间,须和结束时间一起使用,否则默认查最近七天(含今天)"
),
@ApiImplicitParam
(
name
=
"createdEnd"
,
value
=
"日期格式字符串(yyyy-MM-dd),时间范围查询--结束时间,须和开始时间一起使用,否则默认查最近七天(含今天)"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_MAIN_PAY_COUNT')"
)
@RequestMapping
(
value
=
"/payCount"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
payCount
()
{
public
ApiRes
<
List
<
Map
>>
payCount
()
{
// 获取传入参数
JSONObject
paramJSON
=
getReqParamJSON
();
String
createdStart
=
paramJSON
.
getString
(
"createdStart"
);
...
...
@@ -86,9 +105,15 @@ public class MainChartController extends CommonCtrl {
}
/** 支付方式统计 */
@ApiOperation
(
"支付方式统计"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"createdStart"
,
value
=
"日期格式字符串(yyyy-MM-dd),时间范围查询--开始时间,须和结束时间一起使用,否则默认查最近七天(含今天)"
),
@ApiImplicitParam
(
name
=
"createdEnd"
,
value
=
"日期格式字符串(yyyy-MM-dd),时间范围查询--结束时间,须和开始时间一起使用,否则默认查最近七天(含今天)"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_MAIN_PAY_TYPE_COUNT')"
)
@RequestMapping
(
value
=
"/payTypeCount"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
payWayCount
()
{
public
ApiRes
<
ArrayList
>
payWayCount
()
{
JSONObject
paramJSON
=
getReqParamJSON
();
// 开始、结束时间
String
createdStart
=
paramJSON
.
getString
(
"createdStart"
);
...
...
@@ -98,6 +123,10 @@ public class MainChartController extends CommonCtrl {
}
/** 商户基本信息、用户基本信息 **/
@ApiOperation
(
"商户基本信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_MAIN_USER_INFO')"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
ApiRes
userDetail
()
{
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MchAppController.java
View file @
0627791b
...
...
@@ -16,19 +16,21 @@
package
com.jeequan.jeepay.mch.ctrl.merchant
;
import
cn.hutool.core.util.IdUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jeequan.jeepay.components.mq.model.ResetIsvMchAppInfoConfigMQ
;
import
com.jeequan.jeepay.components.mq.vender.IMQSender
;
import
com.jeequan.jeepay.core.aop.MethodLog
;
import
com.jeequan.jeepay.core.constants.ApiCodeEnum
;
import
com.jeequan.jeepay.core.constants.CS
;
import
com.jeequan.jeepay.core.entity.MchApp
;
import
com.jeequan.jeepay.core.exception.BizException
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.core.utils.JsonKit
;
import
com.jeequan.jeepay.mch.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.MchAppService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -40,6 +42,7 @@ import org.springframework.web.bind.annotation.*;
* @site https://www.jeequan.com
* @date 2021-06-16 09:15
*/
@Api
(
tags
=
"商户应用管理"
)
@RestController
@RequestMapping
(
"/api/mchApps"
)
public
class
MchAppController
extends
CommonCtrl
{
...
...
@@ -52,14 +55,23 @@ public class MchAppController extends CommonCtrl {
* @Description: 应用列表
* @Date: 9:59 2021/6/16
*/
@ApiOperation
(
"查询应用列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"pageNumber"
,
value
=
"分页页码"
,
dataType
=
"int"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"分页条数"
,
dataType
=
"int"
,
defaultValue
=
"20"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
),
@ApiImplicitParam
(
name
=
"appName"
,
value
=
"应用名称"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-启用"
,
dataType
=
"Byte"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_APP_LIST')"
)
@GetMapping
public
Api
Res
list
()
{
public
Api
PageRes
<
MchApp
>
list
()
{
MchApp
mchApp
=
getObject
(
MchApp
.
class
);
mchApp
.
setMchNo
(
getCurrentMchNo
());
IPage
<
MchApp
>
pages
=
mchAppService
.
selectPage
(
getIPage
(
true
),
mchApp
);
return
Api
Res
.
ok
(
pages
);
return
Api
PageRes
.
pages
(
pages
);
}
/**
...
...
@@ -67,6 +79,14 @@ public class MchAppController extends CommonCtrl {
* @Description: 新建应用
* @Date: 10:05 2021/6/16
*/
@ApiOperation
(
"新建应用"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"appName"
,
value
=
"应用名称"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"appSecret"
,
value
=
"应用私钥"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"remark"
,
value
=
"备注"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-启用"
,
dataType
=
"Byte"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_APP_ADD')"
)
@MethodLog
(
remark
=
"新建应用"
)
@PostMapping
...
...
@@ -87,6 +107,11 @@ public class MchAppController extends CommonCtrl {
* @Description: 应用详情
* @Date: 10:13 2021/6/16
*/
@ApiOperation
(
"应用详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
)
})
@PreAuthorize
(
"hasAnyAuthority('ENT_MCH_APP_VIEW', 'ENT_MCH_APP_EDIT')"
)
@GetMapping
(
"/{appId}"
)
public
ApiRes
detail
(
@PathVariable
(
"appId"
)
String
appId
)
{
...
...
@@ -104,6 +129,15 @@ public class MchAppController extends CommonCtrl {
* @Description: 更新应用信息
* @Date: 10:11 2021/6/16
*/
@ApiOperation
(
"更新应用信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"appName"
,
value
=
"应用名称"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"appSecret"
,
value
=
"应用私钥"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"remark"
,
value
=
"备注"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-启用"
,
dataType
=
"Byte"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_APP_EDIT')"
)
@MethodLog
(
remark
=
"更新应用信息"
)
@PutMapping
(
"/{appId}"
)
...
...
@@ -130,6 +164,11 @@ public class MchAppController extends CommonCtrl {
* @Description: 删除应用
* @Date: 10:14 2021/6/16
*/
@ApiOperation
(
"删除应用"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_APP_DEL')"
)
@MethodLog
(
remark
=
"删除应用"
)
@DeleteMapping
(
"/{appId}"
)
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MchPayInterfaceConfigController.java
View file @
0627791b
...
...
@@ -29,6 +29,10 @@ import com.jeequan.jeepay.core.model.params.NormalMchParams;
import
com.jeequan.jeepay.core.utils.StringKit
;
import
com.jeequan.jeepay.mch.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.*
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -46,6 +50,7 @@ import java.util.Set;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"商户支付接口管理"
)
@RestController
@RequestMapping
(
"/api/mch/payConfigs"
)
public
class
MchPayInterfaceConfigController
extends
CommonCtrl
{
...
...
@@ -61,9 +66,14 @@ public class MchPayInterfaceConfigController extends CommonCtrl {
* @Description: 查询商户支付接口配置列表
* @Date: 10:51 2021/5/13
*/
@ApiOperation
(
"查询应用支付接口配置列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_PAY_CONFIG_LIST')"
)
@GetMapping
public
ApiRes
list
()
{
public
ApiRes
<
List
<
PayInterfaceDefine
>>
list
()
{
MchInfo
mchInfo
=
mchInfoService
.
getById
(
getCurrentUser
().
getSysUser
().
getBelongInfoId
());
List
<
PayInterfaceDefine
>
list
=
payInterfaceConfigService
.
selectAllPayIfConfigListByAppId
(
getValStringRequired
(
"appId"
));
...
...
@@ -80,6 +90,12 @@ public class MchPayInterfaceConfigController extends CommonCtrl {
* @Description: 根据 商户号、接口类型 获取商户参数配置
* @Date: 10:54 2021/5/13
*/
@ApiOperation
(
"根据应用ID、接口类型 获取应用参数配置"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"接口类型代码"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_PAY_CONFIG_VIEW')"
)
@GetMapping
(
"/{appId}/{ifCode}"
)
public
ApiRes
getByMchNo
(
@PathVariable
(
value
=
"appId"
)
String
appId
,
@PathVariable
(
value
=
"ifCode"
)
String
ifCode
)
{
...
...
@@ -111,6 +127,12 @@ public class MchPayInterfaceConfigController extends CommonCtrl {
* @Description: 更新商户支付参数
* @Date: 10:56 2021/5/13
*/
@ApiOperation
(
"更新商户支付参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"infoId"
,
value
=
"应用AppId"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"接口类型代码"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_PAY_CONFIG_ADD')"
)
@PostMapping
@MethodLog
(
remark
=
"更新商户支付参数"
)
...
...
@@ -157,6 +179,11 @@ public class MchPayInterfaceConfigController extends CommonCtrl {
}
/** 查询支付宝商户授权URL **/
@ApiOperation
(
"查询支付宝商户授权URL"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"mchAppId"
,
value
=
"应用ID"
,
required
=
true
)
})
@GetMapping
(
"/alipayIsvsubMchAuthUrls/{mchAppId}"
)
public
ApiRes
queryAlipayIsvsubMchAuthUrl
(
@PathVariable
String
mchAppId
)
{
...
...
@@ -179,9 +206,14 @@ public class MchPayInterfaceConfigController extends CommonCtrl {
/** 查询当前应用支持的支付接口 */
@ApiOperation
(
"查询当前应用支持的支付接口"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority( 'ENT_DIVISION_RECEIVER_ADD' )"
)
@RequestMapping
(
value
=
"ifCodes/{appId}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
getIfCodeByAppId
(
@PathVariable
(
"appId"
)
String
appId
)
{
public
ApiRes
<
Set
<
String
>>
getIfCodeByAppId
(
@PathVariable
(
"appId"
)
String
appId
)
{
if
(
mchAppService
.
count
(
MchApp
.
gw
().
eq
(
MchApp:
:
getMchNo
,
getCurrentMchNo
()).
eq
(
MchApp:
:
getAppId
,
appId
))
<=
0
){
throw
new
BizException
(
"商户应用不存在"
);
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MchPayPassageConfigController.java
View file @
0627791b
...
...
@@ -26,11 +26,16 @@ import com.jeequan.jeepay.core.constants.CS;
import
com.jeequan.jeepay.core.entity.MchInfo
;
import
com.jeequan.jeepay.core.entity.MchPayPassage
;
import
com.jeequan.jeepay.core.entity.PayWay
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mch.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.MchInfoService
;
import
com.jeequan.jeepay.service.impl.MchPayPassageService
;
import
com.jeequan.jeepay.service.impl.PayWayService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -47,6 +52,7 @@ import java.util.List;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"商户支付通道管理"
)
@RestController
@RequestMapping
(
"/api/mch/payPassages"
)
public
class
MchPayPassageConfigController
extends
CommonCtrl
{
...
...
@@ -60,9 +66,18 @@ public class MchPayPassageConfigController extends CommonCtrl {
* @Description: 查询支付方式列表,并添加是否配置支付通道状态
* @Date: 10:58 2021/5/13
*/
@ApiOperation
(
"查询支付方式列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"pageNumber"
,
value
=
"分页页码"
,
dataType
=
"int"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"分页条数"
,
dataType
=
"int"
,
defaultValue
=
"20"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"wayCode"
,
value
=
"支付方式代码"
),
@ApiImplicitParam
(
name
=
"wayName"
,
value
=
"支付方式名称"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_PAY_PASSAGE_LIST')"
)
@GetMapping
public
Api
Res
list
()
{
public
Api
PageRes
<
PayWay
>
list
()
{
String
appId
=
getValStringRequired
(
"appId"
);
String
wayCode
=
getValString
(
"wayCode"
);
...
...
@@ -103,14 +118,21 @@ public class MchPayPassageConfigController extends CommonCtrl {
}
}
return
ApiRes
.
page
(
payWayPage
);
return
Api
Page
Res
.
page
s
(
payWayPage
);
}
/**
* @Author: ZhuXiao
* @Description: 根据appId、支付方式查询可用的支付接口列表
* @Date: 11:05 2021/5/13
* @return
*/
@ApiOperation
(
"根据[应用ID]、[支付方式代码]查询可用的支付接口列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"wayCode"
,
value
=
"支付方式代码"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_PAY_PASSAGE_CONFIG')"
)
@GetMapping
(
"/availablePayInterface/{appId}/{wayCode}"
)
public
ApiRes
availablePayInterface
(
@PathVariable
(
"appId"
)
String
appId
,
@PathVariable
(
"wayCode"
)
String
wayCode
)
{
...
...
@@ -132,6 +154,11 @@ public class MchPayPassageConfigController extends CommonCtrl {
* @Description:
* @Date: 11:05 2021/5/13
*/
@ApiOperation
(
"商户支付通道详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"id"
,
value
=
"支付通道ID"
,
required
=
true
)
})
@GetMapping
(
"/{id}"
)
public
ApiRes
detail
(
@PathVariable
(
"id"
)
Long
id
)
{
MchPayPassage
payPassage
=
mchPayPassageService
.
getById
(
id
);
...
...
@@ -150,6 +177,11 @@ public class MchPayPassageConfigController extends CommonCtrl {
* @Description: 应用支付通道配置
* @Date: 11:05 2021/5/13
*/
@ApiOperation
(
"更新商户支付通道"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"reqParams"
,
value
=
"商户支付通道配置信息"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_PAY_PASSAGE_ADD')"
)
@PostMapping
@MethodLog
(
remark
=
"更新应用支付通道"
)
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/order/PayOrderController.java
View file @
0627791b
...
...
@@ -25,6 +25,7 @@ import com.jeequan.jeepay.core.entity.MchApp;
import
com.jeequan.jeepay.core.entity.PayOrder
;
import
com.jeequan.jeepay.core.entity.PayWay
;
import
com.jeequan.jeepay.core.exception.BizException
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.core.utils.SeqKit
;
import
com.jeequan.jeepay.exception.JeepayException
;
...
...
@@ -36,6 +37,10 @@ import com.jeequan.jeepay.service.impl.MchAppService;
import
com.jeequan.jeepay.service.impl.PayOrderService
;
import
com.jeequan.jeepay.service.impl.PayWayService
;
import
com.jeequan.jeepay.service.impl.SysConfigService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -53,6 +58,7 @@ import java.util.Map;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"订单管理(支付类)"
)
@RestController
@RequestMapping
(
"/api/payOrder"
)
public
class
PayOrderController
extends
CommonCtrl
{
...
...
@@ -67,9 +73,23 @@ public class PayOrderController extends CommonCtrl {
* @Description: 订单信息列表
* @Date: 10:43 2021/5/13
*/
@ApiOperation
(
"支付订单信息列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"pageNumber"
,
value
=
"分页页码"
,
dataType
=
"int"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"分页条数"
,
dataType
=
"int"
,
defaultValue
=
"20"
),
@ApiImplicitParam
(
name
=
"createdStart"
,
value
=
"日期格式字符串(yyyy-MM-dd HH:mm:ss),时间范围查询--开始时间,查询范围:大于等于此时间"
),
@ApiImplicitParam
(
name
=
"createdEnd"
,
value
=
"日期格式字符串(yyyy-MM-dd HH:mm:ss),时间范围查询--结束时间,查询范围:小于等于此时间"
),
@ApiImplicitParam
(
name
=
"unionOrderId"
,
value
=
"支付/商户/渠道订单号"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
),
@ApiImplicitParam
(
name
=
"wayCode"
,
value
=
"支付方式代码"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"支付状态: 0-订单生成, 1-支付中, 2-支付成功, 3-支付失败, 4-已撤销, 5-已退款, 6-订单关闭"
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"notifyState"
,
value
=
"向下游回调状态, 0-未发送, 1-已发送"
),
@ApiImplicitParam
(
name
=
"divisionState"
,
value
=
"0-未发生分账, 1-等待分账任务处理, 2-分账处理中, 3-分账任务已结束(不体现状态)"
)
})
@PreAuthorize
(
"hasAuthority('ENT_ORDER_LIST')"
)
@GetMapping
public
Api
Res
list
()
{
public
Api
PageRes
<
PayOrder
>
list
()
{
PayOrder
payOrder
=
getObject
(
PayOrder
.
class
);
JSONObject
paramJSON
=
getReqParamJSON
();
...
...
@@ -96,7 +116,7 @@ public class PayOrderController extends CommonCtrl {
}
}
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
/**
...
...
@@ -104,6 +124,11 @@ public class PayOrderController extends CommonCtrl {
* @Description: 支付订单信息
* @Date: 10:43 2021/5/13
*/
@ApiOperation
(
"支付订单信息详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"payOrderId"
,
value
=
"支付订单号"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_PAY_ORDER_VIEW')"
)
@GetMapping
(
"/{payOrderId}"
)
public
ApiRes
detail
(
@PathVariable
(
"payOrderId"
)
String
payOrderId
)
{
...
...
@@ -124,6 +149,12 @@ public class PayOrderController extends CommonCtrl {
* @site https://www.jeequan.com
* @date 2021/6/17 16:38
*/
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"payOrderId"
,
value
=
"支付订单号"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"refundAmount"
,
value
=
"退款金额"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"refundReason"
,
value
=
"退款原因"
,
required
=
true
)
})
@MethodLog
(
remark
=
"发起订单退款"
)
@PreAuthorize
(
"hasAuthority('ENT_PAY_ORDER_REFUND')"
)
@PostMapping
(
"/refunds/{payOrderId}"
)
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/order/RefundOrderController.java
View file @
0627791b
...
...
@@ -20,10 +20,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jeequan.jeepay.core.constants.ApiCodeEnum
;
import
com.jeequan.jeepay.core.entity.RefundOrder
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mch.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.RefundOrderService
;
import
org.apache.commons.lang3.StringUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -38,6 +42,7 @@ import org.springframework.web.bind.annotation.RestController;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"订单管理(退款类)"
)
@RestController
@RequestMapping
(
"/api/refundOrder"
)
public
class
RefundOrderController
extends
CommonCtrl
{
...
...
@@ -49,9 +54,21 @@ public class RefundOrderController extends CommonCtrl {
* @Description: 退款订单信息列表
* @Date: 10:44 2021/5/13
*/
@ApiOperation
(
"退款订单信息列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"pageNumber"
,
value
=
"分页页码"
,
dataType
=
"int"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"分页条数"
,
dataType
=
"int"
,
defaultValue
=
"20"
),
@ApiImplicitParam
(
name
=
"createdStart"
,
value
=
"日期格式字符串(yyyy-MM-dd HH:mm:ss),时间范围查询--开始时间,查询范围:大于等于此时间"
),
@ApiImplicitParam
(
name
=
"createdEnd"
,
value
=
"日期格式字符串(yyyy-MM-dd HH:mm:ss),时间范围查询--结束时间,查询范围:小于等于此时间"
),
@ApiImplicitParam
(
name
=
"unionOrderId"
,
value
=
"支付/退款订单号"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-退款任务关闭"
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"mchType"
,
value
=
"类型: 1-普通商户, 2-特约商户(服务商模式)"
)
})
@PreAuthorize
(
"hasAuthority('ENT_REFUND_LIST')"
)
@GetMapping
public
Api
Res
list
()
{
public
Api
PageRes
<
RefundOrder
>
list
()
{
RefundOrder
refundOrder
=
getObject
(
RefundOrder
.
class
);
JSONObject
paramJSON
=
getReqParamJSON
();
...
...
@@ -59,7 +76,7 @@ public class RefundOrderController extends CommonCtrl {
wrapper
.
eq
(
RefundOrder:
:
getMchNo
,
getCurrentMchNo
());
IPage
<
RefundOrder
>
pages
=
refundOrderService
.
pageList
(
getIPage
(),
wrapper
,
refundOrder
,
paramJSON
);
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
/**
...
...
@@ -67,6 +84,11 @@ public class RefundOrderController extends CommonCtrl {
* @Description: 退款订单信息
* @Date: 10:44 2021/5/13
*/
@ApiOperation
(
"退款订单信息详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"refundOrderId"
,
value
=
"退款订单号"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_REFUND_ORDER_VIEW')"
)
@GetMapping
(
"/{refundOrderId}"
)
public
ApiRes
detail
(
@PathVariable
(
"refundOrderId"
)
String
refundOrderId
)
{
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/order/TransferOrderController.java
View file @
0627791b
...
...
@@ -20,9 +20,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jeequan.jeepay.core.constants.ApiCodeEnum
;
import
com.jeequan.jeepay.core.entity.TransferOrder
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mch.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.TransferOrderService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -38,6 +43,7 @@ import org.springframework.web.bind.annotation.RestController;
* @site https://www.jeequan.com
* @date 2021/8/13 10:52
*/
@Api
(
tags
=
"订单管理(转账类)"
)
@RestController
@RequestMapping
(
"/api/transferOrders"
)
public
class
TransferOrderController
extends
CommonCtrl
{
...
...
@@ -45,9 +51,20 @@ public class TransferOrderController extends CommonCtrl {
@Autowired
private
TransferOrderService
transferOrderService
;
/** list **/
@ApiOperation
(
"转账订单信息列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"pageNumber"
,
value
=
"分页页码"
,
dataType
=
"int"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"分页条数"
,
dataType
=
"int"
,
defaultValue
=
"20"
),
@ApiImplicitParam
(
name
=
"createdStart"
,
value
=
"日期格式字符串(yyyy-MM-dd HH:mm:ss),时间范围查询--开始时间,查询范围:大于等于此时间"
),
@ApiImplicitParam
(
name
=
"createdEnd"
,
value
=
"日期格式字符串(yyyy-MM-dd HH:mm:ss),时间范围查询--结束时间,查询范围:小于等于此时间"
),
@ApiImplicitParam
(
name
=
"unionOrderId"
,
value
=
"转账/商户/渠道订单号"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"支付状态: 0-订单生成, 1-转账中, 2-转账成功, 3-转账失败, 4-订单关闭"
,
dataType
=
"Byte"
)
})
@PreAuthorize
(
"hasAuthority('ENT_TRANSFER_ORDER_LIST')"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
Api
Res
list
()
{
public
Api
PageRes
<
TransferOrder
>
list
()
{
TransferOrder
transferOrder
=
getObject
(
TransferOrder
.
class
);
JSONObject
paramJSON
=
getReqParamJSON
();
...
...
@@ -55,10 +72,15 @@ public class TransferOrderController extends CommonCtrl {
wrapper
.
eq
(
TransferOrder:
:
getMchNo
,
getCurrentMchNo
());
IPage
<
TransferOrder
>
pages
=
transferOrderService
.
pageList
(
getIPage
(),
wrapper
,
transferOrder
,
paramJSON
);
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
/** detail **/
@ApiOperation
(
"转账订单信息详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"recordId"
,
value
=
"转账订单号"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_TRANSFER_ORDER_VIEW')"
)
@RequestMapping
(
value
=
"/{recordId}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
detail
(
@PathVariable
(
"recordId"
)
String
transferId
)
{
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/payconfig/PayWayController.java
View file @
0627791b
...
...
@@ -18,11 +18,15 @@ package com.jeequan.jeepay.mch.ctrl.payconfig;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jeequan.jeepay.core.entity.PayWay
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.core.model.Api
Page
Res
;
import
com.jeequan.jeepay.mch.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.MchPayPassageService
;
import
com.jeequan.jeepay.service.impl.PayOrderService
;
import
com.jeequan.jeepay.service.impl.PayWayService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -37,6 +41,7 @@ import org.springframework.web.bind.annotation.RestController;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"支付方式配置"
)
@RestController
@RequestMapping
(
"api/payWays"
)
public
class
PayWayController
extends
CommonCtrl
{
...
...
@@ -50,9 +55,17 @@ public class PayWayController extends CommonCtrl {
* @Description: list
* @Date: 15:52 2021/4/27
*/
@ApiOperation
(
"支付方式列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"pageNumber"
,
value
=
"分页页码"
,
dataType
=
"int"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"分页条数(-1时查全部数据)"
,
dataType
=
"int"
,
defaultValue
=
"20"
),
@ApiImplicitParam
(
name
=
"wayCode"
,
value
=
"支付方式代码"
),
@ApiImplicitParam
(
name
=
"wayName"
,
value
=
"支付方式名称"
)
})
@PreAuthorize
(
"hasAuthority('ENT_PAY_ORDER_SEARCH_PAY_WAY')"
)
@GetMapping
public
Api
Res
list
()
{
public
Api
PageRes
<
PayWay
>
list
()
{
PayWay
queryObject
=
getObject
(
PayWay
.
class
);
...
...
@@ -67,7 +80,7 @@ public class PayWayController extends CommonCtrl {
IPage
<
PayWay
>
pages
=
payWayService
.
page
(
getIPage
(
true
),
condition
);
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
}
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/paytest/PaytestController.java
View file @
0627791b
...
...
@@ -31,6 +31,10 @@ import com.jeequan.jeepay.response.PayOrderCreateResponse;
import
com.jeequan.jeepay.service.impl.MchAppService
;
import
com.jeequan.jeepay.service.impl.MchPayPassageService
;
import
com.jeequan.jeepay.service.impl.SysConfigService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -46,6 +50,7 @@ import java.util.Set;
* @site https://www.jeequan.com
* @date 2021/6/22 9:43
*/
@Api
(
tags
=
"支付测试"
)
@RestController
@RequestMapping
(
"/api/paytest"
)
public
class
PaytestController
extends
CommonCtrl
{
...
...
@@ -55,9 +60,14 @@ public class PaytestController extends CommonCtrl {
@Autowired
private
SysConfigService
sysConfigService
;
/** 查询商户对应应用下支持的支付方式 **/
@ApiOperation
(
"查询商户对应应用下支持的支付方式"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_PAY_TEST_PAYWAY_LIST')"
)
@GetMapping
(
"/payways/{appId}"
)
public
ApiRes
payWayList
(
@PathVariable
(
"appId"
)
String
appId
)
{
public
ApiRes
<
Set
<
String
>>
payWayList
(
@PathVariable
(
"appId"
)
String
appId
)
{
Set
<
String
>
payWaySet
=
new
HashSet
<>();
mchPayPassageService
.
list
(
...
...
@@ -72,6 +82,24 @@ public class PaytestController extends CommonCtrl {
/** 调起下单接口 **/
@ApiOperation
(
"调起下单接口"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"mchOrderNo"
,
value
=
"商户订单号"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"wayCode"
,
value
=
"支付方式代码"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"amount"
,
value
=
"转账金额,单位元"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"returnUrl"
,
value
=
"页面跳转地址"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"divisionMode"
,
value
=
"订单分账模式:0-该笔订单不允许分账, 1-支付成功按配置自动完成分账, 2-商户手动分账(解冻商户金额)"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"orderTitle"
,
value
=
"订单标题"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"expiredTime"
,
value
=
"过期时间"
),
@ApiImplicitParam
(
name
=
"clientIp"
,
value
=
"客户端IP"
),
@ApiImplicitParam
(
name
=
"notifyUrl"
,
value
=
"通知地址"
),
@ApiImplicitParam
(
name
=
"channelExtra"
,
value
=
"特定渠道发起时额外参数"
),
@ApiImplicitParam
(
name
=
"payDataType"
,
value
=
"支付数据包 类型,eg:form--表单提交,wxapp--微信app参数,aliapp--支付宝app参数,ysfapp--云闪付app参数,codeUrl--二维码URL,codeImgUrl--二维码图片显示URL,none--无参数"
),
@ApiImplicitParam
(
name
=
"authCode"
,
value
=
"支付条码"
),
@ApiImplicitParam
(
name
=
"extParam"
,
value
=
"扩展参数"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_PAY_TEST_DO')"
)
@PostMapping
(
"/payOrders"
)
public
ApiRes
doPay
()
{
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/paytest/PaytestNotifyController.java
View file @
0627791b
...
...
@@ -17,15 +17,15 @@ package com.jeequan.jeepay.mch.ctrl.paytest;
import
com.alibaba.fastjson.JSONObject
;
import
com.jeequan.jeepay.core.entity.MchApp
;
import
com.jeequan.jeepay.core.model.OriginalRes
;
import
com.jeequan.jeepay.mch.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.mch.websocket.server.WsPayOrderServer
;
import
com.jeequan.jeepay.service.impl.MchAppService
;
import
com.jeequan.jeepay.service.impl.MchPayPassageService
;
import
com.jeequan.jeepay.service.impl.SysConfigService
;
import
com.jeequan.jeepay.util.JeepayKit
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -38,12 +38,19 @@ import java.io.IOException;
* @site https://www.jeequan.com
* @date 2021/6/22 14:22
*/
@Api
(
tags
=
"支付测试"
)
@RestController
@RequestMapping
(
"/api/anon/paytestNotify"
)
public
class
PaytestNotifyController
extends
CommonCtrl
{
@Autowired
private
MchAppService
mchAppService
;
@ApiOperation
(
"支付回调信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"mchNo"
,
value
=
"商户号"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"sign"
,
value
=
"签名值"
,
required
=
true
)
})
@RequestMapping
(
"/payOrder"
)
public
void
payOrderNotify
()
throws
IOException
{
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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