package com.fuzamei.web;

import java.util.Map;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.fastjson.JSON;
import com.fuzamei.baseTest.BaseJunit4Test;
import com.fuzamei.entity.Params;
import com.fuzamei.service.OperationHistoryService;
import com.fuzamei.util.PageDTO;

public class OperationHistoryActionTest extends BaseJunit4Test{
	@Autowired
	private OperationHistoryAction operationHistoryAction;

	@Autowired
	private OperationHistoryService operationHistoryService;
	
	/*@Test
	public void test01(){
		Params params=new Params();
		params.setUserId(1001);
		params.setPage(-1);
		params.setStartTime(null);
		params.setEndTime(null);
		Map<String, Object> result = operationHistoryAction.queryOperationHistory(params);
		String jsonString = JSON.toJSONString(result,true);
		System.out.println(jsonString);
	}*/
	
	@Test
	public void test02(){
		Params params=new Params();
		params.setUserId(9001);
		params.setStartPage(0);
		params.setPage(1);
		params.setRowNum(10);
		params.setStartTime(null);
		params.setEndTime(null);
		params.setOperationTypeId(null);
		PageDTO result = operationHistoryService.queryOperationHistory(params);
		String jsonString = JSON.toJSONString(result,true);
		System.out.println(jsonString);
	}
}
