|
@@ -1,5 +1,6 @@
|
|
|
package com.fjhx.flow.service.flow.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -79,7 +80,16 @@ public class FlowExampleServiceImpl extends ServiceImpl<FlowExampleMapper, FlowE
|
|
|
|
|
|
@Override
|
|
|
public Page<FlowExampleVo> getHaveInitiatedPage(FlowExampleSelectDto dto) {
|
|
|
- IWrapper<FlowExample> wrapper = getWrapper().eq("fe", FlowExample::getCreateUser, SecurityUtils.getUserId());
|
|
|
+ IWrapper<FlowExample> wrapper = getWrapper()
|
|
|
+ .eq("fe", FlowExample::getCreateUser, SecurityUtils.getUserId())
|
|
|
+ .func(ObjectUtil.isNotNull(dto.getStatus()), q -> {
|
|
|
+ if (Objects.equals(1, dto.getStatus())) {
|
|
|
+ q.in("fe", FlowExample::getStatus, 0, 1);
|
|
|
+ } else {
|
|
|
+ q.in("fe", FlowExample::getStatus, 2, 3);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
return doSelectExample(dto, wrapper);
|
|
|
}
|
|
|
|