|
@@ -44,6 +44,8 @@ public class ExtendContentController extends BaseController {
|
44
|
44
|
@Autowired
|
45
|
45
|
private ITaBuildingDynamicService iTaBuildingDynamicService;
|
46
|
46
|
|
|
47
|
+ @Autowired
|
|
48
|
+ private ITaBuildingService iTaBuildingService;
|
47
|
49
|
|
48
|
50
|
/**
|
49
|
51
|
* 分页查询列表
|
|
@@ -76,8 +78,9 @@ public class ExtendContentController extends BaseController {
|
76
|
78
|
@RequestParam(value = "targetId", required = false) String targetId,
|
77
|
79
|
@RequestParam(value = "contentType", required = false) String contentType,
|
78
|
80
|
@RequestParam(value = "buildingId", required = false) String buildingId,
|
79
|
|
- @RequestParam(value = "contentId", required = false) String contentId){
|
80
|
|
- ResponseBean responseBean= iExtendContentService.selectExtendContentListShowType(showType, showPosition, targetId,contentType, buildingId, contentId);
|
|
81
|
+ @RequestParam(value = "contentId", required = false) String contentId,
|
|
82
|
+ @RequestParam(value = "cityId", required = false) Integer cityId){
|
|
83
|
+ ResponseBean responseBean= iExtendContentService.selectExtendContentListShowType(showType, showPosition, targetId,contentType, buildingId, contentId, cityId);
|
81
|
84
|
return responseBean;
|
82
|
85
|
}
|
83
|
86
|
|
|
@@ -89,6 +92,8 @@ public class ExtendContentController extends BaseController {
|
89
|
92
|
*/
|
90
|
93
|
@RequestMapping(value="/admin/extendContent",method= RequestMethod.POST)
|
91
|
94
|
public ResponseBean extendContentAdd(@RequestBody ExtendContent extendContent){
|
|
95
|
+ Integer cityId = iTaBuildingService.getCityById(extendContent.getBuildingId());
|
|
96
|
+ extendContent.setCityId(cityId);
|
92
|
97
|
extendContent.setCreateDate(LocalDateTime.now());
|
93
|
98
|
ResponseBean responseBean= iExtendContentService.extendContentAdd(extendContent);
|
94
|
99
|
responseBean.addSuccess(extendContent);
|
|
@@ -129,6 +134,8 @@ public class ExtendContentController extends BaseController {
|
129
|
134
|
ResponseBean responseBean = new ResponseBean();
|
130
|
135
|
extendContent.setContentId(id);
|
131
|
136
|
try {
|
|
137
|
+ Integer cityId = iTaBuildingService.getCityById(extendContent.getBuildingId());
|
|
138
|
+ extendContent.setCityId(cityId);
|
132
|
139
|
if (iExtendContentService.updateById(extendContent)){
|
133
|
140
|
responseBean.addSuccess(extendContent);
|
134
|
141
|
}else {
|