代码优化

pull/1/head
liuwx_gitee 1 year ago
parent 2d7f896a3a
commit c11c451796

@ -13,8 +13,8 @@
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
margin: 0;
padding: 0;
}
.chromeframe {
margin: 0.2em 0;

@ -31,7 +31,7 @@
position: absolute;
white-space: pre;
cursor: text;
transform-origin: 0% 0%;
transform-origin: 0 0;
}
.textLayer .highlight {
@ -1132,7 +1132,7 @@ html[dir="rtl"] #outerContainer.sidebarOpen #loadingBar {
position: absolute;
top: 0;
left: 0;
width: 0%;
width: 0;
height: 100%;
background-color: var(--progressBar-color);
overflow: hidden;

@ -102,7 +102,7 @@ import BarMultid from '@/components/chart/BarMultid'
```json
[
{
"type": "Jeecg", // 列名
"type": "Jeecg",
"Jan.": 18.9,
"Feb.": 28.8,
"Mar.": 39.3,
@ -227,7 +227,7 @@ import LineChartMultid from '@/components/chart/LineChartMultid'
```json
[
{
"type": "Jan", // 列名
"type": "Jan",
"jeecg": 7,
"jeebt": 3.9
},
@ -264,7 +264,6 @@ import Pie from '@/components/chart/Pie'
```json
[
// 所有的 percent 相加等于 100
{ "item": "一月", "percent": 40 },
{ "item": "二月", "percent": 21 },
{ "item": "三月", "percent": 17 },
@ -292,7 +291,6 @@ import Radar from '@/components/chart/Radar'
```json
[
// score 最小值为 0最大值为 100
{ "item": "一月", "score": 40 },
{ "item": "二月", "score": 20 },
{ "item": "三月", "score": 67 },

@ -264,8 +264,8 @@
&.no-title {
.ant-modal-header {
padding: 0px 12px;
border-bottom: 0px !important;
padding: 0 12px;
border-bottom: 0 !important;
}
}
}

@ -247,8 +247,8 @@
&.no-title {
.ant-modal-header {
padding: 0px 12px;
border-bottom: 0px !important;
padding: 0 12px;
border-bottom: 0 !important;
}
}
}

@ -246,8 +246,8 @@
&.no-title {
.ant-modal-header {
padding: 0px 12px;
border-bottom: 0px !important;
padding: 0 12px;
border-bottom: 0 !important;
}
}
}

@ -6,7 +6,7 @@
:confirmLoading="uploading"
@cancel="handleClose">
<div style="margin: 0px 0px 5px 1px" v-if="online">
<div style="margin: 0 0 5px 1px" v-if="online">
<span style="display: inline-block;height: 32px;line-height: 32px;vertical-align: middle;">是否开启校验:</span>
<span style="display: inline-block;height: 32px;margin-left: 6px">
<a-switch :checked="validateStatus==1" @change="handleChangeValidateStatus" checked-children="" un-checked-children="" size="small"/>

@ -227,8 +227,8 @@
}
&.no-title{
.ant-modal-header {
padding: 0px 24px;
border-bottom: 0px !important;
padding: 0 24px;
border-bottom: 0 !important;
}
}
}

