package com.github.wxiaoqi.security.admin.rest.admin;

import com.github.wxiaoqi.security.admin.biz.MemberShareRecordBiz;
import com.github.wxiaoqi.security.admin.entity.MemberShareRecord;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("memberShareRecord")
public class MemberShareRecordController extends BaseController<MemberShareRecordBiz, MemberShareRecord> {

	/**
	 *  获取用户分成明细
	 * @param userId
	 * @return
	 */
	@GetMapping(value = "getAllRecord")
	public ObjectRestResponse getAllRecord(Long userId) {
		return baseBiz.getAllRecord(userId);
	}

	/**
	 * 统计用户分成信息
	 */
	@GetMapping(value = "/app/unauth/generateData")
	public void generateData() {
		baseBiz.generateData();
	}
}