1、WithMockLoginUser从Security上下文改为纯mock;2、更新资金管理service剥离真实h2db,采用纯mock;

This commit is contained in:
gaoqr
2026-01-20 14:44:20 +08:00
parent 77120e4d3e
commit 000561171a
13 changed files with 1034 additions and 1312 deletions
@@ -434,7 +434,7 @@ public class InvoiceServiceImpl implements InvoiceService {
* @return
*/
private List<PurchaseRecordDO> validatePurchaseRecordExists(List<Long> purchaseId) {
List<PurchaseRecordDO> purchaseRecordDOS = purchaseRecordMapper.selectBatchIds(purchaseId);
List<PurchaseRecordDO> purchaseRecordDOS = purchaseRecordMapper.selectByIds(purchaseId);
if (CollUtil.isEmpty(purchaseRecordDOS)) {
throw new ServiceException(PURCHASE_RECORD_NO_EXIST);
}
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.cf.imes.framework.common.exception.ServiceException;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.Assert.AssertUtils;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.query.LambdaUpdateWrapperX;
import com.cf.imes.module.system.controller.admin.funds.products.vo.product.ProductPageReqVO;
@@ -65,8 +64,6 @@ public class ProductsServiceImpl implements ProductsService {
if (ProductStatusEnum.PRODUCT_UPDATES.getStatus().equals(status) && !ProductStatusEnum.isProductDelis(updateReqVOStatus)) {
throw new ServiceException(PRODUCTS_NO_UPDATE);
}
ProductsDO productsDO = BeanUtils.toBean(updateReqVO, ProductsDO.class);
productsMapper.updateById(productsDO);
productsMapper.update(new LambdaUpdateWrapperX<ProductsDO>()
.eq(ProductsDO::getId, updateReqVOId)
.setIfPresent(ProductsDO::getProductName, productName)