zepengdev
2025-08-29 38213237cc11c9bd3f11b0fa69c56ef663049a4b
oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreServiceImpl.java
@@ -1,6 +1,7 @@
package com.oying.modules.pc.store.service.impl;
import cn.hutool.core.util.ObjUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -167,10 +168,16 @@
    }
    @Override
    public boolean updateAddress(Long storeId, String address, Long version) {
    public boolean updateAddress(Long storeId, String address, Double longitude, Double latitude, Long version) {
        Store existingStore = this.getOrThrow(storeId, version);
        LambdaUpdateWrapper<Store> wrapper = this.createLambdaUpdateWrapper(storeId, existingStore.getVersion())
                .set(Store::getAddress, address);
        if (ObjectUtil.isNotEmpty(longitude)) {
            wrapper.set(Store::getLongitude, longitude);
        }
        if (ObjectUtil.isNotEmpty(latitude)) {
            wrapper.set(Store::getLatitude, latitude);
        }
        return update(wrapper);
    }
@@ -225,6 +232,14 @@
    }
    @Override
    public boolean updatePackagingFee(Long storeId, BigDecimal packagingFee, Long version) {
        Store existingStore = this.getOrThrow(storeId, version);
        LambdaUpdateWrapper<Store> wrapper = this.createLambdaUpdateWrapper(storeId, existingStore.getVersion())
                .set(Store::getPackagingFee, packagingFee);
        return update(wrapper);
    }
    @Override
    public boolean updateStatus(Long storeId, Integer status, Long version) {
        Store existingStore = this.getOrThrow(storeId, version);
        LambdaUpdateWrapper<Store> wrapper = this.createLambdaUpdateWrapper(storeId, existingStore.getVersion())