package org.cs.mgr.user.ctl;

import java.util.Map;

import org.apache.log4j.Logger;
import org.cs.core.ctl.BaseCtl;
import org.cs.mgr.user.service.IMgmInviteRecordService;
import org.cs.mgr.user.service.ISmsService;
import org.cs.util.Pager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;


@Controller
@RequestMapping("/rest/mgmInviteRecord")
public class MgmInviteRecordAPI extends BaseCtl{

	private Logger log = Logger.getLogger(MgmInviteRecordAPI.class);
	@Autowired
	public ISmsService smsService;
	
	@Autowired
	public IMgmInviteRecordService mgmInviteRecordUserService;
	
	 
	@ResponseBody
	@RequestMapping("/getMgmInviteRecordsList")
	public JSONObject getMgmInviteRecordsList(String data){
		Map<String, String> map = getMapFromJson(data);
		JSONObject json = new JSONObject();
		try {
			Pager page=mgmInviteRecordUserService.getMgmInviteRecordsList(map);
			json=getJson(1, page, "获取邀请记录成功");
		} catch (Exception e) {
			log.error("获取邀请记录失败："+e.getMessage());
			json = getJson(0, "", "获取邀请记录失败");
		}
		return json;
	}
}