@ -2,7 +2,7 @@
<div class="drag" ref="dragDiv">
<div class="drag_bg"></div>
<div class="drag_text">{{confirmWords}}</div>
<div ref="moveDiv" @mousedown="mousedownFn($event)" :class="{'handler_ok_bg':confirmSuccess}" class="handler handler_bg" style="border: 0.5px solid #fff;height: 34px;position: absolute;top: 0px;left: 0px;"></div>
<div ref="moveDiv" @mousedown="mousedownFn($event)" :class="{'handler_ok_bg':confirmSuccess}" class="handler handler_bg" style="border: 0.5px solid #fff;height: 34px;position: absolute;top: 0;left: 0;"></div>
</div>
</template>
@ -101,11 +101,11 @@
.drag_bg{
background-color: #7ac23c;
height: 34px;
width: 0px;
width: 0;
}
.drag_text{
position: absolute;
top: 0px;
top: 0;
width: 100%;text-align: center;
-moz-user-select: none;
-webkit-user-select: none;

@ -172,7 +172,7 @@ this.$refs.superQueryModal.show();
<div style="width: 100%;">
<span>{{ title }}</span>
<span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right">
<a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0px"></a-button>
<a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0"></a-button>
</span>
</div>
</template>

@ -848,7 +848,7 @@
.ant-tabs-tab {
padding: 0 24px!important;
background-color: #f5f7fa!important;
margin-right: 0px!important;
margin-right: 0!important;
border-radius: 0;
line-height: 38px;
border: 1px solid transparent!important;

@ -74,7 +74,7 @@
</a-layout-content>
<!-- layout footer -->
<a-layout-footer style="padding: 0px">
<a-layout-footer style="padding: 0">
<global-footer/>
</a-layout-footer>
</a-layout>
@ -555,7 +555,7 @@
//
.layout-content {
margin: 24px 24px 0px;
margin: 24px 24px 0;
height: 64px;
padding: 0 12px 0 0;
}
@ -663,7 +663,7 @@
.ant-dropdown-menu-item > .anticon:first-child,
.ant-dropdown-menu-item > a > .anticon:first-child,
.ant-dropdown-menu-submenu-title > .anticon:first-child
.ant-dropdown-menu-submenu-title > .anticon:first-child,
.ant-dropdown-menu-submenu-title > a > .anticon:first-child {
min-width: 12px;
margin-right: 8px;

@ -122,6 +122,6 @@
margin-top: 48px;
}
.page-header[data-v-6740ec88] {
margin: 0px 24px 0;
margin: 0 24px 0;
}
</style>

@ -286,8 +286,8 @@
float: left;
cursor: pointer;
margin-right: 8px;
padding-left: 0px;
padding-right: 0px;
padding-left: 0;
padding-right: 0;
text-align: center;
color: #fff;
font-weight: 700;

@ -32,7 +32,7 @@
<a-list-item :key="index" v-for="(record, index) in announcement1">
<div style="margin-left: 5%;width: 80%">
<p><a @click="showAnnouncement(record)">{{ record.titile }}</a></p>
<p style="color: rgba(0,0,0,.45);margin-bottom: 0px">{{ record.createTime }} 发布</p>
<p style="color: rgba(0,0,0,.45);margin-bottom: 0">{{ record.createTime }} 发布</p>
</div>
<div style="text-align: right">
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue"></a-tag>
@ -50,7 +50,7 @@
<a-list-item :key="index" v-for="(record, index) in announcement2">
<div style="margin-left: 5%;width: 80%">
<p><a @click="showAnnouncement(record)">{{ record.titile }}</a></p>
<p style="color: rgba(0,0,0,.45);margin-bottom: 0px">{{ record.createTime }} 发布</p>
<p style="color: rgba(0,0,0,.45);margin-bottom: 0">{{ record.createTime }} 发布</p>
</div>
<div style="text-align: right">
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue"></a-tag>

@ -46,7 +46,7 @@
<a-form layout="inline">
<a-row>
<a-col :xl="17" :lg="15" :md="14" :sm="24" style="background-color: #f2f2f2;padding: 15px">
<div style="padding: 0px; box-shadow:1px 2px 3px 2px #ccc">
<div style="padding: 0; box-shadow:1px 2px 3px 2px #ccc">
<!--<a-col style="background-color: #108ee9">-->
<!--<h3 style="color: white;margin-left: 20px;padding:5px"><b>新入库文档</b></h3>-->
<!--</a-col>-->
@ -104,7 +104,7 @@
</div>
</a-col>
<a-col :xl="7" :lg="9" :md="10" :sm="24" style="background-color: #f2f2f2;padding: 15px;min-width: 350px">
<div style="background-color: white;padding: 0px; box-shadow:1px 2px 3px 2px #ccc">
<div style="background-color: white;padding: 0; box-shadow:1px 2px 3px 2px #ccc">
<a-form layout="inline" style="min-height: 10px">
<a-row>
<a-col style="background-color: #108ee9">
@ -139,7 +139,7 @@
</div>
</b-j-modal>
<a-layout-footer style="padding: 0px">
<a-layout-footer style="padding: 0">
<global-footer/>
</a-layout-footer>

@ -184,7 +184,7 @@
margin-bottom: 18px;
}
.anty-row-operator button{margin: 0 5px}
.ant-btn-danger{background-color: #ffffff}z
.ant-btn-danger{background-color: #ffffff}
.ant-modal-cust-warp{height: 100%}
.ant-modal-cust-warp .ant-modal-body{height:calc(100% - 110px) !important;overflow-y: auto}

@ -159,5 +159,5 @@
margin-top: 20px;
}
@import '../../../assets/less/index.less';
@import '@/assets/less/index.less';
</style>

@ -13,7 +13,7 @@
<div style="width: 100%;">
<span>{{ title }}</span>
<span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right">
<a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0px"></a-button>
<a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0"></a-button>
</span>
</div>

@ -177,7 +177,7 @@ public class JeecgController<T, S extends IService<T>> {
//1200条 saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒
log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
//update-end-author:taoyan date:20190528 for:批量插入数据
return Result.ok("文件导入成功!数据行数:" + list.size());
return Result.OK("文件导入成功!数据行数:" + list.size());
} catch (Exception e) {
log.error(e.getMessage(), e);
return Result.error("文件导入失败:" + e.getMessage());

@ -18,7 +18,7 @@ public class ImportExcelUtil {
public static Result<?> imporReturnRes(int errorLines,int successLines,List<String> errorMessage) throws IOException {
if (errorLines == 0) {
return Result.ok("共" + successLines + "行数据全部导入成功!");
return Result.OK("共" + successLines + "行数据全部导入成功!");
} else {
JSONObject result = new JSONObject(5);
int totalCount = successLines + errorLines;
@ -31,7 +31,7 @@ public class ImportExcelUtil {
String fileName = fileUrl.substring(lastIndex + 1);
result.put("fileUrl", "/sys/common/static/" + fileUrl);
result.put("fileName", fileName);
Result res = Result.ok(result);
Result res = Result.OK(result);
res.setCode(201);
res.setMessage("文件导入成功,但有错误。");
return res;

@ -9,10 +9,10 @@ import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
public class PasswordUtil {
/**
* JAVA6 PBEWITHMD5ANDDES PBEWITHMD5ANDTRIPLEDES
* PBEWITHSHAANDDESEDE PBEWITHSHA1ANDRC2_40 PBKDF2WITHHMACSHA1
* */
/*
JAVA6 PBEWITHMD5ANDDES PBEWITHMD5ANDTRIPLEDES
PBEWITHSHAANDDESEDE PBEWITHSHA1ANDRC2_40 PBKDF2WITHHMACSHA1
*/
/**
* 使:PBEWITHMD5andDES
@ -27,7 +27,7 @@ public class PasswordUtil {
/**
* 使,使使. 8
*
*
* @return byte[]
* */
public static byte[] getSalt() throws Exception {
@ -44,7 +44,7 @@ public class PasswordUtil {
/**
* PBE
*
*
* @param password
* 使
* @return Key PBE
@ -69,7 +69,7 @@ public class PasswordUtil {
/**
*
*
*
* @param plaintext
*
* @param password
@ -98,7 +98,7 @@ public class PasswordUtil {
/**
*
*
*
* @param ciphertext
*
* @param password
@ -129,7 +129,7 @@ public class PasswordUtil {
/**
*
*
*
* @param src
*
* @return
@ -152,7 +152,7 @@ public class PasswordUtil {
/**
*
*
*
* @param hexString
*
* @return
@ -177,4 +177,4 @@ public class PasswordUtil {
}
}
}

@ -20,7 +20,7 @@ public class YouBianCodeUtil {
/**
* codecode
* :codeD01A04codeD01A05
*
*
* @param code
* @return
*/
@ -67,11 +67,11 @@ public class YouBianCodeUtil {
/**
* code,code
*
*
* CODE:A01
* CODE:A01B03
* code:A01B04
*
*
* @param parentCode code
* @param localCode code
* @return
@ -88,11 +88,11 @@ public class YouBianCodeUtil {
return parentCode;
}
/**
*
*
*
* @param num
* @return
*/
@ -102,7 +102,7 @@ public class YouBianCodeUtil {
/**
*
*
*
* @param num
* @return
*/
@ -113,7 +113,7 @@ public class YouBianCodeUtil {
/**
*
*
*
* @param num
* @return
*/
@ -124,8 +124,8 @@ public class YouBianCodeUtil {
/**
*
*
* @param num
*
* @param zimu
* @return
*/
private static char getNextZiMu(char zimu) {
@ -135,7 +135,7 @@ public class YouBianCodeUtil {
zimu++;
return zimu;
}
/**
*
* @param length
@ -163,7 +163,7 @@ public class YouBianCodeUtil {
}
return cutcode;
}
}
// public static void main(String[] args) {
// // org.jeecgframework.core.util.LogUtil.info(getNextZiMu('C'));

@ -23,7 +23,7 @@ public class AesEncryptUtil {
* @return
* @throws Exception
*/
public static String encrypt(String data, String key, String iv) throws Exception {
public static String encrypt(String data, String key, String iv) {
try {
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");//"算法/模式/补码方式"NoPadding PkcsPadding
@ -60,7 +60,7 @@ public class AesEncryptUtil {
* @return
* @throws Exception
*/
public static String desEncrypt(String data, String key, String iv) throws Exception {
public static String desEncrypt(String data, String key, String iv) {
try {
byte[] encrypted1 = Base64.decode(data);

@ -21,7 +21,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
*
* @Author
*
*/
@ -39,7 +39,7 @@ public class oConvertUtils {
}
return (false);
}
public static boolean isNotEmpty(Object object) {
if (object != null && !object.equals("") && !object.equals("null")) {
return (true);
@ -163,7 +163,7 @@ public class oConvertUtils {
return (defval);
}
}
public static Integer getInt(Object object) {
if (isEmpty(object)) {
return null;
@ -199,15 +199,7 @@ public class oConvertUtils {
return (getString(s, ""));
}
/**
* Unicode
* @param s
* @return
*/
/*public static String escapeJava(Object s) {
return StringEscapeUtils.escapeJava(getString(s));
}*/
public static String getString(Object object) {
if (isEmpty(object)) {
return "";
@ -263,7 +255,7 @@ public class oConvertUtils {
/**
*
*
*
* @param clazz
*
* @return true
@ -326,7 +318,7 @@ public class oConvertUtils {
/**
* java
*
*
* @param str
* @return
*/
@ -343,7 +335,7 @@ public class oConvertUtils {
/**
*
*
*
* @param substring
* @param source
* @return
@ -370,8 +362,8 @@ public class oConvertUtils {
/**
* SETMAP
*
* @param str
*
* @param setobj
* @return
*/
public static Map<Object, Object> SetToMap(Set<Object> setobj) {
@ -387,9 +379,9 @@ public class oConvertUtils {
public static boolean isInnerIP(String ipAddress) {
boolean isInnerIp = false;
long ipNum = getIpNum(ipAddress);
/**
* IPA 10.0.0.0-10.255.255.255 B 172.16.0.0-172.31.255.255 C 192.168.0.0-192.168.255.255 127
**/
/*
IPA 10.0.0.0-10.255.255.255 B 172.16.0.0-172.31.255.255 C 192.168.0.0-192.168.255.255 127
*/
long aBegin = getIpNum("10.0.0.0");
long aEnd = getIpNum("10.255.255.255");
long bBegin = getIpNum("172.16.0.0");
@ -414,12 +406,12 @@ public class oConvertUtils {
private static boolean isInner(long userIp, long begin, long end) {
return (userIp >= begin) && (userIp <= end);
}
/**
* 线
* 线</br>
* hello_world->helloWorld
*
*
* @param name
* 线
* @return
@ -456,13 +448,13 @@ public class oConvertUtils {
}
return result.toString();
}
/**
* 线
* 线</br>
* hello_world,test_id->helloWorld,testId
*
* @param name
*
* @param names
* 线
* @return
*/
@ -479,13 +471,13 @@ public class oConvertUtils {
String result = sf.toString();
return result.substring(0, result.length() - 1);
}
//update-begin--Author:zhoujf Date:20180503 forTASK #2500 【代码生成器】代码生成器开发一通用模板生成功能
/**
* 线()
* 线</br>
* hello_world->HelloWorld
*
*
* @param name
* 线
* @return
@ -514,7 +506,7 @@ public class oConvertUtils {
return result.toString();
}
//update-end--Author:zhoujf Date:20180503 forTASK #2500 【代码生成器】代码生成器开发一通用模板生成功能
/**
* 线
* @param para
@ -522,18 +514,18 @@ public class oConvertUtils {
*/
public static String camelToUnderline(String para){
if(para.length()<3){
return para.toLowerCase();
return para.toLowerCase();
}
StringBuilder sb=new StringBuilder(para);
int temp=0;//定位
//从第三个字符开始 避免命名不规范
//从第三个字符开始 避免命名不规范
for(int i=2;i<para.length();i++){
if(Character.isUpperCase(para.charAt(i))){
sb.insert(i+temp, "_");
temp+=1;
}
}
return sb.toString().toLowerCase();
return sb.toString().toLowerCase();
}
/**
@ -549,10 +541,10 @@ public class oConvertUtils {
}
return sb.toString();
}
/**
*
*
*
* @param object
* @return
*/
@ -567,7 +559,7 @@ public class oConvertUtils {
fieldList.toArray(fields);
return fields;
}
/**
* mapkey
* @param list
@ -577,10 +569,10 @@ public class oConvertUtils {
List<Map<String, Object>> select = new ArrayList<>();
for (Map<String, Object> row : list) {
Map<String, Object> resultMap = new HashMap<>();
Set<String> keySet = row.keySet();
for (String key : keySet) {
String newKey = key.toLowerCase();
resultMap.put(newKey, row.get(key));
Set<String> keySet = row.keySet();
for (String key : keySet) {
String newKey = key.toLowerCase();
resultMap.put(newKey, row.get(key));
}
select.add(resultMap);
}

@ -183,9 +183,9 @@ public class ShiroConfig {
public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
defaultAdvisorAutoProxyCreator.setProxyTargetClass(true);
/**
* github#994
* Advisor
/*
github#994
Advisor
*/
defaultAdvisorAutoProxyCreator.setUsePrefix(true);
defaultAdvisorAutoProxyCreator.setAdvisorBeanNamePrefix("_no_advisor");

@ -26,7 +26,7 @@ public class RedisUtil {
/**
*
*
*
* @param key
* @param time ()
* @return
@ -45,7 +45,7 @@ public class RedisUtil {
/**
* key
*
*
* @param key null
* @return () 0
*/
@ -55,7 +55,7 @@ public class RedisUtil {
/**
* key
*
*
* @param key
* @return true false
*/
@ -70,7 +70,7 @@ public class RedisUtil {
/**
*
*
*
* @param key
*/
@SuppressWarnings("unchecked")
@ -87,7 +87,7 @@ public class RedisUtil {
// ============================String=============================
/**
*
*
*
* @param key
* @return
*/
@ -97,7 +97,7 @@ public class RedisUtil {
/**
*
*
*
* @param key
* @param value
* @return true false
@ -115,7 +115,7 @@ public class RedisUtil {
/**
*
*
*
* @param key
* @param value
* @param time () time0 time0
@ -137,9 +137,9 @@ public class RedisUtil {
/**
*
*
*
* @param key
* @param by (0)
* @param delta (0)
* @return
*/
public long incr(String key, long delta) {
@ -151,9 +151,9 @@ public class RedisUtil {
/**
*
*
*
* @param key
* @param by (0)
* @param delta (0)
* @return
*/
public long decr(String key, long delta) {
@ -166,7 +166,7 @@ public class RedisUtil {
// ================================Map=================================
/**
* HashGet
*
*
* @param key null
* @param item null
* @return
@ -177,7 +177,7 @@ public class RedisUtil {
/**
* hashKey
*
*
* @param key
* @return
*/
@ -187,7 +187,7 @@ public class RedisUtil {
/**
* HashSet
*
*
* @param key
* @param map
* @return true false
@ -204,7 +204,7 @@ public class RedisUtil {
/**
* HashSet
*
*
* @param key
* @param map
* @param time ()
@ -225,7 +225,7 @@ public class RedisUtil {
/**
* hash,
*
*
* @param key
* @param item
* @param value
@ -243,7 +243,7 @@ public class RedisUtil {
/**
* hash,
*
*
* @param key
* @param item
* @param value
@ -265,7 +265,7 @@ public class RedisUtil {
/**
* hash
*
*
* @param key null
* @param item 使 null
*/
@ -275,7 +275,7 @@ public class RedisUtil {
/**
* hash
*
*
* @param key null
* @param item null
* @return true false
@ -286,7 +286,7 @@ public class RedisUtil {
/**
* hash ,
*
*
* @param key
* @param item
* @param by (0)
@ -298,7 +298,7 @@ public class RedisUtil {
/**
* hash
*
*
* @param key
* @param item
* @param by (0)
@ -311,7 +311,7 @@ public class RedisUtil {
// ============================set=============================
/**
* keySet
*
*
* @param key
* @return
*/
@ -326,7 +326,7 @@ public class RedisUtil {
/**
* valueset,
*
*
* @param key
* @param value
* @return true false
@ -342,7 +342,7 @@ public class RedisUtil {
/**
* set
*
*
* @param key
* @param values
* @return
@ -358,7 +358,7 @@ public class RedisUtil {
/**
* set
*
*
* @param key
* @param time ()
* @param values
@ -379,7 +379,7 @@ public class RedisUtil {
/**
* set
*
*
* @param key
* @return
*/
@ -394,7 +394,7 @@ public class RedisUtil {
/**
* value
*
*
* @param key
* @param values
* @return
@ -412,7 +412,7 @@ public class RedisUtil {
/**
* list
*
*
* @param key
* @param start
* @param end 0 -1
@ -429,7 +429,7 @@ public class RedisUtil {
/**
* list
*
*
* @param key
* @return
*/
@ -444,7 +444,7 @@ public class RedisUtil {
/**
* list
*
*
* @param key
* @param index index>=0 0 1 index<0-1-2
* @return
@ -460,10 +460,9 @@ public class RedisUtil {
/**
* list
*
*
* @param key
* @param value
* @param time ()
* @return
*/
public boolean lSet(String key, Object value) {
@ -478,7 +477,7 @@ public class RedisUtil {
/**
* list
*
*
* @param key
* @param value
* @param time ()
@ -499,10 +498,9 @@ public class RedisUtil {
/**
* list
*
*
* @param key
* @param value
* @param time ()
* @return
*/
public boolean lSet(String key, List<Object> value) {
@ -517,7 +515,7 @@ public class RedisUtil {
/**
* list
*
*
* @param key
* @param value
* @param time ()
@ -538,7 +536,7 @@ public class RedisUtil {
/**
* list
*
*
* @param key
* @param index
* @param value
@ -556,7 +554,7 @@ public class RedisUtil {
/**
* Nvalue
*
*
* @param key
* @param count
* @param value

@ -34,9 +34,9 @@ public interface IKmDocService extends IService<KmDoc> {
KmDoc getDocByFileId(String fileId);
void downloadKmDoc(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException, ParseException;
void downloadKmDoc(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException;
void viewKmDoc( String docId, HttpServletResponse response,HttpServletRequest req) throws IOException;
void viewKmDoc( String docId, HttpServletResponse response,HttpServletRequest req);
Result<?> editDraft(KmDocParamVO kmDocParamVO);

@ -1528,7 +1528,7 @@ public class KmDocServiceImpl extends ServiceImpl<KmDocMapper, KmDoc> implements
//下载文件
@SuppressWarnings("ALL")
public void downloadKmDoc(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException, ParseException {
public void downloadKmDoc(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException {
KmDoc kmDoc = super.getById(docId);
if(kmDoc == null) {
response.sendError(HttpStatus.NOT_FOUND.value(),"无效的文档");
@ -1561,7 +1561,7 @@ public class KmDocServiceImpl extends ServiceImpl<KmDocMapper, KmDoc> implements
//预览文件
@SuppressWarnings("ALL")
public void viewKmDoc( String docId, HttpServletResponse response,HttpServletRequest req) throws IOException {
public void viewKmDoc( String docId, HttpServletResponse response,HttpServletRequest req) {
try {
KmDoc kmDoc = super.getById(docId);
if(kmDoc == null) {

@ -17,17 +17,17 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
public class CASServiceUtil {
public static void main(String[] args) {
String serviceUrl = "https://cas.8f8.com.cn:8443/cas/p3/serviceValidate";
String service = "http://localhost:3003/user/login";
String ticket = "ST-5-1g-9cNES6KXNRwq-GuRET103sm0-DESKTOP-VKLS8B3";
String res = getSTValidate(serviceUrl,ticket, service);
System.out.println("---------res-----"+res);
}
/**
* ST
*/
@ -45,7 +45,7 @@ public class CASServiceUtil {
return "";
}
/**
* response body
*
@ -62,12 +62,11 @@ public class CASServiceUtil {
}
return result;
}
/**
* https SSL
*
* @param cookieStore Cookies
* @return
* @throws Exception
*/

@ -36,7 +36,7 @@ public class ActuatorRedisController {
public Result<?> getRedisInfo() throws Exception {
List<RedisInfo> infoList = this.redisService.getRedisInfo();
log.info(infoList.toString());
return Result.ok(infoList);
return Result.OK(infoList);
}
@GetMapping("/keysSize")
@ -77,7 +77,7 @@ public class ActuatorRedisController {
public Map<String, Object> getMemoryInfo() throws Exception {
return redisService.getMemoryInfo();
}
//update-begin--Author:zhangweijian Date:20190425 for获取磁盘信息
/**
* @
@ -95,7 +95,7 @@ public class ActuatorRedisController {
File[] fs = File.listRoots();
log.info("查询磁盘信息:"+fs.length+"个");
List<Map<String,Object>> list = new ArrayList<>();
for (int i = 0; i < fs.length; i++) {
if(fs[i].getTotalSpace()==0) {
continue;

@ -52,7 +52,7 @@ public class QuartzJobController {
/**
*
*
*
* @param quartzJob
* @param pageNo
* @param pageSize
@ -65,13 +65,13 @@ public class QuartzJobController {
QueryWrapper<QuartzJob> queryWrapper = QueryGenerator.initQueryWrapper(quartzJob, req.getParameterMap());
Page<QuartzJob> page = new Page<QuartzJob>(pageNo, pageSize);
IPage<QuartzJob> pageList = quartzJobService.page(page, queryWrapper);
return Result.ok(pageList);
return Result.OK(pageList);
}
/**
*
*
*
* @param quartzJob
* @return
*/
@ -79,12 +79,12 @@ public class QuartzJobController {
@RequestMapping(value = "/add", method = RequestMethod.POST)
public Result<?> add(@RequestBody QuartzJob quartzJob) {
quartzJobService.saveAndScheduleJob(quartzJob);
return Result.ok("创建定时任务成功");
return Result.OK("创建定时任务成功");
}
/**
*
*
*
* @param quartzJob
* @return
*/
@ -97,12 +97,12 @@ public class QuartzJobController {
log.error(e.getMessage(),e);
return Result.error("更新定时任务失败!");
}
return Result.ok("更新定时任务成功!");
return Result.OK("更新定时任务成功!");
}
/**
* id
*
*
* @param id
* @return
*/
@ -114,13 +114,13 @@ public class QuartzJobController {
return Result.error("未找到对应实体");
}
quartzJobService.deleteAndStopJob(quartzJob);
return Result.ok("删除成功!");
return Result.OK("删除成功!");
}
/**
*
*
*
* @param ids
* @return
*/
@ -134,12 +134,12 @@ public class QuartzJobController {
QuartzJob job = quartzJobService.getById(id);
quartzJobService.deleteAndStopJob(job);
}
return Result.ok("删除定时任务成功!");
return Result.OK("删除定时任务成功!");
}
/**
*
*
*
* @param id
* @return
*/
@ -152,12 +152,12 @@ public class QuartzJobController {
return Result.error("定时任务不存在!");
}
quartzJobService.pause(job);
return Result.ok("暂停定时任务成功");
return Result.OK("暂停定时任务成功");
}
/**
*
*
*
* @param id
* @return
*/
@ -171,24 +171,24 @@ public class QuartzJobController {
}
quartzJobService.resumeJob(job);
//scheduler.resumeJob(JobKey.jobKey(job.getJobClassName().trim()));
return Result.ok("恢复定时任务成功");
return Result.OK("恢复定时任务成功");
}
/**
* id
*
*
* @param id
* @return
*/
@RequestMapping(value = "/queryById", method = RequestMethod.GET)
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
QuartzJob quartzJob = quartzJobService.getById(id);
return Result.ok(quartzJob);
return Result.OK(quartzJob);
}
/**
* excel
*
*
* @param request
* @param quartzJob
*/
@ -209,7 +209,7 @@ public class QuartzJobController {
/**
* excel
*
*
* @param request
* @param response
* @return
@ -265,6 +265,6 @@ public class QuartzJobController {
log.info("定时任务 立即执行失败>>"+e.getMessage());
return Result.error("执行失败!");
}
return Result.ok("执行成功!");
return Result.OK("执行成功!");
}
}

@ -90,7 +90,7 @@ public class CommonController {
//update-begin-author:lvdandan date:20200928 for:修改JEditor编辑器本地上传
savePath = this.uploadLocal(file,bizPath);
//update-begin-author:lvdandan date:20200928 for:修改JEditor编辑器本地上传
/** markdown
/* markdown
//针对jeditor编辑器如何使 lcaol模式采用 base64格式存储
String jeditor = request.getParameter("jeditor");
if(oConvertUtils.isNotEmpty(jeditor)){

@ -34,7 +34,7 @@ public class DuplicateCheckController {
/**
*
*
*
* @return
*/
@RequestMapping(value = "/check", method = RequestMethod.GET)
@ -57,7 +57,7 @@ public class DuplicateCheckController {
if (num == null || num == 0) {
// 该值可用
return Result.ok("该值可用!");
return Result.OK("该值可用!");
} else {
// 该值不可用
log.info("该值不可用,系统中已存在!");

@ -245,7 +245,7 @@ public class LoginController {
return result;
}
//update-end-author:taoyan date:20190828 for:校验验证码
//1. 校验用户是否有效
//update-begin-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bugif条件永远为false
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
@ -256,7 +256,7 @@ public class LoginController {
if(!result.isSuccess()) {
return result;
}
//2. 校验用户名或密码是否正确
String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
String syspassword = sysUser.getPassword();
@ -264,7 +264,7 @@ public class LoginController {
result.error500("用户名或密码错误");
return result;
}
//用户登录信息
sysUser = sysUserService.getUserByName(sysUser.getUsername());
userInfo(sysUser, result);
@ -277,7 +277,7 @@ public class LoginController {
//update-end--Author:wangshuai Date:20200714 for登录日志没有记录人员
return result;
}
/**
* 退
* @param request
@ -306,12 +306,12 @@ public class LoginController {
redisUtil.del(String.format("%s::%s", CacheConstant.SYS_USERS_CACHE, sysUser.getUsername()));
//调用shiro的logout
SecurityUtils.getSubject().logout();
return Result.ok("退出登录成功!");
return Result.OK("退出登录成功!");
}else {
return Result.error("Token无效!");
}
}
/**
* 访
* @return
@ -342,7 +342,7 @@ public class LoginController {
result.success("登录成功");
return result;
}
/**
* 访
* @return
@ -363,8 +363,8 @@ public class LoginController {
result.setResult(oConvertUtils.toLowerCasePageList(list));
return result;
}
/**
*
* @param user
@ -389,7 +389,7 @@ public class LoginController {
/**
*
*
*
* @param jsonObject
* @return
*/
@ -438,9 +438,9 @@ public class LoginController {
}
return result;
}
/**
* smsmode 0 .1.2.
/*
smsmode 0 .1.2.
*/
if (CommonConstant.SMS_TPL_TYPE_0.equals(smsmode)) {
//登录模板
@ -470,11 +470,11 @@ public class LoginController {
}
return result;
}
/**
*
*
*
* @param jsonObject
* @return
*/
@ -483,14 +483,14 @@ public class LoginController {
public Result<JSONObject> phoneLogin(@RequestBody JSONObject jsonObject) {
Result<JSONObject> result = new Result<JSONObject>();
String phone = jsonObject.getString("mobile");
//校验用户有效性
SysUser sysUser = sysUserService.getUserByPhone(phone);
result = sysUserService.checkUserIsEffective(sysUser);
if(!result.isSuccess()) {
return result;
}
String smscode = jsonObject.getString("captcha");
Object code = redisUtil.get(phone);
if (!smscode.equals(code)) {
@ -586,7 +586,7 @@ public class LoginController {
}
return res;
}
/**
* app
* @param sysLoginModel
@ -598,14 +598,14 @@ public class LoginController {
Result<JSONObject> result = new Result<JSONObject>();
String username = sysLoginModel.getUsername();
String password = sysLoginModel.getPassword();
//1. 校验用户是否有效
SysUser sysUser = sysUserService.getUserByName(username);
result = sysUserService.checkUserIsEffective(sysUser);
if(!result.isSuccess()) {
return result;
}
//2. 校验用户名或密码是否正确
String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
String syspassword = sysUser.getPassword();
@ -613,7 +613,7 @@ public class LoginController {
result.error500("用户名或密码错误");
return result;
}
String orgCode = sysUser.getOrgCode();
if(oConvertUtils.isEmpty(orgCode)) {
//如果当前用户无选择部门 查看部门关联信息
@ -629,7 +629,7 @@ public class LoginController {
JSONObject obj = new JSONObject();
//用户登录信息
obj.put("userInfo", sysUser);
// 生成token
String token = JwtUtil.sign(username, syspassword);
// 设置超时时间
@ -663,7 +663,7 @@ public class LoginController {
if(checkCode==null || !checkCode.equals(lowerCaseCaptcha)) {
return Result.error("验证码错误");
}
return Result.ok();
return Result.OK();
}
}
}

@ -400,7 +400,7 @@ public class SysAnnouncementController {
}
sysAnnouncementService.save(sysAnnouncementExcel);
}
return Result.ok("文件导入成功!数据行数:" + listSysAnnouncements.size());
return Result.OK("文件导入成功!数据行数:" + listSysAnnouncements.size());
} catch (Exception e) {
log.error(e.getMessage(),e);
return Result.error("文件导入失败!");

@ -97,15 +97,15 @@ public class SysGatewayRoute implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/* *//**更新人*//*
/* *//*更新人*//*
@ApiModelProperty(value = "更新人")
private String updateBy;
*//**更新日期*//*
*//*更新日期*//*
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
*//**所属部门*//*
*//*所属部门*//*
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;*/
}

@ -22,8 +22,7 @@ public interface SysAnnouncementSendMapper extends BaseMapper<SysAnnouncementSen
/**
* @
* @param announcementSendModel
* @param pageSize
* @param pageNo
* @param page
* @return
*/
public List<AnnouncementSendModel> getMyAnnouncementSendList(Page<AnnouncementSendModel> page,@Param("announcementSendModel") AnnouncementSendModel announcementSendModel);

@ -58,22 +58,22 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* @return
*/
IPage<SysUser> getUserByRoleId(Page page, @Param("roleId") String roleId, @Param("username") String username);
/**
* ID
* @param username
* @param departId
* @param orgCode
*/
void updateUserDepart(@Param("username") String username,@Param("orgCode") String orgCode);
/**
*
* @param phone
* @return
*/
public SysUser getUserByPhone(@Param("phone") String phone);
/**
*
* @param email
@ -132,7 +132,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
/** 更新空字符串为null【此写法有sql注入风险禁止随便用】 */
int updateNullByEmptyString(@Param("fieldName") String fieldName);
/**
* Ids,
* @param departIds

@ -11,7 +11,7 @@ import java.util.List;
* <p>
*
* <p>
*
*
* @Author:Steve
* @Since 2019-01-22
*/
@ -47,28 +47,28 @@ public interface ISysDepartService extends IService<SysDepart>{
* @return
*/
Boolean updateDepartDataById(SysDepart sysDepart,String username);
/**
* depart
* @param id
/*
depart
@param id
* @return
*/
/* boolean removeDepartDataById(String id); */
/**
*
* @param keyWord
* @return
*/
List<SysDepartTreeModel> searhBy(String keyWord,String myDeptSearch,String departIds);
/**
* id
* @param id
* @return
*/
boolean delete(String id);
/**
* SysDepart
* @param userId
@ -86,7 +86,7 @@ public interface ISysDepartService extends IService<SysDepart>{
/**
* id
* @param id
* @param ids
* @return
*/
void deleteBatchWithChildren(List<String> ids);

@ -18,38 +18,38 @@ public interface ISysPermissionDataRuleService extends IService<SysPermissionDat
/**
* id
*
* @param permRule
*
* @param permissionId
*/
List<SysPermissionDataRule> getPermRuleListByPermId(String permissionId);
/**
*
*
*
* @return
*/
List<SysPermissionDataRule> queryPermissionRule(SysPermissionDataRule permRule);
/**
* ID
* @param permission
* @param permissionId
* @param username
* @return
*/
List<SysPermissionDataRule> queryPermissionDataRules(String username,String permissionId);
/**
* rule_flag
* @param sysPermissionDataRule
*/
public void savePermissionDataRule(SysPermissionDataRule sysPermissionDataRule);
/**
*
* @param dataRuleId
*/
public void deletePermissionDataRule(String dataRuleId);
}

@ -30,7 +30,7 @@ import java.util.*;
* <p>
*
* <p>
*
*
* @Author Steve
* @Since 2019-01-22
*/
@ -130,14 +130,14 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
}
}
/**
* saveDepartData ,
* @deprecated
* @param parentId
* @return
*/
private String[] generateOrgCode(String parentId) {
private String[] generateOrgCode(String parentId) {
//update-begin--Author:Steve Date:20190201 for组织机构添加数据代码调整
LambdaQueryWrapper<SysDepart> query = new LambdaQueryWrapper<SysDepart>();
LambdaQueryWrapper<SysDepart> query1 = new LambdaQueryWrapper<SysDepart>();
@ -195,16 +195,16 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
strArray[1] = orgType;
return strArray;
//update-end--Author:Steve Date:20190201 for组织机构添加数据代码调整
}
}
/*
removeDepartDataById delete ID
/**
* removeDepartDataById delete ID
*
*/
/*
* @Override
*
*
* @Transactional public boolean removeDepartDataById(String id) {
* System.out.println("要删除的ID 为=============================>>>>>"+id); boolean
* flag = this.removeById(id); return flag; }
@ -226,7 +226,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteBatchWithChildren(List<String> ids) {
@ -342,13 +342,13 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
}
return ok;
}
/**
* delete
* @param id
* @param idList
*/
private void checkChildrenExists(String id, List<String> idList) {
private void checkChildrenExists(String id, List<String> idList) {
LambdaQueryWrapper<SysDepart> query = new LambdaQueryWrapper<SysDepart>();
query.eq(SysDepart::getParentId,id);
List<SysDepart> departList = this.list(query);

@ -11,12 +11,12 @@ public class SecurityToolsTest {
MyKeyPair mkeyPair = SecurityTools.generateKeyPair();
JSONObject msg = new JSONObject();
msg.put("name", "党政辉");
msg.put("age", 50);
msg.set("name", "党政辉");
msg.set("age", 50);
JSONObject identity = new JSONObject();
identity.put("type", "01");
identity.put("no", "210882165896524512");
msg.put("identity", identity);
identity.set("type", "01");
identity.set("no", "210882165896524512");
msg.set("identity", identity);
// 签名加密部分
SecuritySignReq signReq = new SecuritySignReq();

Loading…
Cancel
Save