mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-01-01 12:55:05 +08:00
feat: 支付渠道修改
This commit is contained in:
parent
470e3e26c3
commit
6ea701f278
5 changed files with 35 additions and 4 deletions
|
@ -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 = "备注")
|
||||
|
|
|
@ -18,5 +18,7 @@ import com.skyeye.pay.entity.PayApp;
|
|||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface PayAppService extends SkyeyeBusinessService<PayApp> {
|
||||
|
||||
void updateEnabled(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
}
|
||||
|
|
|
@ -16,4 +16,5 @@ import com.skyeye.pay.entity.PayChannel;
|
|||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface PayChannelService extends SkyeyeBusinessService<PayChannel> {
|
||||
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ public class PayAppServiceImpl extends SkyeyeBusinessServiceImpl<PayAppDao, PayA
|
|||
update(updateWrapper);
|
||||
refreshCache(id);
|
||||
}
|
||||
|
||||
private void verify(String id){
|
||||
QueryWrapper<PayApp> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(CommonConstants.ID, id);
|
||||
|
|
|
@ -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<PayChannelDao, PayChannel> implements PayChannelService {
|
||||
|
||||
@Autowired
|
||||
private PayAppService payAppService;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryPageDataList(InputObject inputObject) {
|
||||
List<Map<String, Object>> 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<PayChannel> queryWrapper = new QueryWrapper<>();
|
||||
|
|
Loading…
Reference in a new issue