代码优化

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

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

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

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

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

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

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

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

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

@ -2,7 +2,7 @@
<div class="drag" ref="dragDiv"> <div class="drag" ref="dragDiv">
<div class="drag_bg"></div> <div class="drag_bg"></div>
<div class="drag_text">{{confirmWords}}</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> </div>
</template> </template>
@ -101,11 +101,11 @@
.drag_bg{ .drag_bg{
background-color: #7ac23c; background-color: #7ac23c;
height: 34px; height: 34px;
width: 0px; width: 0;
} }
.drag_text{ .drag_text{
position: absolute; position: absolute;
top: 0px; top: 0;
width: 100%;text-align: center; width: 100%;text-align: center;
-moz-user-select: none; -moz-user-select: none;
-webkit-user-select: none; -webkit-user-select: none;

@ -172,7 +172,7 @@ this.$refs.superQueryModal.show();
<div style="width: 100%;"> <div style="width: 100%;">
<span>{{ title }}</span> <span>{{ title }}</span>
<span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right"> <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> </span>
</div> </div>
</template> </template>

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

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

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

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

@ -32,7 +32,7 @@
<a-list-item :key="index" v-for="(record, index) in announcement1"> <a-list-item :key="index" v-for="(record, index) in announcement1">
<div style="margin-left: 5%;width: 80%"> <div style="margin-left: 5%;width: 80%">
<p><a @click="showAnnouncement(record)">{{ record.titile }}</a></p> <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>
<div style="text-align: right"> <div style="text-align: right">
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue"></a-tag> <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"> <a-list-item :key="index" v-for="(record, index) in announcement2">
<div style="margin-left: 5%;width: 80%"> <div style="margin-left: 5%;width: 80%">
<p><a @click="showAnnouncement(record)">{{ record.titile }}</a></p> <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>
<div style="text-align: right"> <div style="text-align: right">
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue"></a-tag> <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue"></a-tag>

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

@ -184,7 +184,7 @@
margin-bottom: 18px; margin-bottom: 18px;
} }
.anty-row-operator button{margin: 0 5px} .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{height: 100%}
.ant-modal-cust-warp .ant-modal-body{height:calc(100% - 110px) !important;overflow-y: auto} .ant-modal-cust-warp .ant-modal-body{height:calc(100% - 110px) !important;overflow-y: auto}

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

@ -13,7 +13,7 @@
<div style="width: 100%;"> <div style="width: 100%;">
<span>{{ title }}</span> <span>{{ title }}</span>
<span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right"> <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> </span>
</div> </div>

@ -177,7 +177,7 @@ public class JeecgController<T, S extends IService<T>> {
//1200条 saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒 //1200条 saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒
log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒"); log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
//update-end-author:taoyan date:20190528 for:批量插入数据 //update-end-author:taoyan date:20190528 for:批量插入数据
return Result.ok("文件导入成功!数据行数:" + list.size()); return Result.OK("文件导入成功!数据行数:" + list.size());
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
return Result.error("文件导入失败:" + e.getMessage()); 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 { public static Result<?> imporReturnRes(int errorLines,int successLines,List<String> errorMessage) throws IOException {
if (errorLines == 0) { if (errorLines == 0) {
return Result.ok("共" + successLines + "行数据全部导入成功!"); return Result.OK("共" + successLines + "行数据全部导入成功!");
} else { } else {
JSONObject result = new JSONObject(5); JSONObject result = new JSONObject(5);
int totalCount = successLines + errorLines; int totalCount = successLines + errorLines;
@ -31,7 +31,7 @@ public class ImportExcelUtil {
String fileName = fileUrl.substring(lastIndex + 1); String fileName = fileUrl.substring(lastIndex + 1);
result.put("fileUrl", "/sys/common/static/" + fileUrl); result.put("fileUrl", "/sys/common/static/" + fileUrl);
result.put("fileName", fileName); result.put("fileName", fileName);
Result res = Result.ok(result); Result res = Result.OK(result);
res.setCode(201); res.setCode(201);
res.setMessage("文件导入成功,但有错误。"); res.setMessage("文件导入成功,但有错误。");
return res; return res;

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

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

@ -23,7 +23,7 @@ public class AesEncryptUtil {
* @return * @return
* @throws Exception * @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 { try {
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");//"算法/模式/补码方式"NoPadding PkcsPadding Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");//"算法/模式/补码方式"NoPadding PkcsPadding
@ -60,7 +60,7 @@ public class AesEncryptUtil {
* @return * @return
* @throws Exception * @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 { try {
byte[] encrypted1 = Base64.decode(data); byte[] encrypted1 = Base64.decode(data);

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

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

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

@ -34,9 +34,9 @@ public interface IKmDocService extends IService<KmDoc> {
KmDoc getDocByFileId(String fileId); 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); Result<?> editDraft(KmDocParamVO kmDocParamVO);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save