| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.CarRentalMapper; |
| | |
| | | |
| | | @Override |
| | | public Map<String, Object> list(String createTime, String title, Integer brandId, String insertUser, List<Integer> status, Integer userType, Integer offset, Integer limit) throws Exception { |
| | | Integer companyId = ShiroKit.getUser().getRoleType() == 1 ? null : ShiroKit.getUser().getObjectId(); |
| | | Integer companyId = ShiroExtUtil.getUser().getRoleType() == 1 ? null : ShiroExtUtil.getUser().getObjectId(); |
| | | String start = ""; |
| | | String end = ""; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | |
| | | @Override |
| | | public ResultUtil addCarRental(CarRental carRental) throws Exception { |
| | | carRental.setUserType(3); |
| | | carRental.setUserId(ShiroKit.getUser().getObjectId()); |
| | | carRental.setUserId(ShiroExtUtil.getUser().getObjectId()); |
| | | TCarBrand tCarBrand = carBrandService.selectById(carRental.getBrandId()); |
| | | carRental.setBrandName(tCarBrand.getName()); |
| | | TRegion region = regionService.selectOne(new EntityWrapper<TRegion>().eq("code", carRental.getProvinceCode())); |
| | |
| | | carRental.setCityName(region.getName()); |
| | | carRental.setCreateTime(new Date()); |
| | | carRental.setFirstPageShow(2); |
| | | carRental.setInsertUser(ShiroKit.getUser().getId()); |
| | | if(ShiroKit.getUser().getRoleType() == 1 && carRental.getStatus() == 1){ |
| | | carRental.setInsertUser(ShiroExtUtil.getUser().getId()); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1 && carRental.getStatus() == 1) { |
| | | carRental.setStatus(4); |
| | | } |
| | | this.insert(carRental); |