1.fix支付优化 2.普通公会成员隐藏搜索功能

This commit is contained in:
oujunhui
2020-10-15 16:07:14 +08:00
parent a36eb1b6fd
commit 2d754c9d61
7 changed files with 32 additions and 25 deletions

View File

@@ -38,7 +38,7 @@ public class ChargePresenter extends PayPresenter<IChargeView> {
*/
@SuppressLint("CheckResult")
public void getChargeList() {
payModel.getChargeList(1)
payModel.getChargeList(1,0L)
.compose(bindToLifecycle())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())

View File

@@ -166,26 +166,27 @@ public class ChargeActivity extends BaseActivity {
this.payChannel = payChannel;
boolean selectWeChatPay = (Objects.equals(this.payChannel, Constants.CHARGE_WX));
boolean selectAliPay = (Objects.equals(this.payChannel, Constants.CHARGE_ALIPAY));
if (selectAliPay){
if (mList.size() != mListSize)return;
for(ChargeBean bigList:mBigList) {
mList.add(bigList);
}
mChargeAdapter.setNewData(mList);
mChargeAdapter.notifyDataSetChanged();
} else {
if (mList.size() > mListSize){
if (ListUtils.isListEmpty(mBigList))return;
if (mSelectChargeBean.equals(mBigList.get(0)))
setItemSelect(0);
for(ChargeBean bigList:mBigList) {
if (!ListUtils.isListEmpty(mBigList)) {
if (selectAliPay) {
if (mList.size() == mListSize){
for (ChargeBean bigList : mBigList) {
mList.add(bigList);
}
mChargeAdapter.setNewData(mList);
mChargeAdapter.notifyDataSetChanged();
}
} else {
if (mList.size() > mListSize) {
setItemSelect(0);
}
for (ChargeBean bigList : mBigList) {
mList.remove(bigList);
}
mChargeAdapter.setNewData(mList);
mChargeAdapter.notifyDataSetChanged();
}
}
switch (defaultPay){
case ALI_PAY_CLOSE:
iv_sel_first.setSelected(selectAliPay);
@@ -262,8 +263,8 @@ public class ChargeActivity extends BaseActivity {
// ll_type_first.setVisibility(View.VISIBLE);
// }
});
onLoadingData();
onRefreshing();
onLoadingData();
}
private void setItemSelect(int position){
@@ -306,13 +307,16 @@ public class ChargeActivity extends BaseActivity {
}
public void onRefreshing() {
PayModel.get().getChargeList(1).subscribe(new BeanObserver<ChargeListResult>() {
PayModel.get().getChargeList(1,AuthModel.get().getCurrentUid()).subscribe(new BeanObserver<ChargeListResult>() {
@Override
public void onSuccess(ChargeListResult chargeBeans) {
if (chargeBeans == null)return;
mBigList = chargeBeans.getBigList();
mList = chargeBeans.getList();
mListSize = chargeBeans.getList().size();
onGetChargeList(chargeBeans.getList());
//默认选中
selectPayChannelDisplay(payChannel,chargeBeans.getDefaultPay());
}
@Override
@@ -560,8 +564,7 @@ public class ChargeActivity extends BaseActivity {
defaultPay(defaultPay);
break;
}
//默认选中
selectPayChannelDisplay(payChannel,defaultPay);
}
/**

View File

@@ -263,8 +263,10 @@ public class ModuleHallActivity extends BaseMvpActivity<IModuleHallView, ModuleH
// }
// }, 0);
ivSetting.setVisibility(View.VISIBLE);
ivHallMemberSearch.setVisibility(View.VISIBLE);
}else {
ivSetting.setVisibility(View.GONE);
ivHallMemberSearch.setVisibility(View.GONE);
}
}

View File

@@ -14,4 +14,5 @@ import lombok.Data;
public class ChargeListResult {
List<ChargeBean> list;
List<ChargeBean> bigList;
private int defaultPay;
}

View File

@@ -38,7 +38,7 @@ public interface IPayModel extends IModel {
3苹果充值
*/
Single<ChargeListResult> getChargeList(int channelType);
Single<ChargeListResult> getChargeList(int channelType,long uid);
//发起充值u
Single<JsonObject> requestCharge(Context context, String chargeProdId, String payChannel);

View File

@@ -175,9 +175,9 @@ public class PayModel extends BaseModel implements IPayModel {
}
@Override
public Single<ChargeListResult> getChargeList(int channelType) {
public Single<ChargeListResult> getChargeList(int channelType,long uid) {
return api.getChargeList(
String.valueOf(channelType)
String.valueOf(channelType),uid
)
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchedulers());
@@ -452,7 +452,8 @@ public class PayModel extends BaseModel implements IPayModel {
* @return
*/
@GET("/chargeprod/listV2")
Single<ServiceResult<ChargeListResult>> getChargeList(@Query("channelType") String channelType);
Single<ServiceResult<ChargeListResult>> getChargeList(@Query("channelType") String channelType ,
@Query("pub_uid") long pub_uid);
/**

View File

@@ -21,5 +21,5 @@ with_jenkins=false
#\u6253\u652F\u6301x86\u7684\u6A21\u62DF\u5668\u5305\u4F7F\u7528
ndk_abi_filters=arm
version_name=1.4.1
version_code=141
version_name=1.5.0
version_code=150