package com.jeequan.jeepay.pay.ctrl.channel.alipay.service;

import com.jeequan.jeepay.db.entity.MchStoreDevice;
import com.jeequan.jeepay.pay.ctrl.channel.alipay.model.response.AlipaySpiCashierBatchQueryResponse;
import com.jeequan.jeepay.pay.ctrl.channel.alipay.model.response.AlipaySpiCashierQueryResponse;
import com.jeequan.jeepay.pay.ctrl.channel.alipay.model.response.AlipaySpiCashierSignResponse;
import com.jeequan.jeepay.pay.ctrl.channel.alipay.model.response.AlipaySpiCashierUnSignResponse;
import com.jeequan.jeepay.pay.ctrl.payorder.AbstractPayOrderController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 支付宝如意spi接口：收银员操作
 *
 * @author zx
 *
 * @date 2021-04-27 15:50
 */
@Slf4j
@Service
public class AlipaySpiRuyiCashierService extends AbstractPayOrderController {

	/** 收银员签到  **/
	public AlipaySpiCashierSignResponse cashierSign(MchStoreDevice mchStoreDevice) {
		String cashierId = getValString("cashier_id");

		AlipaySpiCashierSignResponse response = new AlipaySpiCashierSignResponse();
		response.setStatus("1");

		return response;
	}

	/** 收银员签退  **/
	public AlipaySpiCashierUnSignResponse cashierUnsign(MchStoreDevice mchStoreDevice) {
		String cashierId = getValString("cashier_id");

		AlipaySpiCashierUnSignResponse response = new AlipaySpiCashierUnSignResponse();
		response.setStatus("1");

		return response;
	}

	/** 查询收银员列表  **/
	public AlipaySpiCashierBatchQueryResponse batchQuery(MchStoreDevice mchStoreDevice) {
		AlipaySpiCashierBatchQueryResponse response = new AlipaySpiCashierBatchQueryResponse();

		/*List<AlipaySpiCashierBatchQueryResponse.Cashier> cashierList = new ArrayList<>();

		AlipaySpiCashierBatchQueryResponse.Cashier cashier = new AlipaySpiCashierBatchQueryResponse.Cashier();
		cashier.setCashierId("1001");
		cashier.setCashierName("计全科技收银员1");
		cashierList.add(cashier);

		response.setCashierList(cashierList);*/

		return response;
	}

	/** 查询收银员状态  **/
	public AlipaySpiCashierQueryResponse cashierQuery(MchStoreDevice mchStoreDevice) {
		AlipaySpiCashierQueryResponse response = new AlipaySpiCashierQueryResponse();
		response.setStatus("0");
		response.setCashierId("0");

		return response;
	}

}
