依赖注入不可少:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
1、在业务代码中完成编码操作,如完成service编码实现:
/**
* 根据审批流程ID获取工服管理数据
* @Date 2020/10/30 14:09
* @Author dhf
* @param [flowId] 审批流程ID
* @return BizApplyUniform (流程ID为空或查不到未删除的工服数据,返回null)
**/
public BizApplyUniform getApplyUniformByFlowId(String flowId) {
LambdaQueryWrapper<BizApplyUniform> wrapper = new QueryWrapper<BizApplyUniform>().lambda();
// 未删除
wrapper.eq(BizApplyUniform::getIsDelete, 0);
// 流程ID不可为空
if (StringUtils.isNotBlank(flowId)) {
wrapper.eq(BizApplyUniform::getFlowId, flowId);
} else {
return null;
}
return baseMapper.selectOne(wrapper);
}