库管员机具关联优化
This commit is contained in:
parent
6079c91a89
commit
08b66ff0fd
|
|
@ -7,6 +7,7 @@ import org.springframework.stereotype.Service;
|
||||||
import com.bonus.material.ma.mapper.TypeKeeperMapper;
|
import com.bonus.material.ma.mapper.TypeKeeperMapper;
|
||||||
import com.bonus.material.ma.domain.TypeKeeper;
|
import com.bonus.material.ma.domain.TypeKeeper;
|
||||||
import com.bonus.material.ma.service.ITypeKeeperService;
|
import com.bonus.material.ma.service.ITypeKeeperService;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库管员配置Service业务层处理
|
* 库管员配置Service业务层处理
|
||||||
|
|
@ -59,7 +60,11 @@ public class TypeKeeperServiceImpl implements ITypeKeeperService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertTypeKeeper(List<TypeKeeper> typeKeepers) {
|
public int insertTypeKeeper(List<TypeKeeper> typeKeepers) {
|
||||||
|
if (CollectionUtils.isEmpty(typeKeepers)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
typeKeepers.forEach(typeKeeper -> typeKeeper.setCreateTime(DateUtils.getNowDate()));
|
typeKeepers.forEach(typeKeeper -> typeKeeper.setCreateTime(DateUtils.getNowDate()));
|
||||||
|
typeKeeperMapper.deleteTypeKeeperByUserIdAndTypeId(typeKeepers);
|
||||||
return typeKeeperMapper.insertTypeKeeper(typeKeepers);
|
return typeKeeperMapper.insertTypeKeeper(typeKeepers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -106,6 +111,9 @@ public class TypeKeeperServiceImpl implements ITypeKeeperService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteTypeKeeperByUserIdAndTypeId(List<TypeKeeper> typeKeepers) {
|
public int deleteTypeKeeperByUserIdAndTypeId(List<TypeKeeper> typeKeepers) {
|
||||||
|
if (CollectionUtils.isEmpty(typeKeepers)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return typeKeeperMapper.deleteTypeKeeperByUserIdAndTypeId(typeKeepers);
|
return typeKeeperMapper.deleteTypeKeeperByUserIdAndTypeId(typeKeepers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue