package cn.autoform.web.controller.industrycategory;
|
|
import java.util.Map;
|
import java.util.Objects;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import cn.autoform.bean.BusinessCategoryCusEntity;
|
import cn.autoform.fw.exception.RestResult;
|
import cn.autoform.fw.utility.RestResultGenerator;
|
import cn.autoform.web.service.industrycategory.IndustryCategoryService;
|
/**
|
* 模板中心Controller
|
* @author lt-qxy
|
*
|
*/
|
@RestController
|
public class IndustryCategoryController {
|
|
@Autowired
|
private IndustryCategoryService industryCategoryService = null;
|
|
/**
|
* 业务分类管理表中取出数据
|
* @param businessCategory
|
* @return
|
* @throws Exception
|
*/
|
@RequestMapping(value = "${request.industryCategory01}", method = RequestMethod.POST)
|
public RestResult<Map<String,Object>> getBusinessCategoryListService(@RequestBody BusinessCategoryCusEntity businessCategory){
|
Map<String,Object> rsMap = industryCategoryService.getBusinessCategoryList(businessCategory);
|
return RestResultGenerator.genSuccessResult(rsMap);
|
}
|
|
|
/**
|
* 业务分类管理表中删除数据
|
* @param businessCategory
|
* @return
|
* @return
|
* @throws Exception
|
*/
|
@RequestMapping(value = "${request.industryCategory02}", method = RequestMethod.POST)
|
public RestResult<Integer> deleteBusinessCategoryService(@RequestBody BusinessCategoryCusEntity businessCategory){
|
Integer result = !Objects.isNull(businessCategory) ?
|
industryCategoryService.deleteBusinessCategoryService(businessCategory) : -1;
|
return RestResultGenerator.genSuccessResult(result);
|
|
}
|
|
|
}
|