修正插入购买记录时使用正确的SQL日期函数
在`BuyMapper.xml`中,插入购买记录的SQL语句使用了错误的日期函数。现已修正,使用`now()`替代`new()`,以确保在插入记录时能够正确获取当前日期和时间。master
parent
7b4e960de9
commit
5839d305d9
|
@ -45,11 +45,6 @@ public class BuyServiceImpl extends ServiceImpl<BuyMapper, Connector> implements
|
|||
if (i>0){
|
||||
user.setUserBalance(user.getUserBalance()-connectorUser.getConnectorFrequency()*connectorUser.getConnectorPrice());
|
||||
buyMapper.buyPrice(user);
|
||||
ConnectorLog connectorLog = new ConnectorLog();
|
||||
connectorLog.setDataName(connectorUser.getConnectorName());
|
||||
connectorLog.setAmount(connectorUser.getConnectorPrice());
|
||||
// 插入购买记录
|
||||
buyMapper.insertPurchaseRecord(connectorLog);
|
||||
return Result.success(i,"购买成功");
|
||||
}
|
||||
ConnectorUser connectorUser1 = buyMapper.selectConnectorUser(connectorUser);
|
||||
|
|
Loading…
Reference in New Issue