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

import com.sqx.common.utils.Result;
import com.sqx.modules.app.annotation.Login;
import com.sqx.modules.bl.order.entity.UserPackageDetail;
import com.sqx.modules.bl.order.service.UserPackageDetailService;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/app/user/package/detail")
@Api(value = "用户服务包详情管理", tags = {"用户服务包详情"})
public class AppUserPackageDetailController {

    @Autowired
    private UserPackageDetailService service;

    @Login
    @GetMapping("/findMyPackageDetailList")
    @ApiOperation("查询服务包详情列表")
    public Result findMyPackageDetailList(UserPackageDetail userPackageDetail){
        return service.findAppUsedQuantity(userPackageDetail);
    }

    @Login
    @GetMapping("/getMyPackageDetail")
    @ApiOperation("查询服务包详情")
    public Result getMyPackageDetail(UserPackageDetail userPackageDetail){
        return service.getMyPackageDetail(userPackageDetail);
    }
}
