| | |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.model.CityListQuery; |
| | |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IEvaluationService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.StoreConfigService; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import org.apache.ibatis.ognl.Evaluation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private ITSiteService siteService; |
| | | @Resource |
| | | private StoreConfigService storeConfigService; |
| | | @Autowired |
| | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String provinceCode, String cityCode ,String shopName, String name, String phone) { |
| | | List<Integer> operatorId = new ArrayList<>(); |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | operatorId = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId", UserExt.getUser().getObjectId())) |
| | | .stream().map(TStore::getId).collect(Collectors.toList()); |
| | | } |
| | | if (UserExt.getUser().getObjectType()==3){ |
| | | operatorId.add(UserExt.getUser().getObjectId()); |
| | | } |
| | | Page<TEvaluationListVo> page = new PageFactory<TEvaluationListVo>().defaultPage(); |
| | | List<TEvaluationListVo> list = evaluationService.listAll(page,provinceCode,cityCode,name,phone,shopName); |
| | | List<TEvaluationListVo> list = evaluationService.listAll(page,provinceCode,cityCode,name,phone,shopName,operatorId); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |