package com.th.demo.service.impl.system;

import com.google.gson.Gson;
import com.th.demo.mapping.system.SysMenuToolMapper;
import com.th.demo.model.system.SysMenuTool;
import com.th.demo.service.system.SysMenuToolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service("SysMenuToolService")
public class SysMenuToolServiceImpl implements SysMenuToolService {
	@Autowired
	public SysMenuToolMapper sysMenuToolMapper;

	@Override
	public String menuQuery() {
		String result = "";
		List<SysMenuTool> list = new ArrayList<SysMenuTool>();
		Gson gson = new Gson();

		list = sysMenuToolMapper.selectAll();
		result = gson.toJson(list);

		return result;
	}

}
