diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/entity/PayChannel.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/entity/PayChannel.java index f01d7f9a..99717b7e 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/entity/PayChannel.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/entity/PayChannel.java @@ -18,6 +18,8 @@ import com.skyeye.common.entity.features.OperatorUserInfo; import com.skyeye.pay.core.PayClientConfig; import lombok.Data; +import java.util.Map; + /** * @ClassName: PayChannel * @Description: 支付渠道实体类 @@ -41,6 +43,10 @@ public class PayChannel extends OperatorUserInfo { @ApiModelProperty(value = "渠道编码,参考#PayType", required = "required") private String codeNum; + @TableField(exist = false) + @Property("渠道编码对应的信息") + private Map codeNumMation; + @TableField("enabled") @ApiModelProperty(value = "启用状态", required = "required") private Integer enabled; diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/enums/PayType.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/enums/PayType.java index 59442994..a1cc0dc7 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/enums/PayType.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/enums/PayType.java @@ -14,6 +14,9 @@ import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; +import java.util.HashMap; +import java.util.Map; + /** * @ClassName: PayType * @Description: 付款类型 @@ -62,4 +65,12 @@ public enum PayType implements SkyeyeEnumClass { return channelCode != null && channelCode.startsWith("alipay"); } + public static Map getMation(String code) { + PayType type = getByCode(code); + Map result = new HashMap<>(); + result.put("id", type.getKey()); + result.put("name", type.getValue()); + return result; + } + } diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/impl/PayChannelServiceImpl.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/impl/PayChannelServiceImpl.java index df87a8da..d9053b3c 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/impl/PayChannelServiceImpl.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/impl/PayChannelServiceImpl.java @@ -60,6 +60,7 @@ public class PayChannelServiceImpl extends SkyeyeBusinessServiceImpl o.getKey().equals(code), values()); } + public static Map getMation(String code) { + SmsChannelEnum type = getByCode(code); + Map result = new HashMap<>(); + result.put("id", type.getKey()); + result.put("name", type.getValue()); + return result; + } + } diff --git a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/sms/entity/SmsChannel.java b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/sms/entity/SmsChannel.java index c03dac73..d855e331 100644 --- a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/sms/entity/SmsChannel.java +++ b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/sms/entity/SmsChannel.java @@ -8,12 +8,15 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.skyeye.annotation.api.ApiModel; import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.annotation.api.Property; import com.skyeye.annotation.cache.RedisCacheField; import com.skyeye.common.constans.RedisConstants; import com.skyeye.common.entity.features.BaseGeneralInfo; import lombok.Data; import lombok.experimental.Accessors; +import java.util.Map; + /** * @ClassName: SmsChannel * @Description: 短信渠道 @@ -33,6 +36,10 @@ public class SmsChannel extends BaseGeneralInfo { @ApiModelProperty(value = "渠道编码,参考#SmsChannelEnum", required = "required", fuzzyLike = true) private String codeNum; + @TableField(exist = false) + @Property("渠道编码对应的信息") + private Map codeNumMation; + @TableField("enabled") @ApiModelProperty(value = "状态,参考#EnableEnum枚举类", required = "required,num") private Integer enabled; diff --git a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/sms/service/impl/SmsChannelServiceImpl.java b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/sms/service/impl/SmsChannelServiceImpl.java index 28bcc0c8..138dbf65 100644 --- a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/sms/service/impl/SmsChannelServiceImpl.java +++ b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/sms/service/impl/SmsChannelServiceImpl.java @@ -14,6 +14,7 @@ import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; import com.skyeye.common.util.mybatisplus.MybatisPlusUtil; import com.skyeye.exception.CustomException; +import com.skyeye.sms.classenum.SmsChannelEnum; import com.skyeye.sms.core.service.SmsClient; import com.skyeye.sms.core.service.SmsClientFactory; import com.skyeye.sms.dao.SmsChannelDao; @@ -63,6 +64,13 @@ public class SmsChannelServiceImpl extends SkyeyeBusinessServiceImpl