|
|
@ -4,13 +4,13 @@ import au.com.royalpay.payment.manage.cashiers.beans.CashierQueryBean;
|
|
|
|
import au.com.royalpay.payment.manage.cashiers.core.CashierOrderService;
|
|
|
|
import au.com.royalpay.payment.manage.cashiers.core.CashierOrderService;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.cashiers.CashierMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.cashiers.CashierMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.cashiers.CashierOrderMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.cashiers.CashierOrderMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
|
|
|
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.Order;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.Order;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
|
@ -36,8 +36,10 @@ public class CashierOrderServiceImp implements CashierOrderService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public JSONObject listCashierOrders(String cashier_id, JSONObject partner, CashierQueryBean query) {
|
|
|
|
public JSONObject listCashierOrders(String cashier_id, JSONObject partner, CashierQueryBean query) {
|
|
|
|
JSONObject cashier = cashierMapper.findOne(cashier_id);
|
|
|
|
JSONObject cashier = cashierMapper.findIsValidById(cashier_id);
|
|
|
|
Assert.notNull(cashier, "cashier not found");
|
|
|
|
if (cashier == null) {
|
|
|
|
|
|
|
|
throw new BadRequestException("Cashier Not Found Or Disabled");
|
|
|
|
|
|
|
|
}
|
|
|
|
String timezone = partner.getJSONObject("client").getString("timezone");
|
|
|
|
String timezone = partner.getJSONObject("client").getString("timezone");
|
|
|
|
JSONObject params = query.params(timezone);
|
|
|
|
JSONObject params = query.params(timezone);
|
|
|
|
params.put("client_id", partner.getIntValue("client_id"));
|
|
|
|
params.put("client_id", partner.getIntValue("client_id"));
|
|
|
|