2 changed files with 63 additions and 0 deletions
@ -0,0 +1,30 @@ |
|||||
|
package cn.chjyj.szwh.service; |
||||
|
|
||||
|
import cn.chjyj.szwh.bean.UserAccountBill; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface UserAccountBillService { |
||||
|
/** |
||||
|
* 用户的账单明细 |
||||
|
* @param userisli |
||||
|
* @param page |
||||
|
* @return |
||||
|
*/ |
||||
|
List<UserAccountBill> getUserAccBill(String userisli, int page); |
||||
|
|
||||
|
/** |
||||
|
* 统计用户的交易总笔数 |
||||
|
* @param userisli |
||||
|
* @return |
||||
|
*/ |
||||
|
int countUserAccBill(String userisli); |
||||
|
|
||||
|
/** |
||||
|
* add new user bill |
||||
|
* @param userAccountBill |
||||
|
* @return |
||||
|
*/ |
||||
|
int addUserAccBill(UserAccountBill userAccountBill); |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
package cn.chjyj.szwh.service.impl; |
||||
|
|
||||
|
import cn.chjyj.szwh.bean.UserAccountBill; |
||||
|
import cn.chjyj.szwh.constant.ChConstant; |
||||
|
import cn.chjyj.szwh.mapper.UserAccountBillMapper; |
||||
|
import cn.chjyj.szwh.service.UserAccountBillService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class UserAccountBillServiceImpl implements UserAccountBillService { |
||||
|
@Autowired |
||||
|
private UserAccountBillMapper userAccountBillMapper; |
||||
|
@Override |
||||
|
public List<UserAccountBill> getUserAccBill(String userisli, int page) { |
||||
|
int startrs = page > 0 ? (page - 1) * ChConstant.PAGESIZE : 0; |
||||
|
return userAccountBillMapper.getUserAccBill(userisli,startrs,ChConstant.PAGESIZE); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public int countUserAccBill(String userisli) { |
||||
|
return userAccountBillMapper.countUserAccBill(userisli); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public int addUserAccBill(UserAccountBill userAccountBill) { |
||||
|
return userAccountBillMapper.addUserAccBill(userAccountBill); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue