1 文件已重命名
33个文件已修改
21个文件已添加
| | |
| | | <artifactId>alipay-sdk-java</artifactId> |
| | | <version>4.8.10.ALL</version> |
| | | </dependency> |
| | | <!-- oos对象存储 --> |
| | | <!-- obs对象存储 --> |
| | | <dependency> |
| | | <groupId>com.aliyun.oss</groupId> |
| | | <artifactId>aliyun-sdk-oss</artifactId> |
| | | <version>3.8.0</version> |
| | | <groupId>com.huaweicloud</groupId> |
| | | <artifactId>esdk-obs-java-bundle</artifactId> |
| | | <version>[3.21.11,)</version> |
| | | </dependency> |
| | | <!-- https://mvnrepository.com/artifact/com.aliyun/aliyun-java-sdk-core --> |
| | | <dependency> |
| | |
| | | /** |
| | | * token异常 |
| | | */ |
| | | TOKEN_EXPIRED(10030, "token过期"), |
| | | TOKEN_ERROR(10030, "token验证失败"), |
| | | TOKEN_EXPIRED(600, "token过期"), |
| | | TOKEN_ERROR(600, "token验证失败"), |
| | | |
| | | /** |
| | | * 签名异常 |
| | |
| | | import com.supersavedriving.driver.core.util.JwtTokenUtil; |
| | | import com.supersavedriving.driver.core.base.tips.ErrorTip; |
| | | import com.supersavedriving.driver.core.util.RenderUtil; |
| | | import com.supersavedriving.driver.modular.system.warpper.ResponseWarpper; |
| | | import io.jsonwebtoken.JwtException; |
| | | import org.springframework.web.method.HandlerMethod; |
| | | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; |
| | |
| | | } |
| | | } catch (JwtException e) { |
| | | //有异常就是token解析失败 |
| | | RenderUtil.renderJson(response, new ErrorTip(BizExceptionEnum.TOKEN_ERROR.getCode(), BizExceptionEnum.TOKEN_ERROR.getMessage())); |
| | | // RenderUtil.renderJson(response, new ErrorTip(BizExceptionEnum.TOKEN_ERROR.getCode(), BizExceptionEnum.TOKEN_ERROR.getMessage())); |
| | | RenderUtil.renderJson(response, ResponseWarpper.tokenErr()); |
| | | return false; |
| | | } |
| | | } else { |
| | | //header没有带Bearer字段 |
| | | RenderUtil.renderJson(response, new ErrorTip(BizExceptionEnum.TOKEN_ERROR.getCode(), BizExceptionEnum.TOKEN_ERROR.getMessage())); |
| | | // RenderUtil.renderJson(response, new ErrorTip(BizExceptionEnum.TOKEN_ERROR.getCode(), BizExceptionEnum.TOKEN_ERROR.getMessage())); |
| | | RenderUtil.renderJson(response, ResponseWarpper.tokenErr()); |
| | | return false; |
| | | } |
| | | return true; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.supersavedriving.driver.modular.system.model.JoiningRequirements; |
| | | import com.supersavedriving.driver.modular.system.service.IJoiningRequirementsService; |
| | | import com.supersavedriving.driver.modular.system.service.*; |
| | | import com.supersavedriving.driver.modular.system.util.huawei.SMSUtil; |
| | | import com.supersavedriving.driver.modular.system.warpper.*; |
| | | import com.supersavedriving.driver.core.common.annotion.ServiceLog; |
| | | import com.supersavedriving.driver.core.util.ToolUtil; |
| | | import com.supersavedriving.driver.modular.system.service.IBranchOfficeService; |
| | | import com.supersavedriving.driver.modular.system.service.IDriverService; |
| | | import com.supersavedriving.driver.modular.system.util.RedisUtil; |
| | | import com.supersavedriving.driver.modular.system.util.ResultUtil; |
| | | import com.supersavedriving.driver.modular.system.util.SMSUtil; |
| | | import com.supersavedriving.driver.modular.system.util.UUIDUtil; |
| | | import com.supersavedriving.driver.modular.system.warpper.*; |
| | | import com.supersavedriving.driver.modular.system.warpper.DriverPositionWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.DriverRegisterWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.PromotionWarpper; |
| | |
| | | |
| | | @Autowired |
| | | private IJoiningRequirementsService joiningRequirementsService; |
| | | |
| | | @Autowired |
| | | private IAccountChangeDetailService accountChangeDetailService; |
| | | |
| | | @Autowired |
| | | private IYouTuiDriverService youTuiDriverService; |
| | | |
| | | @Autowired |
| | | private IRevenueService revenueService; |
| | | |
| | | @Autowired |
| | | private IOrderService orderService; |
| | | |
| | | @Autowired |
| | | private ICashWithdrawalService cashWithdrawalService; |
| | | |
| | | |
| | | |
| | |
| | | return ResponseWarpper.success(ResultUtil.paranErr("phone")); |
| | | } |
| | | try { |
| | | String numberRandom = UUIDUtil.getNumberRandom(6); |
| | | SMSUtil.send_huawei_sms("", receiver + phone, "[\"" + numberRandom + "\"]"); |
| | | String numberRandom = UUIDUtil.getNumberRandom(5); |
| | | SMSUtil.send(receiver + phone, "", "[\"" + numberRandom + "\"]"); |
| | | redisUtil.setStrValue(receiver + phone, numberRandom, 300);//5分钟有效期 |
| | | return ResponseWarpper.success(ResultUtil.success()); |
| | | }catch (Exception e){ |
| | |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/driver/queryDriverIntegralIncomeAndExpenses") |
| | | // @ServiceLog(name = "获取积分收支明细", url = "/api/driver/queryDriverIntegralIncomeAndExpenses") |
| | | @ApiOperation(value = "获取积分收支明细", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "类型(1=获取,2=消耗)", name = "type", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<List<IntegralIncomeAndExpensesWarpper>> queryDriverIntegralIncomeAndExpenses(Integer type, Integer pageNum, Integer pageSize){ |
| | | if(null == pageNum){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageNum")); |
| | | } |
| | | if(null == pageSize){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageSize")); |
| | | } |
| | | try { |
| | | Integer uid = driverService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | List<IntegralIncomeAndExpensesWarpper> integralIncomeAndExpensesWarppers = accountChangeDetailService.queryDriverIntegralIncomeAndExpenses(uid, type, pageNum, pageSize); |
| | | return ResponseWarpper.success(integralIncomeAndExpensesWarppers); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/driver/queryDriverYouTuiList") |
| | | // @ServiceLog(name = "获取积分兑换记录", url = "/api/driver/queryDriverYouTuiList") |
| | | @ApiOperation(value = "获取积分兑换记录", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<List<DriverYouTuiListWarpper>> queryDriverYouTuiList(){ |
| | | try { |
| | | Integer uid = driverService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | List<DriverYouTuiListWarpper> driverYouTuiListWarppers = youTuiDriverService.queryDriverYouTuiList(uid); |
| | | return ResponseWarpper.success(driverYouTuiListWarppers); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/driver/queryCommissionList") |
| | | // @ServiceLog(name = "获取佣金记录", url = "/api/driver/queryCommissionList") |
| | | @ApiOperation(value = "获取佣金记录", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "日期", name = "time", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<List<CommissionListWarpper>> queryCommissionList(String time, Integer pageNum, Integer pageSize){ |
| | | if(null == pageNum){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageNum")); |
| | | } |
| | | if(null == pageSize){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageSize")); |
| | | } |
| | | try { |
| | | Integer uid = driverService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | List<CommissionListWarpper> list = revenueService.queryCommissionList(uid, time, pageNum, pageSize); |
| | | return ResponseWarpper.success(list); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/driver/queryInviteList") |
| | | // @ServiceLog(name = "获取司机邀请列表", url = "/api/driver/queryInviteList") |
| | | @ApiOperation(value = "获取司机邀请列表", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "日期", name = "time", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<List<InviteListWarpper>> queryInviteList(String time, Integer pageNum, Integer pageSize){ |
| | | if(null == pageNum){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageNum")); |
| | | } |
| | | if(null == pageSize){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageSize")); |
| | | } |
| | | try { |
| | | Integer uid = driverService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | List<InviteListWarpper> inviteListWarppers = orderService.queryInviteList(uid, time, pageNum, pageSize); |
| | | return ResponseWarpper.success(inviteListWarppers); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/driver/queryCommissionDetail") |
| | | // @ServiceLog(name = "获取司机佣金明细", url = "/api/driver/queryCommissionDetail") |
| | | @ApiOperation(value = "获取司机佣金明细", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "日期", name = "time", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<CommissionDetailListWarpper> queryCommissionDetail(String time, Integer pageNum, Integer pageSize){ |
| | | if(null == pageNum){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageNum")); |
| | | } |
| | | if(null == pageSize){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageSize")); |
| | | } |
| | | try { |
| | | Integer uid = driverService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | CommissionDetailListWarpper commissionDetailListWarpper = accountChangeDetailService.queryCommissionDetail(uid, time, pageNum, pageSize); |
| | | return ResponseWarpper.success(commissionDetailListWarpper); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/driver/withdrawCash") |
| | | // @ServiceLog(name = "司机提现操作", url = "/api/driver/withdrawCash") |
| | | @ApiOperation(value = "司机提现操作", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "类型(1=余额提现,2=佣金提现)", name = "type", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "提现金额", name = "money", required = true, dataType = "double"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper withdrawCash(Integer type, Double money){ |
| | | if(null == type){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("type")); |
| | | } |
| | | if(null == money){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("money")); |
| | | } |
| | | try { |
| | | Integer uid = driverService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | ResultUtil resultUtil = cashWithdrawalService.withdrawCash(uid, type, money); |
| | | return ResponseWarpper.success(resultUtil); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.supersavedriving.driver.modular.system.api; |
| | | |
| | | import com.supersavedriving.driver.modular.system.model.Order; |
| | | import com.supersavedriving.driver.modular.system.warpper.*; |
| | | import com.supersavedriving.driver.core.common.annotion.ServiceLog; |
| | | import com.supersavedriving.driver.core.util.ToolUtil; |
| | |
| | | @ResponseBody |
| | | @PostMapping("/api/order/cancelTransferOrder") |
| | | // @ServiceLog(name = "司机取消转单操作", url = "/api/order/cancelTransferOrder") |
| | | @ApiOperation(value = "司机取消转单操作", tags = {"司机端-我的订单"}, notes = "") |
| | | @ApiOperation(value = "司机取消转单操作", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "long"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/order/queryDriverOrderList") |
| | | // @ServiceLog(name = "获取司机订单列表", url = "/api/order/queryDriverOrderList") |
| | | @ApiOperation(value = "获取司机订单列表", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单状态(107=未支付,109=已完成,301=已取消)", name = "state", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<List<DriverOrderListWarpper>> queryDriverOrderList(Integer state, Integer pageNum, Integer pageSize){ |
| | | if(null == pageNum){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageNum")); |
| | | } |
| | | if(null == pageSize){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageSize")); |
| | | } |
| | | try { |
| | | Integer uid = driverService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | List<DriverOrderListWarpper> driverOrderListWarppers = orderService.queryDriverOrderList(uid, state, pageNum, pageSize); |
| | | return ResponseWarpper.success(driverOrderListWarppers); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.api; |
| | | |
| | | import com.supersavedriving.driver.core.util.ToolUtil; |
| | | import com.supersavedriving.driver.modular.system.service.IDriverService; |
| | | import com.supersavedriving.driver.modular.system.service.IYouTuiDriverService; |
| | | import com.supersavedriving.driver.modular.system.util.ResultUtil; |
| | | import com.supersavedriving.driver.modular.system.warpper.DriverYouTuiWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.ResponseWarpper; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/15 17:50 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class YouTuiController { |
| | | |
| | | @Autowired |
| | | private IYouTuiDriverService youTuiDriverService; |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/youtui/queryDriverYouTui") |
| | | // @ServiceLog(name = "获取司机优推数据", url = "/api/youtui/queryDriverYouTui") |
| | | @ApiOperation(value = "获取司机优推数据", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<List<DriverYouTuiWarpper>> queryDriverYouTui(Integer pageNum, Integer pageSize){ |
| | | if(ToolUtil.isEmpty(pageNum)){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageNum")); |
| | | } |
| | | if(ToolUtil.isEmpty(pageSize)){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageSize")); |
| | | } |
| | | try { |
| | | Integer uid = driverService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | List<DriverYouTuiWarpper> driverYouTuiWarppers = youTuiDriverService.queryDriverYouTui(uid, pageNum, pageSize); |
| | | return ResponseWarpper.success(driverYouTuiWarppers); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/youtui/queryAllYouTui") |
| | | // @ServiceLog(name = "获取兑换权益列表", url = "/api/youtui/queryAllYouTui") |
| | | @ApiOperation(value = "获取兑换权益列表", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper<List<DriverYouTuiWarpper>> queryAllYouTui(Integer pageNum, Integer pageSize){ |
| | | if(ToolUtil.isEmpty(pageNum)){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageNum")); |
| | | } |
| | | if(ToolUtil.isEmpty(pageSize)){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("pageSize")); |
| | | } |
| | | try { |
| | | Integer uid = driverService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | List<DriverYouTuiWarpper> driverYouTuiWarppers = youTuiDriverService.queryAllYouTui(pageNum, pageSize); |
| | | return ResponseWarpper.success(driverYouTuiWarppers); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/youtui/redeemBenefits") |
| | | // @ServiceLog(name = "司机兑换优推", url = "/api/youtui/redeemBenefits") |
| | | @ApiOperation(value = "司机兑换优推", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "优推数据id", name = "id", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper redeemBenefits(Integer id){ |
| | | if(ToolUtil.isEmpty(id)){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("id")); |
| | | } |
| | | try { |
| | | Integer uid = driverService.getUserByRequest(); |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | ResultUtil resultUtil = youTuiDriverService.redeemBenefits(uid, id); |
| | | return ResponseWarpper.success(resultUtil); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ResponseWarpper(500, e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.supersavedriving.driver.modular.system.model.AccountChangeDetail; |
| | | import com.supersavedriving.driver.modular.system.warpper.CommissionDetailWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.IntegralIncomeAndExpensesWarpper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/4 11:33 |
| | | */ |
| | | public interface AccountChangeDetailMapper extends BaseMapper<AccountChangeDetail> { |
| | | |
| | | |
| | | /** |
| | | * 获取积分收支明细 |
| | | * @param driverId |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<IntegralIncomeAndExpensesWarpper> queryDriverIntegralIncomeAndExpenses(@Param("driverId") Integer driverId, @Param("type") Integer type, |
| | | @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize); |
| | | |
| | | |
| | | /** |
| | | * 获取佣金收入明细列表 |
| | | * @param driverId |
| | | * @param time |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<CommissionDetailWarpper> queryCommissionDetail(@Param("driverId") Integer driverId, @Param("time") String time, |
| | | @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize); |
| | | |
| | | |
| | | /** |
| | | * 获取总佣金 |
| | | * @param driverId |
| | | * @param time |
| | | * @return |
| | | */ |
| | | Double queryCommissionDetailTotal(@Param("driverId") Integer driverId, @Param("time") String time); |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.supersavedriving.driver.modular.system.model.CashWithdrawal; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 17:02 |
| | | */ |
| | | public interface CashWithdrawalMapper extends BaseMapper<CashWithdrawal> { |
| | | } |
| | |
| | | package com.supersavedriving.driver.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.supersavedriving.driver.modular.system.warpper.DriverOrderListWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.HallOrderList; |
| | | import com.supersavedriving.driver.modular.system.model.Order; |
| | | import com.supersavedriving.driver.modular.system.warpper.InviteListWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.OrderInfoWarpper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | OrderInfoWarpper queryOrderInfo(@Param("orderId") Long orderId); |
| | | |
| | | |
| | | /** |
| | | * 获取司机订单列表 |
| | | * @param driverId |
| | | * @param state |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<DriverOrderListWarpper> queryDriverOrderList(@Param("driverId") Integer driverId, @Param("state") Integer state, |
| | | @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize); |
| | | |
| | | |
| | | /** |
| | | * 获取司机邀请列表 |
| | | * @param driverId |
| | | * @param time |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<InviteListWarpper> queryInviteList(@Param("driverId") Integer driverId, @Param("time") String time, |
| | | @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.supersavedriving.driver.modular.system.model.YouTuiDriver; |
| | | import com.supersavedriving.driver.modular.system.warpper.DriverYouTuiWarpper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface YouTuiDriverMapper extends BaseMapper<YouTuiDriver> { |
| | | |
| | | |
| | | /** |
| | | * 获取司机优推兑换月数据 |
| | | * @param driverId |
| | | * @return |
| | | */ |
| | | List<Map<String, String>> queryRedemptionDate(@Param("driverId") Integer driverId); |
| | | |
| | | |
| | | /** |
| | | * 获取日期内的记录 |
| | | * @param driverId |
| | | * @param createTime |
| | | * @return |
| | | */ |
| | | List<DriverYouTuiWarpper> queryYouTuiDriverList(@Param("driverId") Integer driverId, @Param("createTime") String createTime); |
| | | |
| | | |
| | | /** |
| | | * 获取司机优推数据 |
| | | * @param driverId |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<DriverYouTuiWarpper> queryDriverYouTui(@Param("driverId") Integer driverId, @Param("pageNum") Integer pageNum, |
| | | @Param("pageSize") Integer pageSize); |
| | | |
| | | |
| | | /** |
| | | * 获取优推数据 |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<DriverYouTuiWarpper> queryAllYouTui(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize); |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.supersavedriving.driver.modular.system.model.YouTui; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 9:59 |
| | | */ |
| | | public interface YouTuiMapper extends BaseMapper<YouTui> { |
| | | } |
| | |
| | | <result column="userType" property="userType"/> |
| | | <result column="userId" property="userId"/> |
| | | <result column="type" property="type"/> |
| | | <result column="changeType" property="changeType"/> |
| | | <result column="oldData" property="oldData"/> |
| | | <result column="newData" property="newData"/> |
| | | <result column="explain" property="explain"/> |
| | | <result column="createTime" property="createTime"/> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <select id="queryDriverIntegralIncomeAndExpenses" resultType="com.supersavedriving.driver.modular.system.warpper.IntegralIncomeAndExpensesWarpper"> |
| | | select * from ( |
| | | select |
| | | explain as description, |
| | | UNIX_TIMESTAMP(createTime) * 1000 as createTime, |
| | | (newData - oldData) as integral |
| | | from t_account_change_detail where `type` = 2 and userType = 2 and userId = #{driverId} |
| | | ) as aa where 1 = 1 |
| | | <if test="null != type and 1 == type"> |
| | | and aa.integral > 0 |
| | | </if> |
| | | <if test="null != type and 2 == type"> |
| | | and aa.integral < 0 |
| | | </if> |
| | | order by aa.createTime desc limit #{pageNum}, #{pageSize} |
| | | </select> |
| | | |
| | | |
| | | <select id="queryCommissionDetail" resultType="com.supersavedriving.driver.modular.system.warpper.CommissionDetailWarpper"> |
| | | select |
| | | `explain`, |
| | | UNIX_TIMESTAMP(createTime) * 1000 as createTime, |
| | | (newData - oldData) as money, |
| | | newData as balance |
| | | from t_account_change_detail where userType = 2 and userId = #{driverId} |
| | | <if test="null != time and '' != time"> |
| | | and DATE_FORMAT(createTime, '%Y年%m月') = #{time} |
| | | </if> |
| | | order by createTime desc limit #{pageNum}, #{pageSize} |
| | | </select> |
| | | |
| | | |
| | | <select id="queryCommissionDetailTotal" resultType="double"> |
| | | select |
| | | sum(money) as money |
| | | from ( |
| | | select |
| | | (newData - oldData) as money |
| | | from t_account_change_detail where userType = 2 and userId = #{driverId} |
| | | <if test="null != time and '' != time"> |
| | | and DATE_FORMAT(createTime, '%Y年%m月') = #{time} |
| | | </if> |
| | | ) as aa where aa.money > 0 |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.supersavedriving.driver.modular.system.dao.CashWithdrawalMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.supersavedriving.driver.modular.system.model.CashWithdrawal"> |
| | | <id column="id" property="id"/> |
| | | <result column="type" property="type"/> |
| | | <result column="userDriverId" property="userDriverId"/> |
| | | <result column="code" property="code"/> |
| | | <result column="businessType" property="businessType"/> |
| | | <result column="amount" property="amount"/> |
| | | <result column="state" property="state"/> |
| | | <result column="createTime" property="createTime"/> |
| | | </resultMap> |
| | | </mapper> |
| | |
| | | <result column="branchOfficeId" property="branchOfficeId"/> |
| | | <result column="balance" property="balance"/> |
| | | <result column="backgroundBalance" property="backgroundBalance"/> |
| | | <result column="couponBalance" property="couponBalance"/> |
| | | <result column="approvalStatus" property="approvalStatus"/> |
| | | <result column="approvalNotes" property="approvalNotes"/> |
| | | <result column="approvalUserId" property="approvalUserId"/> |
| | |
| | | left join t_app_user b on (a.userId = b.id) |
| | | where a.id = #{orderId} |
| | | </select> |
| | | |
| | | |
| | | <select id="queryDriverOrderList" resultType="com.supersavedriving.driver.modular.system.warpper.DriverOrderListWarpper"> |
| | | select |
| | | id, |
| | | '超省新代驾订单' as title, |
| | | UNIX_TIMESTAMP(createTime) * 1000 as createTime, |
| | | startAddress, |
| | | endAddress, |
| | | state, |
| | | source |
| | | from t_order where status = 1 and driverId = #{driverId} |
| | | <if test="null != state and 107 == state"> |
| | | and state = #{state} |
| | | </if> |
| | | <if test="null != state and 109 == state"> |
| | | and state in (108, 109) |
| | | </if> |
| | | <if test="null != state and 301 == state"> |
| | | and state = #{state} |
| | | </if> |
| | | order by createTime desc limit #{pageNum}, #{pageSize} |
| | | </select> |
| | | |
| | | |
| | | <select id="queryInviteList" resultType="com.supersavedriving.driver.modular.system.warpper.InviteListWarpper"> |
| | | select * from ( |
| | | select |
| | | a.id, |
| | | a.nickname, |
| | | min(UNIX_TIMESTAMP(b.createTime) * 1000) as time, |
| | | 1 as type |
| | | from t_app_user a |
| | | left join t_order b on (a.id = b.userId) |
| | | where a.`status` = 1 and a.inviterType = 2 and a.inviterId = #{driverId} |
| | | <if test="null != time and '' != time"> |
| | | and DATE_FORMAT(b.createTime, '%Y年%m月') = #{time} |
| | | </if> |
| | | group by a.id, a.nickname |
| | | |
| | | union all |
| | | |
| | | select |
| | | a.id, |
| | | a.`name`, |
| | | min(UNIX_TIMESTAMP(b.createTime) * 1000) as time, |
| | | 2 as type |
| | | from t_driver a |
| | | left join t_order b on (a.id = b.driverId) |
| | | where a.`status` = 1 and a.approvalStatus = 2 and a.inviterType = 2 and a.inviterId = #{driverId} |
| | | <if test="null != time and '' != time"> |
| | | and DATE_FORMAT(b.createTime, '%Y年%m月') = #{time} |
| | | </if> |
| | | group by a.id, a.`name` |
| | | ) as aa where aa.time is not null order by aa.time desc limit #{pageNum}, #{pageSize} |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="userId" property="userId" /> |
| | | <result column="orderId" property="orderId" /> |
| | | <result column="amount" property="amount" /> |
| | | <result column="balance" property="balance"/> |
| | | <result column="createTime" property="createTime" /> |
| | | </resultMap> |
| | | |
| | |
| | | <result column="driverId" property="driverId" /> |
| | | <result column="youTuiId" property="youTuiId" /> |
| | | <result column="integral" property="integral" /> |
| | | <result column="type" property="type"/> |
| | | <result column="surplusQuantity" property="surplusQuantity"/> |
| | | <result column="endTime" property="endTime"/> |
| | | <result column="state" property="state"/> |
| | | <result column="failureTime" property="failureTime" /> |
| | | <result column="createTime" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="queryRedemptionDate" resultType="map"> |
| | | select DATE_FORMAT(aa.createTime, '%Y年%m月') as createTime from (select createTime from t_you_tui_driver where driverId = #{driverId} order by createTime desc) as aa group by DATE_FORMAT(aa.createTime, '%Y年%m月') |
| | | </select> |
| | | |
| | | |
| | | <select id="queryYouTuiDriverList" resultType="com.supersavedriving.driver.modular.system.warpper.DriverYouTuiWarpper"> |
| | | select |
| | | b.`name`, |
| | | b.integral, |
| | | UNIX_TIMESTAMP(a.createTime) * 1000 as createTime |
| | | from t_you_tui_driver a |
| | | left join t_you_tui b on (a.youTuiId = b.id) |
| | | where a.driverId = #{driverId} and DATE_FORMAT(a.createTime, '%Y年%m月') = #{createTime} order by a.createTime desc |
| | | </select> |
| | | |
| | | |
| | | <select id="queryDriverYouTui" resultType="com.supersavedriving.driver.modular.system.warpper.DriverYouTuiWarpper"> |
| | | select |
| | | a.id, |
| | | b.`name`, |
| | | b.type, |
| | | b.number, |
| | | b.img, |
| | | b.integral, |
| | | b.content, |
| | | UNIX_TIMESTAMP(a.createTime) * 1000 as createTime, |
| | | a.state |
| | | from t_you_tui_driver a |
| | | left join t_you_tui b on (a.youTuiId = b.id) |
| | | where a.driverId = #{driverId} order by a.createTime desc limit #{pageNum}, #{pageSize} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="queryAllYouTui" resultType="com.supersavedriving.driver.modular.system.warpper.DriverYouTuiWarpper"> |
| | | select |
| | | id, |
| | | `name`, |
| | | type, |
| | | number, |
| | | img, |
| | | integral, |
| | | content |
| | | from t_you_tui where status = 1 order by createTime desc limit #{pageNum}, #{pageSize} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.supersavedriving.driver.modular.system.dao.YouTuiMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.supersavedriving.driver.modular.system.model.YouTui"> |
| | | <id column="id" property="id" /> |
| | | <result column="name" property="name" /> |
| | | <result column="type" property="type" /> |
| | | <result column="img" property="img" /> |
| | | <result column="number" property="number"/> |
| | | <result column="integral" property="integral"/> |
| | | <result column="effectiveTime" property="effectiveTime"/> |
| | | <result column="content" property="content"/> |
| | | <result column="status" property="status" /> |
| | | <result column="createTime" property="createTime" /> |
| | | <result column="distance" property="distance" /> |
| | | </resultMap> |
| | | </mapper> |
| | |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 变动类型(1=订单收入,2=订单支出,3=充值,4=提现,5=佣金收入,6=佣金提现,7=优惠券收入,8=保险支付) |
| | | */ |
| | | @TableField("changeType") |
| | | private Integer changeType; |
| | | /** |
| | | * 历史数据 |
| | | */ |
| | | @TableField("oldData") |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 16:58 |
| | | */ |
| | | @Data |
| | | @TableName("t_cash_withdrawal") |
| | | public class CashWithdrawal { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 类型(1=用户,2=司机) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 用户司机id |
| | | */ |
| | | @TableField("userDriverId") |
| | | private Integer userDriverId; |
| | | /** |
| | | * 提现编号 |
| | | */ |
| | | @TableField("code") |
| | | private String code; |
| | | /** |
| | | * 交易类型 11佣金提现 12余额提现 |
| | | */ |
| | | @TableField("businessType") |
| | | private Integer businessType; |
| | | /** |
| | | * 提现金额 |
| | | */ |
| | | @TableField("amount") |
| | | private Double amount; |
| | | /** |
| | | * 提现状态 1未成功 2成功 |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("createTime") |
| | | private Date createTime; |
| | | } |
| | |
| | | @TableField("backgroundBalance") |
| | | private Double backgroundBalance; |
| | | /** |
| | | * 优惠券余额(订单优惠券支付的金额) |
| | | */ |
| | | @TableField("couponBalance") |
| | | private Double couponBalance; |
| | | /** |
| | | * 审核状态(1=待审核,2=已同意,3=已拒绝) |
| | | */ |
| | | @TableField("approvalStatus") |
| | |
| | | @TableField("amount") |
| | | private Double amount; |
| | | /** |
| | | * 余额 |
| | | */ |
| | | @TableField("balance") |
| | | private Double balance; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("createTime") |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 9:55 |
| | | */ |
| | | @Data |
| | | @TableName("t_you_tui") |
| | | public class YouTui { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @TableField("name") |
| | | private String name; |
| | | /** |
| | | * 优推类型(1=次数,2=小时) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 图片地址 |
| | | */ |
| | | @TableField("img") |
| | | private String img; |
| | | /** |
| | | * 优推值 |
| | | */ |
| | | @TableField("number") |
| | | private Integer number; |
| | | /** |
| | | * 兑换所需积分 |
| | | */ |
| | | @TableField("integral") |
| | | private Integer integral; |
| | | /** |
| | | * 有效天数 |
| | | */ |
| | | @TableField("effectiveTime") |
| | | private Integer effectiveTime; |
| | | /** |
| | | * 服务内容 |
| | | */ |
| | | @TableField("content") |
| | | private String content; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | @TableField("status") |
| | | private Integer status; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("createTime") |
| | | private Date createTime; |
| | | /** |
| | | * 优推距离 |
| | | */ |
| | | @TableField("distance") |
| | | private Double distance; |
| | | } |
| | |
| | | @TableField("integral") |
| | | private Integer integral; |
| | | /** |
| | | * 优推类型(1=次数,2=小时) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 优推剩余数量 |
| | | */ |
| | | @TableField("surplusQuantity") |
| | | private Integer surplusQuantity; |
| | | /** |
| | | * 优推结束时间 |
| | | */ |
| | | @TableField("endTime") |
| | | private Date endTime; |
| | | /** |
| | | * 状态(1=未使用,2=使用中,3=已结束) |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 失效时间 |
| | | */ |
| | | @TableField("failureTime") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.supersavedriving.driver.modular.system.model.AccountChangeDetail; |
| | | import com.supersavedriving.driver.modular.system.warpper.CommissionDetailListWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.IntegralIncomeAndExpensesWarpper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | * @throws Exception |
| | | */ |
| | | void saveData(AccountChangeDetail accountChangeDetail) throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 获取积分收支明细 |
| | | * @param driverId |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | List<IntegralIncomeAndExpensesWarpper> queryDriverIntegralIncomeAndExpenses(Integer driverId, Integer type, Integer pageNum, Integer pageSize) throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 获取佣金明细列表 |
| | | * @param driverId |
| | | * @param time |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | CommissionDetailListWarpper queryCommissionDetail(Integer driverId, String time, Integer pageNum, Integer pageSize) throws Exception; |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.supersavedriving.driver.modular.system.model.CashWithdrawal; |
| | | import com.supersavedriving.driver.modular.system.util.ResultUtil; |
| | | |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 17:03 |
| | | */ |
| | | public interface ICashWithdrawalService extends IService<CashWithdrawal> { |
| | | |
| | | |
| | | /** |
| | | * 司机提现申请 |
| | | * @param type |
| | | * @param money |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil withdrawCash(Integer driverId, Integer type, Double money) throws Exception; |
| | | } |
| | |
| | | import com.supersavedriving.driver.modular.system.util.ResultUtil; |
| | | import com.supersavedriving.driver.modular.system.warpper.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil saveDriverInfo(Integer uid, DriverInfo driverInfo) throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 清空司机积分 |
| | | */ |
| | | void emptyIntegral(); |
| | | } |
| | |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil setOrderStatus(Integer uid, Long orderId, Integer state) throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 获取司机的订单列表 |
| | | * @param driverId |
| | | * @param state |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | List<DriverOrderListWarpper> queryDriverOrderList(Integer driverId, Integer state, Integer pageNum, Integer pageSize) throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 司机邀请列表 |
| | | * @param driverId |
| | | * @param time |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | List<InviteListWarpper> queryInviteList(Integer driverId, String time, Integer pageNum, Integer pageSize) throws Exception; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.supersavedriving.driver.modular.system.model.Revenue; |
| | | import com.supersavedriving.driver.modular.system.warpper.CommissionListWarpper; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface IRevenueService extends IService<Revenue> { |
| | | |
| | | |
| | | /** |
| | | * 获取司机佣金记录 |
| | | * @param driverId |
| | | * @param time |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | List<CommissionListWarpper> queryCommissionList(Integer driverId, String time, Integer pageNum, Integer pageSize) throws Exception; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.supersavedriving.driver.modular.system.model.YouTuiDriver; |
| | | import com.supersavedriving.driver.modular.system.util.ResultUtil; |
| | | import com.supersavedriving.driver.modular.system.warpper.DriverYouTuiListWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.DriverYouTuiWarpper; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface IYouTuiDriverService extends IService<YouTuiDriver> { |
| | | |
| | | |
| | | /** |
| | | * 获取司机兑换优推记录 |
| | | * @param driverId |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | List<DriverYouTuiListWarpper> queryDriverYouTuiList(Integer driverId) throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 获取司机优推列表 |
| | | * @param driverId |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | List<DriverYouTuiWarpper> queryDriverYouTui(Integer driverId, Integer pageNum, Integer pageSize) throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 获取优推数据 |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | List<DriverYouTuiWarpper> queryAllYouTui(Integer pageNum, Integer pageSize) throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 司机兑换优推数据 |
| | | * @param driverId |
| | | * @param id |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil redeemBenefits(Integer driverId, Integer id) throws Exception; |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.supersavedriving.driver.modular.system.model.YouTui; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 10:01 |
| | | */ |
| | | public interface IYouTuiService extends IService<YouTui> { |
| | | } |
| | |
| | | import com.supersavedriving.driver.modular.system.dao.AccountChangeDetailMapper; |
| | | import com.supersavedriving.driver.modular.system.model.AccountChangeDetail; |
| | | import com.supersavedriving.driver.modular.system.service.IAccountChangeDetailService; |
| | | import com.supersavedriving.driver.modular.system.warpper.CommissionDetailListWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.CommissionDetailWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.IntegralIncomeAndExpensesWarpper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 账户变动 |
| | |
| | | accountChangeDetail.setCreateTime(new Date()); |
| | | this.baseMapper.insert(accountChangeDetail); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取积分收支明细 |
| | | * @param driverId |
| | | * @param type |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<IntegralIncomeAndExpensesWarpper> queryDriverIntegralIncomeAndExpenses(Integer driverId, Integer type, Integer pageNum, Integer pageSize) throws Exception { |
| | | pageNum = (pageNum - 1) * pageSize; |
| | | return this.baseMapper.queryDriverIntegralIncomeAndExpenses(driverId, type, pageNum, pageSize); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取佣金明细列表 |
| | | * @param driverId |
| | | * @param time |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public CommissionDetailListWarpper queryCommissionDetail(Integer driverId, String time, Integer pageNum, Integer pageSize) throws Exception { |
| | | pageNum = (pageNum - 1) * pageSize; |
| | | List<CommissionDetailWarpper> commissionDetailWarppers = this.baseMapper.queryCommissionDetail(driverId, time, pageNum, pageSize); |
| | | Double aDouble = this.baseMapper.queryCommissionDetailTotal(driverId, time); |
| | | CommissionDetailListWarpper commissionDetailListWarpper = new CommissionDetailListWarpper(); |
| | | commissionDetailListWarpper.setList(commissionDetailWarppers); |
| | | commissionDetailListWarpper.setTotal(aDouble); |
| | | return commissionDetailListWarpper; |
| | | } |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.supersavedriving.driver.modular.system.dao.CashWithdrawalMapper; |
| | | import com.supersavedriving.driver.modular.system.model.CashWithdrawal; |
| | | import com.supersavedriving.driver.modular.system.model.Driver; |
| | | import com.supersavedriving.driver.modular.system.service.ICashWithdrawalService; |
| | | import com.supersavedriving.driver.modular.system.service.IDriverService; |
| | | import com.supersavedriving.driver.modular.system.util.ResultUtil; |
| | | import com.supersavedriving.driver.modular.system.util.UUIDUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 17:03 |
| | | */ |
| | | @Service |
| | | public class CashWithdrawalServiceImpl extends ServiceImpl<CashWithdrawalMapper, CashWithdrawal> implements ICashWithdrawalService { |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public ResultUtil withdrawCash(Integer driverId, Integer type, Double money) throws Exception { |
| | | Driver driver = driverService.selectById(driverId); |
| | | if(type == 1 && (null == driver.getBalance() || driver.getBalance() < money)){ |
| | | return ResultUtil.error("账户余额不足"); |
| | | } |
| | | if(type == 2 && (null == driver.getCommission() || driver.getCommission() < money)){ |
| | | return ResultUtil.error("佣金余额不足"); |
| | | } |
| | | |
| | | CashWithdrawal cashWithdrawal = new CashWithdrawal(); |
| | | cashWithdrawal.setType(2); |
| | | cashWithdrawal.setUserDriverId(driverId); |
| | | cashWithdrawal.setCode(System.currentTimeMillis() + UUIDUtil.getNumberRandom(3)); |
| | | cashWithdrawal.setBusinessType(type == 1 ? 12 : 11); |
| | | cashWithdrawal.setAmount(money); |
| | | cashWithdrawal.setState(1); |
| | | cashWithdrawal.setCreateTime(new Date()); |
| | | this.insert(cashWithdrawal); |
| | | if(type == 1){ |
| | | driver.setBalance(driver.getBalance() - money); |
| | | } |
| | | if(type == 2){ |
| | | driver.setCommission(driver.getCommission() - money); |
| | | } |
| | | driverService.updateById(driver); |
| | | return ResultUtil.success(); |
| | | } |
| | | } |
| | |
| | | Driver driver = this.selectById(uid); |
| | | DriverInfoWarpper driverInfo = new DriverInfoWarpper(); |
| | | BeanUtils.copyProperties(driver, driverInfo); |
| | | driverInfo.setBalance(driver.getBalance() + driver.getBackgroundBalance() + driver.getCouponBalance() + driver.getCommission()); |
| | | |
| | | YouTuiDriver youTuiDriver = youTuiDriverService.selectOne(new EntityWrapper<YouTuiDriver>().eq("driverId", uid).last(" and failureTime > now() order by failureTime limit 0, 1")); |
| | | if(null != youTuiDriver){ |
| | | driverInfo.setYouTuiStart(youTuiDriver.getCreateTime().getTime()); |
| | |
| | | if(ToolUtil.isNotEmpty(driverInfo.getEmergencyPhone())){ |
| | | driver.setEmergencyPhone(driverInfo.getEmergencyPhone()); |
| | | } |
| | | if(ToolUtil.isNotEmpty(driverInfo.getWxCollectionCode())){ |
| | | driver.setWxCollectionCode(driverInfo.getWxCollectionCode()); |
| | | } |
| | | if(ToolUtil.isNotEmpty(driverInfo.getZfbCollectionCode())){ |
| | | driver.setZfbCollectionCode(driverInfo.getZfbCollectionCode()); |
| | | } |
| | | if(ToolUtil.isNotEmpty(driverInfo.getPhone()) && ToolUtil.isNotEmpty(driverInfo.getCode())){ |
| | | String value = redisUtil.getValue(driverInfo.getPhone()); |
| | | if(ToolUtil.isEmpty(value)){ |
| | |
| | | this.updateById(driver); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | @Override |
| | | public void emptyIntegral() { |
| | | List<Driver> drivers = this.selectList(new EntityWrapper<Driver>().eq("approvalStatus", 2).eq("status", 1)); |
| | | List<AccountChangeDetail> list = new ArrayList<>(); |
| | | for (Driver driver : drivers) { |
| | | AccountChangeDetail accountChangeDetail = new AccountChangeDetail(); |
| | | accountChangeDetail.setUserType(2); |
| | | accountChangeDetail.setUserId(driver.getId()); |
| | | accountChangeDetail.setCreateTime(new Date()); |
| | | accountChangeDetail.setOldData(driver.getIntegral().doubleValue()); |
| | | accountChangeDetail.setType(2); |
| | | accountChangeDetail.setExplain("定时清空积分"); |
| | | driver.setIntegral(0); |
| | | accountChangeDetail.setNewData(driver.getIntegral().doubleValue()); |
| | | list.add(accountChangeDetail); |
| | | } |
| | | if(drivers.size() > 0){ |
| | | this.updateBatchById(drivers); |
| | | accountChangeDetailService.insertBatch(list); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | pushUtil.pushOrderStatus(uid, 2, order.getId(), order.getStatus()); |
| | | }else{ |
| | | //开始推单 |
| | | // pushOrder(order); |
| | | pushOrder(order); |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | |
| | | |
| | | //1 |
| | | //找到中心点 |
| | | GeoJsonPoint geoJsonPoint = new GeoJsonPoint(Double.valueOf(startLat), Double.valueOf(startLng)); |
| | | GeoJsonPoint geoJsonPoint = new GeoJsonPoint(Double.valueOf(startLng), Double.valueOf(startLat)); |
| | | Double num = num3 / 1000;//范围公里 |
| | | //构造半径 |
| | | Distance distanceR = new Distance(num, Metrics.KILOMETERS); |
| | |
| | | List<Location> locations = mongoTemplate.find(query, Location.class); |
| | | List<Integer> driverIds = locations.stream().map(Location::getDriverId).collect(Collectors.toList()); |
| | | Integer driver = null; |
| | | YouTuiDriver youTuiDriver1 = null; |
| | | if(driverIds.size() > 0){ |
| | | List<YouTuiDriver> youTuiDrivers = youTuiDriverService.selectList(new EntityWrapper<YouTuiDriver>().in("driverId", driverIds).last(" and now() < failureTime")); |
| | | List<YouTuiDriver> youTuiDrivers = youTuiDriverService.selectList(new EntityWrapper<YouTuiDriver>().in("driverId", driverIds) |
| | | .eq("state", 2).last(" and (surplusQuantity > 0 or now() < endTime) and now() < failureTime")); |
| | | Double d = null; |
| | | for (YouTuiDriver youTuiDriver : youTuiDrivers) { |
| | | String value = redisUtil.getValue("DRIVER" + youTuiDriver.getDriverId()); |
| | |
| | | if(d == null || d.compareTo(wgs84) > 0){ |
| | | d = wgs84; |
| | | driver = youTuiDriver.getDriverId(); |
| | | youTuiDriver1 = youTuiDriver; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(null != youTuiDriver1 && youTuiDriver1.getType() == 1){ |
| | | youTuiDriver1.setSurplusQuantity(youTuiDriver1.getSurplusQuantity() - 1); |
| | | youTuiDriverService.updateById(youTuiDriver1); |
| | | } |
| | | |
| | | //开始范围查找 |
| | | if(null == driver){ |
| | |
| | | @Override |
| | | public OrderInfoWarpper queryOrderInfo(Integer uid, Long orderId) throws Exception { |
| | | OrderInfoWarpper orderInfoWarpper = this.baseMapper.queryOrderInfo(orderId); |
| | | AppUser appUser = appUserService.selectById(uid); |
| | | orderInfoWarpper.setBalance(appUser.getAccountBalance()); |
| | | orderInfoWarpper.setCurrentDistance(0D); |
| | | String value = redisUtil.getValue("DRIVER" + uid); |
| | | Map<String, Double> distance = GeodesyUtil.getDistance(orderInfoWarpper.getStartLng() + "," + orderInfoWarpper.getStartLat(), value); |
| | | Double wgs84 = distance.get("WGS84"); |
| | | orderInfoWarpper.setCurrentDistance(wgs84); |
| | | if(ToolUtil.isNotEmpty(value)){ |
| | | Map<String, Double> distance = GeodesyUtil.getDistance(orderInfoWarpper.getStartLng() + "," + orderInfoWarpper.getStartLat(), value); |
| | | Double wgs84 = distance.get("WGS84"); |
| | | orderInfoWarpper.setCurrentDistance(wgs84); |
| | | } |
| | | return orderInfoWarpper; |
| | | } |
| | | |
| | |
| | | public void saveRevenue(Order order){ |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取司机的订单列表 |
| | | * @param driverId |
| | | * @param state |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<DriverOrderListWarpper> queryDriverOrderList(Integer driverId, Integer state, Integer pageNum, Integer pageSize) throws Exception { |
| | | pageNum = (pageNum - 1) * pageSize; |
| | | return this.baseMapper.queryDriverOrderList(driverId, state, pageNum, pageSize); |
| | | } |
| | | |
| | | /** |
| | | * 司机邀请列表 |
| | | * @param driverId |
| | | * @param time |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<InviteListWarpper> queryInviteList(Integer driverId, String time, Integer pageNum, Integer pageSize) throws Exception { |
| | | pageNum = (pageNum - 1) * pageSize; |
| | | return this.baseMapper.queryInviteList(driverId, time, pageNum, pageSize); |
| | | } |
| | | } |
| | |
| | | package com.supersavedriving.driver.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.supersavedriving.driver.core.util.ToolUtil; |
| | | import com.supersavedriving.driver.modular.system.dao.RevenueMapper; |
| | | import com.supersavedriving.driver.modular.system.model.AppUser; |
| | | import com.supersavedriving.driver.modular.system.model.Driver; |
| | | import com.supersavedriving.driver.modular.system.model.Order; |
| | | import com.supersavedriving.driver.modular.system.model.Revenue; |
| | | import com.supersavedriving.driver.modular.system.service.IAppUserService; |
| | | import com.supersavedriving.driver.modular.system.service.IDriverService; |
| | | import com.supersavedriving.driver.modular.system.service.IOrderService; |
| | | import com.supersavedriving.driver.modular.system.service.IRevenueService; |
| | | import com.supersavedriving.driver.modular.system.warpper.CommissionListWarpper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 收入记录 |
| | |
| | | */ |
| | | @Service |
| | | public class RevenueServiceImpl extends ServiceImpl<RevenueMapper, Revenue> implements IRevenueService { |
| | | |
| | | @Autowired |
| | | private IOrderService orderService; |
| | | |
| | | @Autowired |
| | | private IAppUserService appUserService; |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取司机佣金记录 |
| | | * @param driverId |
| | | * @param time |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<CommissionListWarpper> queryCommissionList(Integer driverId, String time, Integer pageNum, Integer pageSize) throws Exception { |
| | | pageNum = (pageNum - 1) * pageSize; |
| | | Wrapper<Revenue> wrapper = new EntityWrapper<Revenue>().eq("type", 2).eq("userType", 2) |
| | | .eq("userId", driverId); |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | wrapper.eq("DATE_FORMAT(createTime, '%Y年%m月')", time); |
| | | } |
| | | List<Revenue> revenues = this.selectList(wrapper.last(" order by createTime desc limit " + pageNum + ", " + pageSize)); |
| | | List<CommissionListWarpper> list = new ArrayList<>(); |
| | | for (Revenue revenue : revenues) { |
| | | CommissionListWarpper commissionListWarpper = new CommissionListWarpper(); |
| | | commissionListWarpper.setCreateTime(revenue.getCreateTime().getTime()); |
| | | commissionListWarpper.setAmount(revenue.getAmount()); |
| | | Order order = orderService.selectById(revenue.getOrderId()); |
| | | if(null != order.getUserId()){ |
| | | AppUser appUser = appUserService.selectById(order.getUserId()); |
| | | if(null != appUser.getInviterType() && appUser.getInviterType() == 2 && appUser.getInviterId().compareTo(driverId) == 0){ |
| | | commissionListWarpper.setUserType(1); |
| | | } |
| | | } |
| | | if(null == commissionListWarpper.getUserType()){ |
| | | Driver driver = driverService.selectById(order.getDriverId()); |
| | | if(null != driver.getInviterType() && driver.getInviterType() == 2 && driver.getInviterId().compareTo(driverId) == 0){ |
| | | commissionListWarpper.setUserType(2); |
| | | } |
| | | } |
| | | list.add(commissionListWarpper); |
| | | } |
| | | return list; |
| | | } |
| | | } |
| | |
| | | package com.supersavedriving.driver.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.supersavedriving.driver.modular.system.model.AccountChangeDetail; |
| | | import com.supersavedriving.driver.modular.system.model.Driver; |
| | | import com.supersavedriving.driver.modular.system.model.YouTui; |
| | | import com.supersavedriving.driver.modular.system.model.YouTuiDriver; |
| | | import com.supersavedriving.driver.modular.system.dao.YouTuiDriverMapper; |
| | | import com.supersavedriving.driver.modular.system.service.IAccountChangeDetailService; |
| | | import com.supersavedriving.driver.modular.system.service.IDriverService; |
| | | import com.supersavedriving.driver.modular.system.service.IYouTuiDriverService; |
| | | import com.supersavedriving.driver.modular.system.service.IYouTuiService; |
| | | import com.supersavedriving.driver.modular.system.util.ResultUtil; |
| | | import com.supersavedriving.driver.modular.system.warpper.DriverYouTuiListWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.DriverYouTuiWarpper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 用户优推数据 |
| | |
| | | */ |
| | | @Service |
| | | public class YouTuiDriverServiceImpl extends ServiceImpl<YouTuiDriverMapper, YouTuiDriver> implements IYouTuiDriverService { |
| | | |
| | | @Autowired |
| | | private IYouTuiService youTuiService; |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | |
| | | @Autowired |
| | | private IAccountChangeDetailService accountChangeDetailService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取司机兑换优推记录 |
| | | * @param driverId |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<DriverYouTuiListWarpper> queryDriverYouTuiList(Integer driverId) throws Exception { |
| | | List<Map<String, String>> list = this.baseMapper.queryRedemptionDate(driverId); |
| | | List<DriverYouTuiListWarpper> driverYouTuiListWarppers = new ArrayList<>(); |
| | | for (Map<String, String> map : list) { |
| | | String createTime = map.get("createTime"); |
| | | List<DriverYouTuiWarpper> driverYouTuiWarppers = this.baseMapper.queryYouTuiDriverList(driverId, createTime); |
| | | DriverYouTuiListWarpper driverYouTuiListWarpper = new DriverYouTuiListWarpper(); |
| | | driverYouTuiListWarpper.setMonth(createTime); |
| | | driverYouTuiListWarpper.setList(driverYouTuiWarppers); |
| | | driverYouTuiListWarppers.add(driverYouTuiListWarpper); |
| | | } |
| | | return driverYouTuiListWarppers; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取司机优推数据 |
| | | * @param driverId |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<DriverYouTuiWarpper> queryDriverYouTui(Integer driverId, Integer pageNum, Integer pageSize) throws Exception { |
| | | pageNum = (pageNum - 1) * pageSize; |
| | | return this.baseMapper.queryDriverYouTui(driverId, pageNum, pageSize); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取待兑换的优推数据 |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<DriverYouTuiWarpper> queryAllYouTui(Integer pageNum, Integer pageSize) throws Exception { |
| | | pageNum = (pageNum - 1) * pageSize; |
| | | return this.baseMapper.queryAllYouTui(pageNum, pageSize); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 司机兑换优推数据 |
| | | * @param driverId |
| | | * @param id |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil redeemBenefits(Integer driverId, Integer id) throws Exception { |
| | | YouTui youTui = youTuiService.selectById(id); |
| | | if(youTui.getStatus() != 1){ |
| | | return ResultUtil.error("优推已下架"); |
| | | } |
| | | Driver driver = driverService.selectById(driverId); |
| | | if(null == driver.getIntegral() || youTui.getIntegral() > driver.getIntegral()){ |
| | | return ResultUtil.error("积分不足"); |
| | | } |
| | | |
| | | AccountChangeDetail accountChangeDetail = new AccountChangeDetail(); |
| | | accountChangeDetail.setUserType(2); |
| | | accountChangeDetail.setUserId(driverId); |
| | | accountChangeDetail.setType(2); |
| | | accountChangeDetail.setOldData(driver.getIntegral().doubleValue()); |
| | | accountChangeDetail.setExplain("兑换优推"); |
| | | accountChangeDetail.setCreateTime(new Date()); |
| | | driver.setIntegral(driver.getIntegral() - youTui.getIntegral()); |
| | | accountChangeDetail.setNewData(driver.getIntegral().doubleValue()); |
| | | driverService.updateById(driver); |
| | | accountChangeDetailService.insert(accountChangeDetail); |
| | | |
| | | YouTuiDriver youTuiDriver = new YouTuiDriver(); |
| | | youTuiDriver.setDriverId(driverId); |
| | | youTuiDriver.setYouTuiId(id); |
| | | youTuiDriver.setIntegral(youTui.getIntegral()); |
| | | youTuiDriver.setType(youTui.getType()); |
| | | if(youTui.getType() == 1){//次数 |
| | | youTuiDriver.setSurplusQuantity(youTui.getNumber()); |
| | | } |
| | | if(youTui.getType() == 2){//小时 |
| | | youTuiDriver.setEndTime(new Date(System.currentTimeMillis() + (youTui.getNumber() * 60 * 60 * 1000))); |
| | | } |
| | | youTuiDriver.setState(1); |
| | | youTuiDriver.setFailureTime(new Date(System.currentTimeMillis() + (youTui.getEffectiveTime() * 24 * 60 * 60 * 1000))); |
| | | youTuiDriver.setCreateTime(new Date()); |
| | | this.insert(youTuiDriver); |
| | | return ResultUtil.success(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.supersavedriving.driver.modular.system.dao.YouTuiMapper; |
| | | import com.supersavedriving.driver.modular.system.model.YouTui; |
| | | import com.supersavedriving.driver.modular.system.service.IYouTuiService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 优推数据 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 10:01 |
| | | */ |
| | | @Service |
| | | public class YouTuiServiceImpl extends ServiceImpl<YouTuiMapper, YouTui> implements IYouTuiService { |
| | | } |
| | |
| | | package com.supersavedriving.driver.modular.system.util; |
| | | |
| | | |
| | | import com.supersavedriving.driver.modular.system.service.IDriverService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | */ |
| | | @Component |
| | | public class TaskUtil { |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | |
| | | |
| | | |
| | |
| | | // } |
| | | |
| | | |
| | | // |
| | | // /** |
| | | // * 每月第一天的1点执行的任务 |
| | | // */ |
| | | // @Scheduled(cron = "0 0 1 1 * *") |
| | | // public void taskMonth(){ |
| | | // try { |
| | | // |
| | | // }catch (Exception e){ |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } |
| | | |
| | | /** |
| | | * 每月1日凌晨执行的任务 |
| | | */ |
| | | @Scheduled(cron = "0 0 0 1 * *") |
| | | public void taskMonth1(){ |
| | | try { |
| | | driverService.emptyIntegral(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 每月16日凌晨执行的任务 |
| | | */ |
| | | @Scheduled(cron = "0 0 0 16 * *") |
| | | public void taskMonth16(){ |
| | | try { |
| | | driverService.emptyIntegral(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.util.huawei; |
| | | |
| | | import com.obs.services.ObsClient; |
| | | import com.obs.services.model.PutObjectRequest; |
| | | import com.obs.services.model.PutObjectResult; |
| | | |
| | | import java.io.InputStream; |
| | | |
| | | /** |
| | | * 对象存储上传 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/15 11:32 |
| | | */ |
| | | public class OBSUtil { |
| | | |
| | | public static String endPoint = "https://obs.cn-south-1.myhuaweicloud.com"; |
| | | public static String ak = "N52IGR6DHOC3JAZFHZIW"; |
| | | public static String sk = "jq7Q7jnFS4Gxamwh3naN2sbNKwQQ7cZISPVumGBS"; |
| | | public static String bucketname = "csxdj"; |
| | | |
| | | /** |
| | | * 上传文件 |
| | | * @param inputStream |
| | | * @param objectKey |
| | | * @return |
| | | */ |
| | | public static String putObjectToBucket(InputStream inputStream, String objectKey) { |
| | | try { |
| | | // 创建ObsClient实例 |
| | | ObsClient obsClient = new ObsClient(ak, sk, endPoint); |
| | | // 待上传的本地文件路径,需要指定到具体的文件名 |
| | | PutObjectRequest request = new PutObjectRequest(); |
| | | request.setBucketName(bucketname); |
| | | request.setObjectKey(objectKey); |
| | | request.setInput(inputStream); |
| | | PutObjectResult putObjectResult = obsClient.putObject(request); |
| | | return putObjectResult.getObjectUrl(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
File was renamed from driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/util/SMSUtil.java |
| | |
| | | package com.supersavedriving.driver.modular.system.util; |
| | | |
| | | package com.supersavedriving.driver.modular.system.util.huawei; |
| | | |
| | | import javax.net.ssl.*; |
| | | import java.io.*; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 短信工具类 |
| | | * @author zhibing.pu |
| | | * @date 2023/3/15 11:23 |
| | | */ |
| | | public class SMSUtil { |
| | | |
| | | //无需修改,用于格式化鉴权头域,给"X-WSSE"参数赋值 |
| | | private static final String WSSE_HEADER_FORMAT = "UsernameToken Username=\"%s\",PasswordDigest=\"%s\",Nonce=\"%s\",Created=\"%s\""; |
| | | //无需修改,用于格式化鉴权头域,给"Authorization"参数赋值 |
| | | private static final String AUTH_HEADER_VALUE = "WSSE realm=\"SDP\",profile=\"UsernameToken\",type=\"Appkey\""; |
| | | |
| | | /** |
| | | * 发送短信(华为云) |
| | | * @param templateId 模板id |
| | | * @param receiver 必填,全局号码格式(包含国家码),示例:+8615123456789,多个号码之间用英文逗号分隔 |
| | | * @param templateParas 选填,使用无变量模板时请赋空值 String templateParas = "",双变量模板示例:模板内容为"您有${1}件快递请到${2}领取"时,templateParas可填写为"[\"3\",\"人民公园正门\"]" |
| | | * 模板变量,此处以单变量验证码短信为例,请客户自行生成6位验证码,并定义为字符串类型,以杜绝首位0丢失的问题(例如:002569变成了2569) |
| | | * 发送短信 |
| | | * @param phones //必填,全局号码格式(包含国家码),示例:+8615123456789,多个号码之间用英文逗号分隔 |
| | | * @param templateId //模板ID |
| | | * @param templateParas //模板变量,此处以单变量验证码短信为例,请客户自行生成6位验证码,并定义为字符串类型,以杜绝首位0丢失的问题(例如:002569变成了2569)。 |
| | | * @throws Exception |
| | | */ |
| | | public static void send_huawei_sms(String templateId, String receiver, String templateParas) throws Exception { |
| | | |
| | | public static void send(String phones, String templateId, String templateParas) throws Exception { |
| | | //必填,请参考"开发准备"获取如下数据,替换为实际值 |
| | | String url = "https://smsapi.cn-south-1.myhuaweicloud.com:443"; //APP接入地址(在控制台"应用管理"页面获取)+接口访问URI |
| | | String appKey = "g3DW0G5Fbp3110UiGl5fkWcn799s"; //APP_Key |
| | | String appSecret = "LaT1NYvQKNkHO5KikniEueN8iTaz"; //APP_Secret |
| | | String sender = "ismsapp0000000103"; //国内短信签名通道号或国际/港澳台短信通道号 |
| | | String url = "https://smsapi.cn-south-1.myhuaweicloud.com:443/sms/batchSendSms/v1"; //APP接入地址(在控制台"应用管理"页面获取)+接口访问URI |
| | | String appKey = "9I0xrhdGXthf1fv9nn8G3glZ6Zng"; //APP_Key |
| | | String appSecret = "U7WxwX2LVk2YD6KAHxjc9tdnXoM9"; //APP_Secret |
| | | String sender = "8823031523874"; //国内短信签名通道号或国际/港澳台短信通道号 |
| | | // String templateId = "8ff55eac1d0b478ab3c06c3c6a492300"; //模板ID |
| | | |
| | | //条件必填,国内短信关注,当templateId指定的模板类型为通用模板时生效且必填,必须是已审核通过的,与模板类型一致的签名名称 |
| | | //国际/港澳台短信不用关注该参数 |
| | | String signature = "IGO"; //签名名称 |
| | | String signature = "超省新代驾"; //签名名称 |
| | | |
| | | //必填,全局号码格式(包含国家码),示例:+8615123456789,多个号码之间用英文逗号分隔 |
| | | // String receiver = "+86151****6789,+86152****7890"; //短信接收人号码 |
| | | |
| | | //选填,短信状态报告接收地址,推荐使用域名,为空或者不填表示不接收状态报告 |
| | | String statusCallBack = ""; |
| | | |
| | | /** |
| | | * 选填,使用无变量模板时请赋空值 String templateParas = ""; |
| | | * 单变量模板示例:模板内容为"您的验证码是${1}"时,templateParas可填写为"[\"369751\"]" |
| | | * 双变量模板示例:模板内容为"您有${1}件快递请到${2}领取"时,templateParas可填写为"[\"3\",\"人民公园正门\"]" |
| | | * 模板中的每个变量都必须赋值,且取值不能为空 |
| | | * 查看更多模板和变量规范:产品介绍>模板和变量规范 |
| | | */ |
| | | // String templateParas = "[\"369751\"]"; //模板变量,此处以单变量验证码短信为例,请客户自行生成6位验证码,并定义为字符串类型,以杜绝首位0丢失的问题(例如:002569变成了2569)。 |
| | | |
| | | //请求Body,不携带签名名称时,signature请填null |
| | | String body = buildRequestBody(sender, receiver, templateId, templateParas, statusCallBack, signature); |
| | | String body = buildRequestBody(sender, phones, templateId, templateParas, statusCallBack, signature); |
| | | if (null == body || body.isEmpty()) { |
| | | System.out.println("body is null."); |
| | | return; |
| | |
| | | HttpsURLConnection connection = null; |
| | | InputStream is = null; |
| | | |
| | | |
| | | HostnameVerifier hv = new HostnameVerifier() { |
| | | |
| | | @Override |
| | | public boolean verify(String hostname, SSLSession session) { |
| | | return true; |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.warpper; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 16:14 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class CommissionDetailListWarpper { |
| | | @ApiModelProperty("总计") |
| | | private Double total; |
| | | @ApiModelProperty("列表数据") |
| | | private List<CommissionDetailWarpper> list; |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.warpper; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 16:16 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class CommissionDetailWarpper { |
| | | @ApiModelProperty("说明") |
| | | private String explain; |
| | | @ApiModelProperty("时间") |
| | | private Long createTime; |
| | | @ApiModelProperty("变动金额") |
| | | private Double money; |
| | | @ApiModelProperty("余额") |
| | | private Double balance; |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.warpper; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 11:34 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class CommissionListWarpper { |
| | | @ApiModelProperty("日期") |
| | | private Long createTime; |
| | | @ApiModelProperty("推广类型(1=用户,2=司机)") |
| | | private Integer userType; |
| | | @ApiModelProperty("获取佣金") |
| | | private Double amount; |
| | | } |
| | |
| | | private String code; |
| | | @ApiModelProperty(value = "新手机号码", required = false, dataType = "String") |
| | | private String phone; |
| | | @ApiModelProperty(value = "收款码", required = false, dataType = "String") |
| | | private String wxCollectionCode; |
| | | @ApiModelProperty(value = "收款码", required = false, dataType = "String") |
| | | private String zfbCollectionCode; |
| | | } |
| | |
| | | private Long youTuiStart; |
| | | @ApiModelProperty("账户余额") |
| | | private Double balance; |
| | | @ApiModelProperty("佣金余额") |
| | | private Double commission; |
| | | @ApiModelProperty("积分") |
| | | private Integer integral; |
| | | @ApiModelProperty("今日接单") |
| | |
| | | private String emergencyContact; |
| | | @ApiModelProperty("紧急联系人电话") |
| | | private String emergencyPhone; |
| | | @ApiModelProperty("微信收款码") |
| | | private String wxCollectionCode; |
| | | @ApiModelProperty("支付宝收款码") |
| | | private String zfbCollectionCode; |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.warpper; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 10:22 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class DriverOrderListWarpper { |
| | | @ApiModelProperty("订单id") |
| | | private Integer id; |
| | | @ApiModelProperty("标题") |
| | | private String title; |
| | | @ApiModelProperty("订单时间") |
| | | private Long createTime; |
| | | @ApiModelProperty("起点地址") |
| | | private String startAddress; |
| | | @ApiModelProperty("终点地址") |
| | | private String endAddress; |
| | | @ApiModelProperty("订单状态") |
| | | private Integer state; |
| | | @ApiModelProperty("订单来源(1=乘客,2=司机)") |
| | | private Integer source; |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.warpper; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/15 16:20 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class DriverYouTuiListWarpper { |
| | | @ApiModelProperty("日期") |
| | | private String month; |
| | | @ApiModelProperty("优推记录") |
| | | private List<DriverYouTuiWarpper> list; |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.warpper; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/15 16:21 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class DriverYouTuiWarpper { |
| | | @ApiModelProperty("id") |
| | | private Integer id; |
| | | @ApiModelProperty("名称") |
| | | private String name; |
| | | @ApiModelProperty("优推类型(1=次数,2=小时)") |
| | | private Integer type; |
| | | @ApiModelProperty("优推值") |
| | | private Integer number; |
| | | @ApiModelProperty("图片") |
| | | private String img; |
| | | @ApiModelProperty("积分") |
| | | private Integer integral; |
| | | @ApiModelProperty("说明") |
| | | private String content; |
| | | @ApiModelProperty("兑换时间") |
| | | private Long createTime; |
| | | @ApiModelProperty("状态(1=待使用,2=使用中,3=已结束)") |
| | | private Integer state; |
| | | } |
| | |
| | | private String endLng; |
| | | @ApiModelProperty("预估里程") |
| | | private Double estimatedMileage; |
| | | @ApiModelProperty("预估费") |
| | | private Double estimatedPrice; |
| | | @ApiModelProperty("起步价") |
| | | private Double startPrice; |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.warpper; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/15 14:58 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class IntegralIncomeAndExpensesWarpper { |
| | | @ApiModelProperty("说明") |
| | | private String description; |
| | | @ApiModelProperty("时间") |
| | | private Long createTime; |
| | | @ApiModelProperty("积分") |
| | | private Integer integral; |
| | | } |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.warpper; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/3/18 15:18 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class InviteListWarpper { |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickname; |
| | | @ApiModelProperty("时间") |
| | | private Long time; |
| | | @ApiModelProperty("类型(1=邀请下单,2=注册司机)") |
| | | private Integer type; |
| | | } |
| | |
| | | private String userName; |
| | | @ApiModelProperty("用户电话") |
| | | private String userPhone; |
| | | @ApiModelProperty("用户余额") |
| | | private Double balance; |
| | | @ApiModelProperty("下单次数") |
| | | private Integer orderTimes; |
| | | @ApiModelProperty("取消次数") |
New file |
| | |
| | | package com.supersavedriving.driver.modular.system.warpper; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("订单状态") |
| | | public class OrderStatusWarpper { |
| | | @ApiModelProperty("订单id") |
| | | private Long orderId; |
| | | @ApiModelProperty("订单类型") |
| | | private Integer orderType; |
| | | @ApiModelProperty("订单状态(101=待接单,102=已接单,103=前往预约点,104=到达预约点,105=开始服务,106=到达目的地,107=待支付,108=待评价,109=已完成,201=转单中,301=已取消,401=等待中)") |
| | | private Integer state; |
| | | } |
| | |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | <groupId>com.stylefeng</groupId> |
| | | <groupId>com.supersavedriving</groupId> |
| | | <artifactId>guns-parent</artifactId> |
| | | <version>1.0.0</version> |
| | | |
| | |
| | | <scope>import</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.stylefeng</groupId> |
| | | <groupId>com.supersavedriving</groupId> |
| | | <artifactId>guns-generator</artifactId> |
| | | <version>${guns.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.stylefeng</groupId> |
| | | <groupId>com.supersavedriving</groupId> |
| | | <artifactId>guns-core</artifactId> |
| | | <version>${guns.version}</version> |
| | | </dependency> |