package com.yh.saas.platform.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.yh.saas.platform.entity.FuncClickInfo;
import com.yh.saas.platform.service.IFuncClickInfoService;

/**
 * <p>
 * APP功能点击次数记录表 前端控制器
 * </p>
 *
 * @author wxg
 * @since 2019-11-12
 */
@RestController
@RequestMapping("/funcClickInfo")
public class FuncClickInfoController {
	@Autowired
	private IFuncClickInfoService funcClickInfoService;

	/**
	 * 查询功能点击次数记录信息
	 * 
	 * @param userId
	 * @return List<FuncClickInfo>
	 */
	@GetMapping("/query/queryFuncClickInfoList")
	public List<FuncClickInfo> queryFuncClickInfoList(@RequestParam String userId) {
		return funcClickInfoService.queryFuncClickInfoList(userId);
	}

	/**
	 * 保存功能点击次数记录信息
	 * 
	 * @param FuncClickInfo
	 * @return Id
	 */
	@PostMapping("/api/saveFuncClickInfo")
	public String saveFuncClickInfo(@RequestBody FuncClickInfo funcClickInfo) {
		return funcClickInfoService.saveFuncClickInfo(funcClickInfo);
	}

}
