| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.*; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.core.util.WoUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ExcelExportUtil; |
| | | |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | |
| | | public String showCarRental(Model model){ |
| | | List<TCarBrand> state = carBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1)); |
| | | model.addAttribute("carBrand", state); |
| | | model.addAttribute("userType", ShiroKit.getUser().getRoleType()); |
| | | model.addAttribute("userType", ShiroExtUtil.getUser().getRoleType()); |
| | | return PREFIX + "carRental.html"; |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping("/carRental_add") |
| | | public String carRental_add(Model model){ |
| | | model.addAttribute("push", ShiroKit.getUser().getRoleType() == 1 ? true : false); |
| | | model.addAttribute("push", ShiroExtUtil.getUser().getRoleType() == 1 ? true : false); |
| | | List<TCarBrand> state = carBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1)); |
| | | model.addAttribute("carBrand", state); |
| | | List<TRegion> regions = regionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | |
| | | model.addAttribute("province", regions); |
| | | regions = regionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", regionService.selectOne(new EntityWrapper<TRegion>().eq("code", carRental.getProvinceCode())).getId())); |
| | | model.addAttribute("city", regions); |
| | | model.addAttribute("push", ShiroKit.getUser().getRoleType() == 1 ? true : false); |
| | | model.addAttribute("push", ShiroExtUtil.getUser().getRoleType() == 1 ? true : false); |
| | | return PREFIX + "carRental_edit.html"; |
| | | } |
| | | |
| | |
| | | carRental.setImgUrl(eighteen); |
| | | carRental.setVideoUrl(nineteen); |
| | | carRental.setFirstPageShow(2); |
| | | carRental.setInsertUser(ShiroKit.getUser().getId()); |
| | | carRental.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | carRentalService.insert(carRental); |
| | | } |
| | | } |