| | |
| | | import com.agentdriving.driver.modular.system.warpper.*; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.agentdriving.driver.modular.system.model.Driver; |
| | | import com.agentdriving.driver.modular.system.model.DriverBank; |
| | | import com.agentdriving.driver.modular.system.model.Edition; |
| | | import com.agentdriving.driver.modular.system.model.JoiningRequirements; |
| | | import com.agentdriving.driver.modular.system.service.*; |
| | | import com.agentdriving.driver.modular.system.util.PayMoneyUtil; |
| | | import com.agentdriving.driver.modular.system.util.huawei.OBSUtil; |
| | | import com.agentdriving.driver.modular.system.util.huawei.SMSUtil; |
| | | import com.agentdriving.driver.modular.system.warpper.*; |
| | | import com.agentdriving.driver.modular.system.util.RedisUtil; |
| | | import com.agentdriving.driver.modular.system.util.ResultUtil; |
| | | import com.agentdriving.driver.modular.system.util.UUIDUtil; |
| | |
| | | } |
| | | } |
| | | String numberRandom = UUIDUtil.getNumberRandom(5); |
| | | SMSUtil.send(phone, "1d0f0cbe5b214b0d8efa891730eb532a", "[\"" + numberRandom + "\"]"); |
| | | SMSUtil.send(phone, "4d18e74a95ca400d802755fe0f903589", "[\"" + numberRandom + "\"]"); |
| | | redisUtil.setStrValue(receiver + phone, numberRandom, 300);//5分钟有效期 |
| | | return ResponseWarpper.success(ResultUtil.success()); |
| | | }catch (Exception e){ |
| | |
| | | @ApiOperation(value = "账户余额充值", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "充值金额", name = "amount", required = true, dataType = "double"), |
| | | @ApiImplicitParam(value = "支付方式(1=微信,2=支付宝)", name = "type", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper balanceRecharge(Double amount){ |
| | | public ResponseWarpper balanceRecharge(Integer type, Double amount){ |
| | | if(null == amount){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("amount")); |
| | | } |
| | | if(null == type){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("type")); |
| | | } |
| | | try { |
| | | Integer uid = driverService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | ResultUtil resultUtil = driverService.balanceRecharge(uid, amount); |
| | | ResultUtil resultUtil = driverService.balanceRecharge(uid, type, amount); |
| | | return ResponseWarpper.success(resultUtil); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 账户余额充值支付回调 |
| | | * @param request |
| | | * @param response |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/driver/balanceRechargeCallbackAli") |
| | | public void balanceRechargeCallbackAli(HttpServletRequest request, HttpServletResponse response){ |
| | | try { |
| | | Map<String, String> map = payMoneyUtil.alipayCallback(request); |
| | | if(null != map){ |
| | | String out_trade_no = map.get("out_trade_no"); |
| | | String transaction_id = map.get("trade_no"); |
| | | String orderId = out_trade_no.substring(17); |
| | | driverService.balanceRechargeCallback(out_trade_no, transaction_id); |
| | | response.setContentType("text/html;charset=UTF-8"); |
| | | PrintWriter out; |
| | | out = response.getWriter(); |
| | | out.println("success"); // 请不要修改或删除 |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/driver/queryPerformanceSummary") |
| | | // @ServiceLog(name = "获取业绩排行", url = "/api/driver/queryPerformanceSummary") |