| | |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | | import com.dsh.course.feignClient.course.model.QueryCoursePackageLists; |
| | | import com.dsh.guns.core.support.HttpKit; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.ICoursePackageService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | @Resource |
| | | private CoursePackageClient coursePackageClient; |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | |
| | | |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Page<Map<String, Object>> queryCoursePackageLists(String provinceCode, String cityCode, Integer coursePackageTypeId, String name, Integer status, Integer state) { |
| | | public Page<Map<String, Object>> queryCoursePackageLists(String provinceCode, String cityCode, Integer coursePackageTypeId, Integer storeId, String name, Integer status, Integer state) { |
| | | QueryCoursePackageLists queryCoursePackageLists = new QueryCoursePackageLists(); |
| | | queryCoursePackageLists.setProvinceCode(provinceCode); |
| | | queryCoursePackageLists.setCityCode(cityCode); |
| | | queryCoursePackageLists.setCoursePackageTypeId(coursePackageTypeId); |
| | | queryCoursePackageLists.setStoreId(storeId); |
| | | queryCoursePackageLists.setName(name); |
| | | queryCoursePackageLists.setState(state); |
| | | queryCoursePackageLists.setStatus(status); |
| | |
| | | queryCoursePackageLists.setOffset(Integer.valueOf(request.getParameter("offset"))); |
| | | queryCoursePackageLists.setSort(request.getParameter("sort")); |
| | | queryCoursePackageLists.setOrder(request.getParameter("order")); |
| | | return coursePackageClient.queryCoursePackageLists(queryCoursePackageLists); |
| | | Page<Map<String, Object>> mapPage = coursePackageClient.queryCoursePackageLists(queryCoursePackageLists); |
| | | List<Map<String, Object>> records = mapPage.getRecords(); |
| | | for (Map<String, Object> record : records) { |
| | | TStore store = storeService.getById(Integer.valueOf(record.get("storeId").toString())); |
| | | record.put("store", store.getName()); |
| | | } |
| | | return mapPage; |
| | | } |
| | | } |