ActivtyTemplatedController.java
1.9 KB
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
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();
}
}