|
@@ -1,6 +1,7 @@
|
|
package com.usky.dxtop.service.api;
|
|
package com.usky.dxtop.service.api;
|
|
|
|
|
|
|
|
|
|
|
|
+import java.util.Date;
|
|
import java.util.TreeMap;
|
|
import java.util.TreeMap;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -46,9 +47,14 @@ public class OneCardApi {
|
|
private static final String LOGS = String.format("%s/%s",URL,"partner/logs");
|
|
private static final String LOGS = String.format("%s/%s",URL,"partner/logs");
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 公用的请求参数
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
public static TreeMap<String, Object> getCommonParam(){
|
|
public static TreeMap<String, Object> getCommonParam(){
|
|
TreeMap<String, Object> tMap = new TreeMap<>();
|
|
TreeMap<String, Object> tMap = new TreeMap<>();
|
|
tMap.put("v",3);
|
|
tMap.put("v",3);
|
|
|
|
+ tMap.put("d",new Date());
|
|
tMap.put("shop",3);
|
|
tMap.put("shop",3);
|
|
tMap.put("term",3);
|
|
tMap.put("term",3);
|
|
tMap.put("oper",3);
|
|
tMap.put("oper",3);
|
|
@@ -58,7 +64,7 @@ public class OneCardApi {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 寻卡参数
|
|
* 寻卡参数
|
|
- * @param t
|
|
|
|
|
|
+ * @param t (11按卡号,21按唯一识别号,22 按姓名,23 按身份证号,24 按订餐手机号)
|
|
* @param q
|
|
* @param q
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -68,4 +74,188 @@ public class OneCardApi {
|
|
commonParam.put("q",q);
|
|
commonParam.put("q",q);
|
|
return commonParam;
|
|
return commonParam;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 读卡
|
|
|
|
+ * @param cid 物理卡号
|
|
|
|
+ * @param cno 交易卡面编码
|
|
|
|
+ * @param account 是否需要获取多账户信息:可选参数,如传值必须传入 all
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static TreeMap<String, Object> getReadCardParam(String cid,String cno,String account){
|
|
|
|
+ TreeMap<String, Object> commonParam = getCommonParam();
|
|
|
|
+ commonParam.put("cid",cid);
|
|
|
|
+ commonParam.put("cno",cno);
|
|
|
|
+ commonParam.put("account",account);
|
|
|
|
+ return commonParam;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 卡消费
|
|
|
|
+ * @param cid 物理卡号
|
|
|
|
+ * @param cno 交易卡面编码
|
|
|
|
+ * @param amt 交易金额
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static TreeMap<String, Object> getPayParam(String cid,String cno,Double amt,Long invoice){
|
|
|
|
+ TreeMap<String, Object> commonParam = getCommonParam();
|
|
|
|
+ commonParam.put("cid",cid);
|
|
|
|
+ commonParam.put("cno",cno);
|
|
|
|
+ commonParam.put("amt",amt);
|
|
|
|
+ commonParam.put("invoice",invoice);
|
|
|
|
+ return commonParam;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 卡充值撤销
|
|
|
|
+ * @param cid
|
|
|
|
+ * @param cno
|
|
|
|
+ * @param seq 编号
|
|
|
|
+ * @param amt 退还金额
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static TreeMap<String, Object> getUnPayParam(String cid,String cno,Long seq,Double amt){
|
|
|
|
+ TreeMap<String, Object> commonParam = getCommonParam();
|
|
|
|
+ commonParam.put("cid",cid);
|
|
|
|
+ commonParam.put("cno",cno);
|
|
|
|
+ commonParam.put("amt",amt);
|
|
|
|
+ commonParam.put("seq",seq);
|
|
|
|
+ return commonParam;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 卡充值
|
|
|
|
+ * @param cid
|
|
|
|
+ * @param cno
|
|
|
|
+ * @param amt 金额
|
|
|
|
+ * @param invoice
|
|
|
|
+ * @param cashbox 钱箱参数4支付表5微信
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static TreeMap<String, Object> getChargeParam(String cid,String cno,Double amt,Long invoice,Integer cashbox){
|
|
|
|
+ TreeMap<String, Object> commonParam = getCommonParam();
|
|
|
|
+ commonParam.put("cid",cid);
|
|
|
|
+ commonParam.put("cno",cno);
|
|
|
|
+ commonParam.put("amt",amt);
|
|
|
|
+ commonParam.put("cashbox",cashbox);
|
|
|
|
+ commonParam.put("invoice",invoice);
|
|
|
|
+ return commonParam;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 取消卡充值
|
|
|
|
+ * @param cid
|
|
|
|
+ * @param cno
|
|
|
|
+ * @param amt
|
|
|
|
+ * @param msg 取消原因
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static TreeMap<String, Object> getUnChargeParam(String cid,String cno,Double amt,String msg){
|
|
|
|
+ TreeMap<String, Object> commonParam = getCommonParam();
|
|
|
|
+ commonParam.put("cid",cid);
|
|
|
|
+ commonParam.put("cno",cno);
|
|
|
|
+ commonParam.put("amt",amt);
|
|
|
|
+ commonParam.put("cashbox",msg);
|
|
|
|
+ return commonParam;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 终端的充值,消费,撤单记录
|
|
|
|
+ * @param date 日期
|
|
|
|
+ * @param pi 页数
|
|
|
|
+ * @param ps 条数
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static TreeMap<String, Object> getReconciliationParam(Integer date,Integer pi,Integer ps){
|
|
|
|
+ TreeMap<String, Object> commonParam = getCommonParam();
|
|
|
|
+ commonParam.put("date",date);
|
|
|
|
+ commonParam.put("pi",pi);
|
|
|
|
+ commonParam.put("ps",ps);
|
|
|
|
+ return commonParam;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 卡日志查询
|
|
|
|
+ * @param t (1 查询卡消费日志(包含消费撤单日志),2 查询卡充值日志(包含充值撤单日志),3 查询卡消费和充值日志(包含消费和充值撤
|
|
|
|
+ * 单日志)4 查询卡事务日志(不含消费和充值的其它相
|
|
|
|
+ * 关日志))
|
|
|
|
+ * @param cid
|
|
|
|
+ * @param cno
|
|
|
|
+ * @param account
|
|
|
|
+ * @param pi
|
|
|
|
+ * @param ps
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static TreeMap<String, Object> getCardLogsParam(Integer t,String cid,String cno,Integer account,Integer pi,Integer ps){
|
|
|
|
+ TreeMap<String, Object> commonParam = getCommonParam();
|
|
|
|
+ commonParam.put("t",t);
|
|
|
|
+ commonParam.put("cid",cid);
|
|
|
|
+ commonParam.put("cno",cno);
|
|
|
|
+ commonParam.put("account",account);
|
|
|
|
+ commonParam.put("pi",pi);
|
|
|
|
+ commonParam.put("ps",ps);
|
|
|
|
+ return commonParam;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 日期查询卡消费日志
|
|
|
|
+ * @param t
|
|
|
|
+ * @param cid
|
|
|
|
+ * @param cno
|
|
|
|
+ * @param account
|
|
|
|
+ * @param sd
|
|
|
|
+ * @param ed
|
|
|
|
+ * @param pi
|
|
|
|
+ * @param ps
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static TreeMap<String, Object> getCardLogsByDateParam(Integer t,String cid,String cno,Integer account,
|
|
|
|
+ Date sd,Date ed
|
|
|
|
+ ,Integer pi,Integer ps){
|
|
|
|
+ TreeMap<String, Object> commonParam = getCardLogsParam(t, cid, cno, account, pi, ps);
|
|
|
|
+ commonParam.put("sd",sd);
|
|
|
|
+ commonParam.put("ed",ed);
|
|
|
|
+ return commonParam;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 全部日志
|
|
|
|
+ * @param t
|
|
|
|
+ * @param account
|
|
|
|
+ * @param sd
|
|
|
|
+ * @param ed
|
|
|
|
+ * @param pi
|
|
|
|
+ * @param ps
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static TreeMap<String, Object> getCardLogsByAllParam(Integer t,Integer account, Date sd,Date ed,Integer pi,Integer ps){
|
|
|
|
+ TreeMap<String, Object> commonParam = getCommonParam();
|
|
|
|
+ commonParam.put("t",t);
|
|
|
|
+ commonParam.put("account",account);
|
|
|
|
+ commonParam.put("pi",pi);
|
|
|
|
+ commonParam.put("ps",ps);
|
|
|
|
+ commonParam.put("sd",sd);
|
|
|
|
+ commonParam.put("ed",ed);
|
|
|
|
+ return commonParam;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 卡支付二维码
|
|
|
|
+ * @param cid
|
|
|
|
+ * @param timeOut
|
|
|
|
+ * @param unique
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static TreeMap<String, Object> getCardQrCodeParam(String cid,Integer timeOut,String unique){
|
|
|
|
+ TreeMap<String, Object> commonParam = getCommonParam();
|
|
|
|
+ commonParam.put("t",cid);
|
|
|
|
+ commonParam.put("account",timeOut);
|
|
|
|
+ commonParam.put("pi",unique);
|
|
|
|
+ return commonParam;
|
|
|
|
+ }
|
|
}
|
|
}
|