|
|
@@ -9,6 +9,7 @@ import com.huifu.adapay.Adapay;
|
|
|
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
|
|
import com.huifu.adapay.model.*;
|
|
|
import com.izouma.nineth.dto.adapay.MemberInfo;
|
|
|
+import com.izouma.nineth.dto.adapay.SettleAccountsItem;
|
|
|
import com.izouma.nineth.utils.SnowflakeIdWorker;
|
|
|
import com.izouma.nineth.utils.excel.BigIntegerConverter;
|
|
|
import com.izouma.nineth.utils.excel.LocalDateConverter;
|
|
|
@@ -183,7 +184,7 @@ public class AdapayTest {
|
|
|
JSONArray list = new JSONArray();
|
|
|
paymentParams.put("page_index", ++page);
|
|
|
Map<String, Object> paymentList = Payment.queryList(paymentParams);
|
|
|
- System.out.println(JSON.toJSONString(paymentList,SerializerFeature.PrettyFormat));
|
|
|
+ System.out.println(JSON.toJSONString(paymentList, SerializerFeature.PrettyFormat));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
@@ -250,5 +251,23 @@ public class AdapayTest {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Test
|
|
|
+ public void delSettleAccount() throws BaseAdaPayException {
|
|
|
+ String memberId = "test0301";
|
|
|
+ Map<String, Object> memberParams = new HashMap<>();
|
|
|
+ memberParams.put("member_id", memberId);
|
|
|
+ memberParams.put("app_id", appId);
|
|
|
+ Map<String, Object> member = Member.query(memberParams);
|
|
|
+ MemberInfo memberInfo = JSON.parseObject(JSON.toJSONString(member), MemberInfo.class);
|
|
|
+ if (memberInfo.getSettleAccounts() != null && memberInfo.getSettleAccounts().size() > 0) {
|
|
|
+ SettleAccountsItem settleAccountsItem = memberInfo.getSettleAccounts().get(0);
|
|
|
+ Map<String, Object> settleCountParams = new HashMap<>();
|
|
|
+ settleCountParams.put("settle_account_id", settleAccountsItem.getId());
|
|
|
+ settleCountParams.put("member_id", memberId);
|
|
|
+ settleCountParams.put("app_id", appId);
|
|
|
+ Map<String, Object> settleCount = SettleAccount.delete(settleCountParams);
|
|
|
+ System.out.println(JSON.toJSONString(settleCount, SerializerFeature.PrettyFormat));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|