已修复 ID 精度丢失
This commit is contained in:
1 parent
0f921d4d9f
commit
42a06f7e4d
6 files changed
+117
-80
No files matched your search
+37
-37
@@ -10,9 +10,9 @@ import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.UsdtAggregationTaskItem;
|
||||
import com.ruoyi.system.domain.UsdtAggregationTaskItemPlus;
|
||||
import com.ruoyi.system.domain.vo.AggregationExecuteRequest;
|
||||
import com.ruoyi.system.service.IUsdtAggregationTaskItemService;
|
||||
import com.ruoyi.system.service.UsdtAggregationWorkflowService;
|
||||
import com.ruoyi.system.domain.vo.AggregationExecuteRequest;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -27,14 +27,15 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/usdtTaskItem")
|
||||
public class UsdtAggregationTaskItemController extends BaseController
|
||||
{
|
||||
public class UsdtAggregationTaskItemController extends BaseController {
|
||||
@Autowired
|
||||
private IUsdtAggregationTaskItemService usdtAggregationTaskItemService;
|
||||
@Autowired
|
||||
private UsdtAggregationWorkflowService aggregationWorkflowService;
|
||||
|
||||
/** 手动重新执行单个失败明细,仍要求配置密码。 */
|
||||
/**
|
||||
* 手动重新执行单个失败明细,仍要求配置密码。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdtTaskItem:edit')")
|
||||
@PostMapping("/{id}/retry")
|
||||
public AjaxResult retry(@PathVariable("id") Long id,
|
||||
@@ -58,65 +59,65 @@ public class UsdtAggregationTaskItemController extends BaseController
|
||||
request.setConfigurationPassword(null);
|
||||
}
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:usdtTaskItem:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtAggregationTaskItemPlus> list = usdtAggregationTaskItemService.getByIds(ids.getLongIds(),false,UsdtAggregationTaskItemPlus::getRemark,UsdtAggregationTaskItemPlus::getId);
|
||||
public AjaxResult getByIds(@RequestBody Ids ids) {
|
||||
List<UsdtAggregationTaskItemPlus> list = usdtAggregationTaskItemService.getByIds(ids.getLongIds(), false, UsdtAggregationTaskItemPlus::getRemark, UsdtAggregationTaskItemPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:usdtTaskItem:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtAggregationTaskItemPlus> list = usdtAggregationTaskItemService.getByIds(ids.getLongIds(),true,UsdtAggregationTaskItemPlus::getUserId,UsdtAggregationTaskItemPlus::getRemark,UsdtAggregationTaskItemPlus::getId);
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids) {
|
||||
List<UsdtAggregationTaskItemPlus> list = usdtAggregationTaskItemService.getByIds(ids.getLongIds(), true, UsdtAggregationTaskItemPlus::getUserId, UsdtAggregationTaskItemPlus::getRemark, UsdtAggregationTaskItemPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:usdtTaskItem:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtAggregationTaskItemService.select(keyword,false);
|
||||
public AjaxResult select(String keyword) {
|
||||
List<SelectItem> list = usdtAggregationTaskItemService.select(keyword, false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:usdtTaskItem:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtAggregationTaskItemService.select(keyword,true);
|
||||
public AjaxResult userSelect(String keyword) {
|
||||
List<SelectItem> list = usdtAggregationTaskItemService.select(keyword, true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询归集任务明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdtTaskItem:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(UsdtAggregationTaskItem usdtAggregationTaskItem)
|
||||
{
|
||||
public TableDataInfo list(UsdtAggregationTaskItem usdtAggregationTaskItem) {
|
||||
startPage();
|
||||
List<UsdtAggregationTaskItem> list = usdtAggregationTaskItemService.selectUsdtAggregationTaskItemList(usdtAggregationTaskItem,false);
|
||||
List<UsdtAggregationTaskItem> list = usdtAggregationTaskItemService.selectUsdtAggregationTaskItemList(usdtAggregationTaskItem, false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询归集任务明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdtTaskItem:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(UsdtAggregationTaskItem usdtAggregationTaskItem)
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询归集任务明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdtTaskItem:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(UsdtAggregationTaskItem usdtAggregationTaskItem) {
|
||||
startPage();
|
||||
List<UsdtAggregationTaskItem> list = usdtAggregationTaskItemService.selectUsdtAggregationTaskItemList(usdtAggregationTaskItem,true);
|
||||
List<UsdtAggregationTaskItem> list = usdtAggregationTaskItemService.selectUsdtAggregationTaskItemList(usdtAggregationTaskItem, true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
|
||||
/**
|
||||
* 导出归集任务明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdtTaskItem:export')")
|
||||
@Log(title = "归集任务明细", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(UsdtAggregationTaskItem usdtAggregationTaskItem)
|
||||
{
|
||||
List<UsdtAggregationTaskItem> list = usdtAggregationTaskItemService.selectUsdtAggregationTaskItemList(usdtAggregationTaskItem,false);
|
||||
public AjaxResult export(UsdtAggregationTaskItem usdtAggregationTaskItem) {
|
||||
List<UsdtAggregationTaskItem> list = usdtAggregationTaskItemService.selectUsdtAggregationTaskItemList(usdtAggregationTaskItem, false);
|
||||
ExcelUtil<UsdtAggregationTaskItem> util = new ExcelUtil<UsdtAggregationTaskItem>(UsdtAggregationTaskItem.class);
|
||||
return util.exportExcel(list, "usdtTaskItem");
|
||||
}
|
||||
@@ -127,19 +128,18 @@ public class UsdtAggregationTaskItemController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdtTaskItem:query')")
|
||||
@RequestMapping(value = "/{id}", method = {RequestMethod.GET, RequestMethod.POST})
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtAggregationTaskItemService.selectUsdtAggregationTaskItemById(id,false));
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(usdtAggregationTaskItemService.selectUsdtAggregationTaskItemById(id, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户的归集任务明细详细信息。
|
||||
* 兼容 POST 查询,仍由服务层校验明细归属,不允许借此修改或执行归集明细。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdtTaskItem:user-query')")
|
||||
@RequestMapping(value = "/user/{id}", method = {RequestMethod.GET, RequestMethod.POST})
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtAggregationTaskItemService.selectUsdtAggregationTaskItemById(id,true));
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(usdtAggregationTaskItemService.selectUsdtAggregationTaskItemById(id, true));
|
||||
}
|
||||
/*
|
||||
* 明细金额、来源地址、目标地址和执行状态均由归集工作流维护。
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.ruoyi.system.domain;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -19,6 +21,8 @@ public class UsdtAggregationTask extends BaseEntity
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 任务名称 */
|
||||
@@ -27,10 +31,14 @@ public class UsdtAggregationTask extends BaseEntity
|
||||
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long appId;
|
||||
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/** 状态 */
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.ruoyi.system.domain;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -19,6 +21,8 @@ public class UsdtAggregationTaskItem extends BaseEntity
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 钱包地址 */
|
||||
@@ -70,14 +74,20 @@ public class UsdtAggregationTaskItem extends BaseEntity
|
||||
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long appId;
|
||||
|
||||
/** 父任务 */
|
||||
@Excel(name = "父任务")
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long parentId;
|
||||
|
||||
/** 归集地址 */
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.ruoyi.system.domain;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -22,6 +24,8 @@ public class UsdtAggregationTaskItemPlus implements Serializable
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
/** 钱包地址 */
|
||||
@Excel(name = "钱包地址")
|
||||
@@ -64,12 +68,18 @@ public class UsdtAggregationTaskItemPlus implements Serializable
|
||||
private Long willUseTrxNum;
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long appId;
|
||||
/** 父任务 */
|
||||
@Excel(name = "父任务")
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long parentId;
|
||||
/** 归集地址 */
|
||||
@Excel(name = "归集地址")
|
||||
|
||||
@@ -6,6 +6,8 @@ import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -26,15 +28,21 @@ public class UsdtAggregationTaskPlus implements Serializable
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.INPUT)
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
/** 任务名称 */
|
||||
@Excel(name = "任务名称")
|
||||
private String taskName;
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long appId;
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
// ID 以字符串输出,避免浏览器 Number 解析雪花 ID 时丢失精度。
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
|
||||
+44
-43
@@ -17,6 +17,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 归集任务明细Service业务层处理
|
||||
*
|
||||
@@ -24,64 +25,68 @@ import java.util.*;
|
||||
* @date 2026-01-01
|
||||
*/
|
||||
@Service
|
||||
public class UsdtAggregationTaskItemServiceImpl extends ServiceImpl<UsdtAggregationTaskItemMapper, UsdtAggregationTaskItemPlus> implements IUsdtAggregationTaskItemService
|
||||
{
|
||||
public class UsdtAggregationTaskItemServiceImpl extends ServiceImpl<UsdtAggregationTaskItemMapper, UsdtAggregationTaskItemPlus> implements IUsdtAggregationTaskItemService {
|
||||
@Autowired
|
||||
private UsdtAggregationTaskItemMapper usdtAggregationTaskItemMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<UsdtAggregationTaskItemPlus> getByIds(List<Long> ids ,boolean isUser, SFunction<UsdtAggregationTaskItemPlus, ?>... columns) {
|
||||
public List<UsdtAggregationTaskItemPlus> getByIds(List<Long> ids, boolean isUser, SFunction<UsdtAggregationTaskItemPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtAggregationTaskItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtAggregationTaskItemPlus>()
|
||||
.select(columns).in(UsdtAggregationTaskItemPlus::getId, ids);
|
||||
if(isUser){
|
||||
if (isUser) {
|
||||
lambdaQueryWrapper.eq(UsdtAggregationTaskItemPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtAggregationTaskItemPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
if (isUser) {
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private void checkUserPlus(List<UsdtAggregationTaskItemPlus> list) {
|
||||
for (UsdtAggregationTaskItemPlus item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
for (UsdtAggregationTaskItemPlus item : list) {
|
||||
if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUser(List<UsdtAggregationTaskItem> list) {
|
||||
for (UsdtAggregationTaskItem item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
for (UsdtAggregationTaskItem item : list) {
|
||||
if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUser(UsdtAggregationTaskItemPlus item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUser(UsdtAggregationTaskItem item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword,boolean isUser) {
|
||||
public List<SelectItem> select(String keyword, boolean isUser) {
|
||||
LambdaQueryWrapper<UsdtAggregationTaskItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtAggregationTaskItemPlus>()
|
||||
.select(UsdtAggregationTaskItemPlus::getId,UsdtAggregationTaskItemPlus::getUserId, UsdtAggregationTaskItemPlus::getRemark)
|
||||
.select(UsdtAggregationTaskItemPlus::getId, UsdtAggregationTaskItemPlus::getUserId, UsdtAggregationTaskItemPlus::getRemark)
|
||||
.like(UsdtAggregationTaskItemPlus::getRemark, keyword);
|
||||
if(isUser){
|
||||
if (isUser) {
|
||||
lambdaQueryWrapper.eq(UsdtAggregationTaskItemPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtAggregationTaskItemPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
if (isUser) {
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (UsdtAggregationTaskItemPlus item : list){
|
||||
List<SelectItem> result = new ArrayList<>();
|
||||
for (UsdtAggregationTaskItemPlus item : list) {
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getRemark());
|
||||
selectItem.setId(item.getId());
|
||||
@@ -89,6 +94,7 @@ public class UsdtAggregationTaskItemServiceImpl extends ServiceImpl<UsdtAggregat
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsdtAggregationTaskItemPlus getById(Long id, SFunction<UsdtAggregationTaskItemPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtAggregationTaskItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtAggregationTaskItemPlus>()
|
||||
@@ -98,7 +104,7 @@ public class UsdtAggregationTaskItemServiceImpl extends ServiceImpl<UsdtAggregat
|
||||
|
||||
@Override
|
||||
public Map<Long, UsdtAggregationTaskItemPlus> getMapByIds(List<Long> ids, SFunction<UsdtAggregationTaskItemPlus, ?>... columns) {
|
||||
List<UsdtAggregationTaskItemPlus> list = this.getByIds(ids,false, columns);
|
||||
List<UsdtAggregationTaskItemPlus> list = this.getByIds(ids, false, columns);
|
||||
Map<Long, UsdtAggregationTaskItemPlus> map = new HashMap<>();
|
||||
for (UsdtAggregationTaskItemPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
@@ -173,6 +179,7 @@ public class UsdtAggregationTaskItemServiceImpl extends ServiceImpl<UsdtAggregat
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询归集任务明细
|
||||
*
|
||||
@@ -180,10 +187,9 @@ public class UsdtAggregationTaskItemServiceImpl extends ServiceImpl<UsdtAggregat
|
||||
* @return 归集任务明细
|
||||
*/
|
||||
@Override
|
||||
public UsdtAggregationTaskItem selectUsdtAggregationTaskItemById(Long id,boolean isUser)
|
||||
{
|
||||
public UsdtAggregationTaskItem selectUsdtAggregationTaskItemById(Long id, boolean isUser) {
|
||||
UsdtAggregationTaskItem vo = usdtAggregationTaskItemMapper.selectUsdtAggregationTaskItemById(id);
|
||||
if(isUser){
|
||||
if (isUser) {
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
@@ -196,16 +202,15 @@ public class UsdtAggregationTaskItemServiceImpl extends ServiceImpl<UsdtAggregat
|
||||
* @return 归集任务明细
|
||||
*/
|
||||
@Override
|
||||
public List<UsdtAggregationTaskItem> selectUsdtAggregationTaskItemList(UsdtAggregationTaskItem usdtAggregationTaskItem,boolean isUser)
|
||||
{
|
||||
if(usdtAggregationTaskItem == null){
|
||||
usdtAggregationTaskItem = new UsdtAggregationTaskItem();
|
||||
public List<UsdtAggregationTaskItem> selectUsdtAggregationTaskItemList(UsdtAggregationTaskItem usdtAggregationTaskItem, boolean isUser) {
|
||||
if (usdtAggregationTaskItem == null) {
|
||||
usdtAggregationTaskItem = new UsdtAggregationTaskItem();
|
||||
}
|
||||
if(isUser){
|
||||
if (isUser) {
|
||||
usdtAggregationTaskItem.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtAggregationTaskItem> list = usdtAggregationTaskItemMapper.selectUsdtAggregationTaskItemList(usdtAggregationTaskItem);
|
||||
if(isUser){
|
||||
if (isUser) {
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
@@ -218,11 +223,10 @@ public class UsdtAggregationTaskItemServiceImpl extends ServiceImpl<UsdtAggregat
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUsdtAggregationTaskItem(UsdtAggregationTaskItem usdtAggregationTaskItem,boolean isUser)
|
||||
{
|
||||
usdtAggregationTaskItem.setCreatedAt(DateUtils.getNowDate());
|
||||
usdtAggregationTaskItem.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
public int insertUsdtAggregationTaskItem(UsdtAggregationTaskItem usdtAggregationTaskItem, boolean isUser) {
|
||||
usdtAggregationTaskItem.setCreatedAt(DateUtils.getNowDate());
|
||||
usdtAggregationTaskItem.setUpdatedAt(DateUtils.getNowDate());
|
||||
if (isUser) {
|
||||
usdtAggregationTaskItem.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return usdtAggregationTaskItemMapper.insertUsdtAggregationTaskItem(usdtAggregationTaskItem);
|
||||
@@ -235,10 +239,9 @@ public class UsdtAggregationTaskItemServiceImpl extends ServiceImpl<UsdtAggregat
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUsdtAggregationTaskItem(UsdtAggregationTaskItem usdtAggregationTaskItem,boolean isUser)
|
||||
{
|
||||
public int updateUsdtAggregationTaskItem(UsdtAggregationTaskItem usdtAggregationTaskItem, boolean isUser) {
|
||||
usdtAggregationTaskItem.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
if (isUser) {
|
||||
checkUser(usdtAggregationTaskItem);
|
||||
}
|
||||
return usdtAggregationTaskItemMapper.updateUsdtAggregationTaskItem(usdtAggregationTaskItem);
|
||||
@@ -251,10 +254,9 @@ public class UsdtAggregationTaskItemServiceImpl extends ServiceImpl<UsdtAggregat
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtAggregationTaskItemByIds(Long[] ids,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
List<UsdtAggregationTaskItemPlus> list= getByIds(Arrays.asList(ids),false,UsdtAggregationTaskItemPlus::getUserId,UsdtAggregationTaskItemPlus::getId);
|
||||
public int deleteUsdtAggregationTaskItemByIds(Long[] ids, boolean isUser) {
|
||||
if (isUser) {
|
||||
List<UsdtAggregationTaskItemPlus> list = getByIds(Arrays.asList(ids), false, UsdtAggregationTaskItemPlus::getUserId, UsdtAggregationTaskItemPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return usdtAggregationTaskItemMapper.deleteUsdtAggregationTaskItemByIds(ids);
|
||||
@@ -267,10 +269,9 @@ public class UsdtAggregationTaskItemServiceImpl extends ServiceImpl<UsdtAggregat
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtAggregationTaskItemById(Long id,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
UsdtAggregationTaskItemPlus vo = getById(id,UsdtAggregationTaskItemPlus::getUserId,UsdtAggregationTaskItemPlus::getId);
|
||||
public int deleteUsdtAggregationTaskItemById(Long id, boolean isUser) {
|
||||
if (isUser) {
|
||||
UsdtAggregationTaskItemPlus vo = getById(id, UsdtAggregationTaskItemPlus::getUserId, UsdtAggregationTaskItemPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return usdtAggregationTaskItemMapper.deleteUsdtAggregationTaskItemById(id);
|
||||
|
||||
Reference in new issue
Block a user