Commit 34abf2b5 authored by 赵啸非's avatar 赵啸非

提交配置校验

parent 3f3c6e32
...@@ -24,6 +24,12 @@ import com.mortals.xhx.common.utils.FreeMarkerUtils; ...@@ -24,6 +24,12 @@ import com.mortals.xhx.common.utils.FreeMarkerUtils;
import com.mortals.xhx.common.utils.SendSkinRefreshTask; import com.mortals.xhx.common.utils.SendSkinRefreshTask;
import com.mortals.xhx.feign.skin.ISkinFillFeign; import com.mortals.xhx.feign.skin.ISkinFillFeign;
import com.mortals.xhx.feign.skin.ISkinSampleFeign; import com.mortals.xhx.feign.skin.ISkinSampleFeign;
import com.mortals.xhx.module.app.model.AppEntity;
import com.mortals.xhx.module.app.model.AppQuery;
import com.mortals.xhx.module.app.service.AppService;
import com.mortals.xhx.module.model.model.ModelEntity;
import com.mortals.xhx.module.model.model.ModelQuery;
import com.mortals.xhx.module.model.service.ModelService;
import com.mortals.xhx.module.product.model.ProductEntity; import com.mortals.xhx.module.product.model.ProductEntity;
import com.mortals.xhx.module.product.service.ProductService; import com.mortals.xhx.module.product.service.ProductService;
import com.mortals.xhx.module.skin.dao.SkinBaseDao; import com.mortals.xhx.module.skin.dao.SkinBaseDao;
...@@ -81,6 +87,10 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -81,6 +87,10 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
private ISkinSampleFeign skinSampleFeign; private ISkinSampleFeign skinSampleFeign;
@Autowired @Autowired
private ISkinFillFeign skinFillFeign; private ISkinFillFeign skinFillFeign;
@Autowired
private AppService appService;
@Autowired
private ModelService modelService;
@Override @Override
protected void validData(SkinBaseEntity entity, Context context) throws AppException { protected void validData(SkinBaseEntity entity, Context context) throws AppException {
...@@ -360,6 +370,58 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -360,6 +370,58 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
} }
} }
//查询所有app 图标
List<AppEntity> appEntityList = appService.find(new AppQuery());
for (AppEntity appEntity : appEntityList) {
String fieldValue = appEntity.getFilePath();
String filePath = uploadService.getFilePath(fieldValue);
File file = new File(filePath);
if (file.exists()) {
try {
zip.putNextEntry(new ZipEntry(StrUtil.subAfter(fieldValue, "/", false)));
IOUtils.write(FileUtil.readBytes(file), zip);
zip.flush();
zip.closeEntry();
} catch (Exception e) {
log.error("异常", e);
}
}
String appIconPath = appEntity.getAppIconPath();
filePath = uploadService.getFilePath(appIconPath);
file = new File(filePath);
if (file.exists()) {
try {
zip.putNextEntry(new ZipEntry(StrUtil.subAfter(appIconPath, "/", false)));
IOUtils.write(FileUtil.readBytes(file), zip);
zip.flush();
zip.closeEntry();
} catch (Exception e) {
log.error("异常", e);
}
}
}
//查询所有model 图标
List<ModelEntity> modelEntities = modelService.find(new ModelQuery());
for (ModelEntity modelEntity : modelEntities) {
String fieldValue = modelEntity.getModelIcon();
String filePath = uploadService.getFilePath(fieldValue);
File file = new File(filePath);
if (file.exists()) {
try {
zip.putNextEntry(new ZipEntry(StrUtil.subAfter(fieldValue, "/", false)));
IOUtils.write(FileUtil.readBytes(file), zip);
zip.flush();
zip.closeEntry();
} catch (Exception e) {
log.error("异常", e);
}
}
}
IOUtils.closeQuietly(zip); IOUtils.closeQuietly(zip);
return Rest.ok(outputStream.toByteArray()); return Rest.ok(outputStream.toByteArray());
} }
......
...@@ -139,7 +139,6 @@ public class SkinBaseController extends BaseCRUDJsonBodyMappingController<SkinBa ...@@ -139,7 +139,6 @@ public class SkinBaseController extends BaseCRUDJsonBodyMappingController<SkinBa
/** /**
* 获取皮肤所有相关资源文件并压缩打包成zip * 获取皮肤所有相关资源文件并压缩打包成zip
*/ */
// @PostMapping(value = "skinzip")
@GetMapping(value = "skinzip") @GetMapping(value = "skinzip")
@UnAuth @UnAuth
public void skinzip() { public void skinzip() {
......
...@@ -20,7 +20,7 @@ client.global.set("authToken", JSON.parse(response.body).data.token); ...@@ -20,7 +20,7 @@ client.global.set("authToken", JSON.parse(response.body).data.token);
%} %}
###自助终端应用列表 ###自助终端应用列表
POST {{baseUrl}}/app/list POST {{baseUrl}}/app/interlist
Content-Type: application/json Content-Type: application/json
{ {
......
...@@ -14,6 +14,12 @@ ...@@ -14,6 +14,12 @@
}, },
"base-myjkq": {
"baseUrl": "http://10.6.50.2:11078/base"
},
"base-test-https": { "base-test-https": {
"baseUrl": "https://192.168.0.98:31071/basics_api/base" "baseUrl": "https://192.168.0.98:31071/basics_api/base"
}, },
......
GET http://localhost:80/api/item?id=99
Accept: application/json
###
###登录 ###登录
POST {{baseUrl}}/login/login POST {{baseUrl}}/login/login
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment