package cn.com.ty.lift.ud.payment.controller;

import cn.com.ty.lift.ud.payment.controller.query.TyBillQuery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.com.ty.lift.ud.payment.mapper.entity.TyBillEntity;
import cn.com.ty.lift.ud.payment.service.ITyBillService;
import cn.com.xwy.boot.web.dto.RestResponse;
import cn.com.ty.lift.ud.common.BaseController;
import com.baomidou.mybatisplus.extension.service.IService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 天域账单流水 API Jing
 * 
 * @author Xson
 * @date 2020-04-23
 */
@Api(tags = "天域账单流水 API- 小陶")
@RestController
@RequestMapping("/api/tyBills")
public class TyBillController extends BaseController<TyBillEntity, TyBillQuery> {

    private final Logger log = LoggerFactory.getLogger(TyBillController.class);

    private @Autowired ITyBillService tyBillService;

    @Override
    protected IService<TyBillEntity> getService() {
        return tyBillService;
    }


    @PostMapping("/query-page")
    @ApiOperation(value = "分页查询")
    @Override
    public RestResponse getCondition(@RequestBody TyBillQuery request) {
        return tyBillService.selectByExample(request);
    }
}