From 6ea701f278e38aa5a863728a89295f400d79faff Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Sat, 5 Oct 2024 21:24:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E4=BB=98=E6=B8=A0=E9=81=93?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/skyeye/pay/entity/PayChannel.java | 10 ++++++-- .../com/skyeye/pay/service/PayAppService.java | 2 ++ .../skyeye/pay/service/PayChannelService.java | 1 + .../pay/service/impl/PayAppServiceImpl.java | 1 + .../service/impl/PayChannelServiceImpl.java | 25 +++++++++++++++++-- 5 files changed, 35 insertions(+), 4 deletions(-) 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 12b6d585..9fa9528c 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 @@ -9,10 +9,12 @@ import com.baomidou.mybatisplus.annotation.TableId; 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.annotation.unique.UniqueField; import com.skyeye.common.constans.RedisConstants; import com.skyeye.common.entity.features.OperatorUserInfo; +import com.skyeye.pay.core.PayClientConfig; import lombok.Data; /** @@ -26,7 +28,7 @@ import lombok.Data; @Data @UniqueField({"codeNum", "appId"}) @RedisCacheField(name = "skyeye:payChannel", cacheTime = RedisConstants.THIRTY_DAY_SECONDS) -@TableName("skyeye_pay_channel") +@TableName(value = "skyeye_pay_channel", autoResultMap = true) @ApiModel("支付渠道实体类") public class PayChannel extends OperatorUserInfo { @@ -50,9 +52,13 @@ public class PayChannel extends OperatorUserInfo { @ApiModelProperty(value = "应用id", required = "required") private String appId; + @TableField(exist = false) + @Property("应用信息") + private PayApp appMation; + @TableField("config") @ApiModelProperty(value = "支付渠道配置", required = "required") - private String config; + private PayClientConfig config; @TableField("remark") @ApiModelProperty(value = "备注") diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/PayAppService.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/PayAppService.java index 72d9533f..b7397b55 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/PayAppService.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/PayAppService.java @@ -18,5 +18,7 @@ import com.skyeye.pay.entity.PayApp; * 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的 */ public interface PayAppService extends SkyeyeBusinessService { + void updateEnabled(InputObject inputObject, OutputObject outputObject); + } diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/PayChannelService.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/PayChannelService.java index 69a36278..01be5dc2 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/PayChannelService.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/PayChannelService.java @@ -16,4 +16,5 @@ import com.skyeye.pay.entity.PayChannel; * 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的 */ public interface PayChannelService extends SkyeyeBusinessService { + } diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/impl/PayAppServiceImpl.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/impl/PayAppServiceImpl.java index d6626198..91587b71 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/impl/PayAppServiceImpl.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/service/impl/PayAppServiceImpl.java @@ -50,6 +50,7 @@ public class PayAppServiceImpl extends SkyeyeBusinessServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq(CommonConstants.ID, id); 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 14cfc35c..15d53277 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 @@ -12,11 +12,15 @@ import com.skyeye.common.constans.CommonConstants; import com.skyeye.common.object.InputObject; import com.skyeye.exception.CustomException; import com.skyeye.pay.dao.PayChannelDao; -import com.skyeye.pay.entity.PayApp; import com.skyeye.pay.entity.PayChannel; +import com.skyeye.pay.service.PayAppService; import com.skyeye.pay.service.PayChannelService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; +import java.util.Map; + /** * @ClassName: PayChannelServiceImpl * @Description: 支付渠道服务层 @@ -26,9 +30,26 @@ import org.springframework.stereotype.Service; * 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的 */ @Service -@SkyeyeService(name = "支付渠道",groupName = "支付渠道") +@SkyeyeService(name = "支付渠道", groupName = "支付渠道") public class PayChannelServiceImpl extends SkyeyeBusinessServiceImpl implements PayChannelService { + @Autowired + private PayAppService payAppService; + + @Override + public List> queryPageDataList(InputObject inputObject) { + List> beans = super.queryPageDataList(inputObject); + payAppService.setMationForMap(beans, "appId", "appMation"); + return beans; + } + + @Override + public PayChannel selectById(String id) { + PayChannel payChannel = super.selectById(id); + payAppService.setDataMation(payChannel, PayChannel::getAppId); + return payChannel; + } + @Override public void updatePrepose(PayChannel payChannel) { QueryWrapper queryWrapper = new QueryWrapper<>();