|
@@ -8,7 +8,9 @@ import com.fjhx.flow.entity.flow.po.FlowInfo;
|
|
|
import com.fjhx.flow.entity.flow.vo.FlowInfoVo;
|
|
|
import com.fjhx.flow.mapper.flow.FlowInfoMapper;
|
|
|
import com.fjhx.flow.service.flow.FlowInfoService;
|
|
|
+import com.ruoyi.common.constant.StatusConstant;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
+import com.ruoyi.common.utils.wrapper.SqlField;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
@@ -24,13 +26,18 @@ import org.springframework.stereotype.Service;
|
|
|
public class FlowInfoServiceImpl extends ServiceImpl<FlowInfoMapper, FlowInfo> implements FlowInfoService {
|
|
|
|
|
|
public Page<FlowInfoVo> getPage(FlowInfoSelectDto dto) {
|
|
|
+
|
|
|
IWrapper<FlowInfo> wrapper = getWrapper();
|
|
|
+ wrapper.eq("fi", FlowInfo::getClassifyName, dto.getClassifyName());
|
|
|
+ wrapper.keyword(dto, new SqlField("fi", FlowInfo::getFlowName), new SqlField("fi", FlowInfo::getFlowKey));
|
|
|
wrapper.orderByDesc("fi", FlowInfo::getId);
|
|
|
- Page<FlowInfoVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
- return page;
|
|
|
+
|
|
|
+ return this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
}
|
|
|
|
|
|
public void add(FlowInfoDto flowInfoDto) {
|
|
|
+ nameDuplication(FlowInfo::getFlowKey, flowInfoDto.getFlowKey(), "流程标识已存在");
|
|
|
+ flowInfoDto.setStatus(StatusConstant.ENABLE);
|
|
|
this.save(flowInfoDto);
|
|
|
}
|
|
|
|
|
@@ -39,8 +46,4 @@ public class FlowInfoServiceImpl extends ServiceImpl<FlowInfoMapper, FlowInfo> i
|
|
|
this.updateById(flowInfoDto);
|
|
|
}
|
|
|
|
|
|
- public void delete(Long id) {
|
|
|
- this.removeById(id);
|
|
|
- }
|
|
|
-
|
|
|
}
|