code review 支付商户逻辑

This commit is contained in:
YunaiV
2021-12-25 17:53:18 +08:00
parent ff21fdc5df
commit 4b5c185608
8 changed files with 23 additions and 24 deletions

View File

@ -75,7 +75,7 @@ public class PayMerchantController {
return success(PayMerchantConvert.INSTANCE.convert(merchant));
}
@GetMapping("/list-name")
@GetMapping("/list-name") // TODO @aquan/list-name =》/list-by-name
@ApiOperation("根据商户名称获得支付商户信息列表")
@ApiImplicitParam(name = "name", value = "商户名称", example = "芋道", dataTypeClass = Long.class)
@PreAuthorize("@ss.hasPermission('pay:merchant:query')")

View File

@ -1,6 +1,5 @@
package cn.iocoder.yudao.adminserver.modules.pay.service.merchant;
import cn.hutool.core.collection.CollUtil;
import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantCreateReqVO;
import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantExportReqVO;
import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantPageReqVO;
@ -11,14 +10,13 @@ import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
import javax.validation.Valid;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* 支付商户信息 Service 接口
*
* @author 芋艿
* @author 芋艿 TODO @aquan作者是你哈
*/
public interface PayMerchantService {

View File

@ -21,6 +21,7 @@ import java.util.List;
import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.PAY_MERCHANT_NOT_EXISTS;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
/**
* 支付商户信息 Service 实现类
*
@ -86,6 +87,7 @@ public class PayMerchantServiceImpl implements PayMerchantService {
return merchantMapper.selectList(exportReqVO);
}
// TODO @aquan接口上已经有注释这里不用在有啦
/**
* 修改商户状态
*
@ -114,7 +116,6 @@ public class PayMerchantServiceImpl implements PayMerchantService {
return this.merchantMapper.getMerchantListByName(merchantName);
}
/**
* 检查商户是否存在
* @param id 商户编号
@ -134,6 +135,7 @@ public class PayMerchantServiceImpl implements PayMerchantService {
// TODO @芋艿:后续增加下合适的算法
/**
* 根据年月日时分秒毫秒生成商户号
*
* @return 商户号
*/
private String generateMerchantNo(){

View File

@ -44,17 +44,16 @@ spring:
datasource:
master:
name: ruoyi-vue-pro
url: jdbc:mysql://rm-j6cxl87683w973f78ho.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
driver-class-name: com.mysql.jdbc.Driver
username: chenquan
password: Miraclequan@990429
username: root
password: 123456
slave: # 模拟从库,可根据自己需要修改
name: ruoyi-vue-pro
url: jdbc:mysql://rm-j6cxl87683w973f78ho.mysql.rds.aliyuncs.com:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
driver-class-name: com.mysql.jdbc.Driver
username: chenquan
password: Miraclequan@990429
username: root
password: 123456
activiti:
#1.false:默认值activiti启动时对比数据库表中保存的版本如果不匹配。将抛出异常