Commit 1a87284a authored by tianyiming's avatar tianyiming

修改查询设备分类接口

parent eda4a94f
package com.yeejoin.amos.boot.module.statistcs.biz.controller; package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.ComprehensiveStatisticalAnalysisServiceImpl; import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.ComprehensiveStatisticalAnalysisServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; 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; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...@@ -32,14 +34,18 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController { ...@@ -32,14 +34,18 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
private ComprehensiveStatisticalAnalysisServiceImpl comprehensiveStatisticalAnalysisServiceImpl; private ComprehensiveStatisticalAnalysisServiceImpl comprehensiveStatisticalAnalysisServiceImpl;
/** /**
* @param key 筛选key * 查询设备分类
* @param category
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/select/equipmentCategory") @PostMapping(value = "/select/equipmentCategory")
@ApiOperation(httpMethod = "GET", value = "查询设备分类", notes = "查询设备分类") @ApiOperation(httpMethod = "POST", value = "查询设备分类", notes = "查询设备分类")
public ResponseModel<List<Map<String, Object>>> queryEquipmentCategory(@RequestParam(value = "key", required = false) String key) { public ResponseModel<List<Map<String, Object>>> queryEquipmentCategory(@RequestBody JSONObject category) {
return ResponseHelper.buildResponse(comprehensiveStatisticalAnalysisServiceImpl.queryEquipmentCategory(key)); if(ObjectUtils.isEmpty(category) || category.getString("key") == null){
return null;
}
return ResponseHelper.buildResponse(comprehensiveStatisticalAnalysisServiceImpl.queryEquipmentCategory(category.getString("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