commit | author | age
|
a18bfa
|
1 |
package cn.autoform.web.controller.industrycategory; |
Z |
2 |
|
|
3 |
import java.util.Map; |
|
4 |
import java.util.Objects; |
|
5 |
|
|
6 |
import org.springframework.beans.factory.annotation.Autowired; |
|
7 |
import org.springframework.web.bind.annotation.RequestBody; |
|
8 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
9 |
import org.springframework.web.bind.annotation.RequestMethod; |
|
10 |
import org.springframework.web.bind.annotation.RestController; |
|
11 |
|
|
12 |
import cn.autoform.bean.BusinessCategoryCusEntity; |
|
13 |
import cn.autoform.fw.exception.RestResult; |
|
14 |
import cn.autoform.fw.utility.RestResultGenerator; |
|
15 |
import cn.autoform.web.service.industrycategory.IndustryCategoryService; |
|
16 |
/** |
|
17 |
* 模板中心Controller |
|
18 |
* @author lt-qxy |
|
19 |
* |
|
20 |
*/ |
|
21 |
@RestController |
|
22 |
public class IndustryCategoryController { |
|
23 |
|
|
24 |
@Autowired |
|
25 |
private IndustryCategoryService industryCategoryService = null; |
|
26 |
|
|
27 |
/** |
|
28 |
* 业务分类管理表中取出数据 |
|
29 |
* @param businessCategory |
|
30 |
* @return |
|
31 |
* @throws Exception |
|
32 |
*/ |
|
33 |
@RequestMapping(value = "${request.industryCategory01}", method = RequestMethod.POST) |
|
34 |
public RestResult<Map<String,Object>> getBusinessCategoryListService(@RequestBody BusinessCategoryCusEntity businessCategory){ |
|
35 |
Map<String,Object> rsMap = industryCategoryService.getBusinessCategoryList(businessCategory); |
|
36 |
return RestResultGenerator.genSuccessResult(rsMap); |
|
37 |
} |
|
38 |
|
|
39 |
|
|
40 |
/** |
|
41 |
* 业务分类管理表中删除数据 |
|
42 |
* @param businessCategory |
|
43 |
* @return |
|
44 |
* @return |
|
45 |
* @throws Exception |
|
46 |
*/ |
|
47 |
@RequestMapping(value = "${request.industryCategory02}", method = RequestMethod.POST) |
|
48 |
public RestResult<Integer> deleteBusinessCategoryService(@RequestBody BusinessCategoryCusEntity businessCategory){ |
|
49 |
Integer result = !Objects.isNull(businessCategory) ? |
|
50 |
industryCategoryService.deleteBusinessCategoryService(businessCategory) : -1; |
|
51 |
return RestResultGenerator.genSuccessResult(result); |
|
52 |
|
|
53 |
} |
|
54 |
|
|
55 |
|
|
56 |
} |