|
@@ -4,6 +4,7 @@ package org.springblade.manager.controller;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
@@ -165,6 +166,7 @@ public class WbsTreeSynchronousRecordController {
|
|
|
public R<List<WbsTreeSynchronousRecordDTO>> querySyncRecord(@RequestParam Long projectId) {
|
|
|
List<WbsTreeSynchronousRecord> list = this.mWbsTreeSynchronousRecordService.list(new QueryWrapper<WbsTreeSynchronousRecord>().lambda()
|
|
|
.eq(WbsTreeSynchronousRecord::getProjectId, projectId)
|
|
|
+ .eq(WbsTreeSynchronousRecord::getIsDeleted, 0)
|
|
|
.ne(WbsTreeSynchronousRecord::getStatus, 2)
|
|
|
);
|
|
|
List<WbsTreeSynchronousRecordDTO> wbsTreeSynchronousRecordDTOS = BeanUtil.copyProperties(list, WbsTreeSynchronousRecordDTO.class);
|
|
@@ -183,5 +185,30 @@ public class WbsTreeSynchronousRecordController {
|
|
|
});
|
|
|
return R.data(wbsTreeSynchronousRecordDTOS);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除接口
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "删除接口")
|
|
|
+ @GetMapping("delete")
|
|
|
+ public R<Boolean> delete(@RequestParam Long id) {
|
|
|
+ return R.data(this.mWbsTreeSynchronousRecordService.update(Wrappers.<WbsTreeSynchronousRecord>update().lambda()
|
|
|
+ .set(WbsTreeSynchronousRecord::getIsDeleted, 1)
|
|
|
+ .eq(WbsTreeSynchronousRecord::getId, id)
|
|
|
+ ));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 重刷接口
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "重刷接口")
|
|
|
+ @GetMapping("reFlush")
|
|
|
+ public R<Boolean> reFlush(@RequestParam Long id) {
|
|
|
+ return R.data(this.mWbsTreeSynchronousRecordService.update(Wrappers.<WbsTreeSynchronousRecord>update().lambda()
|
|
|
+ .set(WbsTreeSynchronousRecord::getStatus, 0)
|
|
|
+ .eq(WbsTreeSynchronousRecord::getId, id)
|
|
|
+ ));
|
|
|
+ }
|
|
|
}
|
|
|
|