package com.sqx.modules.bl.massage.app;

import com.sqx.common.utils.Result;
import com.sqx.modules.app.annotation.Login;
import com.sqx.modules.bl.massage.entity.MassagePackageDetail;
import com.sqx.modules.bl.massage.service.MassagePackageDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/app/massage/packageDetail")
@Api(value = "服务包详情管理", tags = {"服务包详情管理"})
public class AppMassagePackageDetailController {

    @Autowired
    private MassagePackageDetailService service;

    @Login
    @GetMapping("/findAppPage")
    @ApiOperation("查询按服务包详情（分页）")
    public Result findAppPage(@RequestAttribute("userId") Long userId, MassagePackageDetail massagePackageDetail){
        massagePackageDetail.setStatus(1);
        massagePackageDetail.setUserId(userId);
        return service.findAppPage(massagePackageDetail);
    }

    @Login
    @GetMapping("/getAppPackageDetail")
    @ApiOperation("查询服务包详情")
    public Result getAppPackageDetail(MassagePackageDetail massagePackageDetail){
        return service.getAppPackageDetail(massagePackageDetail);
    }

}
