package org.springblade.gateway.web_gateway.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.tool.api.R;
import org.springblade.gateway.web_gateway.service.IQrCodeService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author July
 * @version 1.0.0
 * @ClassName QrCodeController.java
 * @Description 业务员二维码
 * @createTime 2021年10月12日 16:20:00
 */
@RestController
@RequestMapping("/qrcode")
@Api(tags = "二维码控制器")
@AllArgsConstructor
public class QrCodeController {

	private IQrCodeService qrCodeService;

	@ApiOperation("获取小程序码")
	@PostMapping("/getCodes")
	public R getCodes(BladeUser bladeUser) {
		return R.data(qrCodeService.getCodes(bladeUser.getUserId()));
	}
}
