This commit is contained in:
dute7liang
2024-01-20 02:20:47 +08:00
parent 6993f764b7
commit 4222b0c52c

View File

@@ -19,6 +19,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
/** /**
* 消费记录Service业务层处理 * 消费记录Service业务层处理
* *
@@ -57,6 +59,7 @@ public class ConsumeLogServiceImpl extends ServiceImpl<ConsumeLogMapper, Consume
boolean update = this.update(Wrappers.lambdaUpdate(ConsumeLog.class) boolean update = this.update(Wrappers.lambdaUpdate(ConsumeLog.class)
.eq(ConsumeLog::getId, id) .eq(ConsumeLog::getId, id)
.eq(ConsumeLog::getCalculateStatus, false) .eq(ConsumeLog::getCalculateStatus, false)
.set(ConsumeLog::getOpCreate, LocalDateTime.now())
.set(ConsumeLog::getCalculateStatus, true)); .set(ConsumeLog::getCalculateStatus, true));
if(update){ if(update){
consumer = calculateInitFenxiao(consumer); consumer = calculateInitFenxiao(consumer);