songhuangfeng123
2022-07-04 ebf072008e6d544a940f70e65b7c59be8211f8cf
emergency/emergency-service/src/main/java/com/gkhy/safePlatform/emergency/controller/Test.java
@@ -2,8 +2,7 @@
import com.gkhy.safePlatform.account.rpc.apimodel.UserAccountService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
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;
@@ -15,12 +14,17 @@
    @DubboReference(check = false)
    private UserAccountService userAccountService;
//    private Logger logger = LogManager.getLogger(Test.class);
    @RequestMapping(value = "/t/rpc",method = RequestMethod.GET)
    public Object testRpc(String id){
        String resp = userAccountService.sayName(id);
        return resp;
    }
//    @Autowired
//    private DemoService demoService;
//
//    @RequestMapping(value = "/t/rpc",method = RequestMethod.GET)
//    public Object testRpc(String id){
//        String resp = userAccountService.sayName(id);
//        return resp;
//    }
//
//    @RequestMapping(value = "/t/get",method = RequestMethod.GET)
//    public Object testEmergencyGetById(Long id){
//        return demoService.getById(id);
//    }
}