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
496865c8
Commit
496865c8
authored
Jun 15, 2023
by
yurong
Browse files
运营平台完善knife4j接口描述
parent
1fd61f3e
Changes
44
Hide whitespace changes
Inline
Side-by-side
jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysUserRoleRela.java
View file @
496865c8
...
...
@@ -17,6 +17,8 @@ package com.jeequan.jeepay.core.entity;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
...
...
@@ -31,6 +33,7 @@ import java.io.Serializable;
* @author [mybatis plus generator]
* @since 2021-04-23
*/
@ApiModel
(
value
=
"操作员<->角色 关联表"
,
description
=
""
)
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
...
...
@@ -47,11 +50,13 @@ public class SysUserRoleRela implements Serializable {
/**
* 用户ID
*/
@ApiModelProperty
(
value
=
"用户ID"
)
private
Long
userId
;
/**
* 角色ID
*/
@ApiModelProperty
(
value
=
"角色ID"
)
private
String
roleId
;
...
...
jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/TransferOrder.java
View file @
496865c8
...
...
@@ -18,6 +18,8 @@ package com.jeequan.jeepay.core.entity;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
...
...
@@ -33,6 +35,7 @@ import java.util.Date;
* @author [mybatis plus generator]
* @since 2021-08-11
*/
@ApiModel
(
value
=
"转账订单表"
,
description
=
""
)
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
...
...
@@ -61,132 +64,158 @@ public class TransferOrder implements Serializable {
/**
* 转账订单号
*/
@ApiModelProperty
(
value
=
"转账订单号"
)
@TableId
private
String
transferId
;
/**
* 商户号
*/
@ApiModelProperty
(
value
=
"商户号"
)
private
String
mchNo
;
/**
* 服务商号
*/
@ApiModelProperty
(
value
=
"服务商号"
)
private
String
isvNo
;
/**
* 应用ID
*/
@ApiModelProperty
(
value
=
"应用ID"
)
private
String
appId
;
/**
* 商户名称
*/
@ApiModelProperty
(
value
=
"商户名称"
)
private
String
mchName
;
/**
* 类型: 1-普通商户, 2-特约商户(服务商模式)
*/
@ApiModelProperty
(
value
=
"类型: 1-普通商户, 2-特约商户(服务商模式)"
)
private
Byte
mchType
;
/**
* 商户订单号
*/
@ApiModelProperty
(
value
=
"商户订单号"
)
private
String
mchOrderNo
;
/**
* 支付接口代码
*/
@ApiModelProperty
(
value
=
"支付接口代码"
)
private
String
ifCode
;
/**
* 入账方式: WX_CASH-微信零钱; ALIPAY_CASH-支付宝转账; BANK_CARD-银行卡
*/
@ApiModelProperty
(
value
=
"入账方式: WX_CASH-微信零钱; ALIPAY_CASH-支付宝转账; BANK_CARD-银行卡"
)
private
String
entryType
;
/**
* 转账金额,单位分
*/
@ApiModelProperty
(
value
=
"转账金额,单位分"
)
private
Long
amount
;
/**
* 三位货币代码,人民币:cny
*/
@ApiModelProperty
(
value
=
"三位货币代码,人民币:cny"
)
private
String
currency
;
/**
* 收款账号
*/
@ApiModelProperty
(
value
=
"收款账号"
)
private
String
accountNo
;
/**
* 收款人姓名
*/
@ApiModelProperty
(
value
=
"收款人姓名"
)
private
String
accountName
;
/**
* 收款人开户行名称
*/
@ApiModelProperty
(
value
=
"收款人开户行名称"
)
private
String
bankName
;
/**
* 转账备注信息
*/
@ApiModelProperty
(
value
=
"转账备注信息"
)
private
String
transferDesc
;
/**
* 客户端IP
*/
@ApiModelProperty
(
value
=
"客户端IP"
)
private
String
clientIp
;
/**
* 支付状态: 0-订单生成, 1-转账中, 2-转账成功, 3-转账失败, 4-订单关闭
*/
@ApiModelProperty
(
value
=
"支付状态: 0-订单生成, 1-转账中, 2-转账成功, 3-转账失败, 4-订单关闭"
)
private
Byte
state
;
/**
* 特定渠道发起额外参数
*/
@ApiModelProperty
(
value
=
"特定渠道发起额外参数"
)
private
String
channelExtra
;
/**
* 渠道订单号
*/
@ApiModelProperty
(
value
=
"渠道订单号"
)
private
String
channelOrderNo
;
/**
* 渠道支付错误码
*/
@ApiModelProperty
(
value
=
"渠道支付错误码"
)
private
String
errCode
;
/**
* 渠道支付错误描述
*/
@ApiModelProperty
(
value
=
"渠道支付错误描述"
)
private
String
errMsg
;
/**
* 商户扩展参数
*/
@ApiModelProperty
(
value
=
"商户扩展参数"
)
private
String
extParam
;
/**
* 异步通知地址
*/
@ApiModelProperty
(
value
=
"异步通知地址"
)
private
String
notifyUrl
;
/**
* 转账成功时间
*/
@ApiModelProperty
(
value
=
"转账成功时间"
)
private
Date
successTime
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createdAt
;
/**
* 更新时间
*/
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updatedAt
;
}
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/CurrentUserController.java
View file @
496865c8
...
...
@@ -31,6 +31,10 @@ import com.jeequan.jeepay.core.model.security.JeeUserDetails;
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
;
...
...
@@ -46,6 +50,7 @@ import java.util.*;
* @site https://www.jeequan.com
* @date 2021/6/8 17:10
*/
@Api
(
tags
=
"登录者信息"
)
@RestController
@RequestMapping
(
"api/current"
)
public
class
CurrentUserController
extends
CommonCtrl
{
...
...
@@ -54,6 +59,7 @@ public class CurrentUserController extends CommonCtrl{
@Autowired
private
SysUserService
sysUserService
;
@Autowired
private
SysUserAuthService
sysUserAuthService
;
@ApiOperation
(
"查询当前登录者的用户信息"
)
@RequestMapping
(
value
=
"/user"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
currentUserInfo
()
{
...
...
@@ -90,6 +96,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-女"
)
})
@RequestMapping
(
value
=
"/user"
,
method
=
RequestMethod
.
PUT
)
@MethodLog
(
remark
=
"修改信息"
)
public
ApiRes
modifyCurrentUserInfo
()
{
...
...
@@ -122,6 +135,12 @@ public class CurrentUserController extends CommonCtrl{
/** 修改密码 */
@ApiOperation
(
"修改个人信息--安全信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"confirmPwd"
,
value
=
"新密码"
),
@ApiImplicitParam
(
name
=
"originalPwd"
,
value
=
"原密码"
)
})
@RequestMapping
(
value
=
"modifyPwd"
,
method
=
RequestMethod
.
PUT
)
@MethodLog
(
remark
=
"修改密码"
)
public
ApiRes
modifyPwd
()
throws
BizException
{
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/anon/AuthController.java
View file @
496865c8
...
...
@@ -83,6 +83,7 @@ public class AuthController extends CommonCtrl {
}
/** 图片验证码 **/
@ApiOperation
(
"图片验证码"
)
@RequestMapping
(
value
=
"/vercode"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
vercode
()
throws
BizException
{
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/config/MainChartController.java
View file @
496865c8
...
...
@@ -19,6 +19,10 @@ import com.alibaba.fastjson.JSONObject;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mgr.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.PayOrderService
;
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
;
...
...
@@ -37,6 +41,7 @@ import java.util.Map;
* @site https://www.jeequan.com
* @date 2021-06-07 07:15
*/
@Api
(
tags
=
"主页统计"
)
@Slf4j
@RestController
@RequestMapping
(
"api/mainChart"
)
...
...
@@ -49,6 +54,7 @@ public class MainChartController extends CommonCtrl {
* @date: 2021/6/7 16:18
* @describe: 周交易总金额
*/
@ApiOperation
(
"周交易总金额"
)
@PreAuthorize
(
"hasAuthority('ENT_C_MAIN_PAY_AMOUNT_WEEK')"
)
@RequestMapping
(
value
=
"/payAmountWeek"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
payAmountWeek
()
{
...
...
@@ -60,6 +66,7 @@ public class MainChartController extends CommonCtrl {
* @date: 2021/6/7 16:18
* @describe: 商户总数量、服务商总数量、总交易金额、总交易笔数
*/
@ApiOperation
(
"商户总数量、服务商总数量、总交易金额、总交易笔数"
)
@PreAuthorize
(
"hasAuthority('ENT_C_MAIN_NUMBER_COUNT')"
)
@RequestMapping
(
value
=
"/numCount"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
numCount
()
{
...
...
@@ -73,9 +80,15 @@ public class MainChartController extends CommonCtrl {
* @date: 2021/6/7 16:18
* @describe: 交易统计
*/
@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_C_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"
);
...
...
@@ -90,9 +103,15 @@ public class MainChartController extends CommonCtrl {
* @date: 2021/6/7 16:18
* @describe: 支付方式统计
*/
@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_C_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"
);
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/config/SysConfigController.java
View file @
496865c8
...
...
@@ -26,6 +26,10 @@ import com.jeequan.jeepay.core.model.ApiRes;
import
com.jeequan.jeepay.core.utils.SpringBeansUtil
;
import
com.jeequan.jeepay.mgr.ctrl.CommonCtrl
;
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
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -46,6 +50,7 @@ import java.util.Map;
* @site https://www.jeequan.com
* @date 2021-06-07 07:15
*/
@Api
(
tags
=
"系统管理(配置信息类)"
)
@Slf4j
@RestController
@RequestMapping
(
"api/sysConfigs"
)
...
...
@@ -60,9 +65,14 @@ public class SysConfigController extends CommonCtrl {
* @date: 2021/6/7 16:19
* @describe: 分组下的配置
*/
@ApiOperation
(
"系统配置--查询分组下的配置"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"groupKey"
,
value
=
"分组key"
)
})
@PreAuthorize
(
"hasAuthority('ENT_SYS_CONFIG_INFO')"
)
@RequestMapping
(
value
=
"/{groupKey}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
getConfigs
(
@PathVariable
(
"groupKey"
)
String
groupKey
)
{
public
ApiRes
<
List
<
SysConfig
>>
getConfigs
(
@PathVariable
(
"groupKey"
)
String
groupKey
)
{
LambdaQueryWrapper
<
SysConfig
>
condition
=
SysConfig
.
gw
();
condition
.
orderByAsc
(
SysConfig:
:
getSortNum
);
if
(
StringUtils
.
isNotEmpty
(
groupKey
)){
...
...
@@ -78,6 +88,15 @@ public class SysConfigController extends CommonCtrl {
* @date: 2021/6/7 16:19
* @describe: 系统配置修改
*/
@ApiOperation
(
"系统配置--修改分组下的配置"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"groupKey"
,
value
=
"分组key"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"mchSiteUrl"
,
value
=
"商户平台网址(不包含结尾/)"
),
@ApiImplicitParam
(
name
=
"mgrSiteUrl"
,
value
=
"运营平台网址(不包含结尾/)"
),
@ApiImplicitParam
(
name
=
"ossPublicSiteUrl"
,
value
=
"公共oss访问地址(不包含结尾/)"
),
@ApiImplicitParam
(
name
=
"paySiteUrl"
,
value
=
"支付网关地址(不包含结尾/)"
)
})
@PreAuthorize
(
"hasAuthority('ENT_SYS_CONFIG_EDIT')"
)
@MethodLog
(
remark
=
"系统配置修改"
)
@RequestMapping
(
value
=
"/{groupKey}"
,
method
=
RequestMethod
.
PUT
)
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/isv/IsvInfoController.java
View file @
496865c8
...
...
@@ -46,7 +46,7 @@ import org.springframework.web.bind.annotation.RestController;
* @site https://www.jeequan.com
* @date 2021-06-07 07:15
*/
@Api
(
tags
=
"服务商管理"
)
@Api
(
tags
=
"服务商管理
(基本信息)
"
)
@RestController
@RequestMapping
(
"/api/isvInfo"
)
public
class
IsvInfoController
extends
CommonCtrl
{
...
...
@@ -61,7 +61,12 @@ public class IsvInfoController extends CommonCtrl {
*/
@ApiOperation
(
"服务商列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"isvNo"
,
value
=
"服务商编号"
)
@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
=
"isvNo"
,
value
=
"服务商编号"
),
@ApiImplicitParam
(
name
=
"isvName"
,
value
=
"服务商名称"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-正常"
,
dataType
=
"Byte"
)
})
@PreAuthorize
(
"hasAuthority('ENT_ISV_LIST')"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
...
...
@@ -88,6 +93,17 @@ public class IsvInfoController extends CommonCtrl {
* @date: 2021/6/7 16:13
* @describe: 新增服务商信息
*/
@ApiOperation
(
"新增服务商"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"isvName"
,
value
=
"服务商名称"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"contactName"
,
value
=
"联系人姓名"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"contactTel"
,
value
=
"联系人手机号"
),
@ApiImplicitParam
(
name
=
"contactEmail"
,
value
=
"联系人邮箱"
),
@ApiImplicitParam
(
name
=
"isvShortName"
,
value
=
"服务商简称"
),
@ApiImplicitParam
(
name
=
"remark"
,
value
=
"备注"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-正常"
,
dataType
=
"Byte"
)
})
@PreAuthorize
(
"hasAuthority('ENT_ISV_INFO_ADD')"
)
@MethodLog
(
remark
=
"新增服务商"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
...
...
@@ -109,6 +125,11 @@ public class IsvInfoController extends CommonCtrl {
* @date: 2021/6/7 16:13
* @describe: 删除服务商信息
*/
@ApiOperation
(
"删除服务商"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"isvNo"
,
value
=
"服务商号"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_ISV_INFO_DEL')"
)
@MethodLog
(
remark
=
"删除服务商"
)
@RequestMapping
(
value
=
"/{isvNo}"
,
method
=
RequestMethod
.
DELETE
)
...
...
@@ -125,6 +146,18 @@ public class IsvInfoController extends CommonCtrl {
* @date: 2021/6/7 16:13
* @describe: 更新服务商信息
*/
@ApiOperation
(
"更新服务商信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"isvNo"
,
value
=
"服务商号"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"isvName"
,
value
=
"服务商名称"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"contactName"
,
value
=
"联系人姓名"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"contactTel"
,
value
=
"联系人手机号"
),
@ApiImplicitParam
(
name
=
"contactEmail"
,
value
=
"联系人邮箱"
),
@ApiImplicitParam
(
name
=
"isvShortName"
,
value
=
"服务商简称"
),
@ApiImplicitParam
(
name
=
"remark"
,
value
=
"备注"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-正常"
,
dataType
=
"Byte"
)
})
@PreAuthorize
(
"hasAuthority('ENT_ISV_INFO_EDIT')"
)
@MethodLog
(
remark
=
"更新服务商信息"
)
@RequestMapping
(
value
=
"/{isvNo}"
,
method
=
RequestMethod
.
PUT
)
...
...
@@ -147,6 +180,11 @@ public class IsvInfoController extends CommonCtrl {
* @date: 2021/6/7 16:13
* @describe: 查看服务商信息
*/
@ApiOperation
(
"查看服务商信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"isvNo"
,
value
=
"服务商编号"
,
required
=
true
)
})
@PreAuthorize
(
"hasAnyAuthority('ENT_ISV_INFO_VIEW', 'ENT_ISV_INFO_EDIT')"
)
@RequestMapping
(
value
=
"/{isvNo}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
detail
(
@PathVariable
(
"isvNo"
)
String
isvNo
)
{
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/isv/IsvPayInterfaceConfigController.java
View file @
496865c8
...
...
@@ -15,7 +15,6 @@
*/
package
com.jeequan.jeepay.mgr.ctrl.isv
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jeequan.jeepay.components.mq.model.ResetIsvMchAppInfoConfigMQ
;
import
com.jeequan.jeepay.components.mq.vender.IMQSender
;
import
com.jeequan.jeepay.core.aop.MethodLog
;
...
...
@@ -28,6 +27,10 @@ import com.jeequan.jeepay.core.model.params.IsvParams;
import
com.jeequan.jeepay.core.utils.StringKit
;
import
com.jeequan.jeepay.mgr.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.PayInterfaceConfigService
;
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
;
...
...
@@ -35,7 +38,6 @@ import org.springframework.web.bind.annotation.*;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
/**
* 服务商支付接口管理类
...
...
@@ -44,6 +46,7 @@ import java.util.Map;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"服务商管理(支付接口)"
)
@RestController
@RequestMapping
(
"/api/isv/payConfigs"
)
public
class
IsvPayInterfaceConfigController
extends
CommonCtrl
{
...
...
@@ -56,9 +59,14 @@ public class IsvPayInterfaceConfigController extends CommonCtrl {
* @Description: 查询服务商支付接口配置列表
* @Date: 16:45 2021/4/27
*/
@ApiOperation
(
"查询服务商支付接口配置列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
CS
.
ACCESS_TOKEN_NAME
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"isvNo"
,
value
=
"服务商号"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_ISV_PAY_CONFIG_LIST')"
)
@GetMapping
public
ApiRes
list
()
{
public
ApiRes
<
List
<
PayInterfaceDefine
>>
list
()
{
List
<
PayInterfaceDefine
>
list
=
payInterfaceConfigService
.
selectAllPayIfConfigListByIsvNo
(
CS
.
INFO_TYPE_ISV
,
getValStringRequired
(
"isvNo"
));
return
ApiRes
.
ok
(
list
);
...
...
@@ -69,9 +77,15 @@ public class IsvPayInterfaceConfigController extends CommonCtrl {
* @Description: 根据 服务商号、接口类型 获取商户参数配置
* @Date: 17:03 2021/4/27
*/
@ApiOperation
(
"根据[服务商号]、[接口类型]获取商户参数配置"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"isvNo"
,
value
=
"服务商号"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"接口类型代码"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_ISV_PAY_CONFIG_VIEW')"
)
@GetMapping
(
"/{isvNo}/{ifCode}"
)
public
ApiRes
getByMchNo
(
@PathVariable
(
value
=
"isvNo"
)
String
isvNo
,
@PathVariable
(
value
=
"ifCode"
)
String
ifCode
)
{
public
ApiRes
<
PayInterfaceConfig
>
getByMchNo
(
@PathVariable
(
value
=
"isvNo"
)
String
isvNo
,
@PathVariable
(
value
=
"ifCode"
)
String
ifCode
)
{
PayInterfaceConfig
payInterfaceConfig
=
payInterfaceConfigService
.
getByInfoIdAndIfCode
(
CS
.
INFO_TYPE_ISV
,
isvNo
,
ifCode
);
if
(
payInterfaceConfig
!=
null
)
{
if
(
payInterfaceConfig
.
getIfRate
()
!=
null
)
{
...
...
@@ -87,11 +101,22 @@ public class IsvPayInterfaceConfigController extends CommonCtrl {
return
ApiRes
.
ok
(
payInterfaceConfig
);
}
/**
* @Author: ZhuXiao
* @Description: 服务商支付接口参数配置
* @Date: 16:45 2021/4/27
*/
*/
@ApiOperation
(
"服务商支付接口参数配置"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"infoId"
,
value
=
"服务商号"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"接口类型代码"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"ifParams"
,
value
=
"接口配置参数,json字符串"
),
@ApiImplicitParam
(
name
=
"ifRate"
,
value
=
"支付接口费率"
,
dataType
=
"BigDecimal"
),
@ApiImplicitParam
(
name
=
"remark"
,
value
=
"备注"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-启用"
,
dataType
=
"Byte"
)
})
@PreAuthorize
(
"hasAuthority('ENT_ISV_PAY_CONFIG_ADD')"
)
@PostMapping
@MethodLog
(
remark
=
"更新服务商支付参数"
)
...
...
@@ -137,5 +162,4 @@ public class IsvPayInterfaceConfigController extends CommonCtrl {
return
ApiRes
.
ok
();
}
}
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchAppController.java
View file @
496865c8
...
...
@@ -22,10 +22,15 @@ 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.entity.MchApp
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mgr.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.MchAppService
;
import
com.jeequan.jeepay.service.impl.MchInfoService
;
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.*
;
...
...
@@ -37,6 +42,8 @@ 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
{
...
...
@@ -50,13 +57,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
=
"mchNo"
,
value
=
"商户号"
),
@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
);
IPage
<
MchApp
>
pages
=
mchAppService
.
selectPage
(
getIPage
(),
mchApp
);
return
Api
Res
.
ok
(
pages
);
return
Api
PageRes
.
pages
(
pages
);
}
/**
...
...
@@ -64,6 +81,15 @@ 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
=
"mchNo"
,
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 +113,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
)
{
...
...
@@ -103,6 +134,16 @@ 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
=
"mchNo"
,
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}"
)
...
...
@@ -123,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-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchInfoController.java
View file @
496865c8
...
...
@@ -28,11 +28,16 @@ import com.jeequan.jeepay.core.constants.ApiCodeEnum;
import
com.jeequan.jeepay.core.constants.CS
;
import
com.jeequan.jeepay.core.entity.MchInfo
;
import
com.jeequan.jeepay.core.entity.SysUser
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mgr.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.MchInfoService
;
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.security.access.prepost.PreAuthorize
;
...
...
@@ -50,6 +55,7 @@ import java.util.*;
* @site https://www.jeequan.com
* @date 2021-06-07 07:15
*/
@Api
(
tags
=
"商户基本信息管理"
)
@RestController
@RequestMapping
(
"/api/mchInfo"
)
public
class
MchInfoController
extends
CommonCtrl
{
...
...
@@ -64,9 +70,20 @@ public class MchInfoController extends CommonCtrl {
* @date: 2021/6/7 16:14
* @describe: 商户信息列表
*/
@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
=
"mchNo"
,
value
=
"商户号"
),
@ApiImplicitParam
(
name
=
"mchName"
,
value
=
"商户名称"
),
@ApiImplicitParam
(
name
=
"isvNo"
,
value
=
"服务商号"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-启用"
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"类型: 1-普通商户, 2-特约商户(服务商模式)"
,
dataType
=
"Byte"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_LIST')"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
Api
Res
list
()
{
public
Api
PageRes
<
MchInfo
>
list
()
{
MchInfo
mchInfo
=
getObject
(
MchInfo
.
class
);
LambdaQueryWrapper
<
MchInfo
>
wrapper
=
MchInfo
.
gw
();
...
...
@@ -88,7 +105,7 @@ public class MchInfoController extends CommonCtrl {
wrapper
.
orderByDesc
(
MchInfo:
:
getCreatedAt
);
IPage
<
MchInfo
>
pages
=
mchInfoService
.
page
(
getIPage
(),
wrapper
);
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
/**
...
...
@@ -96,6 +113,20 @@ public class MchInfoController extends CommonCtrl {
* @date: 2021/6/7 16:14
* @describe: 新增商户信息
*/
@ApiOperation
(
"新增商户信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"mchName"
,
value
=
"商户名称"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"mchShortName"
,
value
=
"商户简称"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"loginUserName"
,
value
=
"登录名"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"isvNo"
,
value
=
"服务商号,type为2时必填"
),
@ApiImplicitParam
(
name
=
"contactName"
,
value
=
"联系人姓名"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"contactTel"
,
value
=
"联系人手机号"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"contactEmail"
,
value
=
"联系人邮箱"
),
@ApiImplicitParam
(
name
=
"remark"
,
value
=
"备注"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-启用"
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"类型: 1-普通商户, 2-特约商户(服务商模式)"
,
dataType
=
"Byte"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_INFO_ADD')"
)
@MethodLog
(
remark
=
"新增商户"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
...
...
@@ -118,6 +149,11 @@ public class MchInfoController extends CommonCtrl {
* @date: 2021/6/7 16:14
* @describe: 删除商户信息
*/
@ApiOperation
(
"删除商户信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"mchNo"
,
value
=
"商户号"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_INFO_DEL')"
)
@MethodLog
(
remark
=
"删除商户"
)
@RequestMapping
(
value
=
"/{mchNo}"
,
method
=
RequestMethod
.
DELETE
)
...
...
@@ -137,6 +173,21 @@ public class MchInfoController extends CommonCtrl {
* @date: 2021/6/7 16:14
* @describe: 更新商户信息
*/
@ApiOperation
(
"更新商户信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"mchName"
,
value
=
"商户名称"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"mchShortName"
,
value
=
"商户简称"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"loginUserName"
,
value
=
"登录名"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"contactName"
,
value
=
"联系人姓名"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"contactTel"
,
value
=
"联系人手机号"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"contactEmail"
,
value
=
"联系人邮箱"
),
@ApiImplicitParam
(
name
=
"remark"
,
value
=
"备注"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-启用"
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"resetPass"
,
value
=
"是否重置密码"
,
dataType
=
"Boolean"
),
@ApiImplicitParam
(
name
=
"confirmPwd"
,
value
=
"待更新的密码,base64加密"
),
@ApiImplicitParam
(
name
=
"defaultPass"
,
value
=
"是否默认密码"
,
dataType
=
"Boolean"
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_INFO_EDIT')"
)
@MethodLog
(
remark
=
"更新商户信息"
)
@RequestMapping
(
value
=
"/{mchNo}"
,
method
=
RequestMethod
.
PUT
)
...
...
@@ -193,6 +244,11 @@ public class MchInfoController extends CommonCtrl {
* @date: 2021/6/7 16:14
* @describe: 查询商户信息
*/
@ApiOperation
(
"查询商户信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"mchNo"
,
value
=
"商户号"
,
required
=
true
)
})
@PreAuthorize
(
"hasAnyAuthority('ENT_MCH_INFO_VIEW', 'ENT_MCH_INFO_EDIT')"
)
@RequestMapping
(
value
=
"/{mchNo}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
detail
(
@PathVariable
(
"mchNo"
)
String
mchNo
)
{
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchPayInterfaceConfigController.java
View file @
496865c8
...
...
@@ -34,6 +34,10 @@ import com.jeequan.jeepay.service.impl.MchAppService;
import
com.jeequan.jeepay.service.impl.MchInfoService
;
import
com.jeequan.jeepay.service.impl.PayInterfaceConfigService
;
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
;
...
...
@@ -49,6 +53,7 @@ import java.util.List;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"商户支付接口管理"
)
@RestController
@RequestMapping
(
"/api/mch/payConfigs"
)
public
class
MchPayInterfaceConfigController
extends
CommonCtrl
{
...
...
@@ -64,9 +69,14 @@ public class MchPayInterfaceConfigController extends CommonCtrl {
* @Description: 查询应用支付接口配置列表
* @Date: 15:50 2021/4/27
*/
@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
()
{
List
<
PayInterfaceDefine
>
list
=
payInterfaceConfigService
.
selectAllPayIfConfigListByAppId
(
getValStringRequired
(
"appId"
));
return
ApiRes
.
ok
(
list
);
...
...
@@ -77,6 +87,12 @@ public class MchPayInterfaceConfigController extends CommonCtrl {
* @Description: 根据 appId、接口类型 获取应用参数配置
* @Date: 17:03 2021/4/27
*/
@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
getByAppId
(
@PathVariable
(
value
=
"appId"
)
String
appId
,
@PathVariable
(
value
=
"ifCode"
)
String
ifCode
)
{
...
...
@@ -109,6 +125,12 @@ public class MchPayInterfaceConfigController extends CommonCtrl {
* @Description: 应用支付接口配置
* @Date: 16:13 2021/4/27
*/
@ApiOperation
(
"更新应用支付参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"infoId"
,
value
=
"商户号"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"接口类型代码"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_PAY_CONFIG_ADD')"
)
@PostMapping
@MethodLog
(
remark
=
"更新应用支付参数"
)
...
...
@@ -164,6 +186,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
)
{
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchPayPassageConfigController.java
View file @
496865c8
...
...
@@ -25,15 +25,19 @@ import com.jeequan.jeepay.core.constants.ApiCodeEnum;
import
com.jeequan.jeepay.core.constants.CS
;
import
com.jeequan.jeepay.core.entity.*
;
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.mgr.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.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
java.math.BigDecimal
;
import
java.util.LinkedList
;
import
java.util.List
;
...
...
@@ -44,6 +48,7 @@ import java.util.List;
* @site https://www.jeequan.com
* @date 2021-04-27 15:30
*/
@Api
(
tags
=
"商户支付通道管理"
)
@RestController
@RequestMapping
(
"/api/mch/payPassages"
)
public
class
MchPayPassageConfigController
extends
CommonCtrl
{
...
...
@@ -59,9 +64,18 @@ public class MchPayPassageConfigController extends CommonCtrl {
* @Description: 查询支付方式列表,并添加是否配置支付通道状态
* @Date: 15:31 2021/5/10
*/
@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"
);
...
...
@@ -101,14 +115,21 @@ public class MchPayPassageConfigController extends CommonCtrl {
}
}
return
ApiRes
.
page
(
payWayPage
);
return
Api
Page
Res
.
page
s
(
payWayPage
);
}
/**
* @Author: ZhuXiao
* @Description: 根据appId、支付方式查询可用的支付接口列表
* @Date: 17:55 2021/5/8
* @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
)
{
...
...
@@ -134,6 +155,11 @@ public class MchPayPassageConfigController extends CommonCtrl {
* @Description: 应用支付通道配置
* @Date: 17:36 2021/5/8
*/
@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-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/MchNotifyController.java
View file @
496865c8
...
...
@@ -21,12 +21,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.jeequan.jeepay.components.mq.model.PayOrderMchNotifyMQ
;
import
com.jeequan.jeepay.components.mq.vender.IMQSender
;
import
com.jeequan.jeepay.core.constants.ApiCodeEnum
;
import
com.jeequan.jeepay.core.constants.CS
;
import
com.jeequan.jeepay.core.entity.MchNotifyRecord
;
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.mgr.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.MchNotifyRecordService
;
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-06-07 07:15
*/
@Api
(
tags
=
"订单管理(通知类)"
)
@RestController
@RequestMapping
(
"/api/mchNotify"
)
public
class
MchNotifyController
extends
CommonCtrl
{
...
...
@@ -54,9 +59,24 @@ public class MchNotifyController extends CommonCtrl {
* @date: 2021/6/7 16:14
* @describe: 商户通知列表
*/
@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
=
"mchNo"
,
value
=
"商户号"
),
@ApiImplicitParam
(
name
=
"orderId"
,
value
=
"订单ID"
),
@ApiImplicitParam
(
name
=
"mchOrderNo"
,
value
=
"商户订单号"
),
@ApiImplicitParam
(
name
=
"isvNo"
,
value
=
"服务商号"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用ID"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"通知状态,1-通知中,2-通知成功,3-通知失败"
,
dataType
=
"Byte"
),
@ApiImplicitParam
(
name
=
"orderType"
,
value
=
"订单类型:1-支付,2-退款"
,
dataType
=
"Byte"
)
})
@PreAuthorize
(
"hasAuthority('ENT_NOTIFY_LIST')"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
Api
Res
list
()
{
public
Api
PageRes
<
MchNotifyRecord
>
list
()
{
MchNotifyRecord
mchNotify
=
getObject
(
MchNotifyRecord
.
class
);
JSONObject
paramJSON
=
getReqParamJSON
();
...
...
@@ -94,7 +114,7 @@ public class MchNotifyController extends CommonCtrl {
wrapper
.
orderByDesc
(
MchNotifyRecord:
:
getCreatedAt
);
IPage
<
MchNotifyRecord
>
pages
=
mchNotifyService
.
page
(
getIPage
(),
wrapper
);
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
/**
...
...
@@ -102,6 +122,11 @@ public class MchNotifyController extends CommonCtrl {
* @date: 2021/6/7 16:14
* @describe: 商户通知信息
*/
@ApiOperation
(
"通知信息详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"notifyId"
,
value
=
"商户通知记录ID"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_NOTIFY_VIEW')"
)
@RequestMapping
(
value
=
"/{notifyId}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
detail
(
@PathVariable
(
"notifyId"
)
String
notifyId
)
{
...
...
@@ -117,6 +142,11 @@ public class MchNotifyController extends CommonCtrl {
* @Author: terrfly
* @Date: 2021/6/21 17:41
*/
@ApiOperation
(
"商户通知重发"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"notifyId"
,
value
=
"商户通知记录ID"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_MCH_NOTIFY_RESEND')"
)
@RequestMapping
(
value
=
"resend/{notifyId}"
,
method
=
RequestMethod
.
POST
)
public
ApiRes
resend
(
@PathVariable
(
"notifyId"
)
Long
notifyId
)
{
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/PayOrderController.java
View file @
496865c8
...
...
@@ -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
;
...
...
@@ -52,6 +57,7 @@ import java.util.Map;
* @site https://www.jeequan.com
* @date 2021-06-07 07:15
*/
@Api
(
tags
=
"订单管理(支付类)"
)
@RestController
@RequestMapping
(
"/api/payOrder"
)
public
class
PayOrderController
extends
CommonCtrl
{
...
...
@@ -66,9 +72,25 @@ public class PayOrderController extends CommonCtrl {
* @date: 2021/6/7 16:15
* @describe: 订单信息列表
*/
@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
=
"mchNo"
,
value
=
"商户号"
),
@ApiImplicitParam
(
name
=
"unionOrderId"
,
value
=
"支付/商户/渠道订单号"
),
@ApiImplicitParam
(
name
=
"isvNo"
,
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')"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
Api
Res
list
()
{
public
Api
PageRes
<
PayOrder
>
list
()
{
PayOrder
payOrder
=
getObject
(
PayOrder
.
class
);
JSONObject
paramJSON
=
getReqParamJSON
();
...
...
@@ -89,7 +111,7 @@ public class PayOrderController extends CommonCtrl {
order
.
addExt
(
"wayName"
,
order
.
getWayCode
());
}
}
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
/**
...
...
@@ -97,6 +119,11 @@ public class PayOrderController extends CommonCtrl {
* @date: 2021/6/7 16:15
* @describe: 支付订单信息
*/
@ApiOperation
(
"支付订单信息详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"payOrderId"
,
value
=
"支付订单号"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_PAY_ORDER_VIEW')"
)
@RequestMapping
(
value
=
"/{payOrderId}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
detail
(
@PathVariable
(
"payOrderId"
)
String
payOrderId
)
{
...
...
@@ -114,6 +141,13 @@ public class PayOrderController extends CommonCtrl {
* @site https://www.jeequan.com
* @date 2021/6/17 16:38
*/
@ApiOperation
(
"发起订单退款"
)
@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-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/RefundOrderController.java
View file @
496865c8
...
...
@@ -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.RefundOrder
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mgr.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.RefundOrderService
;
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
;
...
...
@@ -37,6 +42,7 @@ import org.springframework.web.bind.annotation.RestController;
* @site https://www.jeequan.com
* @date 2021-06-07 07:15
*/
@Api
(
tags
=
"订单管理(退款类)"
)
@RestController
@RequestMapping
(
"/api/refundOrder"
)
public
class
RefundOrderController
extends
CommonCtrl
{
...
...
@@ -48,16 +54,30 @@ public class RefundOrderController extends CommonCtrl {
* @date: 2021/6/7 16:15
* @describe: 退款订单信息列表
*/
@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
=
"mchNo"
,
value
=
"商户号"
),
@ApiImplicitParam
(
name
=
"unionOrderId"
,
value
=
"支付/退款订单号"
),
@ApiImplicitParam
(
name
=
"isvNo"
,
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')"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
Api
Res
list
()
{
public
Api
PageRes
<
RefundOrder
>
list
()
{
RefundOrder
refundOrder
=
getObject
(
RefundOrder
.
class
);
JSONObject
paramJSON
=
getReqParamJSON
();
LambdaQueryWrapper
<
RefundOrder
>
wrapper
=
RefundOrder
.
gw
();
IPage
<
RefundOrder
>
pages
=
refundOrderService
.
pageList
(
getIPage
(),
wrapper
,
refundOrder
,
paramJSON
);
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
/**
...
...
@@ -65,6 +85,11 @@ public class RefundOrderController extends CommonCtrl {
* @date: 2021/6/7 16:15
* @describe: 退款订单信息
*/
@ApiOperation
(
"退款订单信息详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"refundOrderId"
,
value
=
"退款订单号"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_REFUND_ORDER_VIEW')"
)
@RequestMapping
(
value
=
"/{refundOrderId}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
detail
(
@PathVariable
(
"refundOrderId"
)
String
refundOrderId
)
{
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/TransferOrderController.java
View file @
496865c8
...
...
@@ -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.mgr.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,19 +51,36 @@ 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
=
"mchNo"
,
value
=
"商户号"
),
@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
();
LambdaQueryWrapper
<
TransferOrder
>
wrapper
=
TransferOrder
.
gw
();
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-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/payconfig/PayInterfaceDefineController.java
View file @
496865c8
...
...
@@ -28,6 +28,10 @@ import com.jeequan.jeepay.mgr.ctrl.CommonCtrl;
import
com.jeequan.jeepay.service.impl.PayInterfaceConfigService
;
import
com.jeequan.jeepay.service.impl.PayInterfaceDefineService
;
import
com.jeequan.jeepay.service.impl.PayOrderService
;
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.*
;
...
...
@@ -41,6 +45,7 @@ import java.util.List;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"支付接口配置"
)
@RestController
@RequestMapping
(
"api/payIfDefines"
)
public
class
PayInterfaceDefineController
extends
CommonCtrl
{
...
...
@@ -54,9 +59,13 @@ public class PayInterfaceDefineController extends CommonCtrl {
* @Description: list
* @Date: 15:51 2021/4/27
*/
@ApiOperation
(
"支付接口--列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
)
})
@PreAuthorize
(
"hasAuthority('ENT_PC_IF_DEFINE_LIST')"
)
@GetMapping
public
ApiRes
list
()
{
public
ApiRes
<
List
<
PayInterfaceDefine
>>
list
()
{
List
<
PayInterfaceDefine
>
list
=
payInterfaceDefineService
.
list
(
PayInterfaceDefine
.
gw
()
.
orderByAsc
(
PayInterfaceDefine:
:
getCreatedAt
)
...
...
@@ -70,6 +79,11 @@ public class PayInterfaceDefineController extends CommonCtrl {
* @Description: detail
* @Date: 15:51 2021/4/27
*/
@ApiOperation
(
"支付接口--详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"接口类型代码"
,
required
=
true
)
})
@PreAuthorize
(
"hasAnyAuthority('ENT_PC_IF_DEFINE_VIEW', 'ENT_PC_IF_DEFINE_EDIT')"
)
@GetMapping
(
"/{ifCode}"
)
public
ApiRes
detail
(
@PathVariable
(
"ifCode"
)
String
ifCode
)
{
...
...
@@ -81,6 +95,23 @@ public class PayInterfaceDefineController extends CommonCtrl {
* @Description: add
* @Date: 15:51 2021/4/27
*/
@ApiOperation
(
"支付接口--新增"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"接口类型代码"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"configPageType"
,
value
=
"支付参数配置页面类型:1-JSON渲染,2-自定义"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"icon"
,
value
=
"页面展示:卡片-图标"
),
@ApiImplicitParam
(
name
=
"bgColor"
,
value
=
"页面展示:卡片-背景色"
),
@ApiImplicitParam
(
name
=
"ifName"
,
value
=
"接口名称"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"isIsvMode"
,
value
=
"是否支持服务商子商户模式: 0-不支持, 1-支持"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"isMchMode"
,
value
=
"是否支持普通商户模式: 0-不支持, 1-支持"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"isvParams"
,
value
=
"ISV接口配置定义描述,[{},{}],当configPageType为1时必填"
),
@ApiImplicitParam
(
name
=
"isvsubMchParams"
,
value
=
"特约商户接口配置定义描述,[{},{}],当configPageType为1时必填"
),
@ApiImplicitParam
(
name
=
"normalMchParams"
,
value
=
"普通商户接口配置定义描述,[{},{}],当configPageType为1时必填"
),
@ApiImplicitParam
(
name
=
"remark"
,
value
=
"备注"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-启用"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"wayCodeStrs"
,
value
=
"接口类型代码(若干个接口类型代码用英文逗号拼接起来)"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_PC_IF_DEFINE_ADD')"
)
@PostMapping
@MethodLog
(
remark
=
"新增支付接口"
)
...
...
@@ -108,6 +139,24 @@ public class PayInterfaceDefineController extends CommonCtrl {
* @Description: update
* @Date: 15:51 2021/4/27
*/
@ApiOperation
(
"支付接口--更新"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"接口类型代码"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"configPageType"
,
value
=
"支付参数配置页面类型:1-JSON渲染,2-自定义"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"icon"
,
value
=
"页面展示:卡片-图标"
),
@ApiImplicitParam
(
name
=
"bgColor"
,
value
=
"页面展示:卡片-背景色"
),
@ApiImplicitParam
(
name
=
"ifName"
,
value
=
"接口名称"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"isIsvMode"
,
value
=
"是否支持服务商子商户模式: 0-不支持, 1-支持"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"isMchMode"
,
value
=
"是否支持普通商户模式: 0-不支持, 1-支持"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"isvParams"
,
value
=
"ISV接口配置定义描述,[{},{}],当configPageType为1时必填"
),
@ApiImplicitParam
(
name
=
"isvsubMchParams"
,
value
=
"特约商户接口配置定义描述,[{},{}],当configPageType为1时必填"
),
@ApiImplicitParam
(
name
=
"normalMchParams"
,
value
=
"普通商户接口配置定义描述,[{},{}],当configPageType为1时必填"
),
@ApiImplicitParam
(
name
=
"remark"
,
value
=
"备注"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态: 0-停用, 1-启用"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"wayCodeStrs"
,
value
=
"接口类型代码(若干个接口类型代码用英文逗号拼接起来)"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"wayCodes"
,
value
=
"接口类型代码列表"
)
})
@PreAuthorize
(
"hasAuthority('ENT_PC_IF_DEFINE_EDIT')"
)
@PutMapping
(
"/{ifCode}"
)
@MethodLog
(
remark
=
"更新支付接口"
)
...
...
@@ -136,6 +185,11 @@ public class PayInterfaceDefineController extends CommonCtrl {
* @Description: delete
* @Date: 15:52 2021/4/27
*/
@ApiOperation
(
"支付接口--删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"ifCode"
,
value
=
"接口类型代码"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_PC_IF_DEFINE_DEL')"
)
@DeleteMapping
(
"/{ifCode}"
)
@MethodLog
(
remark
=
"删除支付接口"
)
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/payconfig/PayWayController.java
View file @
496865c8
...
...
@@ -23,12 +23,16 @@ import com.jeequan.jeepay.core.entity.MchPayPassage;
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.
utils.StringKit
;
import
com.jeequan.jeepay.core.
model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mgr.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
;
...
...
@@ -41,6 +45,7 @@ import org.springframework.web.bind.annotation.*;
* @site https://www.jeequan.com
* @date 2021-04-27 15:50
*/
@Api
(
tags
=
"支付方式配置"
)
@RestController
@RequestMapping
(
"api/payWays"
)
public
class
PayWayController
extends
CommonCtrl
{
...
...
@@ -54,9 +59,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
(
"hasAnyAuthority('ENT_PC_WAY_LIST', 'ENT_PAY_ORDER_SEARCH_PAY_WAY')"
)
@GetMapping
public
Api
Res
list
()
{
public
Api
PageRes
<
PayWay
>
list
()
{
PayWay
queryObject
=
getObject
(
PayWay
.
class
);
...
...
@@ -71,7 +84,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
);
}
...
...
@@ -80,6 +93,11 @@ public class PayWayController extends CommonCtrl {
* @Description: detail
* @Date: 15:52 2021/4/27
*/
@ApiOperation
(
"支付方式--详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"wayCode"
,
value
=
"支付方式代码"
,
required
=
true
)
})
@PreAuthorize
(
"hasAnyAuthority('ENT_PC_WAY_VIEW', 'ENT_PC_WAY_EDIT')"
)
@GetMapping
(
"/{wayCode}"
)
public
ApiRes
detail
(
@PathVariable
(
"wayCode"
)
String
wayCode
)
{
...
...
@@ -91,6 +109,12 @@ public class PayWayController extends CommonCtrl {
* @Description: add
* @Date: 15:52 2021/4/27
*/
@ApiOperation
(
"支付方式--新增"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"wayCode"
,
value
=
"支付方式代码"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"wayName"
,
value
=
"支付方式名称"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_PC_WAY_ADD')"
)
@PostMapping
@MethodLog
(
remark
=
"新增支付方式"
)
...
...
@@ -114,6 +138,12 @@ public class PayWayController extends CommonCtrl {
* @Description: update
* @Date: 15:52 2021/4/27
*/
@ApiOperation
(
"支付方式--更新"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"wayCode"
,
value
=
"支付方式代码"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"wayName"
,
value
=
"支付方式名称"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_PC_WAY_EDIT')"
)
@PutMapping
(
"/{wayCode}"
)
@MethodLog
(
remark
=
"更新支付方式"
)
...
...
@@ -132,6 +162,11 @@ public class PayWayController extends CommonCtrl {
* @Description: delete
* @Date: 15:52 2021/4/27
*/
@ApiOperation
(
"支付方式--删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"wayCode"
,
value
=
"支付方式代码"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_PC_WAY_DEL')"
)
@DeleteMapping
(
"/{wayCode}"
)
@MethodLog
(
remark
=
"删除支付方式"
)
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysEntController.java
View file @
496865c8
...
...
@@ -17,20 +17,22 @@ package com.jeequan.jeepay.mgr.ctrl.sysuser;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jeequan.jeepay.core.aop.MethodLog
;
import
com.jeequan.jeepay.core.entity.SysEntitlement
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.core.utils.TreeDataBuilder
;
import
com.jeequan.jeepay.mgr.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.SysEntitlementService
;
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
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.jeequan.jeepay.core.entity.SysEntitlement
;
import
com.jeequan.jeepay.service.impl.SysEntitlementService
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.core.utils.TreeDataBuilder
;
import
java.util.List
;
...
...
@@ -41,6 +43,7 @@ import java.util.List;
* @site https://www.jeequan.com
* @date 2021/6/8 17:13
*/
@Api
(
tags
=
"系统管理--用户权限"
)
@RestController
@RequestMapping
(
"api/sysEnts"
)
public
class
SysEntController
extends
CommonCtrl
{
...
...
@@ -49,6 +52,12 @@ public class SysEntController extends CommonCtrl {
/** getOne */
@ApiOperation
(
"用户角色--权限--查询菜单权限详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"entId"
,
value
=
"权限ID[ENT_功能模块_子模块_操作], eg: ENT_ROLE_LIST_ADD"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"sysType"
,
value
=
"所属系统: MGR-运营平台, MCH-商户中心"
,
required
=
true
)
})
@PreAuthorize
(
"hasAnyAuthority( 'ENT_UR_ROLE_ENT_LIST' )"
)
@RequestMapping
(
value
=
"/bySysType"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
bySystem
()
{
...
...
@@ -60,6 +69,16 @@ public class SysEntController extends CommonCtrl {
}
/** updateById */
@ApiOperation
(
"用户角色--权限--更新权限资源"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"entId"
,
value
=
"权限ID[ENT_功能模块_子模块_操作], eg: ENT_ROLE_LIST_ADD"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"entName"
,
value
=
"权限名称"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"menuUri"
,
value
=
"菜单uri/路由地址"
),
@ApiImplicitParam
(
name
=
"entSort"
,
value
=
"排序字段, 规则:正序"
),
@ApiImplicitParam
(
name
=
"quickJump"
,
value
=
"快速开始菜单 0-否, 1-是"
),
@ApiImplicitParam
(
name
=
"state"
,
value
=
"状态 0-停用, 1-启用"
)
})
@PreAuthorize
(
"hasAuthority( 'ENT_UR_ROLE_ENT_EDIT')"
)
@MethodLog
(
remark
=
"更新资源权限"
)
@RequestMapping
(
value
=
"/{entId}"
,
method
=
RequestMethod
.
PUT
)
...
...
@@ -72,9 +91,14 @@ public class SysEntController extends CommonCtrl {
/** 查询权限集合 */
@ApiOperation
(
"用户角色--权限--查询权限集合"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"sysType"
,
value
=
"所属系统: MGR-运营平台, MCH-商户中心"
,
required
=
true
)
})
@PreAuthorize
(
"hasAnyAuthority( 'ENT_UR_ROLE_ENT_LIST', 'ENT_UR_ROLE_DIST' )"
)
@RequestMapping
(
value
=
"/showTree"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
showTree
()
{
public
ApiRes
<
List
<
JSONObject
>>
showTree
()
{
//查询全部数据
List
<
SysEntitlement
>
list
=
sysEntitlementService
.
list
(
SysEntitlement
.
gw
().
eq
(
SysEntitlement:
:
getSysType
,
getValStringRequired
(
"sysType"
)));
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysLogController.java
View file @
496865c8
...
...
@@ -21,9 +21,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.jeequan.jeepay.core.aop.MethodLog
;
import
com.jeequan.jeepay.core.constants.ApiCodeEnum
;
import
com.jeequan.jeepay.core.entity.SysLog
;
import
com.jeequan.jeepay.core.model.ApiPageRes
;
import
com.jeequan.jeepay.core.model.ApiRes
;
import
com.jeequan.jeepay.mgr.ctrl.CommonCtrl
;
import
com.jeequan.jeepay.service.impl.SysLogService
;
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 +47,7 @@ import java.util.List;
* @site https://www.jeequan.com
* @date 2021-06-07 07:15
*/
@Api
(
tags
=
"系统管理(系统日志)"
)
@RestController
@RequestMapping
(
"api/sysLog"
)
public
class
SysLogController
extends
CommonCtrl
{
...
...
@@ -54,9 +60,20 @@ public class SysLogController extends CommonCtrl {
* @date: 2021/6/7 16:15
* @describe: 日志记录列表
*/
@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
=
"userId"
,
value
=
"系统用户ID"
),
@ApiImplicitParam
(
name
=
"userName"
,
value
=
"用户姓名"
),
@ApiImplicitParam
(
name
=
"sysType"
,
value
=
"所属系统: MGR-运营平台, MCH-商户中心"
)
})
@PreAuthorize
(
"hasAuthority('ENT_LOG_LIST')"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
Api
Res
list
()
{
public
Api
PageRes
<
SysLog
>
list
()
{
SysLog
sysLog
=
getObject
(
SysLog
.
class
);
JSONObject
paramJSON
=
getReqParamJSON
();
// 查询列表
...
...
@@ -80,7 +97,7 @@ public class SysLogController extends CommonCtrl {
}
}
IPage
<
SysLog
>
pages
=
sysLogService
.
page
(
getIPage
(),
condition
);
return
ApiRes
.
page
(
pages
);
return
Api
Page
Res
.
page
s
(
pages
);
}
/**
...
...
@@ -88,6 +105,11 @@ public class SysLogController extends CommonCtrl {
* @date: 2021/6/7 16:16
* @describe: 查看日志信息
*/
@ApiOperation
(
"系统日志详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"sysLogId"
,
value
=
"系统日志ID"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_SYS_LOG_VIEW')"
)
@RequestMapping
(
value
=
"/{sysLogId}"
,
method
=
RequestMethod
.
GET
)
public
ApiRes
detail
(
@PathVariable
(
"sysLogId"
)
String
sysLogId
)
{
...
...
@@ -103,6 +125,11 @@ public class SysLogController extends CommonCtrl {
* @date: 2021/6/7 16:16
* @describe: 删除日志信息
*/
@ApiOperation
(
"删除日志信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"iToken"
,
value
=
"用户身份凭证"
,
required
=
true
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"selectedIds"
,
value
=
"系统日志ID(若干个ID用英文逗号拼接)"
,
required
=
true
)
})
@PreAuthorize
(
"hasAuthority('ENT_SYS_LOG_DEL')"
)
@MethodLog
(
remark
=
"删除日志信息"
)
@RequestMapping
(
value
=
"/{selectedIds}"
,
method
=
RequestMethod
.
DELETE
)
...
...
Prev
1
2
3
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