各个标准service接口增加通过编号查查询queryByStandardNumber方法
This commit is contained in:
+5
@@ -10,4 +10,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface EnterpriseStandardService extends IService<LawsEnterpriseStandard> {
|
||||
|
||||
/**
|
||||
* 通过编号查查询
|
||||
*/
|
||||
LawsEnterpriseStandard queryByStandardNumber(String standardNumber);
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -73,4 +73,9 @@ public interface ILawsDomesticStandardService extends IService<LawsDomesticStand
|
||||
* @return
|
||||
*/
|
||||
LawsDomesticStandard queryById(String id);
|
||||
|
||||
/**
|
||||
* 通过编号查查询
|
||||
*/
|
||||
LawsDomesticStandard queryByStandardNumber(String standardNumber);
|
||||
}
|
||||
|
||||
+5
@@ -73,4 +73,9 @@ public interface ILawsOverseasStandardService extends IService<LawsOverseasStand
|
||||
* @return
|
||||
*/
|
||||
LawsOverseasStandard queryById(String id);
|
||||
|
||||
/**
|
||||
* 通过编号查查询
|
||||
*/
|
||||
LawsOverseasStandard queryByStandardNumber(String standardNumber);
|
||||
}
|
||||
|
||||
+14
@@ -1,9 +1,12 @@
|
||||
package com.jero.modules.laws.standard.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
|
||||
import com.jero.modules.laws.standard.service.EnterpriseStandardService;
|
||||
import com.jero.modules.laws.standard.mapper.LawsEnterpriseStandardMapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@@ -15,6 +18,17 @@ import org.springframework.stereotype.Service;
|
||||
public class EnterpriseStandardServiceImpl extends ServiceImpl<LawsEnterpriseStandardMapper, LawsEnterpriseStandard>
|
||||
implements EnterpriseStandardService{
|
||||
|
||||
@Override
|
||||
public LawsEnterpriseStandard queryByStandardNumber(String standardNumber) {
|
||||
if (StringUtils.isBlank(standardNumber)){
|
||||
return null;
|
||||
}
|
||||
LambdaQueryWrapper<LawsEnterpriseStandard> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.like(LawsEnterpriseStandard::getStandardNumber, standardNumber);
|
||||
wrapper.eq(LawsEnterpriseStandard::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
|
||||
wrapper.last("limit 1");
|
||||
return getOne(wrapper);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+15
@@ -1,10 +1,13 @@
|
||||
package com.jero.modules.laws.standard.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
|
||||
import com.jero.modules.laws.standard.mapper.LawsDomesticStandardMapper;
|
||||
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
|
||||
import com.jero.modules.personal.service.ILawsStandardCollectionService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -123,4 +126,16 @@ public class LawsDomesticStandardServiceImpl extends ServiceImpl<LawsDomesticSta
|
||||
public LawsDomesticStandard queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LawsDomesticStandard queryByStandardNumber(String standardNumber) {
|
||||
if (StringUtils.isBlank(standardNumber)){
|
||||
return null;
|
||||
}
|
||||
LambdaQueryWrapper<LawsDomesticStandard> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.like(LawsDomesticStandard::getStandardNumber, standardNumber);
|
||||
wrapper.eq(LawsDomesticStandard::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
|
||||
wrapper.last("limit 1");
|
||||
return getOne(wrapper);
|
||||
}
|
||||
}
|
||||
|
||||
+15
@@ -1,10 +1,13 @@
|
||||
package com.jero.modules.laws.standard.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.modules.laws.standard.entity.LawsOverseasStandard;
|
||||
import com.jero.modules.laws.standard.mapper.LawsOverseasStandardMapper;
|
||||
import com.jero.modules.laws.standard.service.ILawsOverseasStandardService;
|
||||
import com.jero.modules.personal.service.ILawsStandardCollectionService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -123,4 +126,16 @@ public class LawsOverseasStandardServiceImpl extends ServiceImpl<LawsOverseasSta
|
||||
public LawsOverseasStandard queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LawsOverseasStandard queryByStandardNumber(String standardNumber) {
|
||||
if (StringUtils.isBlank(standardNumber)){
|
||||
return null;
|
||||
}
|
||||
LambdaQueryWrapper<LawsOverseasStandard> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.like(LawsOverseasStandard::getStandardNumber, standardNumber);
|
||||
wrapper.eq(LawsOverseasStandard::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
|
||||
wrapper.last("limit 1");
|
||||
return getOne(wrapper);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user