|
|
|
@ -4,6 +4,7 @@ import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect;
|
|
|
|
|
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
|
|
|
|
|
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
|
|
|
|
|
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
|
|
|
|
|
import cn.yixblog.support.mybatis.paginator.annotations.CountRef;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
|
|
|
@ -22,45 +23,29 @@ public interface TransactionMapper {
|
|
|
|
|
@AutoSql(type = SqlType.INSERT)
|
|
|
|
|
void save(JSONObject transaction);
|
|
|
|
|
|
|
|
|
|
@CountRef(".countTransFlowPage")
|
|
|
|
|
PageList<JSONObject> listTransFlowPage(JSONObject params, PageBounds pagination);
|
|
|
|
|
|
|
|
|
|
int countTransFlowPage(JSONObject params);
|
|
|
|
|
|
|
|
|
|
List<JSONObject> listTransFlow(JSONObject params);
|
|
|
|
|
|
|
|
|
|
JSONObject analysisTransFlow(JSONObject params);
|
|
|
|
|
|
|
|
|
|
Double analysisBalance(JSONObject params);
|
|
|
|
|
|
|
|
|
|
@AutoSql(type = SqlType.SELECT)
|
|
|
|
|
JSONObject findTransById(@Param("transaction_id") String transactionId);
|
|
|
|
|
|
|
|
|
|
@AutoSql(type = SqlType.SELECT)
|
|
|
|
|
@AdvanceSelect(addonWhereClause = "refund_id is null and system_generate=0 and transaction_type = 'Credit'")
|
|
|
|
|
JSONObject findIncomeByOrderId(@Param("order_id") String orderId);
|
|
|
|
|
|
|
|
|
|
@AutoSql(type = SqlType.SELECT)
|
|
|
|
|
@AdvanceSelect(addonWhereClause = "transaction_type = 'Credit'")
|
|
|
|
|
JSONObject findByOrderId(@Param("order_id") String orderId);
|
|
|
|
|
|
|
|
|
|
@AutoSql(type = SqlType.SELECT)
|
|
|
|
|
@AdvanceSelect(addonWhereClause = "refund_id is null and system_generate=1")
|
|
|
|
|
JSONObject findSystemIncomeByOrderId(@Param("order_id") String orderId);
|
|
|
|
|
|
|
|
|
|
@AutoSql(type = SqlType.UPDATE)
|
|
|
|
|
void update(JSONObject transaction);
|
|
|
|
|
|
|
|
|
|
@AutoSql(type = SqlType.SELECT)
|
|
|
|
|
@AdvanceSelect(addonWhereClause = "transaction_type='Debit' and system_generate = 0")
|
|
|
|
|
JSONObject findRefundLog(@Param("order_id") String orderId, @Param("refund_id") String refundId);
|
|
|
|
|
|
|
|
|
|
@AutoSql(type = SqlType.SELECT)
|
|
|
|
|
@AdvanceSelect(addonWhereClause = "transaction_type='Credit'")
|
|
|
|
|
JSONObject findRefundPayback(@Param("order_id") String orderId, @Param("refund_id") String refundId);
|
|
|
|
|
|
|
|
|
|
JSONObject findLastIncome();
|
|
|
|
|
|
|
|
|
|
double getClientUnClearedAmount(@Param("client_id") int clientId);
|
|
|
|
|
|
|
|
|
|
List<JSONObject> getClientsUnClearedAmount(@Param("client_ids") List<Integer> client_ids);
|
|
|
|
|
List<JSONObject> getClientsUnClearedAmount(@Param("client_ids") List<Integer> clientIds);
|
|
|
|
|
|
|
|
|
|
JSONObject getClientAmountAnalysis(JSONObject params);
|
|
|
|
|
|
|
|
|
@ -76,8 +61,11 @@ public interface TransactionMapper {
|
|
|
|
|
|
|
|
|
|
PageList<JSONObject> listSettlementLog(JSONObject params, PageBounds pagination);
|
|
|
|
|
|
|
|
|
|
@CountRef(".countSettlementLogInClients")
|
|
|
|
|
PageList<JSONObject> listSettlementLogInClients(JSONObject params, PageBounds pagination);
|
|
|
|
|
|
|
|
|
|
int countSettlementLogInClients(JSONObject params);
|
|
|
|
|
|
|
|
|
|
JSONObject analysisSettlementLog(JSONObject params);
|
|
|
|
|
|
|
|
|
|
List<JSONObject> listSettlementLogTotal(JSONObject params);
|
|
|
|
@ -98,11 +86,11 @@ public interface TransactionMapper {
|
|
|
|
|
|
|
|
|
|
List<JSONObject> listTransactionsForBDPrize(@Param("year") int year, @Param("month") int month, @Param("channel") String channel);
|
|
|
|
|
|
|
|
|
|
BigDecimal TotalAmountForBDPrize(@Param("year") int year, @Param("month") int month, @Param("bd_id") String bd_id);
|
|
|
|
|
BigDecimal totalAmountForBDPrize(@Param("year") int year, @Param("month") int month, @Param("bd_id") String bd_id);
|
|
|
|
|
|
|
|
|
|
BigDecimal TotalAmountForBDLeaderPrize(@Param("year") int year, @Param("month") int month, @Param("bd_group") String bd_group);
|
|
|
|
|
BigDecimal totalAmountForBDLeaderPrize(@Param("year") int year, @Param("month") int month, @Param("bd_group") String bd_group);
|
|
|
|
|
|
|
|
|
|
BigDecimal TotalAmountForSydneyGMPrize(@Param("year") int year, @Param("month") int month);
|
|
|
|
|
BigDecimal totalAmountForSydneyGMPrize(@Param("year") int year, @Param("month") int month);
|
|
|
|
|
|
|
|
|
|
List<JSONObject> listTransactionForCityPartnerCommissionByDate(@Param("year") int year, @Param("month") int month);
|
|
|
|
|
|
|
|
|
@ -118,7 +106,7 @@ public interface TransactionMapper {
|
|
|
|
|
|
|
|
|
|
@AutoSql(type = SqlType.COUNT)
|
|
|
|
|
@AdvanceSelect(addonWhereClause = "transaction_type='Credit'")
|
|
|
|
|
int countOrders(@Param("client_id") int client_id);
|
|
|
|
|
int countOrders(@Param("client_id") int clientId);
|
|
|
|
|
|
|
|
|
|
List<JSONObject> listDailyTransactions(@Param("from") Date from, @Param("to") Date to, @Param("dev_id") String devId, @Param("client_id") int clientId, @Param("client_ids") String[] client_ids);
|
|
|
|
|
|
|
|
|
@ -128,16 +116,8 @@ public interface TransactionMapper {
|
|
|
|
|
@AdvanceSelect(addonWhereClause = "system_generate=1")
|
|
|
|
|
List<JSONObject> findTransactionsBySysGen(@Param("order_id") String orderId);
|
|
|
|
|
|
|
|
|
|
@AutoSql(type = SqlType.SELECT)
|
|
|
|
|
List<JSONObject> findFixTransaction(@Param("order_id") String orderId, @Param("refund_id") String refundId, @Param("system_transaction_id") String systemTransactionId);
|
|
|
|
|
|
|
|
|
|
BigDecimal analysisCustomerPaid(@Param("customer_id") String customerId, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
|
|
|
|
|
|
|
|
|
|
@AutoSql(type = SqlType.UPDATE)
|
|
|
|
|
void updateTransactionSurcharge(@Param("transaction_id") String transactionId, @Param("surcharge_rate") BigDecimal surchargeRate,
|
|
|
|
|
@Param("settle_amount") BigDecimal settleAmount, @Param("total_surcharge") BigDecimal surcharge,
|
|
|
|
|
@Param("channel_surcharge") BigDecimal channelSurcharge, @Param("royal_surcharge") BigDecimal royalSurcharge);
|
|
|
|
|
|
|
|
|
|
List<JSONObject> getSettleDelayAnalysis(@Param("begin") Date begin, @Param("end") Date end);
|
|
|
|
|
|
|
|
|
|
List<JSONObject> getSettleDelayTotalTransaction(@Param("begin") Date begin, @Param("end") Date end);
|
|
|
|
|