| | |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.*; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.WoUtil; |
| | | import com.stylefeng.guns.modular.system.dao.DriverPunishMapper; |
| | | import com.stylefeng.guns.modular.system.dao.DriverTrainMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.EmailUtil; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | |
| | | |
| | | @Value("${spring.mail.template-path}") |
| | | private String templatePath; |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | |
| | | |
| | |
| | | type = 6; |
| | | tDriver.setAuthState(4); |
| | | } |
| | | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | try { |
| | | String path = templatePath + "driver/index.html"; |
| | | Document document = Jsoup.parse(new File(path), "UTF-8"); |
| | | document.getElementById("chinese").attr("style", "display: none;"); |
| | | document.getElementById("french").attr("style", "display: none;"); |
| | | document.getElementById("invite1").attr("style", "display: none;"); |
| | | document.getElementById("user1").attr("style", "display: none;"); |
| | | document.getElementById("settle1").attr("style", "display: none;"); |
| | | document.getElementById("pass1").attr("style", "display: none;"); |
| | | document.getElementById("email1").attr("style", "display: none;"); |
| | | document.getElementById("bill1").attr("style", "display: none;"); |
| | | document.getElementById("reward1").attr("style", "display: none;"); |
| | | document.getElementById("rewardToday1").attr("style", "display: none;"); |
| | | document.getElementById("carAudit1").attr("style", "display: none;"); |
| | | document.getElementById("chinese").remove(); |
| | | document.getElementById("french").remove(); |
| | | document.getElementById("invite1").remove(); |
| | | document.getElementById("user1").remove(); |
| | | document.getElementById("settle1").remove(); |
| | | document.getElementById("pass1").remove(); |
| | | document.getElementById("email1").remove(); |
| | | document.getElementById("bill1").remove(); |
| | | document.getElementById("reward1").remove(); |
| | | document.getElementById("rewardToday1").remove(); |
| | | document.getElementById("carAudit1").remove(); |
| | | |
| | | document.getElementsByTag("title").get(0).text(1 == authState ? "Driver is verified and qualified" : "Driver is not verified and qualified"); |
| | | Element driver_audit1_user = document.getElementById("driver_audit1_user"); |
| | | driver_audit1_user.text("Hello " + tDriver.getFirstName() + " " + tDriver.getLastName() + ","); |
| | | Element driver_audit1_content = document.getElementById("driver_audit1_content"); |
| | | if(1 == authState){ |
| | | driver_audit1_content.text("You application has been approved."); |
| | | driver_audit1_content.text("Your application has been approved."); |
| | | }else{ |
| | | driver_audit1_content.text("I'm sorry, your application was rejected. Reason for rejection: Incomplete filling in personal information."); |
| | | driver_audit1_content.text("We are sorry to inform you that your application was rejected. Please contact our service for relevant details, call 0577777767 or send e-mail to support@i-go.group"); |
| | | } |
| | | EmailUtil.send(tDriver.getEmail(), "Notice of driver registration application", document.html()); |
| | | EmailUtil.send(tDriver.getEmail(), 1 == authState ? "Driver is verified and qualified" : "Driver is not verified and qualified", document.html()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | } |
| | | tDriver.setPhone(phone); |
| | | tDriver.setAccount(phone); |
| | | tDriver.setBalance(new BigDecimal(0)); |
| | | // tDriver.setCommission(new BigDecimal(0)); |
| | | // tDriver.setCouponBalance(new BigDecimal(0)); |
| | | // tDriver.setBackgroundBalance(new BigDecimal(0)); |
| | | |
| | | tDriverService.insert(tDriver); |
| | | |
| | | //添加经营业务 |
| | |
| | | tDriverService.updateById(driver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 操作司机状态 |
| | | */ |
| | |
| | | if (1 == optType){ //解冻 |
| | | tDriver.setAuthState(2); |
| | | }else if (2 == optType){ //冻结 |
| | | String token = redisUtil.getValue("DRIVER_" + tDriver.getPhone()); |
| | | redisUtil.remove(token);//删除个人信息数据 |
| | | redisUtil.remove("DRIVER_" + tDriver.getPhone());//删除后台冻结相关缓存 |
| | | redisUtil.remove("DRIVER_" + driverId);//清除存储的token |
| | | tDriver.setAuthState(3); |
| | | } |
| | | tDriver.setRemark(remark); |