af13f344ad85d7d0b441b45067b583bf7cdeddf7.svn-base 1.14 KB
package com.thinkgem.jeesite.modules.rest.wsapi.dto.service.imp;

import java.util.List;
import java.util.Random;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.modules.reg.entity.base.RegBaseH;
import com.thinkgem.jeesite.modules.reg.service.base.RegBaseHService;
import com.thinkgem.jeesite.modules.rest.wsapi.dto.service.RestfulService;

@Service
@Transactional(readOnly = true)
public class TestRestfulServiceImpl implements RestfulService{

	@Autowired  
    private RegBaseHService regBaseHService; 
	
    @Override
    public String getHelloWorld() {  
        return "Hello World, Spring 3.0 restful!";
    }  
  
    @Override
    public int getRandomNumber() {  
        Random random = new Random();
        return random.nextInt(100);
    }  
  
    @Override
    public List<RegBaseH> getRegBaseH() {  
    	RegBaseH regBaseH = new RegBaseH();
    	regBaseH.setBdcdyh("610702003008GB00001");
    	List<RegBaseH> findList = regBaseHService.findList(regBaseH);
        return findList;
    }  
}