mapper冲突解决
This commit is contained in:
1 parent
247d38b34b
commit
1c01a2fa09
2 files changed
+11
-12
No files matched your search
+4
-5
@@ -1,14 +1,13 @@
|
||||
package cn.iocoder.yudao.module.product.dal.mysql.device;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.product.api.device.dto.DeviceRespDto;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.device.vo.DevicePageReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.device.DeviceDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.device.vo.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 贩卖机信息 Mapper
|
||||
|
||||
+7
-7
@@ -27,13 +27,13 @@ import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.*;
|
||||
public class ProductDeviceLogServiceImpl implements ProductDeviceLogService {
|
||||
|
||||
@Resource
|
||||
private ProductDeviceLogMapper deviceLogMapper;
|
||||
private ProductDeviceLogMapper productDeviceLogMapper;
|
||||
|
||||
@Override
|
||||
public Long createDeviceLog(ProductDeviceLogSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ProductDeviceLogDO deviceLog = BeanUtils.toBean(createReqVO, ProductDeviceLogDO.class);
|
||||
deviceLogMapper.insert(deviceLog);
|
||||
productDeviceLogMapper.insert(deviceLog);
|
||||
// 返回
|
||||
return deviceLog.getId();
|
||||
}
|
||||
@@ -44,7 +44,7 @@ public class ProductDeviceLogServiceImpl implements ProductDeviceLogService {
|
||||
validateDeviceLogExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ProductDeviceLogDO updateObj = BeanUtils.toBean(updateReqVO, ProductDeviceLogDO.class);
|
||||
deviceLogMapper.updateById(updateObj);
|
||||
productDeviceLogMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -52,23 +52,23 @@ public class ProductDeviceLogServiceImpl implements ProductDeviceLogService {
|
||||
// 校验存在
|
||||
validateDeviceLogExists(id);
|
||||
// 删除
|
||||
deviceLogMapper.deleteById(id);
|
||||
productDeviceLogMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateDeviceLogExists(Long id) {
|
||||
if (deviceLogMapper.selectById(id) == null) {
|
||||
if (productDeviceLogMapper.selectById(id) == null) {
|
||||
throw exception(DEVICE_LOG_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductDeviceLogDO getDeviceLog(Long id) {
|
||||
return deviceLogMapper.selectById(id);
|
||||
return productDeviceLogMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProductDeviceLogDO> getDeviceLogPage(ProductDeviceLogPageReqVO pageReqVO) {
|
||||
return deviceLogMapper.selectPage(pageReqVO);
|
||||
return productDeviceLogMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user