zepengdev
2025-06-04 e8109eee3549d43fc4de2fe4286e29a4152f824d
删除CreateBy、UpdateBy赋值
5 files modified
32 ■■■■ changed files
oying-system/src/main/java/com/oying/modules/pc/product/service/impl/ProductServiceImpl.java 2 ●●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreController.java 6 ●●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreCategoryServiceImpl.java 2 ●●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreQualificationServiceImpl.java 20 ●●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreServiceImpl.java 2 ●●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/pc/product/service/impl/ProductServiceImpl.java
@@ -46,7 +46,6 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void create(Product resources) {
        resources.setCreateBy(SecurityUtils.getCurrentUserId());
        productMapper.insert(resources);
    }
@@ -55,7 +54,6 @@
    public void update(Product resources) {
        Product product = getById(resources.getProductId());
        product.copy(resources);
        product.setUpdateBy(SecurityUtils.getCurrentUserId());
        productMapper.updateById(product);
    }
oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreController.java
@@ -25,12 +25,12 @@
    private final StoreService storeService;
    @GetMapping(value = "/page")
    public R<?> getStoresByPage(@RequestBody StoreQueryCriteria criteria) {
    public R<?> getStoresByPage(StoreQueryCriteria criteria) {
        return R.success(storeService.queryByPage(criteria));
    }
    @GetMapping(value = "/list")
    public R<?> getStores(@RequestBody StoreQueryCriteria criteria) {
    public R<?> getStores(StoreQueryCriteria criteria) {
        return R.success(storeService.queryAll(criteria));
    }
@@ -49,8 +49,6 @@
        Store store = new Store();
        store.setStoreId(StoreIdGenerator.getId());
        store.setMerchantId(SecurityUtils.getCurrentUserId());
        store.setCreateBy(SecurityUtils.getCurrentUserId());
        store.setCreateTime(ZonedDateTime.now());
        storeService.save(store);
        return R.success();
    }
oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreCategoryServiceImpl.java
@@ -47,7 +47,6 @@
    public void create(StoreCategory resources) {
        // 重名
        this.calculateAndSetLevel(resources);
        resources.setCreateBy(SecurityUtils.getCurrentUserId());
        storeCategoryMapper.insert(resources);
    }
@@ -56,7 +55,6 @@
    public void update(StoreCategory resources) {
        StoreCategory storeCategory = getById(resources.getCategoryId());
        storeCategory.copy(resources);
        resources.setUpdateBy(SecurityUtils.getCurrentUserId());
        storeCategoryMapper.updateById(storeCategory);
    }
oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreQualificationServiceImpl.java
@@ -1,23 +1,21 @@
package com.oying.modules.pc.store.service.impl;
import cn.hutool.core.util.ObjUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.oying.exception.EntityExistException;
import com.oying.modules.pc.common.id.StoreQualificationIdGenerator;
import com.oying.modules.pc.store.domain.StoreQualification;
import com.oying.modules.pc.store.domain.dto.StoreQualificationQueryCriteria;
import com.oying.modules.pc.store.mapper.StoreQualificationMapper;
import com.oying.modules.pc.store.service.StoreQualificationService;
import com.oying.utils.*;
import com.oying.utils.PageResult;
import com.oying.utils.PageUtil;
import lombok.RequiredArgsConstructor;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.ZonedDateTime;
import java.util.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Optional;
/**
* @description 服务实现
@@ -44,17 +42,11 @@
    @Transactional(rollbackFor = Exception.class)
    public void create(StoreQualification resources) {
        // resources.setQualificationId(StoreQualificationIdGenerator.getId());
        resources.setCreateBy(SecurityUtils.getCurrentUserId());
        resources.setCreateTime(ZonedDateTime.now());
        storeQualificationMapper.insert(resources);
    }
    @Override
    public void batchCreate(List<StoreQualification> resources) {
        resources.forEach(i-> {
            i.setCreateBy(SecurityUtils.getCurrentUserId());
            i.setCreateTime(ZonedDateTime.now());
        });
        this.saveBatch(resources);
    }
oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreServiceImpl.java
@@ -52,8 +52,6 @@
    @Override
    public boolean create(Store store) {
        // store.setStoreId(StoreIdGenerator.getId());
        store.setCreateBy(SecurityUtils.getCurrentUserId());
        store.setCreateTime(ZonedDateTime.now());
        return save(store);
    }