admin
2021-01-15 5405154d6979f1b50ce2d881bb164b1acca80b6d
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
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.0", check = false)
    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;
    }
}