| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.CoachClient; |
| | | import com.dsh.course.feignClient.account.CoachTypeClient; |
| | |
| | | import com.dsh.guns.modular.system.model.CoachChangeStateVO; |
| | | import com.dsh.guns.modular.system.model.CoachQuery; |
| | | import com.dsh.guns.modular.system.model.Store; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | |
| | | coach.setCity(cityManager.getCity()); |
| | | coach.setCityCode(cityManager.getCityCode()); |
| | | coach.setCityManagerId(objectId); |
| | | |
| | | } |
| | | if (coach.getDiploma().equals("")) { |
| | | coach.setDiploma(null); |
| | |
| | | /** |
| | | * 获取教练列表 |
| | | */ |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public List<CoachSerchVO> list(String province, String city, String name, String phone) { |
| | |
| | | coachQuery.setCity(city); |
| | | coachQuery.setName(name); |
| | | coachQuery.setPhone(phone); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | if (objectType == 2){ |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<Integer> operatorId = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId)) |
| | | .stream().map(TStore::getId).collect(Collectors.toList()); |
| | | coachQuery.setStoreIds(operatorId); |
| | | } |
| | | if (objectType == 3){ |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<Integer> list = new ArrayList<>(); |
| | | list.add(objectId); |
| | | coachQuery.setStoreIds(list); |
| | | } |
| | | return coachClient.listAll(coachQuery); |
| | | } |
| | | } |