-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBalanceSvcImpl.java
More file actions
69 lines (58 loc) · 1.76 KB
/
Copy pathBalanceSvcImpl.java
File metadata and controls
69 lines (58 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package deep.zero.svc;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import deep.zero.bean.Balance;
import deep.zero.repo.BalanceRepo;
@Service()
@Transactional(readOnly=true)
public class BalanceSvcImpl implements BalanceSvc{
@Autowired
private BalanceRepo br;
//// 创建账户
// public void save(Balance balance){
// br.save(balance);
// }
// 从银行到账户
public void BankToAccount(Balance balance,String accountId){
// 调银联接口=========================================
br.save(balance);
}
// free账户到G账户或是G账户到free账户
@Transactional
public void add(Balance fromBalance,Balance toBalance) {
br.save(fromBalance);
br.save(toBalance);
}
// 账户余额
public BigDecimal freeAccount(Long playerId,Long accId){
return br.freeAccount(playerId,accId);
}
//// G余额
// public BigDecimal GAccount(Long playerId,Long accId){
// return br.GAccount(playerId,accId);
// }
// 总余额
public BigDecimal ALLAcount(Long playerId,Long accId){
return br.ALLAcount(playerId, accId);
}
// 明细
public List<Balance> getListAccount(){
return null;
}
//提现
public void AccountToBank(Balance balance,String accountId) {
// 调银联接口=========================================
br.save(balance);
}
//查询所有
public List<Balance> findAll(){
return br.findAll();
}
public List<Balance> findFreeBalanceByAccountId(Long accountId,Date weekStartTime, Date weekEndTime) {
return br.findFreeBalanceByPlayerId(accountId,weekStartTime,weekEndTime);
}
}