| | |
| | | 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.*; |
| | |
| | | |
| | | @Autowired |
| | | private ITRegionService regionService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITUserService userService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到列表页 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/showSellingCarList") |
| | | public String showSellingCarList(Model model){ |
| | | public String showSellingCarList(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 + "sellingCar.html"; |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/sellingCar_add") |
| | | public String sellingCar_add(Model model){ |
| | | model.addAttribute("push", ShiroExtUtil.getUser().getRoleType() == 1 ? true : false); |
| | | public String sellingCar_add(Model model) { |
| | | 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)); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/sellingCar_update") |
| | | public String sellingCar_update(Model model, Integer id){ |
| | | public String sellingCar_update(Model model, Integer id) { |
| | | SellingCar sellingCar = sellingCarService.selectById(id); |
| | | model.addAttribute("item", sellingCar); |
| | | model.addAttribute("imgs", sellingCar.getImgUrl().split(",")); |
| | | model.addAttribute("videos", sellingCar.getVideoUrl().split(",")); |
| | | model.addAttribute("describeImgs", sellingCar.getDescribeImgUrl().split(",")); |
| | | 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)); |