This commit is contained in:
D 2024-03-27 15:15:21 +08:00
parent 88ad3c24b0
commit 5cd37aea45
9 changed files with 79 additions and 58 deletions

View File

@ -108,16 +108,16 @@ public class TestController extends BaseController
@Schema(description = "用户实体")
class UserEntity
{
@Schema(defaultValue = "用户ID")
@Schema(title = "用户ID")
private Integer userId;
@Schema(defaultValue = "用户名称")
@Schema(title = "用户名称")
private String username;
@Schema(defaultValue = "用户密码")
@Schema(title = "用户密码")
private String password;
@Schema(defaultValue = "用户手机")
@Schema(title = "用户手机")
private String mobile;
public UserEntity()

View File

@ -4,41 +4,52 @@ import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* Entity基类
*
* @author ruoyi
*/
@Schema(title = "基类")
public class BaseEntity implements Serializable
{
private static final long serialVersionUID = 1L;
/** 搜索值 */
@Schema(title = "搜索值")
@JsonIgnore
private String searchValue;
/** 创建者 */
@Schema(title = "创建者")
private String createBy;
/** 创建时间 */
@Schema(title = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 更新者 */
@Schema(title = "更新者")
private String updateBy;
/** 更新时间 */
@Schema(title = "更新时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 备注 */
@Schema(title = "备注")
private String remark;
/** 请求参数 */
@Schema(title = "请求参数")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, Object> params;

View File

@ -1,13 +1,17 @@
package com.ruoyi.common.core.domain;
import java.io.Serializable;
import com.ruoyi.common.constant.HttpStatus;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* 响应信息主体
*
* @author ruoyi
*/
@Schema(title = "响应信息主体")
public class R<T> implements Serializable
{
private static final long serialVersionUID = 1L;
@ -18,10 +22,13 @@ public class R<T> implements Serializable
/** 失败 */
public static final int FAIL = HttpStatus.ERROR;
@Schema(title = "响应码")
private int code;
@Schema(title = "响应信息")
private String msg;
@Schema(title = "响应数据")
private T data;
public static <T> R<T> ok()

View File

@ -34,7 +34,7 @@ public class ${ClassName} extends ${Entity}
#foreach ($column in $columns)
#if(!$table.isSuperColumn($column.javaField))
/** $column.columnComment */
@Schema(defaultValue = "$column.columnComment")
@Schema(title = "$column.columnComment")
#if($column.list)
#set($parentheseIndex=$column.columnComment.indexOf(""))
#if($parentheseIndex != -1)

View File

@ -19,98 +19,98 @@ public class OauthUser extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
@Schema(defaultValue = "主键")
@Schema(title = "主键")
private Long id;
/** 第三方系统的唯一ID详细解释请参考名词解释 */
@Schema(defaultValue = "第三方系统的唯一ID详细解释请参考名词解释")
@Schema(title = "第三方系统的唯一ID详细解释请参考名词解释")
@Excel(name = "第三方系统的唯一ID详细解释请参考名词解释")
private String uuid;
/** 用户ID */
@Schema(defaultValue = "用户ID")
@Schema(title = "用户ID")
@Excel(name = "用户ID")
private Long userId;
/**
* 第三方用户来源可选值GITHUBGITEEQQ更多请参考AuthDefaultSource.java(opens new window)
*/
@Schema(defaultValue = "第三方用户来源可选值GITHUB、GITEE、QQ更多请参考AuthDefaultSource.java(opens new window)")
@Schema(title = "第三方用户来源可选值GITHUB、GITEE、QQ更多请参考AuthDefaultSource.java(opens new window)")
@Excel(name = "第三方用户来源可选值GITHUB、GITEE、QQ更多请参考AuthDefaultSource.java(opens new window)")
private String source;
/** 用户的授权令牌 */
@Schema(defaultValue = "用户的授权令牌")
@Schema(title = "用户的授权令牌")
@Excel(name = "用户的授权令牌")
private String accessToken;
/** 第三方用户的授权令牌的有效期,部分平台可能没有 */
@Schema(defaultValue = "第三方用户的授权令牌的有效期,部分平台可能没有")
@Schema(title = "第三方用户的授权令牌的有效期,部分平台可能没有")
@Excel(name = "第三方用户的授权令牌的有效期,部分平台可能没有")
private Long expireIn;
/** 刷新令牌,部分平台可能没有 */
@Schema(defaultValue = "刷新令牌,部分平台可能没有")
@Schema(title = "刷新令牌,部分平台可能没有")
@Excel(name = "刷新令牌,部分平台可能没有")
private String refreshToken;
/** 第三方用户的 open id部分平台可能没有 */
@Schema(defaultValue = "第三方用户的 open id部分平台可能没有")
@Schema(title = "第三方用户的 open id部分平台可能没有")
@Excel(name = "第三方用户的 open id部分平台可能没有")
private String openId;
/** 第三方用户的 ID部分平台可能没有 */
@Schema(defaultValue = "第三方用户的 ID部分平台可能没有")
@Schema(title = "第三方用户的 ID部分平台可能没有")
@Excel(name = "第三方用户的 ID部分平台可能没有")
private String uid;
/** 个别平台的授权信息,部分平台可能没有 */
@Schema(defaultValue = "个别平台的授权信息,部分平台可能没有")
@Schema(title = "个别平台的授权信息,部分平台可能没有")
@Excel(name = "个别平台的授权信息,部分平台可能没有")
private String accessCode;
/** 第三方用户的 union id部分平台可能没有 */
@Schema(defaultValue = "第三方用户的 union id部分平台可能没有")
@Schema(title = "第三方用户的 union id部分平台可能没有")
@Excel(name = "第三方用户的 union id部分平台可能没有")
private String unionId;
/** 第三方用户授予的权限,部分平台可能没有 */
@Schema(defaultValue = "第三方用户授予的权限,部分平台可能没有")
@Schema(title = "第三方用户授予的权限,部分平台可能没有")
@Excel(name = "第三方用户授予的权限,部分平台可能没有")
private String scope;
/** 个别平台的授权信息,部分平台可能没有 */
@Schema(defaultValue = "个别平台的授权信息,部分平台可能没有")
@Schema(title = "个别平台的授权信息,部分平台可能没有")
@Excel(name = "个别平台的授权信息,部分平台可能没有")
private String tokenType;
/** id token部分平台可能没有 */
@Schema(defaultValue = "id token部分平台可能没有")
@Schema(title = "id token部分平台可能没有")
@Excel(name = "id token部分平台可能没有")
private String idToken;
/** 小米平台用户的附带属性,部分平台可能没有 */
@Schema(defaultValue = "小米平台用户的附带属性,部分平台可能没有")
@Schema(title = "小米平台用户的附带属性,部分平台可能没有")
@Excel(name = "小米平台用户的附带属性,部分平台可能没有")
private String macAlgorithm;
/** 小米平台用户的附带属性,部分平台可能没有 */
@Schema(defaultValue = "小米平台用户的附带属性,部分平台可能没有")
@Schema(title = "小米平台用户的附带属性,部分平台可能没有")
@Excel(name = "小米平台用户的附带属性,部分平台可能没有")
private String macKey;
/** 用户的授权code部分平台可能没有 */
@Schema(defaultValue = "用户的授权code部分平台可能没有")
@Schema(title = "用户的授权code部分平台可能没有")
@Excel(name = "用户的授权code部分平台可能没有")
private String code;
/** Twitter平台用户的附带属性部分平台可能没有 */
@Schema(defaultValue = "Twitter平台用户的附带属性部分平台可能没有")
@Schema(title = "Twitter平台用户的附带属性部分平台可能没有")
@Excel(name = "Twitter平台用户的附带属性部分平台可能没有")
private String oauthToken;
/** Twitter平台用户的附带属性部分平台可能没有 */
@Schema(defaultValue = "Twitter平台用户的附带属性部分平台可能没有")
@Schema(title = "Twitter平台用户的附带属性部分平台可能没有")
@Excel(name = "Twitter平台用户的附带属性部分平台可能没有")
private String oauthTokenSecret;

View File

@ -19,71 +19,71 @@ public class OnlineMb extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
@Schema(defaultValue = "主键")
@Schema(title = "主键")
private Long mbId;
/** 标签名 */
@Schema(defaultValue = "标签名")
@Schema(title = "标签名")
@Excel(name = "标签名")
private String tag;
/** 标签id */
@Schema(defaultValue = "标签id")
@Schema(title = "标签id")
@Excel(name = "标签id")
private String tagId;
/** 参数类型 */
@Schema(defaultValue = "参数类型")
@Schema(title = "参数类型")
@Excel(name = "参数类型")
private String parameterType;
/** 结果类型 */
@Schema(defaultValue = "结果类型")
@Schema(title = "结果类型")
@Excel(name = "结果类型")
private String resultMap;
/** sql语句 */
@Schema(defaultValue = "sql语句")
@Schema(title = "sql语句")
@Excel(name = "sql语句")
private String sql;
/** 请求路径 */
@Schema(defaultValue = "请求路径")
@Schema(title = "请求路径")
@Excel(name = "请求路径")
private String path;
/** 请求方式 */
@Schema(defaultValue = "请求方式")
@Schema(title = "请求方式")
@Excel(name = "请求方式")
private String method;
/** 响应类型 */
@Schema(defaultValue = "响应类型")
@Schema(title = "响应类型")
@Excel(name = "响应类型")
private String resultType;
/** 执行器 */
@Schema(defaultValue = "执行器")
@Schema(title = "执行器")
@Excel(name = "执行器")
private String actuator;
/** 是否需要userId */
@Schema(defaultValue = "是否需要userId")
@Schema(title = "是否需要userId")
@Excel(name = "是否需要userId")
private String userId;
/** 是否需要deptId */
@Schema(defaultValue = "是否需要deptId")
@Schema(title = "是否需要deptId")
@Excel(name = "是否需要deptId")
private String deptId;
/** 许可类型 */
@Schema(defaultValue = "许可类型")
@Schema(title = "许可类型")
@Excel(name = "许可类型")
private String permissionType;
/** 许可值 */
@Schema(defaultValue = "许可值")
@Schema(title = "许可值")
@Excel(name = "许可值")
private String permissionValue;

View File

@ -19,41 +19,41 @@ public class PayInvoice extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 发票id */
@Schema(defaultValue = "发票id")
@Schema(title = "发票id")
private Long invoiceId;
/** 订单号 */
@Schema(defaultValue = "订单号")
@Schema(title = "订单号")
@Excel(name = "订单号")
private String orderNumber;
/** 发票类型 */
@Schema(defaultValue = "发票类型")
@Schema(title = "发票类型")
@Excel(name = "发票类型")
private String invoiceType;
/** 发票抬头 */
@Schema(defaultValue = "发票抬头")
@Schema(title = "发票抬头")
@Excel(name = "发票抬头")
private String invoiceHeader;
/** 纳税人识别号 */
@Schema(defaultValue = "纳税人识别号")
@Schema(title = "纳税人识别号")
@Excel(name = "纳税人识别号")
private String invoiceNumber;
/** 收票人手机号 */
@Schema(defaultValue = "收票人手机号")
@Schema(title = "收票人手机号")
@Excel(name = "收票人手机号")
private String invoicePhone;
/** 收票人邮箱 */
@Schema(defaultValue = "收票人邮箱")
@Schema(title = "收票人邮箱")
@Excel(name = "收票人邮箱")
private String invoiceEmail;
/** 发票备注 */
@Schema(defaultValue = "发票备注")
@Schema(title = "发票备注")
@Excel(name = "发票备注")
private String invoiceRemark;

View File

@ -14,46 +14,46 @@ import io.swagger.v3.oas.annotations.media.Schema;
* @author ruoyi
* @date 2024-02-15
*/
@Schema(description = "订单对象")
@Schema(title = "订单对象")
public class PayOrder extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 订单ID */
@Schema(defaultValue = "订单ID")
@Schema(title = "订单ID")
private Long orderId;
/** 用户id */
@Schema(defaultValue = "用户id")
@Schema(title = "用户id")
@Excel(name = "用户id")
private Long userId;
/** 订单号 */
@Schema(defaultValue = "订单号")
@Schema(title = "订单号")
@Excel(name = "订单号")
private String orderNumber;
/** 订单状态 */
@Schema(defaultValue = "订单状态")
@Schema(title = "订单状态")
@Excel(name = "订单状态")
private String orderStatus;
/** 订单总金额 */
@Schema(defaultValue = "订单总金额")
@Schema(title = "订单总金额")
@Excel(name = "订单总金额")
private String totalAmount;
/** 订单内容 */
@Schema(defaultValue = "订单内容")
@Schema(title = "订单内容")
@Excel(name = "订单内容")
private String orderContent;
/** 订单备注 */
@Schema(defaultValue = "订单备注")
@Schema(title = "订单备注")
@Excel(name = "订单备注")
private String orderRemark;
/** 负载信息 */
@Schema(defaultValue = "负载信息")
@Schema(title = "负载信息")
@Excel(name = "负载信息")
private String orderMessage;

View File

@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.pay.domain.PayOrder;
import com.ruoyi.pay.service.IPayOrderService;
import com.ruoyi.pay.sqb.service.Impl.SQBServiceImpl;
@ -33,14 +34,16 @@ public class SQBController extends BaseController {
})
@PostMapping("/payUrl")
@Anonymous
public AjaxResult payUrl(@RequestParam("id") String orderNumber) throws Exception {
public R<String> payUrl(@RequestParam("id") String orderNumber) throws Exception {
PayOrder payOrder = payOrderServicer.selectPayOrderByOrderNumber(orderNumber);
String url = sqbServiceImpl.payUrl(payOrder);
AjaxResult ajaxResult = new AjaxResult(200, url, "操作成功");
return ajaxResult;
return R.ok(url);
}
@Operation(summary = "查询支付状态")
@Parameters(value = {
@Parameter(name = "id", description = "订单号", required = true)
})
@PostMapping("/query")
@Anonymous
public AjaxResult query(@RequestParam("id") String orderNumber) throws Exception {