郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
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
40
41
42
43
44
45
46
47
48
package com.gkhy.safePlatform.safeCheck.controller;
 
 
import com.gkhy.safePlatform.account.rpc.apimodel.AccountAuthService;
import com.gkhy.safePlatform.safeCheck.entity.SafeCheckWorkBak20220718;
import com.gkhy.safePlatform.safeCheck.service.SafeCheckService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
 
@RestController
@RequestMapping(value = "/safe_t")
public class SafeCheckTestController {
 
    @DubboReference(check = false)
    private AccountAuthService nameService;
 
    @Autowired
    private SafeCheckService safeCheckService;
 
//    @Autowired
//    private SafeCheckWorkService safeCheckWorkService;
 
    @RequestMapping(value = "/t/get/id",method = RequestMethod.GET)
    public Object test(Long id){
        SafeCheckWorkBak20220718 work = safeCheckService.getById(id);
        return work;
    }
 
//    @RequestMapping(value = "/t/get/id2",method = RequestMethod.GET)
//    public Object testForBaseService(Long id){
//        SafeCheckWork work = safeCheckWorkService.getById(id);
//        return work;
//    }
 
    @RequestMapping(value = "/h2")
    public Object test2(){
        return "hhh";
    }
 
    @RequestMapping(value = "/t/rpc",method = RequestMethod.GET)
    public Object testRpc(String id){
        return nameService.sayName(id);
    }
 
}