| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.mchange.util.FailSuppressedMessageLogger; |
| | | import com.stylefeng.guns.core.util.MD5Util; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity; |
| | | import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; |
| | |
| | | |
| | | @Autowired |
| | | private IOrderCancelService orderCancelService; |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | |
| | | |
| | |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | String format = String.format("uid=%s&type=%s", uid, type); |
| | | String key = MD5Util.encrypt(format); |
| | | String value = redisUtil.getValue(key); |
| | | if(ToolUtil.isNotEmpty(value) && (System.currentTimeMillis() - Long.valueOf(value)) <= 1000){ |
| | | return ResultUtil.error(language == 1 ? "请勿重复操作" : language == 2 ? "Don't repeat the operation" : "Ne répétez pas l’opération"); |
| | | } |
| | | redisUtil.setStrValue(key, System.currentTimeMillis() + "", 5); |
| | | return driverService.work(uid, type, language); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | BaseWarpper baseWarpper = new BaseWarpper(); |
| | | baseWarpper.setDay(String.valueOf(null != map.get("time") ? map.get("time") : "")); |
| | | baseWarpper.setAmount(Double.valueOf(String.valueOf(null != map.get("money") ? map.get("money") : 0))); |
| | | baseWarpper.setType(Integer.valueOf(type)); |
| | | if("2".equals(type)){ |
| | | switch (Integer.valueOf(String.valueOf(null != map.get("orderType") ? map.get("orderType") : 0))){ |
| | | case 1: |