@@ -30,6 +30,7 @@ | |||||
android:networkSecurityConfig="@xml/network_security_config" | android:networkSecurityConfig="@xml/network_security_config" | ||||
android:roundIcon="@mipmap/boluo" | android:roundIcon="@mipmap/boluo" | ||||
android:supportsRtl="true" | android:supportsRtl="true" | ||||
android:usesCleartextTraffic="true" | |||||
android:theme="@style/AppTheme" | android:theme="@style/AppTheme" | ||||
tools:ignore="GoogleAppIndexingWarning" | tools:ignore="GoogleAppIndexingWarning" | ||||
tools:node="merge" | tools:node="merge" | ||||
@@ -91,7 +91,7 @@ public class APIService { | |||||
GoodTypeSynchronous(item);//同步云端商品分类信息 | GoodTypeSynchronous(item);//同步云端商品分类信息 | ||||
GoodPropSynchronous(item.goodsAttributeList);//同步云端商品属性 | |||||
GoodPropSynchronous(item.goodsTypeId,item.goodsAttributeList);//同步云端商品属性 | |||||
GoodInfoSynchronous(item,goods);//同步云端商品信息 | GoodInfoSynchronous(item,goods);//同步云端商品信息 | ||||
@@ -115,7 +115,7 @@ public class APIService { | |||||
* 同步云端商品属性到本地 | * 同步云端商品属性到本地 | ||||
* @param goodsAttributeList | * @param goodsAttributeList | ||||
*/ | */ | ||||
private static void GoodPropSynchronous( List<GoodsAttributeList> goodsAttributeList){ | |||||
private static void GoodPropSynchronous(String goodsTypeId, List<GoodsAttributeList> goodsAttributeList){ | |||||
goodsAttributeList.forEach(goodProperty->{ | goodsAttributeList.forEach(goodProperty->{ | ||||
//属性添加 | //属性添加 | ||||
BPA_GOODPROPERTY bpa_goodproperty = new BPA_GOODPROPERTY(); | BPA_GOODPROPERTY bpa_goodproperty = new BPA_GOODPROPERTY(); | ||||
@@ -123,6 +123,7 @@ public class APIService { | |||||
bpa_goodproperty.parentid ="0"; | bpa_goodproperty.parentid ="0"; | ||||
bpa_goodproperty.id = goodProperty.goodsAttributeId; | bpa_goodproperty.id = goodProperty.goodsAttributeId; | ||||
bpa_goodproperty.userID="超级管理员"; | bpa_goodproperty.userID="超级管理员"; | ||||
bpa_goodproperty.GoodsTypeId=goodsTypeId; | |||||
QueryDB.AddGoodsProperty(bpa_goodproperty); | QueryDB.AddGoodsProperty(bpa_goodproperty); | ||||
//子属性添加 | //子属性添加 | ||||
@@ -14,6 +14,7 @@ import android.widget.Button; | |||||
import com.bonait.bnframework.HBL.Dialog.AlertDialogButton; | import com.bonait.bnframework.HBL.Dialog.AlertDialogButton; | ||||
import com.bonait.bnframework.HBL.Dialog.DialogManager; | import com.bonait.bnframework.HBL.Dialog.DialogManager; | ||||
import com.bonait.bnframework.HBL.Thread.ThreadManager; | |||||
import com.bonait.bnframework.HttpModel.APIService; | import com.bonait.bnframework.HttpModel.APIService; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.base.BaseFragment; | import com.bonait.bnframework.common.base.BaseFragment; | ||||
@@ -69,8 +70,13 @@ public class GongnengFragment extends BaseFragment { | |||||
btn_Sync.setOnClickListener(v->{ | btn_Sync.setOnClickListener(v->{ | ||||
DialogManager.showWarn(context,"同步云端商品会参数本地所有配方数据,\r\n请问是否继续?", AlertDialogButton.YesNo,(s)->{ | DialogManager.showWarn(context,"同步云端商品会参数本地所有配方数据,\r\n请问是否继续?", AlertDialogButton.YesNo,(s)->{ | ||||
if(s){ | if(s){ | ||||
APIService.MainInit(); | |||||
ToastUtils.info("同步成功"); | |||||
ThreadManager.get().execute(new Runnable() { | |||||
@Override | |||||
public void run() { | |||||
APIService.MainInit(); | |||||
ToastUtils.info("同步成功"); | |||||
} | |||||
}); | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||