Merge remote-tracking branch 'origin/fix-bug-202303' into fix-bug-202303
This commit is contained in:
+2
-1
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -16,7 +17,7 @@ import java.util.List;
|
||||
@Slf4j
|
||||
public class ImportExcelUtil {
|
||||
|
||||
public static Result<?> imporReturnRes(int errorLines,int successLines,List<String> errorMessage) throws IOException {
|
||||
public static Result<T> imporReturnRes(int errorLines, int successLines, List<String> errorMessage) throws IOException {
|
||||
if (errorLines == 0) {
|
||||
return Result.OK("共" + successLines + "行数据全部导入成功!");
|
||||
} else {
|
||||
|
||||
+19
-18
@@ -9,6 +9,7 @@ import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
@@ -63,7 +64,7 @@ public class QuartzJobController {
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
*
|
||||
* @param quartzJob
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
@@ -71,8 +72,8 @@ public class QuartzJobController {
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/page", method = RequestMethod.GET)
|
||||
public Result<?> queryPageList(QuartzJob quartzJob, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
|
||||
public Result<IPage<QuartzJob>> queryPageList(QuartzJob quartzJob, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
|
||||
QueryWrapper<QuartzJob> queryWrapper = QueryGenerator.initQueryWrapper(quartzJob, req.getParameterMap());
|
||||
Page<QuartzJob> page = new Page<QuartzJob>(pageNo, pageSize);
|
||||
IPage<QuartzJob> pageList = quartzJobService.page(page, queryWrapper);
|
||||
@@ -82,26 +83,26 @@ public class QuartzJobController {
|
||||
|
||||
/**
|
||||
* 添加定时任务
|
||||
*
|
||||
*
|
||||
* @param quartzJob
|
||||
* @return
|
||||
*/
|
||||
//@RequiresRoles("admin")
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
public Result<?> add(@RequestBody QuartzJob quartzJob) {
|
||||
public Result<T> add(@RequestBody QuartzJob quartzJob) {
|
||||
quartzJobService.saveAndScheduleJob(quartzJob);
|
||||
return Result.OK("创建定时任务成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新定时任务
|
||||
*
|
||||
*
|
||||
* @param quartzJob
|
||||
* @return
|
||||
*/
|
||||
//@RequiresRoles("admin")
|
||||
@RequestMapping(value = "/edit", method = RequestMethod.PUT)
|
||||
public Result<?> eidt(@RequestBody QuartzJob quartzJob) {
|
||||
public Result<T> eidt(@RequestBody QuartzJob quartzJob) {
|
||||
try {
|
||||
quartzJobService.editAndScheduleJob(quartzJob);
|
||||
} catch (SchedulerException e) {
|
||||
@@ -113,13 +114,13 @@ public class QuartzJobController {
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@RequiresRoles("admin")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
public Result<T> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
QuartzJob quartzJob = quartzJobService.getById(id);
|
||||
if (quartzJob == null) {
|
||||
return Result.error("未找到对应实体");
|
||||
@@ -131,13 +132,13 @@ public class QuartzJobController {
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
//@RequiresRoles("admin")
|
||||
@RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
public Result<T> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
if (ids == null || "".equals(ids.trim())) {
|
||||
return Result.error("参数不识别!");
|
||||
}
|
||||
@@ -150,7 +151,7 @@ public class QuartzJobController {
|
||||
|
||||
/**
|
||||
* 暂停定时任务
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@@ -186,19 +187,19 @@ public class QuartzJobController {
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/queryById", method = RequestMethod.GET)
|
||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
public Result<QuartzJob> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
QuartzJob quartzJob = quartzJobService.getById(id);
|
||||
return Result.OK(quartzJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
*
|
||||
* @param request
|
||||
* @param quartzJob
|
||||
*/
|
||||
@@ -219,13 +220,13 @@ public class QuartzJobController {
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
public Result<T> importExcel(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
// 错误信息
|
||||
@@ -263,7 +264,7 @@ public class QuartzJobController {
|
||||
*/
|
||||
//@RequiresRoles("admin")
|
||||
@GetMapping("/execute")
|
||||
public Result<?> execute(@RequestParam(name = "id", required = true) String id) {
|
||||
public Result<T> execute(@RequestParam(name = "id", required = true) String id) {
|
||||
QuartzJob quartzJob = quartzJobService.getById(id);
|
||||
if (quartzJob == null) {
|
||||
return Result.error("未找到对应实体");
|
||||
|
||||
@@ -5,7 +5,7 @@ import Vue from 'vue'
|
||||
export default class Area {
|
||||
/**
|
||||
* 构造器
|
||||
* @param express
|
||||
* @param pcaa
|
||||
*/
|
||||
constructor (pcaa) {
|
||||
if (!pcaa) {
|
||||
@@ -34,7 +34,7 @@ export default class Area {
|
||||
}
|
||||
|
||||
getCode (text) {
|
||||
if (!text || text.length == 0) {
|
||||
if (!text || text.length === 0) {
|
||||
return ''
|
||||
}
|
||||
for (const item of this.all) {
|
||||
@@ -45,7 +45,7 @@ export default class Area {
|
||||
}
|
||||
|
||||
getText (code) {
|
||||
if (!code || code.length == 0) {
|
||||
if (!code || code.length === 0) {
|
||||
return ''
|
||||
}
|
||||
const arr = []
|
||||
@@ -61,9 +61,9 @@ export default class Area {
|
||||
|
||||
getPcode (id, arr, index) {
|
||||
for (const item of this.all) {
|
||||
if (item.id === id && item.index == index) {
|
||||
if (item.id === id && item.index === index) {
|
||||
arr.unshift(id)
|
||||
if (item.pid != '86') {
|
||||
if (item.pid !== '86') {
|
||||
this.getPcode(item.pid, arr, --index)
|
||||
}
|
||||
}
|
||||
@@ -72,9 +72,9 @@ export default class Area {
|
||||
|
||||
getAreaBycode (code, arr, index) {
|
||||
for (const item of this.all) {
|
||||
if (item.id === code && item.index == index) {
|
||||
if (item.id === code && item.index === index) {
|
||||
arr.unshift(item.text)
|
||||
if (item.pid != '86') {
|
||||
if (item.pid !== '86') {
|
||||
this.getAreaBycode(item.pid, arr, --index)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export function filterMultiDictText (dictOptions, text) {
|
||||
*/
|
||||
export function filterDictTextByCache (dictCode, key) {
|
||||
if (key === null || key === undefined || key.length === 0) {
|
||||
return
|
||||
return ''
|
||||
}
|
||||
if (!dictCode) {
|
||||
return '字典Code不能为空!'
|
||||
|
||||
Reference in New Issue
Block a user