Prechádzať zdrojové kódy

微小虚拟支付广告金数据入库

hpk 4 mesiacov pred
rodič
commit
807cfcb2c5

+ 2 - 0
job-adq/src/main/java/cn/com/ctop/job/adq/data/mapper/AdqAdIncomeMapper.java

@@ -32,4 +32,6 @@ public interface AdqAdIncomeMapper {
     void insertAdqGameDiviceTransfer(@Param("list")ArrayList<JSONObject> reports);
 
     void insertAdqAdPosIncome(@Param("list")List<JSONObject> reports);
+
+    void insertVPAdFunds(ArrayList<JSONObject> reports);
 }

+ 9 - 0
job-adq/src/main/java/cn/com/ctop/job/adq/data/mapper/xml/AdqAdIncomeMapper.xml

@@ -155,6 +155,15 @@
             )
         </foreach>
     </insert>
+    <insert id="insertVPAdFunds">
+        replace INTO media_api.adq_vp_ad_fund
+        ( app_id,fund_id, settle_begin, settle_end, total_amount, remain_amount, expire_time, fund_type )
+        VALUES
+        <foreach collection="list" item="item" separator=",">
+            ( #{item.app_id}, #{item.fund_id}, #{item.settle_begin}, #{item.settle_end},#{item.total_amount},
+              #{item.remain_amount}, #{item.expire_time}, #{item.fund_type} )
+        </foreach>
+    </insert>
 
     <select id="queryAdqIaaMiniApp" resultType="com.alibaba.fastjson.JSONObject">
         select m.app_id,l.id applet_id

+ 3 - 3
job-adq/src/main/java/cn/com/ctop/job/adq/data/service/impl/AdqAdIncomeServiceImpl.java

@@ -716,9 +716,9 @@ public class AdqAdIncomeServiceImpl implements IAdqAdIncomeService {
                 insertErrorLog(isLog, System.currentTimeMillis(), "adq_query_adver_funds", startDt, endDt,
                         new JSONObject().fluentPut("app_id", appId).fluentPut("applet_id", appletId).fluentPut("prod_key", prodKey).fluentPut("msg", "返回为空").toJSONString());
             }
-            //if (!Check.isNull(reports)) {
-            //    adqAdIncomeMapper.insertVPAdFunds(reports);
-            //}
+            if (!Check.isNull(reports)) {
+                adqAdIncomeMapper.insertVPAdFunds(reports);
+            }
 
             if (totalPage > page) {
                 queryVPAdFunds(startDt, endDt, appId, appletId, prodKey, page + 1, isLog, errId, isSend);