zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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);
        
    }
    
    
}