refactor(ruoyi): 更新 API 文档注解
-替换 @Tag 为 @Operation 注解 - 更新 API 接口的 summary 描述 -移除冗余代码和不必要的注释 - 统一使用 io.swagger.v3 包
This commit is contained in:
parent
8d76107c27
commit
d344925286
@ -1,6 +1,6 @@
|
||||
|
||||
package org.dromara.system.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@ -9,20 +9,18 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.system.convert.CommissionTemplateConvert;
|
||||
import org.dromara.system.domain.CommissionTemplate;
|
||||
import org.dromara.system.domain.bo.CommissionTemplateBo;
|
||||
import org.dromara.system.domain.vo.CommissionSectionVo;
|
||||
import org.dromara.system.domain.vo.CommissionTemplateVo;
|
||||
import org.dromara.system.service.ICommissionSectionService;
|
||||
import org.dromara.system.service.ICommissionTemplateService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.List;
|
||||
|
||||
import org.dromara.system.domain.CommissionTemplate;
|
||||
import org.dromara.system.convert.CommissionTemplateConvert;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.system.service.ICommissionSectionService;
|
||||
import org.dromara.system.domain.vo.CommissionSectionVo;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@ -41,7 +39,6 @@ public class CommissionTemplateController {
|
||||
|
||||
/** 分页查询 */
|
||||
@Operation(summary = "分页查询分成比例模板")
|
||||
@Tag(name = "查询分成比例模板列表")
|
||||
@PostMapping("/list")
|
||||
public R<Page<CommissionTemplateVo>> list(@RequestBody CommissionTemplateBo bo, @RequestBody Page<CommissionTemplate> page) {
|
||||
Page<CommissionTemplate> memberPage = commissionTemplateService.page(page,bo.toWrapper());
|
||||
@ -50,7 +47,6 @@ public class CommissionTemplateController {
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部分成比例模板")
|
||||
@Tag(name = "查询分成比例模板列表")
|
||||
@GetMapping("/all")
|
||||
public R<List<CommissionTemplateVo>> listAll() {
|
||||
// 查询全部,不分页
|
||||
@ -58,6 +54,7 @@ public class CommissionTemplateController {
|
||||
List<CommissionTemplateVo> voList = convert.toVO(list);
|
||||
return R.ok(voList);
|
||||
}
|
||||
|
||||
/** 查询详情 */
|
||||
@Operation(summary = "查询分成比例模板详情")
|
||||
@GetMapping("/{id}")
|
||||
|
@ -6,6 +6,7 @@ import cn.dev33.satoken.annotation.SaMode;
|
||||
import com.baomidou.lock.annotation.Lock4j;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
@ -49,7 +50,7 @@ public class SysTenantController extends BaseController {
|
||||
private final ISysTenantService tenantService;
|
||||
|
||||
|
||||
@Tag(name ="查询租户列表")
|
||||
@Operation(summary = "查询租户列表")
|
||||
// @SaCheckRole(value = {
|
||||
// TenantConstants.SUPER_ADMIN_ROLE_KEY,
|
||||
// TenantConstants.TENANT_ADMIN_ROLE_KEY
|
||||
@ -79,7 +80,7 @@ public class SysTenantController extends BaseController {
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@Tag(name ="获取租户表详细信息")
|
||||
@Operation(summary = "查询租户表详细信息")
|
||||
// @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) 团长
|
||||
@SaCheckPermission("system:tenant:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
|
@ -2,6 +2,7 @@ package org.dromara.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
@ -9,7 +10,6 @@ import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.system.domain.SysVersion;
|
||||
import org.dromara.system.domain.bo.SysVersionBo;
|
||||
import org.dromara.system.domain.dto.VersionDTO;
|
||||
import org.dromara.system.domain.vo.SysVersionVo;
|
||||
import org.dromara.system.service.ISysVerisonService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
/**
|
||||
* @author fxh
|
||||
*/
|
||||
@Tag(name = "app版本管理")
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@ -28,13 +29,13 @@ public class SysVersionController {
|
||||
|
||||
|
||||
|
||||
@Tag(name ="查询app版本管理")
|
||||
@Operation(summary = "查询app版本管理")
|
||||
@PostMapping("/list")
|
||||
public R<IPage<SysVersionVo>> list(@RequestBody SysVersionBo query, Page<SysVersion> page){
|
||||
return R.ok(sysVerisonService.getList(page,query));
|
||||
}
|
||||
|
||||
@Tag(name = "新增版本")
|
||||
@Operation(summary = "新增版本")
|
||||
@Log(title = "版本管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public R<Void> add(@Validated @RequestBody SysVersion sysVersion) {
|
||||
@ -44,7 +45,7 @@ public class SysVersionController {
|
||||
return R.ok("新增成功");
|
||||
}
|
||||
|
||||
@Tag(name ="修改状态")
|
||||
@Operation(summary = "修改状态")
|
||||
@Log(title = "修改状态", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/update")
|
||||
public R updateStatus( @RequestParam Long id,
|
||||
@ -52,7 +53,7 @@ public class SysVersionController {
|
||||
return R.ok(sysVerisonService.updateStatus(id,status));
|
||||
}
|
||||
|
||||
@Tag(name ="删除版本管理")
|
||||
@Operation(summary = "删除版本管理")
|
||||
@Log(title = "删除版本管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public R remove(@PathVariable Long id) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
package com.wzj.soopin.transaction.controller;
|
||||
|
||||
|
||||
@ -8,6 +9,7 @@ import com.wzj.soopin.member.domain.bo.AccountBillBO;
|
||||
import com.wzj.soopin.member.domain.po.AccountBill;
|
||||
import com.wzj.soopin.member.domain.vo.AccountBillVO;
|
||||
import com.wzj.soopin.transaction.service.IAccountBillService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
@ -36,7 +38,7 @@ public class AccountBillController extends BaseController {
|
||||
private final AccountBillConvert convert;
|
||||
|
||||
|
||||
@Tag(name = "查询账单列表")
|
||||
@Operation(summary = "查询账单列表")
|
||||
@SaCheckPermission("ums:accountbill:list")
|
||||
@PostMapping("page")
|
||||
public R<Page<AccountBillVO>> page(@RequestBody AccountBillBO bo,
|
||||
@ -46,7 +48,7 @@ public class AccountBillController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@Tag(name = "查询账单列表")
|
||||
@Operation(summary = "查询账单列表")
|
||||
@SaCheckPermission("ums:accountbill:list")
|
||||
@PostMapping("list")
|
||||
public R<List<AccountBillVO>> list(@RequestBody AccountBillBO bo) {
|
||||
@ -54,7 +56,7 @@ public class AccountBillController extends BaseController {
|
||||
return R.ok(convert.toVO(memberPage));
|
||||
}
|
||||
|
||||
@Tag(name ="导出账单")
|
||||
@Operation(summary = "导出账单")
|
||||
@SaCheckPermission("ums:accountbill:export")
|
||||
@PostMapping("export")
|
||||
public ResponseEntity<String> export(AccountBillBO query) {
|
||||
@ -63,14 +65,14 @@ public class AccountBillController extends BaseController {
|
||||
return ResponseEntity.ok(util.writeExcel(convert.toVO(list), "账单"));
|
||||
}
|
||||
|
||||
@Tag(name ="获取账单详情")
|
||||
@Operation(summary = "获取账单详情")
|
||||
@SaCheckPermission("ums:accountbill:query")
|
||||
@GetMapping(value = "{id}")
|
||||
public R<AccountBillVO> getInfo(@PathVariable("id") Long id) {
|
||||
return R.ok(convert.toVO(service.getById(id)));
|
||||
}
|
||||
|
||||
@Tag(name ="新增账单")
|
||||
@Operation(summary = "新增账单")
|
||||
@SaCheckPermission("ums:accountbill:add")
|
||||
@Log(title = "新增账单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("add")
|
||||
@ -78,7 +80,7 @@ public class AccountBillController extends BaseController {
|
||||
return R.ok(service.save(convert.toPo(member)));
|
||||
}
|
||||
|
||||
@Tag(name ="修改账单")
|
||||
@Operation(summary = "修改账单")
|
||||
@SaCheckPermission("ums:accountbill:edit")
|
||||
@Log(title = "修改账单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("update")
|
||||
@ -88,10 +90,10 @@ public class AccountBillController extends BaseController {
|
||||
|
||||
|
||||
|
||||
@Tag(name ="删除账单")
|
||||
@Operation(summary = "删除账单")
|
||||
@SaCheckPermission("ums:accountbill:remove")
|
||||
@Log(title = "删除账单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("{id}")
|
||||
@DeleteMapping("{id}")
|
||||
public R remove(@PathVariable Long id) {
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
package com.wzj.soopin.transaction.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -8,6 +9,7 @@ import com.wzj.soopin.transaction.domain.bo.ChargeBO;
|
||||
import com.wzj.soopin.transaction.domain.po.Charge;
|
||||
import com.wzj.soopin.transaction.domain.vo.ChargeVO;
|
||||
import com.wzj.soopin.transaction.service.IChargeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
@ -16,9 +18,9 @@ import org.dromara.common.log.enums.BusinessType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 用户封禁
|
||||
* 用户提现
|
||||
*/
|
||||
@Tag(name = "用户封禁")
|
||||
@Tag(name = "用户提现")
|
||||
@RestController
|
||||
@RequestMapping("/trans/charge")
|
||||
@RequiredArgsConstructor
|
||||
@ -27,7 +29,7 @@ public class ChargeController {
|
||||
private final IChargeService service;
|
||||
private final ChargeConvert convert;
|
||||
|
||||
@Tag(name = "查询列表")
|
||||
@Operation(summary = "查询用户提现列表")
|
||||
@PostMapping("/list")
|
||||
@MemberFillMethod
|
||||
public R<IPage<ChargeVO>> list(@RequestBody ChargeBO bo, @RequestBody Page page) {
|
||||
@ -35,30 +37,30 @@ public class ChargeController {
|
||||
return R.ok(convert.toVO(pages));
|
||||
}
|
||||
|
||||
@Tag(name = "新增")
|
||||
@Log(title = "新增 ", businessType = BusinessType.INSERT)
|
||||
@Operation(summary = "新增用户提现")
|
||||
@Log(title = "新增用户提现", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public R add(@RequestBody ChargeBO bo) {
|
||||
return R.ok(service.save(convert.toPo(bo)));
|
||||
}
|
||||
|
||||
@Tag(name = "详情")
|
||||
@Operation(summary = "获取用户提现详情")
|
||||
@GetMapping(value = "/{id}")
|
||||
@MemberFillMethod
|
||||
public R<ChargeVO> getInfo(@PathVariable("id") Long id) {
|
||||
return R.ok(convert.toVO(service.getById(id)));
|
||||
}
|
||||
|
||||
@Tag(name = ("处理"))
|
||||
@Log(title = "修改", businessType = BusinessType.UPDATE)
|
||||
@Operation(summary = "修改用户提现")
|
||||
@Log(title = "修改用户提现", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/update")
|
||||
public R update(@RequestBody ChargeBO bo) {
|
||||
service.save(convert.toPo(bo));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Tag(name = ("处理"))
|
||||
@Log(title = "修改", businessType = BusinessType.UPDATE)
|
||||
@Operation(summary = "审核用户提现")
|
||||
@Log(title = "审核用户提现", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/audit")
|
||||
public R audit(@RequestBody ChargeBO bo) {
|
||||
service.save(convert.toPo(bo));
|
||||
@ -66,8 +68,8 @@ public class ChargeController {
|
||||
}
|
||||
|
||||
|
||||
@Tag(name = "删除")
|
||||
@Log(title = "删除", businessType = BusinessType.DELETE)
|
||||
@Operation(summary = "删除用户提现")
|
||||
@Log(title = "删除用户提现", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public R<Object> remove(@PathVariable Long id) {
|
||||
return R.ok(service.removeById(id));
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
package com.wzj.soopin.transaction.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -7,6 +8,7 @@ import com.wzj.soopin.transaction.domain.bo.DivideBO;
|
||||
import com.wzj.soopin.transaction.domain.po.Divide;
|
||||
import com.wzj.soopin.transaction.domain.vo.DivideVO;
|
||||
import com.wzj.soopin.transaction.service.IDivideService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
@ -14,9 +16,7 @@ import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 用户封禁
|
||||
*/
|
||||
|
||||
@Tag(name = "分账")
|
||||
@RestController
|
||||
@RequestMapping("/trans/divide")
|
||||
@ -27,21 +27,21 @@ public class DivideController {
|
||||
private final DivideConvert convert;
|
||||
|
||||
|
||||
@Tag(name = "查询列表")
|
||||
@Operation(summary = "查询分账列表")
|
||||
@PostMapping("/list")
|
||||
public R<IPage<DivideVO>> slist(@RequestBody DivideBO bo, @RequestBody Page page) {
|
||||
Page<Divide> pages = service.page(page, bo.toWrapper());
|
||||
return R.ok(convert.toVO(pages));
|
||||
}
|
||||
|
||||
@Tag(name = "新增")
|
||||
@Log(title = "新增 ", businessType = BusinessType.INSERT)
|
||||
@Operation(summary = "新增分账")
|
||||
@Log(title = "新增分账", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public R add(@RequestBody DivideBO bo) {
|
||||
return R.ok(service.save(bo));
|
||||
}
|
||||
|
||||
@Tag(name = "详情")
|
||||
@Operation(summary = "获取分账详情")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<DivideVO> getInfo(@PathVariable("id") Long id) {
|
||||
return R.ok(service.getVOById(id));
|
||||
@ -49,16 +49,16 @@ public class DivideController {
|
||||
|
||||
|
||||
|
||||
@Tag(name = "删除")
|
||||
@Log(title = "删除", businessType = BusinessType.DELETE)
|
||||
@Operation(summary = "删除分账")
|
||||
@Log(title = "删除分账", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public R<Object> remove(@PathVariable Long id) {
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
||||
|
||||
@Tag(name = "根据订单id分账")
|
||||
@Log(title = "分账", businessType = BusinessType.DELETE)
|
||||
@Operation(summary = "根据订单id分账")
|
||||
@Log(title = "分账", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/divide/{orderId}")
|
||||
public R divide(@PathVariable Long orderId) {
|
||||
service.divide(orderId);
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
package com.wzj.soopin.transaction.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -7,6 +8,7 @@ import com.wzj.soopin.transaction.domain.bo.DivideRuleBO;
|
||||
import com.wzj.soopin.transaction.domain.po.DivideRule;
|
||||
import com.wzj.soopin.transaction.domain.vo.DivideRuleVO;
|
||||
import com.wzj.soopin.transaction.service.IDivideRuleService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
@ -17,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
/**
|
||||
* 用户封禁
|
||||
*/
|
||||
@Tag(name = "分账")
|
||||
@Tag(name = "分账规则")
|
||||
@RestController
|
||||
@RequestMapping("/trans/divide/rule")
|
||||
@RequiredArgsConstructor
|
||||
@ -26,29 +28,29 @@ public class DivideRuleController {
|
||||
private final IDivideRuleService service;
|
||||
private final DivideRuleConvert convert;
|
||||
|
||||
@Tag(name = "查询列表")
|
||||
@Operation(summary = "查询分账规则列表")
|
||||
@PostMapping("/list")
|
||||
public R<IPage<DivideRuleVO>> list(@RequestBody DivideRuleBO bo, @RequestBody Page page) {
|
||||
Page<DivideRule> pages = service.page(page, bo.toWrapper());
|
||||
return R.ok(convert.toVO(pages));
|
||||
}
|
||||
|
||||
@Tag(name = "新增")
|
||||
@Log(title = "新增 ", businessType = BusinessType.INSERT)
|
||||
@Operation(summary = "新增分账规则")
|
||||
@Log(title = "新增分账规则", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public R add(@RequestBody DivideRuleBO bo) {
|
||||
service.save(bo);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Tag(name = "详情")
|
||||
@Operation(summary = "获取分账规则详情")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<DivideRuleVO> getInfo(@PathVariable("id") Long id) {
|
||||
return R.ok(service.getVOById(id));
|
||||
}
|
||||
|
||||
@Tag(name = ("修改"))
|
||||
@Log(title = "修改", businessType = BusinessType.UPDATE)
|
||||
@Operation(summary = "修改分账规则")
|
||||
@Log(title = "修改分账规则", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/update")
|
||||
public R update(@RequestBody DivideRuleBO bo) {
|
||||
service.update(bo);
|
||||
@ -58,8 +60,8 @@ public class DivideRuleController {
|
||||
/**
|
||||
* 启/停用规则,status=1启用,status=0停用
|
||||
*/
|
||||
@Tag(name = ("启用停用"))
|
||||
@Log(title = "启用停用", businessType = BusinessType.UPDATE)
|
||||
@Operation(summary = "启用停用分账规则")
|
||||
@Log(title = "启用停用分账规则", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/changeStatus/{id}/{status}")
|
||||
public R changeStatus(@PathVariable("id") Long id, @PathVariable("status") Integer status) {
|
||||
service.changeStatus(id, status);
|
||||
@ -67,8 +69,8 @@ public class DivideRuleController {
|
||||
}
|
||||
|
||||
|
||||
@Tag(name = "删除")
|
||||
@Log(title = "删除", businessType = BusinessType.DELETE)
|
||||
@Operation(summary = "删除分账规则")
|
||||
@Log(title = "删除分账规则", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public R<Boolean> remove(@PathVariable Long id) {
|
||||
return R.ok(service.removeById(id));
|
||||
|
@ -11,6 +11,7 @@ import com.wzj.soopin.transaction.domain.bo.easypay.separate.apply.resp.Separate
|
||||
import com.wzj.soopin.transaction.domain.vo.EasypayTransResultVO;
|
||||
import com.wzj.soopin.transaction.domain.vo.EasypayPrePayVO;
|
||||
import com.wzj.soopin.transaction.service.IEasypayService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -40,12 +41,9 @@ public class TransEasypayController {
|
||||
|
||||
private final IEasypayService easypayService;
|
||||
|
||||
/**
|
||||
* 处理易生支付结果通知回调 处理
|
||||
*
|
||||
* @param easyPayRequest
|
||||
*/
|
||||
|
||||
@SaIgnore
|
||||
@Log(title = "易生支付-处理结果回调", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/trade/callback")
|
||||
public Map tradeCallback(@RequestBody EasyPayRequest easyPayRequest) {
|
||||
easypayService.handleTradeCallback(easyPayRequest);
|
||||
@ -55,35 +53,26 @@ public class TransEasypayController {
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起支付
|
||||
*
|
||||
* @param paymentBO
|
||||
*/
|
||||
|
||||
@Log(title = "易生支付-发起支付", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/trade")
|
||||
@SaIgnore
|
||||
@Operation(summary = "易生支付-发起支付")
|
||||
public R<EasypayPrePayVO> trade(@RequestBody PaymentBO paymentBO) throws ServerException {
|
||||
EasypayPrePayVO easypayPrePayVO = easypayService.payment(paymentBO);
|
||||
return R.ok(easypayPrePayVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询支付结果
|
||||
*
|
||||
* @param orderId 订单id
|
||||
*/
|
||||
|
||||
@Operation(summary = "查询支付结果")
|
||||
@GetMapping("/paymentQuery/{orderId}")
|
||||
public R<EasypayTransResultVO> paymentQuery(@PathVariable("orderId") Long orderId) throws ServerException {
|
||||
EasypayTransResultVO easypayTransResultVO = easypayService.paymentQuery(orderId);
|
||||
return R.ok(easypayTransResultVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 实时退款
|
||||
*
|
||||
* @param refundBO 退款信息
|
||||
*/
|
||||
|
||||
@Operation(summary = "实时退款")
|
||||
@Log(title = "易生支付-实时退款", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/refund")
|
||||
@SaCheckPermission(value = "trans:easypay:refund",mode = SaMode.OR, orRole = TenantConstants.TENANT_ADMIN_ROLE_KEY)
|
||||
@ -92,11 +81,8 @@ public class TransEasypayController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询退款结果
|
||||
*
|
||||
* @param orderId 订单id
|
||||
*/
|
||||
|
||||
@Operation(summary = "查询退款结果")
|
||||
@GetMapping("/refundQuery/{orderId}")
|
||||
public R<EasypayTransResultVO> refundQuery(@PathVariable("orderId") Long orderId) throws ServerException {
|
||||
EasypayTransResultVO easypayTransResultVO = easypayService.refundQuery(orderId);
|
||||
@ -104,47 +90,33 @@ public class TransEasypayController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询分账结果
|
||||
*
|
||||
* @param orderItemId 订单详情id
|
||||
*/
|
||||
|
||||
@Operation(summary = "查询分账结果")
|
||||
@GetMapping("/separateqQuery/{orderItemId}")
|
||||
public R<SeparateRespOrderInfo> separateqQuery(@PathVariable("orderItemId") Long orderItemId) throws ServerException {
|
||||
return R.ok(easypayService.separateqQuery(orderItemId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传图片至易生
|
||||
*
|
||||
* @param pic
|
||||
*/
|
||||
|
||||
@Operation(summary = "上传图片至易生")
|
||||
@PostMapping("/merchantPicUpload")
|
||||
@SaIgnore
|
||||
@SaCheckPermission(value = "trans:easypay:merchantPicUpload",mode = SaMode.OR, orRole = TenantConstants.TENANT_ADMIN_ROLE_KEY)
|
||||
public R<String> merchantPicUpload(@RequestParam("pic") MultipartFile pic) throws IOException {
|
||||
return R.ok(easypayService.merchantPicUpload(pic));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加分账商户
|
||||
*
|
||||
* @param merchantAddBO
|
||||
*/
|
||||
@Operation(summary = "商户新增")
|
||||
@PostMapping("/merchantAdd")
|
||||
@SaIgnore
|
||||
@SaCheckPermission(value = "trans:easypay:merchantAdd",mode = SaMode.OR, orRole = TenantConstants.TENANT_ADMIN_ROLE_KEY)
|
||||
public R merchantAdd(@RequestBody MerchantAddBO merchantAddBO) throws ServerException {
|
||||
easypayService.merchantAdd(merchantAddBO);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 微信商户新增APPID
|
||||
*
|
||||
* @param subMchtCode 微信子商户号
|
||||
*/
|
||||
|
||||
@PostMapping("/addSubAppidConfig")
|
||||
@SaIgnore
|
||||
@Operation(summary = "微信商户新增APPID")
|
||||
public R addSubAppidConfig(@RequestParam("subMchtCode") String subMchtCode) throws IOException {
|
||||
easypayService.addSubAppidConfig(subMchtCode);
|
||||
return R.ok();
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
package com.wzj.soopin.transaction.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -8,6 +9,7 @@ import com.wzj.soopin.transaction.domain.bo.WithdrawBO;
|
||||
import com.wzj.soopin.transaction.domain.po.Withdraw;
|
||||
import com.wzj.soopin.transaction.domain.vo.WithdrawVO;
|
||||
import com.wzj.soopin.transaction.service.IWithdrawService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
@ -27,7 +29,7 @@ public class WithdrawController {
|
||||
private final IWithdrawService service;
|
||||
private final WithdrawConvert convert;
|
||||
|
||||
@Tag(name = "查询列表")
|
||||
@Operation(summary = "查询提现列表")
|
||||
@PostMapping("/list")
|
||||
@MemberFillMethod
|
||||
public R<IPage<WithdrawVO>> list(@RequestBody WithdrawBO bo, @RequestBody Page page) {
|
||||
@ -35,30 +37,30 @@ public class WithdrawController {
|
||||
return R.ok(convert.toVO(pages));
|
||||
}
|
||||
|
||||
@Tag(name = "新增")
|
||||
@Log(title = "新增 ", businessType = BusinessType.INSERT)
|
||||
@Operation(summary = "新增提现")
|
||||
@Log(title = "新增提现", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public R add(@RequestBody WithdrawBO bo) {
|
||||
return R.ok(service.save(convert.toPo(bo)));
|
||||
}
|
||||
|
||||
@Tag(name = "详情")
|
||||
@Operation(summary = "获取提现详情")
|
||||
@GetMapping(value = "/{id}")
|
||||
@MemberFillMethod
|
||||
public R<WithdrawVO> getInfo(@PathVariable("id") Long id) {
|
||||
return R.ok(convert.toVO(service.getById(id)));
|
||||
}
|
||||
|
||||
@Tag(name = ("审批"))
|
||||
@Log(title = "审批", businessType = BusinessType.UPDATE)
|
||||
@Operation(summary = "审批提现")
|
||||
@Log(title = "审批提现", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/update")
|
||||
public R update(@RequestBody WithdrawBO bo) {
|
||||
return R.ok(service.audit(bo));
|
||||
}
|
||||
|
||||
|
||||
@Tag(name = "删除")
|
||||
@Log(title = "删除", businessType = BusinessType.DELETE)
|
||||
@Operation(summary = "删除提现")
|
||||
@Log(title = "删除提现", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public R<Object> remove(@PathVariable Long id) {
|
||||
return R.ok(service.removeById(id));
|
||||
|
@ -4,6 +4,7 @@ import com.wzj.soopin.transaction.domain.entity.*;
|
||||
import com.wzj.soopin.transaction.service.impl.WxAuthService;
|
||||
import com.wzj.soopin.transaction.service.impl.WxPayService;
|
||||
import com.wzj.soopin.transaction.wechat.WechatPayConfig;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
@ -43,7 +44,7 @@ public class WxPayController {
|
||||
*商家转账 - 发起转账
|
||||
* @return
|
||||
*/
|
||||
@Tag(name = "发起转账")
|
||||
@Operation(summary = "发起转账")
|
||||
@PostMapping("/wechat")
|
||||
public InitiateBatchTransferResponseNew payRequest() {
|
||||
InitiateBatchTransferResponseNew response = null;
|
||||
@ -91,7 +92,7 @@ public class WxPayController {
|
||||
* @Context注解 把HTTP请求上下文对象注入进来,HttpServletRequest、HttpServletResponse、UriInfo 等
|
||||
* @return
|
||||
*/
|
||||
@Tag(name = "微信商户零线转账 - 回调通知")
|
||||
@Operation(summary = "微信商户零线转账 - 回调通知")
|
||||
@PostMapping("/callback")
|
||||
@Log(title = "微信商户零线转账 - 回调通知", businessType = BusinessType.INSERT)
|
||||
public ResponseEntity<Map<String, String>> wxPayCallback(@Context HttpServletRequest request) {
|
||||
@ -117,7 +118,7 @@ public class WxPayController {
|
||||
* @param outBillNo 商户系统内部的商家单号
|
||||
* @return 转账单详细信息
|
||||
*/
|
||||
@Tag(name = "查询转账单")
|
||||
@Operation(summary = "查询转账单")
|
||||
@GetMapping("/detail")
|
||||
public ResponseEntity<TransferDetailEntityNew> getTransferDetailByOutNoNew(@RequestParam String outBillNo) {
|
||||
TransferDetailEntityNew response = null;
|
||||
@ -136,7 +137,7 @@ public class WxPayController {
|
||||
* @param outBillNo 商户系统内部的商家单号
|
||||
* @return
|
||||
*/
|
||||
@Tag(name = "撤销转账")
|
||||
@Operation(summary = "撤销转账")
|
||||
@PostMapping("/cancel")
|
||||
@Parameters({
|
||||
@Parameter(name = "outBillNo", description = "商户系统内部的商家单号", required = true, in = ParameterIn.QUERY)
|
||||
@ -164,7 +165,7 @@ public class WxPayController {
|
||||
* @param code 授权码
|
||||
* @return 包含openid的响应对象
|
||||
*/
|
||||
@Tag(name = "获取用户openid")
|
||||
@Operation(summary = "获取用户openid")
|
||||
@GetMapping("/openid")
|
||||
@Parameters({
|
||||
@Parameter(name = "code", description = "授权码", required = true, in = ParameterIn.QUERY)
|
||||
|
@ -213,6 +213,7 @@ public class EasypayServiceImpl implements IEasypayService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public EasypayPrePayVO payment(PaymentBO paymentBO) throws ServerException {
|
||||
checkPaymentParamByPayType(paymentBO);
|
||||
|
||||
EasyPayRequestHeader reqHeader = generateEasyPayRequestHeader();
|
||||
// 封装结算信息
|
||||
SettleParamInfo settleParamInfo = SettleParamInfo.builder()
|
||||
@ -224,12 +225,12 @@ public class EasypayServiceImpl implements IEasypayService {
|
||||
.riskData(RiskData.builder().customerIp(ServletUtils.getClientIP()).build())
|
||||
.settleParamInfo(settleParamInfo)
|
||||
.build();
|
||||
// 封装支付信息
|
||||
setPayInfo(apiReqBody, paymentBO);
|
||||
//封装请求方信息
|
||||
apiReqBody.setReqInfo(ReqInfo.builder().mchtCode(easypayConfig.getMchtCode()).build());
|
||||
//封装基础订单信息
|
||||
PayOrder payOrder = setReqOrderInfo(apiReqBody, paymentBO);
|
||||
// 封装支付信息
|
||||
setPayInfo(apiReqBody, paymentBO);
|
||||
String reqSign = getSignStr(reqHeader, apiReqBody);
|
||||
EasyPayRequest easyPayRequest = EasyPayRequest.builder()
|
||||
.reqHeader(reqHeader)
|
||||
|
Loading…
x
Reference in New Issue
Block a user