feat: 支付方式配置
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
package org.wfc.system.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wfc.common.core.web.controller.BaseController;
|
||||
import org.wfc.common.core.web.domain.AjaxResult;
|
||||
import org.wfc.common.core.web.page.TableDataInfo;
|
||||
import org.wfc.system.domain.UPayment;
|
||||
import org.wfc.system.service.IUPaymentService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台-支付表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author sys
|
||||
* @since 2025-01-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/uPayment")
|
||||
public class UPaymentController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IUPaymentService uPaymentService;
|
||||
|
||||
@GetMapping("/page")
|
||||
public TableDataInfo page(UPayment uPayment) {
|
||||
startPage();
|
||||
List<UPayment> list = uPaymentService.list();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(UPayment uPayment) {
|
||||
List<UPayment> list = uPaymentService.list();
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getById(@PathVariable("id") Long id) {
|
||||
return success(uPaymentService.getById(id));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UPayment uPayment) {
|
||||
return toAjax(uPaymentService.save(uPayment));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UPayment uPayment) {
|
||||
return toAjax(uPaymentService.updateById(uPayment));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(uPaymentService.removeByIds(CollUtil.newArrayList(ids)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package org.wfc.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import org.wfc.common.mybatis.domain.BaseData;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台-支付表
|
||||
* </p>
|
||||
*
|
||||
* @author sys
|
||||
* @since 2025-01-09
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("u_payment")
|
||||
@Schema(name = "UPayment", description = "用户平台-支付表")
|
||||
public class UPayment extends BaseData {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "支付名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "类型(0支付宝 1微信 2信用卡)")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "应用编号")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "支付网关")
|
||||
private String serverUrl;
|
||||
|
||||
@Schema(description = "外网访问项目的域名")
|
||||
private String domain;
|
||||
|
||||
@Schema(description = "应用私钥")
|
||||
private String privateKey;
|
||||
|
||||
@Schema(description = "应用公钥")
|
||||
private String publicKey;
|
||||
|
||||
@Schema(description = "应用公钥证书")
|
||||
private String appCertPath;
|
||||
|
||||
@Schema(description = "公钥证书")
|
||||
private String certPath;
|
||||
|
||||
@Schema(description = "根证书")
|
||||
private String rootCertPath;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private Boolean enable;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.system.mapper;
|
||||
|
||||
import org.wfc.system.domain.UPayment;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台-支付表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author sys
|
||||
* @since 2025-01-09
|
||||
*/
|
||||
public interface UPaymentMapper extends BaseMapper<UPayment> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.system.service;
|
||||
|
||||
import org.wfc.system.domain.UPayment;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台-支付表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author sys
|
||||
* @since 2025-01-09
|
||||
*/
|
||||
public interface IUPaymentService extends IService<UPayment> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.wfc.system.service.impl;
|
||||
|
||||
import org.wfc.system.domain.UPayment;
|
||||
import org.wfc.system.mapper.UPaymentMapper;
|
||||
import org.wfc.system.service.IUPaymentService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台-支付表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author sys
|
||||
* @since 2025-01-09
|
||||
*/
|
||||
@Service
|
||||
public class UPaymentServiceImpl extends ServiceImpl<UPaymentMapper, UPayment> implements IUPaymentService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.wfc.system.mapper.UPaymentMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,69 @@
|
||||
package org.wfc.user.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wfc.common.core.web.controller.BaseController;
|
||||
import org.wfc.common.core.web.domain.AjaxResult;
|
||||
import org.wfc.common.core.web.page.TableDataInfo;
|
||||
import org.wfc.user.domain.UPayment;
|
||||
import org.wfc.user.service.IUPaymentService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台-支付表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author sys
|
||||
* @since 2025-01-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/uPayment")
|
||||
public class UPaymentController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IUPaymentService uPaymentService;
|
||||
|
||||
@GetMapping("/page")
|
||||
public TableDataInfo page(UPayment uPayment) {
|
||||
startPage();
|
||||
List<UPayment> list = uPaymentService.list();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(UPayment uPayment) {
|
||||
List<UPayment> list = uPaymentService.list();
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getById(@PathVariable("id") Long id) {
|
||||
return success(uPaymentService.getById(id));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UPayment uPayment) {
|
||||
return toAjax(uPaymentService.save(uPayment));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UPayment uPayment) {
|
||||
return toAjax(uPaymentService.updateById(uPayment));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(uPaymentService.removeByIds(CollUtil.newArrayList(ids)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package org.wfc.user.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import org.wfc.common.mybatis.domain.BaseData;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台-支付表
|
||||
* </p>
|
||||
*
|
||||
* @author sys
|
||||
* @since 2025-01-09
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("u_payment")
|
||||
@Schema(name = "UPayment", description = "用户平台-支付表")
|
||||
public class UPayment extends BaseData {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "支付名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "类型(0支付宝 1微信 2信用卡)")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "应用编号")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "支付网关")
|
||||
private String serverUrl;
|
||||
|
||||
@Schema(description = "外网访问项目的域名")
|
||||
private String domain;
|
||||
|
||||
@Schema(description = "应用私钥")
|
||||
private String privateKey;
|
||||
|
||||
@Schema(description = "应用公钥")
|
||||
private String publicKey;
|
||||
|
||||
@Schema(description = "应用公钥证书")
|
||||
private String appCertPath;
|
||||
|
||||
@Schema(description = "公钥证书")
|
||||
private String certPath;
|
||||
|
||||
@Schema(description = "根证书")
|
||||
private String rootCertPath;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private Boolean enable;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.user.mapper;
|
||||
|
||||
import org.wfc.user.domain.UPayment;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台-支付表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author sys
|
||||
* @since 2025-01-09
|
||||
*/
|
||||
public interface UPaymentMapper extends BaseMapper<UPayment> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.user.service;
|
||||
|
||||
import org.wfc.user.domain.UPayment;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台-支付表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author sys
|
||||
* @since 2025-01-09
|
||||
*/
|
||||
public interface IUPaymentService extends IService<UPayment> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.wfc.user.service.impl;
|
||||
|
||||
import org.wfc.user.domain.UPayment;
|
||||
import org.wfc.user.mapper.UPaymentMapper;
|
||||
import org.wfc.user.service.IUPaymentService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台-支付表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author sys
|
||||
* @since 2025-01-09
|
||||
*/
|
||||
@Service
|
||||
public class UPaymentServiceImpl extends ServiceImpl<UPaymentMapper, UPayment> implements IUPaymentService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.wfc.user.mapper.UPaymentMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user