|
|
package com.yohoufo.resource.controller;
|
|
|
|
|
|
import com.yoho.tools.docs.ApiOperation;
|
|
|
import com.yohoufo.common.ApiResponse;
|
|
|
import com.yohoufo.common.annotation.IgnoreSession;
|
|
|
import com.yohoufo.dal.resource.model.ActivtyTemplated;
|
|
|
import com.yohoufo.dal.resource.model.ActivtyTemplatedFloor;
|
|
|
import com.yohoufo.resource.request.ResourcesRequest;
|
|
|
import com.yohoufo.resource.service.IResourcesService;
|
|
|
import com.yohoufo.resource.service.impl.ActivtyTemplatedService;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* Created by li.ma on 2019/10/25.
|
|
|
*/
|
|
|
@RestController
|
|
|
public class ActivtyTemplatedController {
|
|
|
private static final Logger logger = LoggerFactory.getLogger(ActivtyTemplatedController.class);
|
|
|
|
|
|
@Autowired
|
|
|
private ActivtyTemplatedService activtyTemplatedService;
|
|
|
|
|
|
/**
|
|
|
* <p>根据templated_id返回活动模板信息</p>
|
|
|
*
|
|
|
* @param activty templated_id
|
|
|
* @return
|
|
|
* @date: Created on 2018年9月18日 上午10:36:49
|
|
|
*/
|
|
|
@ApiOperation(name = "ufo.activty.get", desc="活动模板获取")
|
|
|
@RequestMapping(params = "method=ufo.activty.get")
|
|
|
@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);
|
|
|
logger.info("Get activty by content templatedId[{}] success.", templatedId);
|
|
|
return new ApiResponse.ApiResponseBuilder().data(data).code(200).message("activty data").build();
|
|
|
}
|
|
|
} |
...
|
...
|
|