package com.elephant.framework.galaxy.aroad.module.zhjs.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.response.R;
import com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog;
import com.elephant.framework.galaxy.aroad.module.zhjs.entity.ZhjsZqzfzsMx;
import com.elephant.framework.galaxy.aroad.module.zhjs.service.ZhjsZqzfzsMxService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController;


/**
 * 中期支付证书明细
 *
 * @author wangjian
 * @date 2019-05-16 19:44:02
 */
@RestController
@AllArgsConstructor
@RequestMapping("/zhjs/zqzfzsmx")
public class ZhjsZqzfzsMxController extends BaseController  {

  private final  ZhjsZqzfzsMxService zhjsZqzfzsMxService;

  /**
   * 分页查询
   * @param page 分页对象
   * @param zhjsZqzfzsMx 中期支付证书明细
   * @return
   */
  @GetMapping("/page")
  public R getZhjsZqzfzsMxPage(Page page, ZhjsZqzfzsMx zhjsZqzfzsMx) {
    return  new R<>(zhjsZqzfzsMxService.page(page,Wrappers.query(zhjsZqzfzsMx)));
  }


  /**
   * 通过id查询中期支付证书明细
   * @param id id
   * @return R
   */
  @GetMapping("/{id}")
  public R getById(@PathVariable("id") String id){
    return new R<>(zhjsZqzfzsMxService.getById(id));
  }

}
