package com.kym.miniapp.controller;

import com.kym.common.R;
import com.kym.common.annotation.SysLog;
import com.kym.service.admin.ActivityService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 小程序控制器
 * </p>
 *
 * @author skyline
 * @since 2023-10-18
 */
@RestController
@RequestMapping("/activity")
public class ActivityController {

    private final ActivityService activityService;


    public ActivityController(ActivityService activityService) {
        this.activityService = activityService;
    }


    @SysLog("活动详情")
    @GetMapping("/{activityId}")
    R<?> activityDetail(@PathVariable("activityId") String activityId) {
        return R.success(activityService.activityDetail(activityId));
    }

}
