package com.cyksj.web.controller.qy;

import com.cyksj.dto.Result;
import com.cyksj.enums.GatewayResponse;
import com.cyksj.mapper.QyServicesIntentionUserRecordMapper;
import com.cyksj.model.entity.QyServicesIntentionUserRecord;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
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;


@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/applets/qy")
public class QyController {
	private final QyServicesIntentionUserRecordMapper qyServicesIntentionUserRecordMapper;

	/**
	 * 企业服务意向用户记录
	 */
	@PostMapping("/services/intention/record")
	public Result<String> recordQyServicesIntention(@RequestBody @Validated QyServicesIntentionUserRecord intentionUserRecord) {
		qyServicesIntentionUserRecordMapper.insert(intentionUserRecord);
		return GatewayResponse.SUCCESS.newBuilder().toResult();
	}
}
