package platform.modules.api.web; import com.github.pagehelper.PageInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.*; import platform.modules.api.dto.SkyImageCount; import platform.modules.api.dto.Sync; import platform.modules.api.service.SkyImageApiService; import platform.modules.api.service.SkyImageCountApiService; import platform.modules.carrier.dto.CarrierLibraryResult; import platform.modules.carrier.entity.Building; import platform.modules.government.entity.User; import platform.modules.sys.web.ResponseMessage; import java.util.List; /** * @author kevin * @since 2019/10/30 2:21 PM */ @RestController @RequestMapping("skyImage") public class SkyImageApiController { @Autowired private SkyImageApiService skyImageApiService; @Autowired private SkyImageCountApiService skyImageCountApiService; @PostMapping("syncUserInfo") public ResponseMessage syncSkyImageUserInfo(@RequestBody List syncs){ if (!ObjectUtils.isEmpty(syncs)){ return skyImageApiService.syncUserInfo(syncs); } else { ResponseMessage.error("用户不能为空"); } return ResponseMessage.success("success"); } @GetMapping("/factoryBuilding") public ResponseMessage factoryBuilding(){ List counts = skyImageCountApiService.factoryBuilding(); return ResponseMessage.success("success", counts); } @GetMapping("parkCount") public ResponseMessage parkCount(){ return ResponseMessage.success("success", skyImageCountApiService.getParkStatistic()); } @GetMapping("streetCount") public ResponseMessage streetCount(){ return ResponseMessage.success("success", skyImageCountApiService.getStreetStatistic()); } @GetMapping("leaseBuilding") public ResponseMessage leaseBuilding(String startTime, String endTime){ return ResponseMessage.success("success", skyImageCountApiService.leaseBuilding(startTime, endTime)); } }