|
@@ -1,11 +1,13 @@
|
|
|
package com.cyksj.web.controller.manage.shop;
|
|
package com.cyksj.web.controller.manage.shop;
|
|
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.dto.Result;
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.model.entity.Channel;
|
|
import com.cyksj.model.entity.Channel;
|
|
|
import com.cyksj.model.entity.ShopConfig;
|
|
import com.cyksj.model.entity.ShopConfig;
|
|
|
|
|
+import com.cyksj.model.request.ChannelPayReq;
|
|
|
import com.cyksj.service.mange.channel.ChannelService;
|
|
import com.cyksj.service.mange.channel.ChannelService;
|
|
|
import com.cyksj.service.mange.shop.ShopConfigService;
|
|
import com.cyksj.service.mange.shop.ShopConfigService;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
@@ -62,4 +64,21 @@ public class ShopConfigController {
|
|
|
shopConfigService.removeById(id);
|
|
shopConfigService.removeById(id);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 更换渠道支付方式
|
|
|
|
|
+ */
|
|
|
|
|
+ @PutMapping("/update/channel/pay")
|
|
|
|
|
+ @SaCheckPermission("merchant:updateChannelShop")
|
|
|
|
|
+ public Result<String> updateChannelPay(@RequestBody ChannelPayReq req) {
|
|
|
|
|
+ String wxShopId = req.getWxShopId();
|
|
|
|
|
+ String zfbShopId = req.getZfbShopId();
|
|
|
|
|
+ if (StrUtil.isAllEmpty(wxShopId, zfbShopId)) {
|
|
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
|
|
+ }
|
|
|
|
|
+ channelService.update(Wrappers.lambdaUpdate(Channel.class)
|
|
|
|
|
+ .eq(StrUtil.isNotBlank(wxShopId), Channel::getWxShopId, wxShopId)
|
|
|
|
|
+ .eq(StrUtil.isNotBlank(zfbShopId), Channel::getZfbShopId, zfbShopId));
|
|
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|