Authored by 马力

bug

... ... @@ -3,6 +3,8 @@ package com.yohoufo.dal.resource.model;
import lombok.Data;
import lombok.ToString;
import java.util.List;
@Data
@ToString
public class ActivtyTemplated {
... ... @@ -19,4 +21,6 @@ public class ActivtyTemplated {
private Integer updateTime;
private String updateUser;
private List<ActivtyTemplatedFloor> floors;
}
\ No newline at end of file
... ...
... ... @@ -40,9 +40,8 @@ public class ActivtyTemplatedController {
@IgnoreSession
@ResponseBody
public ApiResponse getResource(@RequestParam(name = "templated_id") Integer templatedId) {
logger.info("Get activty by content templatedId[{}]", templatedId);
List<ActivtyTemplatedFloor> data = activtyTemplatedService.get(templatedId);
ActivtyTemplated data = activtyTemplatedService.get(templatedId);
logger.info("Get activty by content templatedId[{}] success.", templatedId);
return new ApiResponse.ApiResponseBuilder().data(data).code(200).message("activty data").build();
}
... ...
... ... @@ -21,14 +21,14 @@ public class ActivtyTemplatedService {
@Autowired
private ActivtyTemplatedMapper activtyTemplatedMapper;
public List<ActivtyTemplatedFloor> get(Integer templatedId) {
public ActivtyTemplated get(Integer templatedId) {
ActivtyTemplated activtyTemplated = activtyTemplatedMapper.selectByPrimaryKey(templatedId);
if (null == activtyTemplated) {
return Lists.newArrayList();
return null;
}
List<ActivtyTemplatedFloor> activtyTemplatedFloor = activtyTemplatedFloorMapper.selectByTemplatedId(templatedId);
return activtyTemplatedFloor;
activtyTemplated.setFloors(activtyTemplatedFloorMapper.selectByTemplatedId(templatedId));
return activtyTemplated;
}
}
... ...