From eb6b6dbb35a9f029e0b7d269773685c19fd40976 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 11 七月 2024 10:47:51 +0800 Subject: [PATCH] 玩湃微信商户认证代码 --- cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java | 36 ++++++++++++++++++++++++++++++------ 1 files changed, 30 insertions(+), 6 deletions(-) diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java index 59e44a1..74fa039 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java +++ b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java @@ -15,6 +15,7 @@ import com.dsh.other.feignclient.model.BillingDataRequestVo; import com.dsh.other.feignclient.model.SiteChangeStateVO; import com.dsh.other.feignclient.model.SiteVo; +import com.dsh.other.mapper.TOperatorUserMapper; import com.dsh.other.model.*; import com.dsh.other.model.dto.siteDto.TSiteDTO; import com.dsh.other.model.vo.siteVo.ExpireSiteSearchVO; @@ -64,7 +65,34 @@ private UserCouponClient userCouponClient; @Autowired private CityManagerClient cityManagerClient; + @Autowired + private IOperatorUserService operatorUserService; + /** + * 通过运营商id查询运营商对应的支付宝商户号 + */ + @RequestMapping("/base/getSMIDByOperatorId") + @ResponseBody + public String getSMIDByOperatorId(Integer id) { + // 获取运营商的管理员 + return siteService.getSMIDByOperatorId(id); + }/** + * 根据运营商id获取对应运营商分账比例 返回格式: 微信分账比例,支付宝分账比例 + */ + @RequestMapping("/base/getProportionByOperatorId") + @ResponseBody + public String getProportionByOperatorId(Integer id) { + OperatorUser operatorId = operatorUserService.getOne( + new QueryWrapper<OperatorUser>().eq("operatorId",id) + ); + if (operatorId.getWechatProportion() == null){ + operatorId.setWechatProportion("0"); + } + if (operatorId.getAlipayProportion() == null){ + operatorId.setAlipayProportion("0"); + } + return operatorId.getWechatProportion()+","+operatorId.getAlipayProportion(); + } /** * 获取所有场地 */ @@ -340,7 +368,6 @@ } } - /** * 预约场地支付宝回调 * @@ -356,7 +383,8 @@ if (null != map) { String code = map.get("out_trade_no"); String trade_no = map.get("trade_no"); - SiteBooking siteBooking = siteBookingService.getOne(new QueryWrapper<SiteBooking>().eq("orderNo", code).eq("state", 1)); + SiteBooking siteBooking = siteBookingService.getOne(new QueryWrapper<SiteBooking>() + .eq("orderNo", code).eq("state", 1)); if (siteBooking.getStatus() == 0) { siteBooking.setPayTime(new Date()); siteBooking.setStatus(1); @@ -689,10 +717,6 @@ @Autowired private StoreService service; - - @Autowired - private IOperatorUserService operatorUserService; - @ResponseBody @PostMapping("/base/site/game") -- Gitblit v1.7.1