Commit 315be5ef authored by tianyiming's avatar tianyiming

修改查询设备分类接口

parent 1a87284a
......@@ -6,7 +6,6 @@ import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.ComprehensiveStat
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -35,6 +34,7 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
/**
* 查询设备分类
*
* @param category
* @return
*/
......@@ -42,10 +42,8 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
@PostMapping(value = "/select/equipmentCategory")
@ApiOperation(httpMethod = "POST", value = "查询设备分类", notes = "查询设备分类")
public ResponseModel<List<Map<String, Object>>> queryEquipmentCategory(@RequestBody JSONObject category) {
if(ObjectUtils.isEmpty(category) || category.getString("key") == null){
return null;
}
return ResponseHelper.buildResponse(comprehensiveStatisticalAnalysisServiceImpl.queryEquipmentCategory(category.getString("key")));
String key = category.getString("key") == null ? null : category.getString("key");
return ResponseHelper.buildResponse(comprehensiveStatisticalAnalysisServiceImpl.queryEquipmentCategory(key));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment