Browse Source

修改

授权码生成工具
liup 4 months ago
parent
commit
aee2718125
4 changed files with 14 additions and 55 deletions
  1. +1
    -0
      app/src/main/java/com/bonait/bnframework/ui/activity/EditClassifyTabActivity.java
  2. +0
    -35
      app/src/main/java/com/bonait/bnframework/ui/activity/PropEditClassifyFragment.java
  3. +4
    -15
      app/src/main/java/com/bonait/bnframework/ui/fragment/goods/LocalGoodsFragment.java
  4. +9
    -5
      app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateDataService.java

+ 1
- 0
app/src/main/java/com/bonait/bnframework/ui/activity/EditClassifyTabActivity.java View File

@@ -79,6 +79,7 @@ public class EditClassifyTabActivity extends BaseActivity {
viewBinding.tvClassifyGoods.setSelected(false);
viewBinding.tvClassifyProperty.setSelected(true);
});
viewBinding.tvClassifyProperty.setSelected(true);
}

/**


+ 0
- 35
app/src/main/java/com/bonait/bnframework/ui/activity/PropEditClassifyFragment.java View File

@@ -93,20 +93,8 @@ public class PropEditClassifyFragment extends BaseFragment {
DisplayManager.scaleViewGroup(viewBinding.getRoot());
initData();
initView();
initTopBar();
// EventBus.getDefault().register(this);
}

// @Override
// protected void onCreate(@Nullable Bundle savedInstanceState) {
// super.onCreate(savedInstanceState);
// viewBinding = FragmentPropEditClassifyBinding.inflate(getLayoutInflater());
// setContentView(viewBinding.getRoot());
// DisplayManager.scaleViewGroup(viewBinding.getRoot());
// initData();
// initView();
// initTopBar();
// }

private void initData(){
attributePosition = 0;
@@ -673,29 +661,6 @@ public class PropEditClassifyFragment extends BaseFragment {
subattributeAdapter.notifyDataSetChanged();
}

private void initTopBar(){
// viewBinding.topbar.setTitle("编辑分类");
// viewBinding.back.setOnClickListener(v->{
// finishActivity();
// });
}

// @Override
// protected void doOnBackPressed() {
// super.doOnBackPressed();
// finishActivity();
// }

// private void finishActivity(){
// setResult(RESULT_OK, null);
// EventBus.getDefault().post(new FreshLocalGoodsEvent());
// finish();
// }

// @Override
// protected String getClassName() {
// return "编辑分类页";
// }
@Override
protected boolean canDragBack() {
return false;


+ 4
- 15
app/src/main/java/com/bonait/bnframework/ui/fragment/goods/LocalGoodsFragment.java View File

@@ -333,21 +333,10 @@ public class LocalGoodsFragment extends BaseFragment {
//添加商品的时候选择一个商品分类
//添加商品的时候选择一个属性分类
if(!propClassifyList.isEmpty() && getActivity()!=null){
String selectPropName="";
BPA_PROPERTY_CLASSIFY classify= PropClassifyDBUtil.getByName(selectPropName);
if (classify!=null){
List<BPA_ATTRIBUTE> attributes = AttributeDBUtil.getByClassify(classify.id);
if(attributes.isEmpty()){
NewToastUtil.getInstance().showToast("当前分类没有属性,请先创建分类父属性","The current class does not have attributes. Create the parent attributes of the class first");
return;
}else {
for(BPA_ATTRIBUTE attribute:attributes){
if(SubAttributeDBUtil.getByParentAttributeId(attribute.id).isEmpty()){
NewToastUtil.getInstance().showToast("当前分类父属性["+attribute.name+"]没有子属性,无法创建","Parent property of the current class ["+attribute.name+"] has no subattribute,Cannot create!");
return;
}
}
}
List<BPA_PROPERTY_CLASSIFY> classify= PropClassifyDBUtil.getAll();
if (classify.isEmpty()){
NewToastUtil.getInstance().showToast("请先创建属性分类","Please create attribute classification first");
return;
}
addGoodsDialog();
}


+ 9
- 5
app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateDataService.java View File

@@ -220,12 +220,16 @@ public class UpdateDataService {
boolean isSuccess = true;
StringBuffer names = new StringBuffer();
String errorMsg ="";
for(UpResData upResData:response.body().data){
if (upResData.code>30000){
isSuccess = false;
names.append(upResData.name);
errorMsg=upResData.message;
if(response.body().statusCode == 200){
for(UpResData upResData:response.body().data){
if (upResData.code>30000){
isSuccess = false;
names.append("[").append(upResData.name).append("]");
errorMsg=upResData.message;
}
}
}else{
isSuccess = false;
}
if(!isSuccess){
NewToastUtil.getInstance().showToastError(errorMsg+"-"+names.toString());


Loading…
Cancel
Save