nili 4 months ago
parent
commit
2d64d01bbf
  1. 5
      game-service/src/main/java/awesome/group/game/service/citrus/UserService.java

5
game-service/src/main/java/awesome/group/game/service/citrus/UserService.java

@ -27,6 +27,7 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Collections;
import java.util.List; import java.util.List;
@Service @Service
@ -134,7 +135,9 @@ public class UserService {
public List<CashRecord> getCashRecord(Integer uid) { public List<CashRecord> getCashRecord(Integer uid) {
List<MatrixMoneyRecord> list = moneyRecordMapper.queryByUserId(uid); List<MatrixMoneyRecord> list = moneyRecordMapper.queryByUserId(uid);
return list.stream().map(CashRecord::new).toList(); List<CashRecord> res = new java.util.ArrayList<>(list.stream().map(CashRecord::new).toList());
Collections.reverse(res);
return res;
} }
public void applyMoney(Integer uid, Integer cent) { public void applyMoney(Integer uid, Integer cent) {

Loading…
Cancel
Save