package com.neusoft.smart.pos.trade.controller;


import com.neusoft.smart.pos.dto.trade.response.GetMchInfoResponse;
import com.neusoft.smart.pos.framework.dto.ResponseData;
import com.neusoft.smart.pos.trade.service.MchInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "交易商户信息管理使用rest接口", description = "交易商户信息管理使用rest接口")
@RestController
@RequestMapping(path = "/mch")
@Validated
public class MchInfoController {

	@Autowired
	private MchInfoService mchInfoService;
	
	@ApiOperation(value = "交易商户信息查询使用接口", notes = "交易商户信息查询使用方法")
	@GetMapping("/mchInfo")
	public ResponseData<GetMchInfoResponse> queryMchInfo(
			@RequestParam(value="mcode",defaultValue = "") String mcode) {
		return new ResponseData<>(mchInfoService.queryMchInfo(mcode));
	}
}
	