commit
d5bbf8e0be
@ -0,0 +1,67 @@
|
||||
package au.com.royalpay.payment.manage.ofei.bean;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* Created by wangning on 2018/1/3.
|
||||
*/
|
||||
public class PhoneTopUpQuery {
|
||||
|
||||
private String status;
|
||||
|
||||
private int amount;
|
||||
|
||||
private String phone;
|
||||
|
||||
private int page = 1;
|
||||
|
||||
private int limit = 10;
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public int getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setLimit(int limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public JSONObject toParam(){
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("status",this.status);
|
||||
param.put("amount",this.amount);
|
||||
param.put("customer_number",this.phone);
|
||||
return param;
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package au.com.royalpay.payment.manage.ofei.core;
|
||||
|
||||
import au.com.royalpay.payment.manage.ofei.bean.PhoneTopUpQuery;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
|
||||
/**
|
||||
* Created by wangning on 2018/1/3.
|
||||
*/
|
||||
public interface PhoneTopUpService {
|
||||
|
||||
JSONObject listPageable(PhoneTopUpQuery phoneTopUpQuery);
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package au.com.royalpay.payment.manage.ofei.core.impl;
|
||||
|
||||
import au.com.royalpay.payment.manage.mappers.ofei.TopUpOrderMapper;
|
||||
import au.com.royalpay.payment.manage.ofei.bean.PhoneTopUpQuery;
|
||||
import au.com.royalpay.payment.manage.ofei.core.PhoneTopUpService;
|
||||
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.Order;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* Created by wangning on 2018/1/3.
|
||||
*/
|
||||
@Service
|
||||
public class PhoneTopUpServieImpl implements PhoneTopUpService {
|
||||
@Resource
|
||||
private TopUpOrderMapper topUpOrderMapper;
|
||||
@Override
|
||||
public JSONObject listPageable(PhoneTopUpQuery phoneTopUpQuery) {
|
||||
PageList<JSONObject> topUpOrders = topUpOrderMapper.listPageable(phoneTopUpQuery.toParam(),new PageBounds(phoneTopUpQuery.getPage(), phoneTopUpQuery.getLimit(), Order.formString("create_time.desc")));
|
||||
return PageListUtils.buildPageListResult(topUpOrders);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue