package org.cs.mgr.order.ctl;

import java.util.Map;

import org.cs.core.ctl.BaseCtl;
import org.cs.mgr.order.service.IMgmOrderCommissionService;
import org.cs.util.Pager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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/mgmOrderCommission")
public class MgmOrderCommissionApi extends BaseCtl {

	private final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	
	@Autowired
	private IMgmOrderCommissionService mgmOrderCommissionService;
	
	@ResponseBody
	@RequestMapping("/getMgmOrderCommissionList")
	public JSONObject getMgmOrderCommissionList(String data){
		Map<String, String> map = getMapFromJson(data);
		JSONObject json = new JSONObject();
		try {
			json=mgmOrderCommissionService.getMgmOrderCommissionList(map);//getJson(1, page, "获取佣金记录成功");
		} catch (Exception e) {
			logger.error("获取佣金记录失败："+e.getMessage());
			json = getJson(0, "", "获取佣金记录失败");
		}
		return json;
	}
	
}

