admin
2020-11-30 6e281067fe81dbf180c63a2833f74c1615d32f18
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
package com.ks.lucky.service.impl;
 
import com.ks.app.entity.AppInfo;
import com.ks.app.service.AppService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;
 
@Component
public class AppManager {
 
    @Reference(version = "1.0")
    private AppService appService;
 
    public Long getAppId(String appKey) {
        AppInfo app = appService.getApp(appKey);
        if (app != null) {
            return app.getId();
        }
        return null;
    }
 
    public AppInfo getAppDetail(Long appId) {
        AppInfo info = appService.getAppDetail(appId);
        return info;
    }
}