com.diboot.devtools.v2.OO0OOOOO000O000O Maven / Gradle / Ivy
The newest version!
/**
* Copyright (c) dibo.ltd, https://www.dibo.ltd, https://www.diboot.com
*
* ---- 版权声明 ----
* Diboot相关商标、软件著作权、专利等全部知识产权隶属于苏州帝博信息技术有限公司。
* Diboot devtools 非开源项目,如您有devtools相关定制化需求,请至官网(https://www.dibo.ltd)联系帝博信息商务。
*
* 《中华人民共和国刑法》规定:破坏计算机信息系统罪,处五年以下有期徒刑或者拘役;后果特别严重的,处五年以上有期徒刑。
* 侵犯知识产权罪:处三年以下有期徒刑、拘役或管制,并处罚金;情节特别严重的,处三年以上七年以下有期徒刑,并处罚金。
*
* 任何尝试破解、破坏devtools、侵犯diboot知识产权的行为,我们将不惜一切代价追究到底!
*
*/
package com.diboot.devtools.v2;
import com.diboot.core.exception.BusinessException;
import com.diboot.core.util.JSON;
import com.diboot.core.util.S;
import com.diboot.core.util.V;
import com.diboot.core.vo.Status;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import java.io.*;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@Slf4j
@Service
@Primary
@Deprecated()
public class OO0OOOOO000O000O implements OOO0O0O0O000OOOO {
@Autowired
private O0O00OO000O00000 l1llll1111ll1;
@Autowired
private OO0O0000O0O000OO lll1llll1l1ll;
private static final String l1ll1l1ll1111 = System.lineSeparator();
@Override
@Deprecated()
public String l11l11lll1ll111(OO0OO000O0O0OOOO ll11111l11ll) throws Exception {
O00000O0OOO0O0OO l1ll11ll11ll = l1llll1111ll1.l1l111llll1llll(ll11111l11ll.getTableName());
if (V.isEmpty(l1ll11ll11ll)) {
throw new BusinessException(Status.FAIL_OPERATION, OOO0OO00O00O00OO.l11llll1ll11ll1("5b2T5YmN6KGo5LiN5a2Y5Zyo77yB"));
}
O00OO000OOOO00O0 lllllll1l11l = OO0O00OOOO00OO00.l1l11l111llllll(l1ll11ll11ll, l1llll1111ll1);
O00OOO0O0OO0O0OO lllll11ll1l1 = new O00OOO0O0OO0O0OO().lllllll1l1lllll().setModelObject(lllllll1l11l);
ll11111l11ll.setVersion(O0O0O0000OO0O000.lll1l1l1111l111());
lllll11ll1l1.setQueryMapDto(ll11111l11ll);
O0O0OO000000OOO0 l1l111l11l11 = null;
try {
l1l111l11l11 = O0OO00000OO0OO00.lll11l11l1l1lll(lllll11ll1l1);
} catch (Exception e) {
log.error(OOO0OO00O00O00OO.l11llll1ll11ll1("5Yid5aeL5Luj56CB5aSx6LSlOiB7fQ=="), e.getMessage());
}
if (V.isEmpty(l1l111l11l11)) {
throw new BusinessException(Status.FAIL_OPERATION, OOO0OO00O00O00OO.l11llll1ll11ll1("55Sf5oiQ5Luj56CB5aSx6LSl77yM6K+36YeN6K+V77yB"));
}
List ll11lllll111 = l1l111l11l11.getGenerateFileActions();
if (V.isEmpty(ll11lllll111)) {
throw new BusinessException(Status.FAIL_OPERATION, OOO0OO00O00O00OO.l11llll1ll11ll1("55Sf5oiQ5p6E5bu65Luj56CB5aSx6LSl77yB"));
}
if (V.notEmpty(l1l111l11l11.getErrorMsg()) && (l1l111l11l11.getErrorMsg().contains("登录") || l1l111l11l11.getErrorMsg().contains("账号"))) {
log.warn(l1l111l11l11.getErrorMsg());
return l1l111l11l11.getErrorMsg();
}
l1l111l11l11.ll1l1ll11l1lll1(lllllll1l11l.getModel());
String l11l111ll111 = l1l111l11l11.l11lllll1l1lll1();
lll1ll1111lll(ll11111l11ll.getMobilePages());
if (V.notEmpty(l11l111ll111)) {
log.warn(l11l111ll111);
return l11l111ll111;
}
return null;
}
@Override
@Deprecated()
public String l1l111ll11l11l1() throws Exception {
File l1l1ll1ll1l1 = l1l1111lllll1();
String l1l11ll1lll1 = FileUtils.readFileToString(l1l1ll1ll1l1, OOO0OO00O00O00OO.l11llll1ll11ll1("VVRGLTg="));
return l1l11ll1lll1;
}
@Deprecated()
private void lll1ll1111lll(String l1l1llll1111) throws Exception {
if (V.isEmpty(l1l1llll1111)) {
return;
}
File l1ll1ll1ll1l = l1l1111lllll1();
String l11111llllll = FileUtils.readFileToString(l1ll1ll1ll1l, OOO0OO00O00O00OO.l11llll1ll11ll1("VVRGLTg="));
List l1l11l1l1ll1 = JSON.parseArray(l11111llllll, O00OOOOOO00O000O.class);
try {
List l111111ll11l = JSON.parseArray(l1l1llll1111, O00OOOOOO00O000O.class);
List l111ll111l1l = new ArrayList<>();
if (V.isEmpty(l1l11l1l1ll1)) {
for (O00OOOOOO00O000O lllll1ll11ll : l111111ll11l) {
l111ll111l1l.add(JSON.stringify(lllll1ll11ll));
}
FileUtils.writeStringToFile(l1ll1ll1ll1l, S.joinWith(l1ll1l1ll1111 + ",", l111ll111l1l), OOO0OO00O00O00OO.l11llll1ll11ll1("VVRGLTg="));
} else {
Map l11l1l1ll111 = l1l11l1l1ll1.stream().collect(Collectors.toMap(O00OOOOOO00O000O::getPath, Function.identity(), (lll1llll1l1l, l1ll11l1l1ll) -> lll1llll1l1l));
for (O00OOOOOO00O000O lllll1ll11ll : l111111ll11l) {
if (V.notEmpty(l11l1l1ll111.get(lllll1ll11ll.getPath()))) {
l11l1l1ll111.remove(lllll1ll11ll.getPath());
}
}
List ll1111l11ll1 = new ArrayList<>(l11l1l1ll111.values());
ll1111l11ll1.addAll(l111111ll11l);
for (O00OOOOOO00O000O lllll1ll11ll : ll1111l11ll1) {
l111ll111l1l.add(JSON.stringify(lllll1ll11ll));
}
FileUtils.writeStringToFile(l1ll1ll1ll1l, S.joinWith(l1ll1l1ll1111 + ",", l111ll111l1l), OOO0OO00O00O00OO.l11llll1ll11ll1("VVRGLTg="));
}
} catch (Exception e) {
log.warn(OOO0OO00O00O00OO.l11llll1ll11ll1("6aG16Z2i6Lev55Sx5YaZ5YWl5aSx6LSl77yM6K+35omL5Yqo6YWN572u77yB"), e);
}
}
@Deprecated()
private File l1l1111lllll1() throws Exception {
String l11llll1l111 = "";
String l11111111l1l = OO0O0OOOOO0O0O00.llll11l1ll111l1(O0O0O0000OO0O000.LYR.MOBILE_VIEW);
l11llll1l111 = l11111111l1l + OOO0OO00O00O00OO.l11llll1ll11ll1("cGFnZXNfZGlib290Lmpzb24=");
File l111l1ll1111 = new File(l11llll1l111);
if (!l111l1ll1111.exists()) {
FileUtils.writeStringToFile(l111l1ll1111, "[]", OOO0OO00O00O00OO.l11llll1ll11ll1("VVRGLTg="));
}
return l111l1ll1111;
}
}