| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.SellingCarMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | |
| | | |
| | | @Override |
| | | public Map<String, Object> list(String createTime, String carLicensePlate, 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 addSellingCar(SellingCar sellingCar) throws Exception { |
| | | sellingCar.setUserType(3); |
| | | sellingCar.setUserId(ShiroKit.getUser().getObjectId()); |
| | | sellingCar.setUserId(ShiroExtUtil.getUser().getObjectId()); |
| | | TCarBrand tCarBrand = carBrandService.selectById(sellingCar.getBrandId()); |
| | | sellingCar.setBrandName(tCarBrand.getName()); |
| | | TRegion province = regionService.selectOne(new EntityWrapper<TRegion>().eq("code", sellingCar.getProvinceCode())); |
| | |
| | | sellingCar.setCityName(city.getName()); |
| | | sellingCar.setCreateTime(new Date()); |
| | | sellingCar.setFirstPageShow(2); |
| | | if(ShiroKit.getUser().getRoleType() == 1 && sellingCar.getStatus() == 1){ |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1 && sellingCar.getStatus() == 1) { |
| | | sellingCar.setStatus(4); |
| | | } |
| | | this.insert(sellingCar); |