| | |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.dao.TNoticesMapper; |
| | | import com.stylefeng.guns.modular.system.dao.TUseMoneyMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.util.ALiSendSms; |
| | | import com.stylefeng.guns.modular.system.util.PushUtil; |
| | | import com.stylefeng.guns.modular.system.util.SMSUtil; |
| | | import com.stylefeng.guns.modular.system.warpper.ActivityWarpper; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | |
| | | private IOrderLogisticsService orderLogisticsService; |
| | | @Autowired |
| | | private IInviteService inviteService; |
| | | @Autowired |
| | | private TNoticesMapper noticesMapper; |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/user/allert") |
| | | @ApiOperation(value = "获取公告弹窗", tags = {"司机端-2.0新增"}, notes = "") |
| | | public ResultUtil<List<TNotices>> allert(){ |
| | | try { |
| | | List<TNotices> tNotices = noticesMapper.selectList(new EntityWrapper<TNotices>() |
| | | .eq("type", 2).eq("isDriver",2) |
| | | .eq("isShow", 1).ne("flag", 3).eq("isAlert",1).eq("isDelete", 1) |
| | | ); |
| | | return ResultUtil.success(tNotices); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | /** |
| | | * 获取用户邀请二维码 |
| | | * @param request |
| | |
| | | if (userInfo.getCode()==null){ |
| | | userInfo = driverService.generateCode(userInfo); |
| | | } |
| | | driverService.generateCode(userInfo); |
| | | Map<String, String> res = new HashMap<>(); |
| | | res.put("code",userInfo.getCode()); |
| | | int i = inviteService.selectCount(new EntityWrapper<Invite>() |
| | | .eq("inviteUserId", uid) |
| | | .eq("useType", 2)); |
| | | .eq("userType", 2)); |
| | | |
| | | res.put("inviteNumber",i+""); |
| | | return ResultUtil.success(res); |
| | |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/api/auser/testCode") |
| | | @ApiOperation(value = "测试小程序二维码", tags = {"司机端-2.0新增"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil testCode(){ |
| | | String s = driverService.generateQrCodeTemp(); |
| | | return ResultUtil.success(s); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | startTime = startTime + " 00:00:00"; |
| | | endTime = endTime + " 23:59:59"; |
| | | } |
| | | pageNum = (pageNum - 1) * size; |
| | | List<Invite> invites = inviteService.inviteList(uid,startTime,endTime,pageNum,size); |
| | | for (Invite invite : invites) { |
| | | // 将手机号phone中间四位替换为* |
| | |
| | | String templateCode = null; |
| | | switch (type){ |
| | | case 1: |
| | | templateCode = "SMS_476880205";//身份验证 |
| | | templateCode = "SMS_482775061";//身份验证 |
| | | break; |
| | | case 2: |
| | | templateCode = "SMS_476880205";//登录确认 |
| | | templateCode = "SMS_482775061";//登录确认 |
| | | break; |
| | | case 3: |
| | | templateCode = "SMS_476880205";//用户注册 |
| | | templateCode = "SMS_482775061";//用户注册 |
| | | break; |
| | | case 4: |
| | | templateCode = "SMS_476880205";//修改密码 |
| | | templateCode = "SMS_482775061";//修改密码 |
| | | break; |
| | | case 5: |
| | | templateCode = "SMS_476880205";//司机注册成功 |
| | | templateCode = "SMS_482775061";//司机注册成功 |
| | | break; |
| | | case 6: |
| | | templateCode = "SMS_476880205";//司机注册失败 |
| | | templateCode = "SMS_482775061";//司机注册失败 |
| | | break; |
| | | } |
| | | String s = aLiSendSms.sendSms(driver.getPhone(), templateCode, "{}"); |
| | | // SMSUtil.send(driver.getPhone(), ); |
| | | // String s = aLiSendSms.sendSms(driver.getPhone(), templateCode, "{}"); |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |