Merge remote-tracking branch 'origin/v1.3' into v1.3

This commit is contained in:
Captain.B 2020-09-30 17:34:16 +08:00
commit 0a3a5e2ecc
11 changed files with 28 additions and 27 deletions

View File

@ -487,20 +487,18 @@ public class UserService {
/*修改当前用户用户密码*/ /*修改当前用户用户密码*/
private User updateCurrentUserPwd(EditPassWordRequest request) { private User updateCurrentUserPwd(EditPassWordRequest request) {
if (SessionUtils.getUser() != null) { String oldPassword = CodingUtil.md5(request.getPassword(), "utf-8");
User user = userMapper.selectByPrimaryKey(SessionUtils.getUser().getId()); String newPassword = request.getNewpassword();
String pwd = user.getPassword(); UserExample userExample = new UserExample();
String prepwd = CodingUtil.md5(request.getPassword(), "utf-8"); userExample.createCriteria().andIdEqualTo(SessionUtils.getUser().getId()).andPasswordEqualTo(oldPassword);
String newped = request.getNewpassword(); List<User> users = userMapper.selectByExample(userExample);
if (StringUtils.isNotBlank(prepwd)) { if (!CollectionUtils.isEmpty(users)) {
if (prepwd.trim().equals(pwd.trim())) { User user = users.get(0);
user.setPassword(CodingUtil.md5(newped)); user.setPassword(CodingUtil.md5(newPassword));
user.setUpdateTime(System.currentTimeMillis()); user.setUpdateTime(System.currentTimeMillis());
return user; return user;
}
}
MSException.throwException(Translator.get("password_modification_failed"));
} }
MSException.throwException(Translator.get("password_modification_failed"));
return null; return null;
} }
@ -512,8 +510,8 @@ public class UserService {
/*管理员修改用户密码*/ /*管理员修改用户密码*/
private User updateUserPwd(EditPassWordRequest request) { private User updateUserPwd(EditPassWordRequest request) {
User user = userMapper.selectByPrimaryKey(request.getId()); User user = userMapper.selectByPrimaryKey(request.getId());
String newped = request.getNewpassword(); String newPassword = request.getNewpassword();
user.setPassword(CodingUtil.md5(newped)); user.setPassword(CodingUtil.md5(newPassword));
user.setUpdateTime(System.currentTimeMillis()); user.setUpdateTime(System.currentTimeMillis());
return user; return user;
} }

View File

@ -273,6 +273,8 @@ public class TestCaseService {
.map(TestCase::getName) .map(TestCase::getName)
.collect(Collectors.toSet()); .collect(Collectors.toSet());
List<ExcelErrData<TestCaseExcelData>> errList = null; List<ExcelErrData<TestCaseExcelData>> errList = null;
if(multipartFile == null )
MSException.throwException(Translator.get("upload_fail"));
if (multipartFile.getOriginalFilename().endsWith(".xmind")) { if (multipartFile.getOriginalFilename().endsWith(".xmind")) {
try { try {

View File

@ -3,7 +3,7 @@
<template v-slot:header> <template v-slot:header>
<span class="title">{{$t('api_report.title')}}</span> <span class="title">{{$t('api_report.title')}}</span>
</template> </template>
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link"> <el-table border :data="tableData" class="adjust-table table-content" @row-click="link" height="300px">
<el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/> <el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/>
<el-table-column width="250" :label="$t('commons.create_time')"> <el-table-column width="250" :label="$t('commons.create_time')">
<template v-slot:default="scope"> <template v-slot:default="scope">

View File

@ -3,7 +3,7 @@
<template v-slot:header> <template v-slot:header>
<span class="title">{{$t('commons.test')}}</span> <span class="title">{{$t('commons.test')}}</span>
</template> </template>
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link"> <el-table border :data="tableData" class="adjust-table table-content" @row-click="link" height="300px">
<el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/> <el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/>
<el-table-column prop="projectName" :label="$t('load_test.project_name')" width="150" show-overflow-tooltip/> <el-table-column prop="projectName" :label="$t('load_test.project_name')" width="150" show-overflow-tooltip/>
<el-table-column width="250" :label="$t('commons.create_time')"> <el-table-column width="250" :label="$t('commons.create_time')">

View File

@ -65,7 +65,6 @@ export default {
}, },
mounted() { mounted() {
console.log(this.response.headers);
if (!this.response.headers) { if (!this.response.headers) {
return; return;
} }

View File

@ -1140,10 +1140,12 @@ class JMXGenerator {
let domain = request.environment.config.httpConfig.domain; let domain = request.environment.config.httpConfig.domain;
let validHosts = []; let validHosts = [];
hosts.forEach(item => { hosts.forEach(item => {
let d = item.domain.trim().replace("http://", "").replace("https://", ""); if (item.domain != undefined && domain != undefined) {
if (item && d === domain.trim()) { let d = item.domain.trim().replace("http://", "").replace("https://", "");
item.domain = d; // 域名去掉协议 if (d === domain.trim()) {
validHosts.push(item); item.domain = d; // 域名去掉协议
validHosts.push(item);
}
} }
}); });
if (validHosts.length > 0) { if (validHosts.length > 0) {

View File

@ -3,7 +3,7 @@
<template v-slot:header> <template v-slot:header>
<span class="title">{{$t('api_report.title')}}</span> <span class="title">{{$t('api_report.title')}}</span>
</template> </template>
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link"> <el-table border :data="tableData" class="adjust-table table-content" @row-click="link" height="300px">
<el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/> <el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/>
<el-table-column width="250" :label="$t('commons.create_time')"> <el-table-column width="250" :label="$t('commons.create_time')">
<template v-slot:default="scope"> <template v-slot:default="scope">

View File

@ -3,7 +3,7 @@
<template v-slot:header> <template v-slot:header>
<span class="title">{{$t('commons.test')}}</span> <span class="title">{{$t('commons.test')}}</span>
</template> </template>
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link"> <el-table border :data="tableData" class="adjust-table table-content" @row-click="link" height="300px">
<el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/> <el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/>
<el-table-column prop="projectName" :label="$t('load_test.project_name')" width="150" show-overflow-tooltip/> <el-table-column prop="projectName" :label="$t('load_test.project_name')" width="150" show-overflow-tooltip/>
<el-table-column width="250" :label="$t('commons.create_time')"> <el-table-column width="250" :label="$t('commons.create_time')">

View File

@ -5,7 +5,7 @@
border border
:data="tableData" :data="tableData"
@row-click="intoPlan" @row-click="intoPlan"
v-loading="result.loading"> v-loading="result.loading" height="300px">
<el-table-column <el-table-column
prop="name" prop="name"
fixed fixed

View File

@ -14,7 +14,7 @@
border border
:data="tableData" :data="tableData"
@row-click="intoPlan" @row-click="intoPlan"
v-loading="result.loading"> v-loading="result.loading" height="300px">
<el-table-column <el-table-column
prop="name" prop="name"
fixed fixed

View File

@ -8,7 +8,7 @@
class="adjust-table" class="adjust-table"
@row-click="editTestCase" @row-click="editTestCase"
:data="tableData" :data="tableData"
v-loading="result.loading"> v-loading="result.loading" height="300px">
<el-table-column <el-table-column
prop="name" prop="name"