mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-01-01 12:55:05 +08:00
feat: 支付应用: 删除根据id和enabled更新接口,增加列表查询所有已启用信息
This commit is contained in:
commit
6bb5caa381
7 changed files with 56 additions and 5 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 = "备注")
|
||||
|
|
|
@ -16,4 +16,10 @@ import com.skyeye.pay.entity.PayApp;
|
|||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface PayAppService extends SkyeyeBusinessService<PayApp> {
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
void updateEnabled(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
>>>>>>> 6ea701f278e38aa5a863728a89295f400d79faff
|
||||
}
|
||||
|
|
|
@ -16,4 +16,5 @@ import com.skyeye.pay.entity.PayChannel;
|
|||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface PayChannelService extends SkyeyeBusinessService<PayChannel> {
|
||||
|
||||
}
|
||||
|
|
|
@ -42,6 +42,22 @@ public class PayAppServiceImpl extends SkyeyeBusinessServiceImpl<PayAppDao, PayA
|
|||
verify(payApp.getId());
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
@Override
|
||||
public void updateEnabled(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> params = inputObject.getParams();
|
||||
String id = params.get("id").toString();
|
||||
String enabled = params.get("enabled").toString();
|
||||
verify(id);
|
||||
UpdateWrapper<PayApp> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.set(MybatisPlusUtil.toColumns(PayApp::getEnabled), enabled)
|
||||
.eq(CommonConstants.ID, id);
|
||||
update(updateWrapper);
|
||||
refreshCache(id);
|
||||
}
|
||||
|
||||
>>>>>>> 6ea701f278e38aa5a863728a89295f400d79faff
|
||||
private void verify(String id){
|
||||
QueryWrapper<PayApp> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(CommonConstants.ID, id);
|
||||
|
|
|
@ -12,9 +12,14 @@ import com.skyeye.common.constans.CommonConstants;
|
|||
import com.skyeye.exception.CustomException;
|
||||
import com.skyeye.pay.dao.PayChannelDao;
|
||||
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: 支付渠道服务层
|
||||
|
@ -27,6 +32,23 @@ import org.springframework.stereotype.Service;
|
|||
@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<>();
|
||||
|
|
|
@ -62,12 +62,12 @@ public class ShopMemberLevelController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 批量删除快递运费费用模版信息
|
||||
* 批量删除快递运费费用模版信息[ids]
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "deleteMemberLeveByIds", value = "批量删除快递运费模版信息", method = "DELETE", allUse = "2")
|
||||
@ApiOperation(id = "deleteMemberLeveByIds", value = "批量删除会员等级信息", method = "DELETE", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "ids", name = "ids", value = "主键id列表,多个id用逗号分隔", required = "required")})
|
||||
@RequestMapping("/post/ShopMemberLevelController/deleteMemberLeveByIds")
|
||||
|
|
|
@ -61,7 +61,7 @@ public class ShopMemberLevelServiceImpl extends SkyeyeBusinessServiceImpl<ShopMe
|
|||
}
|
||||
|
||||
/**
|
||||
* 批量删除快递运费模版信息
|
||||
* 批量删除会员等级模版信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
|
|
Loading…
Reference in a new issue