ソースを参照

fix:修复agent 渠道删除时ditch同步处理问题

hidewnd 13 時間 前
コミット
ffb663944a

+ 2 - 0
yt-agent/agent-service/src/main/java/com/ytpm/service/impl/AgentAppServiceImpl.java

@@ -38,6 +38,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.Objects;
 import java.util.UUID;
@@ -124,6 +125,7 @@ public class AgentAppServiceImpl implements AgentAppService {
             app.setAppId(IdUtil.fastSimpleUUID());
             app.setUserId(userId);
             app.setEnabled(1);
+            app.setCreateTime(new Date());
             appMapper.insertOne(app);
             //新增APP时要生成 app_default_config
             generateDefaultConfig(param,app);

+ 50 - 6
yt-agent/agent-service/src/main/resources/mapper/AppMapper.xml

@@ -27,7 +27,8 @@
          ditch_id,
          ditch_name,
          superior_id,
-         enabled
+         enabled,
+         create_time
         )
         values
         (
@@ -53,7 +54,8 @@
          #{ditchId},
          #{ditchName},
          #{superiorId},
-         #{enabled}
+         #{enabled},
+         #{createTime}
         )
     </insert>
     <update id="updateOne">
@@ -156,15 +158,57 @@
         where app_id = #{appId}
     </select>
     <select id="queryAll" resultType="com.ytpm.agent.model.YtApp">
-        select
-            app_id, ditch_id, ditch_name, app_key, app_name, user_id, app_type, apk_url, qr_code, version_code, update_tips, enabled, store_on_sale, store_type, store_url, package_name, domain, category, sub_category, coppa, screen_orientation, ccpa, superior_id
+        select app_id,
+               ditch_id,
+               ditch_name,
+               app_key,
+               app_name,
+               user_id,
+               app_type,
+               apk_url,
+               qr_code,
+               version_code,
+               update_tips,
+               enabled,
+               store_on_sale,
+               store_type,
+               store_url,
+               package_name,
+               domain,
+               category,
+               sub_category,
+               coppa,
+               screen_orientation,
+               ccpa,
+               superior_id
         from yt_app
         where user_id = #{userId}
     </select>
 
     <select id="selectByDitchId" resultType="com.ytpm.agent.model.YtApp">
-        select
-            app_id, ditch_id, ditch_name, app_key, app_name,user_id, app_type, apk_url, qr_code, version_code, update_tips, enabled,ditch_name,ditch_id
+        select app_id,
+               ditch_id,
+               ditch_name,
+               app_key,
+               app_name,
+               user_id,
+               app_type,
+               apk_url,
+               qr_code,
+               version_code,
+               update_tips,
+               enabled,
+               store_on_sale,
+               store_type,
+               store_url,
+               package_name,
+               domain,
+               category,
+               sub_category,
+               coppa,
+               screen_orientation,
+               ccpa,
+               superior_id
         from yt_app
         where ditch_id = #{ditchId} and enabled = 1
     </select>