| | |
| | | import com.supersavedriving.user.modular.system.util.UUIDUtil; |
| | | import com.supersavedriving.user.modular.system.util.huawei.OBSUtil; |
| | | import com.supersavedriving.user.modular.system.util.huawei.SMSUtil; |
| | | import com.supersavedriving.user.modular.system.util.weChat.WeChatUtil; |
| | | import com.supersavedriving.user.modular.system.warpper.*; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | @Autowired |
| | | private WeChatUtil weChatUtil; |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/appUser/getUrlLink") |
| | | // @ServiceLog(name = "获取跳转微信url_link", url = "/base/appUser/appUserLogin") |
| | | @ApiOperation(value = "获取跳转微信url_link", tags = {"用户端-首页"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "跳转小程序路径", name = "path", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "跳转的附带参数", name = "query", required = false, dataType = "string"), |
| | | }) |
| | | public ResponseWarpper<String> getUrlLink(String path, String query){ |
| | | try { |
| | | String urlLink = weChatUtil.getUrlLink(path, query, "release"); |
| | | return ResponseWarpper.success(urlLink); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | SystemConfig systemConfig = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 6)); |
| | | if(null != systemConfig){ |
| | | JSONObject jsonObject = JSON.parseObject(systemConfig.getContent()); |
| | | return ResponseWarpper.success("充值满" + jsonObject.getDouble("num2") + "元,下单享9折优惠!"); |
| | | return ResponseWarpper.success("充值满" + jsonObject.getDouble("num2") + "元,下单享9.5折优惠!"); |
| | | } |
| | | return ResponseWarpper.success(); |
| | | }catch (Exception e){ |
| | |
| | | } else {//验签失败业务处理逻辑 |
| | | System.err.println("支付回调验签失败"); |
| | | } |
| | | |
| | | // Map<String, String> map = payMoneyUtil.weixinpayCallback(request); |
| | | // if(null != map){ |
| | | // String out_trade_no = map.get("out_trade_no"); |
| | | // String transaction_id = map.get("transaction_id"); |
| | | // String result = map.get("result"); |
| | | // String orderId = out_trade_no.substring(17); |
| | | // appUserService.rechargeBalanceCallback(out_trade_no, transaction_id); |
| | | // PrintWriter out = response.getWriter(); |
| | | // out.print(result); |
| | | // out.flush(); |
| | | // out.close(); |
| | | // } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |