|
@@ -0,0 +1,42 @@
|
|
|
|
+package com.jeeplus.test.luckyDraw.controller.app;
|
|
|
|
+
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
+import com.jeeplus.aop.logging.annotation.ApiLog;
|
|
|
|
+import com.jeeplus.sys.constant.enums.LogTypeEnum;
|
|
|
|
+import com.jeeplus.test.luckyDraw.service.LuckyDrawEventsService;
|
|
|
|
+import com.jeeplus.test.luckyDraw.service.dto.LuckyDrawEventsDTO;
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
+
|
|
|
|
+import javax.annotation.Resource;
|
|
|
|
+import javax.validation.Valid;
|
|
|
|
+
|
|
|
|
+@Api("app-活动")
|
|
|
|
+@RestController
|
|
|
|
+@RequestMapping(value = "/app/luckyDraw/events")
|
|
|
|
+public class AppLuckyDrawEventsController {
|
|
|
|
+
|
|
|
|
+ @Resource
|
|
|
|
+ private LuckyDrawEventsService luckyDrawEventsService;
|
|
|
|
+
|
|
|
|
+ @ApiLog("活动列表")
|
|
|
|
+ @GetMapping("list")
|
|
|
|
+ public ResponseEntity<IPage<LuckyDrawEventsDTO>> data_app(LuckyDrawEventsDTO luckyDrawEventsDTO, Page<LuckyDrawEventsDTO> page) throws Exception {
|
|
|
|
+ IPage<LuckyDrawEventsDTO> result = new Page<LuckyDrawEventsDTO>();
|
|
|
|
+ result = luckyDrawEventsService.findList (page,luckyDrawEventsDTO);
|
|
|
|
+ return ResponseEntity.ok (result);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiLog("查询活动数据详情")
|
|
|
|
+ @GetMapping("queryById")
|
|
|
|
+ public ResponseEntity queryById(@RequestParam("id") String id) {
|
|
|
|
+ LuckyDrawEventsDTO luckyDrawEventsDTO = luckyDrawEventsService.queryById ( id );
|
|
|
|
+ return ResponseEntity.ok (luckyDrawEventsDTO);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|