parent
88d44f0a77
commit
7000892d9b
|
|
@ -0,0 +1,22 @@
|
|||
package com.czg.system.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
*/
|
||||
|
||||
@Getter
|
||||
public enum SysParamCodeEnum {
|
||||
|
||||
PAY_CZG_DOMAIN("pay_czg_domain", "超掌柜支付域名"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
private final String msg;
|
||||
|
||||
SysParamCodeEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
|
@ -17,6 +17,7 @@ public interface SysParamsService extends IService<SysParams> {
|
|||
|
||||
/**
|
||||
* 新增参数
|
||||
*
|
||||
* @param paramsDTO 参数
|
||||
* @return 新增结果
|
||||
*/
|
||||
|
|
@ -24,6 +25,7 @@ public interface SysParamsService extends IService<SysParams> {
|
|||
|
||||
/**
|
||||
* 修改参数
|
||||
*
|
||||
* @param paramsDTO 参数
|
||||
* @return 修改结果
|
||||
*/
|
||||
|
|
@ -31,6 +33,7 @@ public interface SysParamsService extends IService<SysParams> {
|
|||
|
||||
/**
|
||||
* 删除参数
|
||||
*
|
||||
* @param code 参数code
|
||||
* @return 删除结果
|
||||
*/
|
||||
|
|
@ -38,14 +41,19 @@ public interface SysParamsService extends IService<SysParams> {
|
|||
|
||||
/**
|
||||
* 根据参数编码获取参数
|
||||
*
|
||||
* @param code 参数编码
|
||||
* @return 参数
|
||||
*/
|
||||
CzgResult<SysParamsDTO> getParamsByCode(String code);
|
||||
|
||||
SysParams getSysParam(String code);
|
||||
|
||||
String getSysParamValue(String code);
|
||||
|
||||
/**
|
||||
* 根据参数类型获取参数
|
||||
*
|
||||
* @param type 参数类型
|
||||
* @return 参数列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,6 +27,11 @@ public class CzgBaseReq {
|
|||
private String currency = "cny";
|
||||
/**
|
||||
* 商户订单号 String(30)
|
||||
* 操作方式+雪花算法
|
||||
* 如 h5雪花ID
|
||||
* 如 js雪花ID
|
||||
* 如 lt雪花ID
|
||||
* 如 refund雪花ID
|
||||
*/
|
||||
private String mchOrderNo;
|
||||
/**
|
||||
|
|
@ -89,4 +94,20 @@ public class CzgBaseReq {
|
|||
* 不传默认为不限制
|
||||
*/
|
||||
private Integer limitPay;
|
||||
|
||||
public CzgBaseReq() {
|
||||
|
||||
}
|
||||
|
||||
public CzgBaseReq(String storeId, String mchOrderNo, Long amount, String subject, String body,
|
||||
String buyerRemark, String notifyUrl, String extParam) {
|
||||
this.storeId = storeId;
|
||||
this.mchOrderNo = mchOrderNo;
|
||||
this.subject = subject;
|
||||
this.body = body;
|
||||
this.amount = amount;
|
||||
this.buyerRemark = buyerRemark;
|
||||
this.notifyUrl = notifyUrl;
|
||||
this.extParam = extParam;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.czg.entity.req;
|
|||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NonNull;
|
||||
|
||||
/**
|
||||
* h5支付请求参数
|
||||
|
|
@ -24,4 +25,13 @@ public class CzgH5PayReq extends CzgBaseReq{
|
|||
*/
|
||||
private String returnUrl;
|
||||
|
||||
|
||||
public CzgH5PayReq(@NonNull String storeId, @NonNull String mchOrderNo,
|
||||
@NonNull String subject, @NonNull Long amount, String body,
|
||||
@NonNull String clientIp, @NonNull String notifyUrl,
|
||||
String returnUrl, String buyerRemark, String extParam) {
|
||||
super(subject, body, amount, mchOrderNo, storeId, buyerRemark, notifyUrl, extParam);
|
||||
this.clientIp = clientIp;
|
||||
this.returnUrl = returnUrl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.czg.entity.req;
|
|||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NonNull;
|
||||
|
||||
/**
|
||||
* 公众号/生活号/银联js支付
|
||||
|
|
@ -41,6 +42,7 @@ public class CzgJsPayReq extends CzgBaseReq {
|
|||
* 支付结果同步跳转通知URL
|
||||
*/
|
||||
private String returnUrl;
|
||||
|
||||
/**
|
||||
* 银联js支付成功前端跳转
|
||||
*/
|
||||
|
|
@ -50,6 +52,15 @@ public class CzgJsPayReq extends CzgBaseReq {
|
|||
*/
|
||||
private String frontFailUrl;
|
||||
|
||||
|
||||
public CzgJsPayReq(@NonNull String storeId, @NonNull String subAppid, @NonNull String mchOrderNo,
|
||||
@NonNull String subject, @NonNull Long amount, String body,
|
||||
@NonNull String userId, @NonNull String clientIp, @NonNull String notifyUrl,
|
||||
String returnUrl, String buyerRemark, String extParam) {
|
||||
super(subject, body, amount, mchOrderNo, storeId, buyerRemark, notifyUrl, extParam);
|
||||
this.userId = userId;
|
||||
this.clientIp = clientIp;
|
||||
this.subAppid = subAppid;
|
||||
this.returnUrl = returnUrl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,17 +3,17 @@ package com.czg.entity.req;
|
|||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
import lombok.NonNull;
|
||||
|
||||
|
||||
/**
|
||||
* 小程序支付
|
||||
*
|
||||
* @author ww
|
||||
* 自有小程序拉起支付
|
||||
* 自有小程序拉起服务商小程序,(微信)半屏小程序支付
|
||||
* 半屏小程序需要在商户自己的小程序中的半屏小程序配置里面申请 否则会拉起全屏小程序支付
|
||||
*
|
||||
* <p>
|
||||
* 半屏小程序支付适用场景是商户自己的小程序被纳入微信实物电商类型小程序,导致间联商户无法绑定这类的小程序APPID
|
||||
*/
|
||||
@Data
|
||||
|
|
@ -50,4 +50,14 @@ public class CzgLtPayReq extends CzgBaseReq{
|
|||
*/
|
||||
private boolean isScreen;
|
||||
|
||||
public CzgLtPayReq(@NonNull String storeId, @NonNull String subAppid, @NonNull String mchOrderNo,
|
||||
@NonNull String subject, @NonNull Long amount, String body,
|
||||
@NonNull String userId, @NonNull String clientIp, @NonNull String notifyUrl,
|
||||
String returnUrl, String buyerRemark, String extParam) {
|
||||
super(storeId, mchOrderNo, amount, subject, body, buyerRemark, notifyUrl, extParam);
|
||||
this.userId = userId;
|
||||
this.clientIp = clientIp;
|
||||
this.returnUrl = returnUrl;
|
||||
this.subAppid = subAppid;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.czg.entity.req;
|
|||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NonNull;
|
||||
|
||||
/**
|
||||
* 反扫请求参数
|
||||
|
|
@ -27,4 +28,13 @@ public class CzgMicroPayReq extends CzgBaseReq {
|
|||
* 子商户appid ,微信付款支付的时候 需要上送
|
||||
*/
|
||||
private String subAppid;
|
||||
|
||||
public CzgMicroPayReq(@NonNull String storeId, @NonNull String subAppid, @NonNull String mchOrderNo,
|
||||
@NonNull String subject, @NonNull Long amount, String body,
|
||||
@NonNull String authCode, @NonNull String notifyUrl,
|
||||
String buyerRemark, String extParam) {
|
||||
super(storeId, mchOrderNo, amount, subject, body, buyerRemark, notifyUrl, extParam);
|
||||
this.authCode = authCode;
|
||||
this.subAppid = subAppid;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.czg.entity.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
|
|
@ -42,4 +43,17 @@ public class CzgRefundReq {
|
|||
*/
|
||||
private String notifyUrl;
|
||||
|
||||
/**
|
||||
* payOrderId和mchOrderNo 二选一 必填
|
||||
*/
|
||||
public CzgRefundReq(@NonNull String mchRefundNo, @NonNull String refundReason, @NonNull Long refundAmount,
|
||||
@NonNull String notifyUrl, String payOrderId, String mchOrderNo, String extParam) {
|
||||
this.mchRefundNo = mchRefundNo;
|
||||
this.refundReason = refundReason;
|
||||
this.refundAmount = refundAmount;
|
||||
this.payOrderId = payOrderId;
|
||||
this.mchOrderNo = mchOrderNo;
|
||||
this.extParam = extParam;
|
||||
this.notifyUrl = notifyUrl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@ package com.czg.entity.req;
|
|||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NonNull;
|
||||
|
||||
/**
|
||||
* 正扫支付请求参数
|
||||
*
|
||||
* @author ww
|
||||
*/
|
||||
@Data
|
||||
|
|
@ -24,4 +26,12 @@ public class CzgScanPayReq extends CzgBaseReq{
|
|||
*/
|
||||
private String returnUrl;
|
||||
|
||||
public CzgScanPayReq(@NonNull String storeId, @NonNull String mchOrderNo,
|
||||
@NonNull String subject, @NonNull Long amount, String body,
|
||||
@NonNull String clientIp, @NonNull String notifyUrl,
|
||||
String returnUrl, String buyerRemark, String extParam) {
|
||||
super(storeId, mchOrderNo, amount, subject, body, buyerRemark, notifyUrl, extParam);
|
||||
this.clientIp = clientIp;
|
||||
this.returnUrl = returnUrl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
package com.czg.entity.resp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class CzgRefundResp {
|
||||
/**
|
||||
* 商户上送的退款订单号
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
package com.czg.entity.resp.pay;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
* @description h5支付参数
|
||||
*/
|
||||
@Data
|
||||
public class CzgH5PayInfo {
|
||||
/**
|
||||
* 支付跳转地址
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
package com.czg.entity.resp.pay;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 扫码支付参数
|
||||
* @author ww
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class CzgScanPayInfo {
|
||||
/**
|
||||
* 付款二维码地址 qrCodeUrl
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public interface CzgPayService {
|
|||
* @param appId 应用id tb_shop_merchant 表中的 app_id
|
||||
* @param appSecret 应用密钥 tb_shop_merchant 表中的 app_secret
|
||||
*/
|
||||
CzgResult<CzgH5PayResp> h5Pay(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, CzgH5PayReq bizData);
|
||||
CzgResult<CzgH5PayResp> h5Pay(@NonNull String appId, @NonNull String appSecret, CzgH5PayReq bizData);
|
||||
|
||||
/**
|
||||
* js支付
|
||||
|
|
@ -26,7 +26,7 @@ public interface CzgPayService {
|
|||
* @param appId 应用id tb_shop_merchant 表中的 app_id
|
||||
* @param appSecret 应用密钥 tb_shop_merchant 表中的 app_secret
|
||||
*/
|
||||
CzgResult<CzgJsPayResp> jsPay(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, CzgJsPayReq bizData);
|
||||
CzgResult<CzgJsPayResp> jsPay(@NonNull String appId, @NonNull String appSecret, CzgJsPayReq bizData);
|
||||
|
||||
/**
|
||||
* 小程序支付
|
||||
|
|
@ -34,7 +34,7 @@ public interface CzgPayService {
|
|||
* @param appId 应用id tb_shop_merchant 表中的 app_id
|
||||
* @param appSecret 应用密钥 tb_shop_merchant 表中的 app_secret
|
||||
*/
|
||||
CzgResult<CzgLtPayResp> ltPay(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, CzgLtPayReq bizData);
|
||||
CzgResult<CzgLtPayResp> ltPay(@NonNull String appId, @NonNull String appSecret, CzgLtPayReq bizData);
|
||||
|
||||
/**
|
||||
* PC扫码支付
|
||||
|
|
@ -42,7 +42,7 @@ public interface CzgPayService {
|
|||
* @param appId 应用id tb_shop_merchant 表中的 app_id
|
||||
* @param appSecret 应用密钥 tb_shop_merchant 表中的 app_secret
|
||||
*/
|
||||
CzgResult<CzgScanPayResp> scanPay(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, CzgScanPayReq bizData);
|
||||
CzgResult<CzgScanPayResp> scanPay(@NonNull String appId, @NonNull String appSecret, CzgScanPayReq bizData);
|
||||
|
||||
/**
|
||||
* 聚合反扫
|
||||
|
|
@ -50,7 +50,7 @@ public interface CzgPayService {
|
|||
* @param appId 应用id tb_shop_merchant 表中的 app_id
|
||||
* @param appSecret 应用密钥 tb_shop_merchant 表中的 app_secret
|
||||
*/
|
||||
CzgResult<CzgMicroPayResp> microPay(@NonNull String domain,@NonNull String appId, @NonNull String appSecret, CzgMicroPayReq bizData);
|
||||
CzgResult<CzgMicroPayResp> microPay(@NonNull String appId, @NonNull String appSecret, CzgMicroPayReq bizData);
|
||||
|
||||
/**
|
||||
* 订单查询
|
||||
|
|
@ -60,7 +60,7 @@ public interface CzgPayService {
|
|||
* @param payOrderId 平台订单号
|
||||
* @param mchOrderNo 商户订单号
|
||||
*/
|
||||
CzgResult<CzgBaseResp> queryPayOrder(@NonNull String domain,@NonNull String appId, @NonNull String appSecret,
|
||||
CzgResult<CzgBaseResp> queryPayOrder(@NonNull String appId, @NonNull String appSecret,
|
||||
String payOrderId, String mchOrderNo);
|
||||
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ public interface CzgPayService {
|
|||
* @param appId 应用id tb_shop_merchant 表中的 app_id
|
||||
* @param appSecret 应用密钥 tb_shop_merchant 表中的 app_secret
|
||||
*/
|
||||
CzgResult<CzgRefundResp> refundOrder(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, CzgRefundReq bizData);
|
||||
CzgResult<CzgRefundResp> refundOrder(@NonNull String appId, @NonNull String appSecret, CzgRefundReq bizData);
|
||||
|
||||
/**
|
||||
* 退款订单查询
|
||||
|
|
@ -80,7 +80,7 @@ public interface CzgPayService {
|
|||
* @param mchRefundNo 商户退款订单号 二选一
|
||||
* @param refundOrderId 平台退款订单号 二选一
|
||||
*/
|
||||
CzgResult<CzgRefundResp> queryRefundOrder(@NonNull String domain,@NonNull String appId, @NonNull String appSecret,
|
||||
CzgResult<CzgRefundResp> queryRefundOrder(@NonNull String appId, @NonNull String appSecret,
|
||||
String mchRefundNo, String refundOrderId);
|
||||
|
||||
|
||||
|
|
@ -90,6 +90,7 @@ public interface CzgPayService {
|
|||
* @param dataJsonStr 带解析数据
|
||||
*/
|
||||
CzgPayNotifyDTO getPayNotifyData(String dataJsonStr);
|
||||
|
||||
/**
|
||||
* 退款回调数据处理
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@ import com.czg.entity.req.*;
|
|||
import com.czg.entity.resp.*;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.service.CzgPayService;
|
||||
import com.czg.system.enums.SysParamCodeEnum;
|
||||
import com.czg.system.service.SysParamsService;
|
||||
import lombok.NonNull;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
|
|
@ -17,44 +20,47 @@ import org.springframework.stereotype.Service;
|
|||
@Service
|
||||
public class CzgPayServiceImpl implements CzgPayService {
|
||||
|
||||
@DubboReference
|
||||
private SysParamsService sysParamsService;
|
||||
|
||||
@Override
|
||||
public CzgResult<CzgH5PayResp> h5Pay(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, CzgH5PayReq bizData) {
|
||||
return CzgPayUtils.h5Pay(domain, appId, appSecret, bizData);
|
||||
public CzgResult<CzgH5PayResp> h5Pay(@NonNull String appId, @NonNull String appSecret, CzgH5PayReq bizData) {
|
||||
return CzgPayUtils.h5Pay(sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_DOMAIN.getCode()), appId, appSecret, bizData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CzgResult<CzgJsPayResp> jsPay(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, CzgJsPayReq bizData) {
|
||||
return CzgPayUtils.jsPay(domain, appId, appSecret, bizData);
|
||||
public CzgResult<CzgJsPayResp> jsPay(@NonNull String appId, @NonNull String appSecret, CzgJsPayReq bizData) {
|
||||
return CzgPayUtils.jsPay(sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_DOMAIN.getCode()), appId, appSecret, bizData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CzgResult<CzgLtPayResp> ltPay(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, CzgLtPayReq bizData) {
|
||||
return CzgPayUtils.ltPay(domain, appId, appSecret, bizData);
|
||||
public CzgResult<CzgLtPayResp> ltPay(@NonNull String appId, @NonNull String appSecret, CzgLtPayReq bizData) {
|
||||
return CzgPayUtils.ltPay(sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_DOMAIN.getCode()), appId, appSecret, bizData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CzgResult<CzgScanPayResp> scanPay(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, CzgScanPayReq bizData) {
|
||||
return CzgPayUtils.scanPay(domain, appId, appSecret, bizData);
|
||||
public CzgResult<CzgScanPayResp> scanPay(@NonNull String appId, @NonNull String appSecret, CzgScanPayReq bizData) {
|
||||
return CzgPayUtils.scanPay(sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_DOMAIN.getCode()), appId, appSecret, bizData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CzgResult<CzgMicroPayResp> microPay(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, CzgMicroPayReq bizData) {
|
||||
return CzgPayUtils.microPay(domain, appId, appSecret, bizData);
|
||||
public CzgResult<CzgMicroPayResp> microPay(@NonNull String appId, @NonNull String appSecret, CzgMicroPayReq bizData) {
|
||||
return CzgPayUtils.microPay(sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_DOMAIN.getCode()), appId, appSecret, bizData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CzgResult<CzgBaseResp> queryPayOrder(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, String payOrderId, String mchOrderNo) {
|
||||
return CzgPayUtils.queryPayOrder(domain, appId, appSecret, payOrderId, mchOrderNo);
|
||||
public CzgResult<CzgBaseResp> queryPayOrder(@NonNull String appId, @NonNull String appSecret, String payOrderId, String mchOrderNo) {
|
||||
return CzgPayUtils.queryPayOrder(sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_DOMAIN.getCode()), appId, appSecret, payOrderId, mchOrderNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CzgResult<CzgRefundResp> refundOrder(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, CzgRefundReq bizData) {
|
||||
return CzgPayUtils.refundOrder(domain, appId, appSecret, bizData);
|
||||
public CzgResult<CzgRefundResp> refundOrder(@NonNull String appId, @NonNull String appSecret, CzgRefundReq bizData) {
|
||||
return CzgPayUtils.refundOrder(sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_DOMAIN.getCode()), appId, appSecret, bizData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CzgResult<CzgRefundResp> queryRefundOrder(@NonNull String domain, @NonNull String appId, @NonNull String appSecret, String mchRefundNo, String refundOrderId) {
|
||||
return CzgPayUtils.queryRefundOrder(domain, appId, appSecret, mchRefundNo,refundOrderId);
|
||||
public CzgResult<CzgRefundResp> queryRefundOrder(@NonNull String appId, @NonNull String appSecret, String mchRefundNo, String refundOrderId) {
|
||||
return CzgPayUtils.queryRefundOrder(sysParamsService.getSysParamValue(SysParamCodeEnum.PAY_CZG_DOMAIN.getCode()), appId, appSecret, mchRefundNo,refundOrderId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.czg.service.system.mapper.SysParamsMapper;
|
|||
import com.czg.system.dto.SysParamsDTO;
|
||||
import com.czg.system.entity.SysParams;
|
||||
import com.czg.system.service.SysParamsService;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
|
|
@ -105,6 +106,14 @@ public class SysParamsServiceImpl extends ServiceImpl<SysParamsMapper, SysParams
|
|||
return getMapper().getSysParam(code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSysParamValue(String code) {
|
||||
SysParams sysParam = getSysParam(code);
|
||||
AssertUtil.isNull(sysParam, "参数不存在");
|
||||
AssertUtil.isBlank(sysParam.getParamValue(), "参数值为空");
|
||||
return sysParam.getParamValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CzgResult<List<SysParamsDTO>> getParamsByType(Integer type) {
|
||||
List<SysParams> sysParamsList = list(new QueryWrapper().eq(SysParams::getParamType, type));
|
||||
|
|
|
|||
Loading…
Reference in New Issue