class ApiExtController {

    @RequestMapping(value = "/checkDblist")
    public ServiceResult checkDblist(@RequestParam("appid") String appid, @CurrentUser LoginUser user) {
        List<ConfigCkeckResult> srlist = new ArrayList<>();
        try {
            if (null != appid) {
                List<DataBaseInfo> list = dataBaseDao.getAllDbByAppId(appid);
                for (DataBaseInfo dataBaseInfo : list) {
                    ConfigCkeckResult<List<ConfigDataResponse>> cr = databaseService.getCheckData(user, dataBaseInfo);
                    if (cr.getCode() == ConfigCkeckResult.ERROR) {
                        return ServiceResult.fail(cr.getMsg());
                    }
                    srlist.add(ConfigCheckBase.checkData(cr.getItem()));
                }
                return ServiceResult.success(srlist);
            } else {
                return ServiceResult.fail("ApiExtController.checkDblist appid 为空");
            }
        } catch (Exception e) {
            return ServiceResult.fail("ApiExtController.checkDblist appid : " + appid + "   " + StringUtil.getMessage(e));
        }
    }

}