fix:用户足迹的处理sql已经在逻辑中处理好了数据问题,这这里的事务在特殊情况下会导致sql异常,将非必要的事务注解去除即可。

This commit is contained in:
Chopper711 2023-06-09 15:42:50 +08:00
parent f14875e679
commit 71061ad861
2 changed files with 0 additions and 4 deletions

View File

@ -3,7 +3,6 @@ package cn.lili.modules.member.mapper;
import cn.lili.modules.member.entity.dos.FootPrint; import cn.lili.modules.member.entity.dos.FootPrint;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Delete;
import org.springframework.transaction.annotation.Transactional;
/** /**
* 浏览历史数据处理层 * 浏览历史数据处理层
@ -17,7 +16,6 @@ public interface FootprintMapper extends BaseMapper<FootPrint> {
* *
* @param memberId 会员ID * @param memberId 会员ID
*/ */
@Transactional(rollbackFor = Exception.class)
@Delete("DELETE li_foot_print " + @Delete("DELETE li_foot_print " +
"FROM li_foot_print " + "FROM li_foot_print " +
"LEFT JOIN ( " + "LEFT JOIN ( " +

View File

@ -16,7 +16,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -39,7 +38,6 @@ public class FootprintServiceImpl extends ServiceImpl<FootprintMapper, FootPrint
private GoodsSkuService goodsSkuService; private GoodsSkuService goodsSkuService;
@Override @Override
@Transactional(rollbackFor = Exception.class)
public FootPrint saveFootprint(FootPrint footPrint) { public FootPrint saveFootprint(FootPrint footPrint) {
LambdaQueryWrapper<FootPrint> queryWrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<FootPrint> queryWrapper = Wrappers.lambdaQuery();
queryWrapper.eq(FootPrint::getMemberId, footPrint.getMemberId()); queryWrapper.eq(FootPrint::getMemberId, footPrint.getMemberId());