Browse Source

同步账户历史应用

zhaoxian 4 năm trước cách đây
mục cha
commit
dbc0b8938f

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java

@@ -204,6 +204,7 @@ public class CallbackController {
                     userAllocation.setUpdateTime(new Date());
                     //自动投放,0关闭,1开启
                     userAllocation.setAutoDelivery(json.getInteger("autoDelivery"));
+                    userAllocation.setMaterialType(json.getString("materialType"));
                     allocationMapper.deleteById(userAllocation.getId());
                     Map<String, Object> deleteUserMap = new HashMap<>();
                     deleteUserMap.put("advertiser_id", advertiserId);
@@ -214,7 +215,8 @@ public class CallbackController {
                         log.info("同步分配用户表完成,task_id:{},accountId:{}", state, accountId);
                     }
                     //物料类型,0-不同步,1应用包,(2人群包,3定向包)
-                    Integer materialType = json.getInteger("materialType");
+                    JSONArray materialTypeArr = json.getJSONArray("materialType");
+                    Integer materialType = materialTypeArr.getInteger(0);
                     //账号绑定
                     bindAccountAuthService.addBindAccount(accountId, KuaishouInterfaceConstant.LOGIN_TYPE_KUAISHOU, advertiserId);
                     Thread t = new Thread() {

+ 1 - 1
module-common/src/main/java/cn/com/ctop/common/module/entity/UserAllocation.java

@@ -132,7 +132,7 @@ public class UserAllocation implements Serializable {
      */
     private Integer deleteComment;
     /**
-     * 同步物料,0关闭,1开启
+     * 自动投放,0关闭,1开启
      */
     private Integer autoDelivery;
     /**