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

import com.th.demo.mapping.home.HomeMapper;
import com.th.demo.model.home.HomeValue;
import com.th.demo.service.home.HomeService;
import com.th.demo.tools.JSONTools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("HomeService")
public class HomeServiceImpl implements HomeService {

    @Autowired
    HomeMapper homeMapper;
    String result = "";

    int num = 0;


    @Override
    public String querydrawLine1(String userId, String belongId) {
        List<HomeValue> homeValue = homeMapper.selectdrawLine1();
        result = JSONTools.toString(homeValue);
        return result;
    }

    @Override
    public String querydrawLine2(String userId, String belongId) {
        List<HomeValue> homeValue = homeMapper.selectdrawLine2();
        result = JSONTools.toString(homeValue);
        return result;
    }

    @Override
    public String querydrawLine3(String userId, String belongId) {
        List<HomeValue> homeValue = homeMapper.selectdrawLine3();
        result = JSONTools.toString(homeValue);
        return result;
    }

    @Override
    public String querydrawLine4(String userId, String belongId) {
        HomeValue homeValue = homeMapper.selectdrawLine4();
        result = JSONTools.toString(homeValue);
        return result;
    }
}
