af13f344ad85d7d0b441b45067b583bf7cdeddf7.svn-base
1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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;
}
}