Pu Zhibing
2 天以前 5dacdee9b54c78372b68140e2b068d03a620eab9
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/CarRentalController.java
@@ -24,6 +24,7 @@
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
@@ -50,27 +51,30 @@
    @Autowired
    private ITRegionService regionService;
    @Autowired
    private ITUserService userService;
    @Autowired
    private ITDriverService driverService;
    @Autowired
    private ITCompanyService companyService;
    @Resource
    private ShiroExtUtil shiroExtUtil;
    /**
     * 跳转到列表页
     *
     * @return
     */
    @GetMapping("/showCarRental")
    public String showCarRental(Model model){
    public String showCarRental(Model model) {
        List<TCarBrand> state = carBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1));
        model.addAttribute("carBrand", state);
        model.addAttribute("userType", ShiroExtUtil.getUser().getRoleType());
        model.addAttribute("userType", shiroExtUtil.getUser().getRoleType());
        return PREFIX + "carRental.html";
    }
@@ -81,7 +85,7 @@
     */
    @GetMapping("/carRental_add")
    public String carRental_add(Model model){
        model.addAttribute("push", ShiroExtUtil.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));
@@ -146,7 +150,7 @@
        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", ShiroExtUtil.getUser().getRoleType() == 1 ? true : false);
        model.addAttribute("push", shiroExtUtil.getUser().getRoleType() == 1 ? true : false);
        return PREFIX + "carRental_edit.html";
    }
@@ -714,7 +718,7 @@
                    carRental.setImgUrl(eighteen);
                    carRental.setVideoUrl(nineteen);
                    carRental.setFirstPageShow(2);
                    carRental.setInsertUser(ShiroExtUtil.getUser().getId());
                    carRental.setInsertUser(shiroExtUtil.getUser().getId());
                    carRentalService.insert(carRental);
                }
            }