Commit c8cd9f33 authored by 陈前's avatar 陈前

Merge remote-tracking branch 'origin/master'

parents d7b7514f a69eed84
<component name="ProjectDictionaryState">
<dictionary name="Eurus">
<words>
<w>addr</w>
<w>alipay</w>
<w>appid</w>
<w>baozheng</w>
<w>caocao</w>
<w>chengyaojin</w>
<w>diaochan</w>
<w>exps</w>
<w>guanyu</w>
<w>hshop</w>
<w>huanggai</w>
<w>huangxin</w>
<w>inputer</w>
......@@ -20,11 +24,13 @@
<w>mawu</w>
<w>nong</w>
<w>patt</w>
<w>posppp</w>
<w>shixiu</w>
<w>skugrps</w>
<w>skus</w>
<w>strs</w>
<w>sunquan</w>
<w>unipay</w>
<w>xishi</w>
<w>yanqing</w>
<w>yuefei</w>
......
......@@ -9,6 +9,7 @@
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/pay" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
......
......@@ -4,6 +4,7 @@
<modules>
<module fileurl="file://$PROJECT_DIR$/TangKuPos.iml" filepath="$PROJECT_DIR$/TangKuPos.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/pay/pay.iml" filepath="$PROJECT_DIR$/pay/pay.iml" />
</modules>
</component>
</project>
\ No newline at end of file
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 27
buildToolsVersion '27.0.0'
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.xingdata.zzdpos"
minSdkVersion 21
......@@ -57,33 +57,33 @@ dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support:design:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
compile 'com.squareup.okhttp3:okhttp:3.9.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.9.0'
compile 'io.reactivex.rxjava2:rxjava:2.1.5'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.alibaba:fastjson:1.1.67.android'
compile 'com.blankj:utilcode:1.11.1'
compile 'com.facebook.fresco:fresco:1.5.0'
compile 'com.facebook.fresco:animated-gif:1.5.0'
compile 'com.hwangjr.rxbus:rxbus:2.0.0'
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
compile 'com.yanzhenjie:permission:1.1.2'
compile 'com.wanjian:cockroach:0.0.5'
compile 'me.yokeyword:fragmentation:1.1.6'
compile 'com.github.arcadefire:nice-spinner:1.3.1'
compile 'com.contrarywind:Android-PickerView:3.2.5'
compile 'com.github.ybq:Android-SpinKit:1.1.0'
compile 'com.youth.banner:banner:1.4.10'
compile 'me.dm7.barcodescanner:zxing:1.9.8'
compile 'com.google.zxing:core:3.3.1'
compile(name: 'zx_print_library-debug', ext: 'aar')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:support-v4:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
implementation 'io.reactivex.rxjava2:rxjava:2.1.5'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.alibaba:fastjson:1.1.67.android'
implementation 'com.blankj:utilcode:1.11.1'
implementation 'com.facebook.fresco:fresco:1.5.0'
implementation 'com.facebook.fresco:animated-gif:1.5.0'
implementation 'com.hwangjr.rxbus:rxbus:2.0.0'
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
implementation 'com.yanzhenjie:permission:1.1.2'
implementation 'com.wanjian:cockroach:0.0.5'
implementation 'me.yokeyword:fragmentation:1.1.6'
implementation 'com.github.arcadefire:nice-spinner:1.3.1'
implementation 'com.contrarywind:Android-PickerView:3.2.5'
implementation 'com.github.ybq:Android-SpinKit:1.1.0'
implementation 'com.youth.banner:banner:1.4.10'
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
implementation 'com.google.zxing:core:3.3.1'
implementation(name: 'zx_print_library-debug', ext: 'aar')
}
......@@ -71,8 +71,8 @@ public class App extends Application {
.start();
// 初始化异常处理
initEx();
//初始化Frwagment框架
// initEx();
//初始化Fragment框架
initFragment();
//初始化数据库
......
......@@ -58,11 +58,23 @@ public class C {
}
public static final class URL {
// public static final String BASE_URL = "http://demo.51zzd.cn:8080/";
/**
* 支付服务器
*/
public static final String TEMP_PAY_URL = "http://demo.51zzd.cn/";
/**
* 测试环境(客户演示使用)sn:test01,设备号:AECRC10
*/
// public static final String BASE_URL = "http://121.40.56.52:8080/";
/**
* 开发平台(开发人员使用)
*/
// public static final String BASE_URL = "http://demo.51zzd.cn:8080/";//开发测试平台
/**
* 生产平台
*/
public static final String BASE_URL = "http://tk.51zzd.com/";
public static final String BASE_URL = "http://121.40.56.52:8080/";
// public static final String TEMP_PAY_URL = "http://121.40.56.52:8081/";
private static final String PKG = "/tk/";
......
......@@ -34,7 +34,7 @@ class ResultFilter<T> implements Function<HttpMessage<T>, T> {
@Override
public void run() {
Intent intent = new Intent();
intent.putExtra("serverErr", "错误码:" + tHttpMessage.getReturnCode() +
intent.putExtra("serverErr", "状态码:" + tHttpMessage.getReturnCode() +
"\n\n\n" + tHttpMessage.getReturnInfo());
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClass(ActivityUtils.getTopActivity(), ServerErrActivity.class);
......@@ -72,7 +72,7 @@ class ResultFilter<T> implements Function<HttpMessage<T>, T> {
@Override
public void run() {
Intent intent = new Intent();
intent.putExtra("serverErr", "错误码:" + tHttpMessage.getReturnCode() +
intent.putExtra("serverErr", "状态码:" + tHttpMessage.getReturnCode() +
"\n\n\n" + tHttpMessage.getReturnInfo());
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClass(ActivityUtils.getTopActivity(), ServerErrActivity.class);
......
package com.xingdata.zzdpos.base;
import android.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.ViewGroup;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.R;
import java.util.ArrayList;
import java.util.List;
public abstract class BaseMultiSelectAdapter<T, B extends ViewDataBinding> extends BaseQuickAdapter<T, BaseViewHolder> {
private List<Integer> mSelectedPositionList;
public BaseMultiSelectAdapter(int layoutResId, @Nullable List<T> data) {
super(layoutResId, data);
mSelectedPositionList = new ArrayList<>();
}
@Override
protected void convert(BaseViewHolder helper, T item) {
this.convert(helper, (B) helper.mViewBinding, mSelectedPositionList.contains(helper.getAdapterPosition()), item);
}
protected abstract void convert(BaseViewHolder helper, B mViewBinding, boolean isSelected, T item);
/**
* 获取所有选中的数据
*
* @return 选中的数据
*/
public List<T> getSelectedDatas() {
List<T> tList = new ArrayList<>();
for (int i = 0; i < getData().size(); i++) {
if (mSelectedPositionList.contains(i)) {
tList.add(getData().get(i));
}
}
return tList;
}
/**
* 选择全部,如果已经全选则全部取消
*/
public void selectAll() {
mSelectedPositionList = new ArrayList<>();
for (int i = 0; i < getData().size(); i++) {
mSelectedPositionList.add(i);
}
}
/**
* 选择某项数据
*
* @param position 要选定item的position
*/
public void select(int position) {
mSelectedPositionList.add(position);
}
/**
* 取消选择某项数据
*
* @param position 要取消的item的position
*/
public void deselect(int position) {
mSelectedPositionList.remove((Integer) position);
}
/**
* 反选
*
* @param position 要反选的item的position
*/
public void invert(int position) {
if (mSelectedPositionList.contains(position)) deselect(position);
else select(position);
}
@Override
protected View getItemView(int layoutResId, ViewGroup parent) {
ViewDataBinding binding = DataBindingUtil.inflate(mLayoutInflater, layoutResId, parent, false);
if (binding == null) return super.getItemView(layoutResId, parent);
View view = binding.getRoot();
view.setTag(R.id.BaseQuickAdapter_databinding_support, binding);
return view;
}
}
......@@ -6,6 +6,7 @@ import com.blankj.utilcode.util.TimeUtils;
import com.xingdata.zzdpos.App;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.base.BaseModel;
import com.xingdata.zzdpos.model.Gift;
import com.xingdata.zzdpos.model.HandoverInfo;
import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.model.Ms;
......@@ -133,8 +134,8 @@ public class DBFactory {
* @return 商品分组
*/
public static Observable<List<Sskugrp>> querySkugrp() {
return Observable.just(DB.getInstance().get(StorePresenter.class).where(Sskugrp
.class).findAll())
return Observable.just(DB.getInstance().get(StorePresenter.class).where(Sskugrp.class)
.findAll())
.flatMap(sskugrps -> Observable.just(getList(sskugrps)));
}
......@@ -146,8 +147,8 @@ public class DBFactory {
* @return 商品名称
*/
public static String querySpuNameBySkuId(Long skuId) {
List<Sssku> ssskus = getList(DB.getInstance().get(StorePresenter.class).where(Sssku
.class).equalTo("skuId", skuId).findAll());
List<Sssku> ssskus = getList(DB.getInstance().get(StorePresenter.class).where(Sssku.class)
.equalTo("skuId", skuId).findAll());
if (ssskus.size() > 0) return ssskus.get(0).getSpuName();
else return null;
}
......@@ -161,20 +162,14 @@ public class DBFactory {
RealmQuery<Ms> query = DB.getInstance().get(StorePresenter.class).where(Ms.class);
query.equalTo("msStatus", 0);
query.notEqualTo("msTools", C.MS_TYPE.GIFT);
Long dateNow = Long.valueOf(TimeUtils.getNowString(new SimpleDateFormat("yyyyMMdd",
Locale.getDefault())));
query.beginGroup().lessThanOrEqualTo("msDateBegin", dateNow).greaterThanOrEqualTo
("msDateEnd", dateNow).endGroup();
Long dateNow = Long.valueOf(TimeUtils.getNowString(new SimpleDateFormat("yyyyMMdd", Locale.getDefault())));
query.beginGroup().lessThanOrEqualTo("msDateBegin", dateNow).greaterThanOrEqualTo("msDateEnd", dateNow).endGroup();
String weekNow = String.valueOf(TimeUtils.getWeekIndex(TimeUtils.getNowDate()));
query.contains("msWeekPlan", weekNow);
Long timeNow = Long.valueOf(TimeUtils.getNowString(new SimpleDateFormat("HHmmss",
Locale.getDefault())));
query.beginGroup().lessThanOrEqualTo("msTimeBegin", timeNow).greaterThanOrEqualTo
("msTimeEnd", timeNow).endGroup();
Long timeNow = Long.valueOf(TimeUtils.getNowString(new SimpleDateFormat("HHmmss", Locale.getDefault())));
query.beginGroup().lessThanOrEqualTo("msTimeBegin", timeNow).greaterThanOrEqualTo("msTimeEnd", timeNow).endGroup();
query.equalTo("msCoustomTag", 0);
......@@ -182,6 +177,22 @@ public class DBFactory {
return Observable.just(query.findAllSorted("msTouchTag2", Sort.DESCENDING))
.flatMap(ms -> Observable.just(getList(ms)));
}
/**
* 查询换购商品
*
* @param gifts 换购信息
* @return 换购信息列表(附带商品)
*/
public static Observable<List<Sssku>> queryGiftSkus(List<Gift> gifts) {
RealmQuery<Sssku> query = DB.getInstance().get(MainPresenter.class).where(Sssku.class);
for (int i = 0; i < gifts.size(); i++) {
if (i > 0) query.or();
query.equalTo("skuId", gifts.get(i).getSkuId());
}
return Observable.just(query.findAll()).flatMap(ssskus -> Observable.just(getList(ssskus)));
}
}
public static class Vip {
......
......@@ -3,15 +3,18 @@ package com.xingdata.zzdpos.model;
public class Gift {
public Gift(Long msId, Sssku sssku, Long addAmt) {
this.sssku = sssku;
public Gift(Long msId, Long skuId, Long addAmt, Long dateEnd) {
this.skuId = skuId;
this.msId = msId;
this.addAmt = addAmt;
this.dateEnd = dateEnd;
}
private Sssku sssku;
private Long msId;
private Long addAmt;
private Long skuId;
private Long dateEnd;
public Sssku getSssku() {
return sssku;
......@@ -37,4 +40,20 @@ public class Gift {
public void setAddAmt(Long addAmt) {
this.addAmt = addAmt;
}
public Long getSkuId() {
return skuId;
}
public void setSkuId(Long skuId) {
this.skuId = skuId;
}
public Long getDateEnd() {
return dateEnd;
}
public void setDateEnd(Long dateEnd) {
this.dateEnd = dateEnd;
}
}
......@@ -33,7 +33,7 @@ public class Ms extends RealmObject implements BaseModel, BaseBean {
public interface OnApplyListener {
void setDis(Ms ms);
void addGift(Long msId, Long skuId, long addAmt);
void addGift(Long msId, Long skuId, long addAmt, long dateEnd);
void removeGift(Long msId);
}
......@@ -73,7 +73,7 @@ public class Ms extends RealmObject implements BaseModel, BaseBean {
if (amt >= this.getPayAmt()) break;
}
if (amt >= this.getPayAmt()) {
onApplyListener.addGift(id, giftSkuId, giftSkuPrice);
onApplyListener.addGift(id, giftSkuId, giftSkuPrice, msDateEnd);
} else {
onApplyListener.removeGift(id);
}
......
......@@ -103,7 +103,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
mView.backToManagerFragment();
mView.showEditorFragment(sssku, C.SKU_EDITOR_MODE.UNKNOWN);
}
})
}, throwable -> mView.showMsg(throwable.getMessage()))
);
}
......@@ -275,7 +275,6 @@ public class SsskuPresenter extends SsskuContract.Presenter {
public void doOnFinish() {
if (!isNeedSync) return;
final double[] nowPro = {0.0};
mView.showLoadingDialog();
SPUtils.getInstance().put(SplashActivity.SYNCHRONOUSERRORCODE, "");
SPUtils.getInstance().put(SplashActivity.SYNCHRONOUSERRORMSG, "");
for (int i = 0; i < SplashPresenter.listSync.size(); i++) {
......@@ -283,9 +282,6 @@ public class SsskuPresenter extends SsskuContract.Presenter {
@Override
public void getPro(double pro) {
nowPro[0] += pro;
if (nowPro[0] >= 100) {
mView.dismissLoadingDialog();
}
}
@Override
......
......@@ -106,7 +106,7 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
for (int i = 0; i < levels.size(); i++) {
users.add(new User(1, levels.get(i).getVipLevelName(), levels.get(i).getVipLevel()));
}
});
}, throwable -> mView.showMsg(throwable.getMessage()));
}
@Override
......@@ -201,7 +201,6 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
public void doOnFinish() {
if (!isNeedSync) return;
final double[] nowPro = {0.0};
mView.showLoadingDialog();
SPUtils.getInstance().put(SplashActivity.SYNCHRONOUSERRORCODE, "");
SPUtils.getInstance().put(SplashActivity.SYNCHRONOUSERRORMSG, "");
for (int i = 0; i < SplashPresenter.listSync.size(); i++) {
......@@ -209,9 +208,6 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
@Override
public void getPro(double pro) {
nowPro[0] += pro;
if (nowPro[0] >= 100) {
mView.dismissLoadingDialog();
}
}
@Override
......@@ -226,7 +222,7 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
* 获取营销计划
*/
private void getMs() {
mCompositeDisposable.add(ApiFactory.Ms.query(mPageNum).subscribe(msPager -> mView.loadMss(msPager, mPageNum == 1)));
mCompositeDisposable.add(ApiFactory.Ms.query(mPageNum).subscribe(msPager -> mView.loadMss(msPager, mPageNum == 1), throwable -> mView.showMsg(throwable.getMessage())));
}
......@@ -238,9 +234,10 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
mCompositeDisposable.add(
DBFactory.Store.querySku(mSkuPageNum, mSkuKeyword)
.doOnSubscribe(subscription -> mView.dismissLoadingDialog())
.subscribe(ssskuPager -> {
mView.loadSkus((Pager<Sku>) ssskuPager, mSkuPageNum == 0);
})
.subscribe(
ssskuPager -> mView.loadSkus((Pager<Sku>) ssskuPager, mSkuPageNum == 0)
, throwable -> mView.showMsg(throwable.getMessage())
)
);
}
......
......@@ -81,7 +81,7 @@ public class SettlePresenter extends SettleContract.Presenter {
}
@Override
public void addGift(Long msId, Long skuId, long addAmt) {
public void addGift(Long msId, Long skuId, long addAmt, long dateEnd) {
//这一版不做处理
}
......@@ -112,8 +112,7 @@ public class SettlePresenter extends SettleContract.Presenter {
public void initSettle() {
DBFactory.Settle.queryPays().subscribe(
pays -> mView.loadPays(pays),
throwable -> {
}
throwable -> mView.showMsg(throwable.getMessage())
);
mView.setSettleFragmentBySettleMode(mSettleMode);
}
......@@ -132,7 +131,7 @@ public class SettlePresenter extends SettleContract.Presenter {
this.processMs();
//计算价格
this.reprice();
});
}, throwable -> mView.showMsg(throwable.getMessage()));
}
@Override
......@@ -178,8 +177,7 @@ public class SettlePresenter extends SettleContract.Presenter {
this.mTickets = tickets;
this.searchAvlTicket();
},
throwable -> {
});
throwable -> mView.showMsg(throwable.getMessage()));
}
@Override
......
......@@ -23,6 +23,7 @@ import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseSku;
import com.xingdata.zzdpos.databinding.ActivityStoreBinding;
import com.xingdata.zzdpos.model.Gift;
import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Saledetail;
......@@ -33,6 +34,7 @@ import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.ui.settle.SettleActivity;
import com.xingdata.zzdpos.ui.store.dialog.CartDialog;
import com.xingdata.zzdpos.ui.store.dialog.MsDialog;
import com.xingdata.zzdpos.ui.store.fragment.GiftFragment;
import com.xingdata.zzdpos.ui.store.fragment.SearchFragment;
import com.xingdata.zzdpos.ui.store.fragment.StoreFragment;
import com.xingdata.zzdpos.util.Global;
......@@ -46,6 +48,7 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
private StoreFragment mStoreFragment = new StoreFragment();
private SearchFragment mSearchFragment = new SearchFragment();
private ScanFragment mScanFragment = new ScanFragment();
private GiftFragment mGiftFragment = new GiftFragment();
private CartDialog mCartDialog = new CartDialog();
private MsDialog mMsDialog = new MsDialog();
......@@ -77,12 +80,14 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
);
mViewBinding.btnPayment.setOnClickListener(view -> {
//显示价格输入页面以添加无码商品
Intent intent = new Intent(StoreActivity.this, PaymentActivity.class);
intent.putExtra(C.SP_KEY.SETTLE_MODE, C.SETTLE_MODE.STORE);
ActivityUtils.startActivity(intent);
});
mScanFragment.setOnScanCompletedListener(barcode -> mPresenter.scanComplete(barcode));
}
@Override
......@@ -163,6 +168,11 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
ActivityUtils.startActivity(intent);
}
@Override
public void showGiftFragment(List<Gift> gifts) {
this.start(mGiftFragment);
}
@Override
public void showSearchFragment() {
if (!mSearchFragment.isAdded()) {
......@@ -206,6 +216,11 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
r.play();
}
@Override
public void loadGifts(List<Gift> gifts) {
mGiftFragment.loadGifts(gifts);
}
/**
* 执行抖动动画
......
......@@ -3,6 +3,7 @@ package com.xingdata.zzdpos.ui.store;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseSku;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.model.Gift;
import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Saledetail;
......@@ -106,6 +107,13 @@ interface StoreContract {
*/
void showSettle(List<Saledetail> saledetails);
/**
* 显示换购页面
*
* @param gifts 换购信息列表
*/
void showGiftFragment(List<Gift> gifts);
/**
* 显示搜索页面
*/
......@@ -139,6 +147,11 @@ interface StoreContract {
* @param result 提示音
*/
void startAlarm(boolean result);
/**
* 加载换购信息
*/
void loadGifts(List<Gift> gifts);
}
abstract class Presenter extends BasePresenter<View> {
......@@ -246,6 +259,12 @@ interface StoreContract {
* @param b 获取焦点
*/
public abstract void searchBarFocusChanged(boolean b);
/**
* 换购页面 - 初始化
*/
public abstract void initGift();
}
}
......@@ -3,6 +3,7 @@ package com.xingdata.zzdpos.ui.store;
import com.xingdata.zzdpos.base.BaseSku;
import com.xingdata.zzdpos.db.DB;
import com.xingdata.zzdpos.db.DBFactory;
import com.xingdata.zzdpos.model.Gift;
import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.model.Saleorder;
......@@ -32,6 +33,11 @@ public class StorePresenter extends StoreContract.Presenter {
*/
private List<Saledetail> mSaledetails;
/**
* 换购商品列表
*/
private List<Gift> mGiftList;
/**
* 当前营销计划
*/
......@@ -47,11 +53,10 @@ public class StorePresenter extends StoreContract.Presenter {
@Override
public void onAttached() {
this.initRealm();
mVip = Vip.createDefault();
mSaledetails = new ArrayList<>();
mGiftList = new ArrayList<>();
mSaleorder = new Saleorder();
mOnApplyListener = new Ms.OnApplyListener() {
@Override
public void setDis(Ms ms) {
......@@ -59,13 +64,18 @@ public class StorePresenter extends StoreContract.Presenter {
}
@Override
public void addGift(Long msId, Long skuId, long addAmt) {
//这一版不做处理
public void addGift(Long msId, Long skuId, long addAmt, long dateEnd) {
mGiftList.add(new Gift(msId, skuId, addAmt, dateEnd));
}
@Override
public void removeGift(Long msId) {
//这一版不作处理
for (int i = 0; i < mGiftList.size(); i++) {
if (mGiftList.get(i).getMsId().longValue() == msId) {
mGiftList.remove(i);
break;
}
}
}
};
}
......@@ -73,7 +83,11 @@ public class StorePresenter extends StoreContract.Presenter {
@Override
public void clickSettle() {
if (mSaledetails.size() == 0) return;
mView.showSettle(mSaledetails);
if (mGiftList.size() > 0) {
mView.showGiftFragment(mGiftList);
} else {
mView.showSettle(mSaledetails);
}
}
@Override
......@@ -200,6 +214,21 @@ public class StorePresenter extends StoreContract.Presenter {
if (b) mView.showSearchFragment();
}
@Override
public void initGift() {
mCompositeDisposable.add(DBFactory.Store.queryGiftSkus(mGiftList).subscribe(ssskus -> {
for (int i = 0; i < ssskus.size(); i++) {
for (int j = 0; j < mGiftList.size(); j++) {
if (ssskus.get(i).getSkuId().longValue() == mGiftList.get(j).getSkuId()) {
mGiftList.get(j).setSssku(ssskus.get(i));
break;
}
}
}
mView.loadGifts(mGiftList);
}));
}
/**
* 获取商品分组
......@@ -221,7 +250,7 @@ public class StorePresenter extends StoreContract.Presenter {
sskugrps.add(0, sskugrp);
mView.loadSkugrps(sskugrps);
})
}, throwable -> mView.showMsg(throwable.getMessage()))
);
}
......@@ -236,7 +265,7 @@ public class StorePresenter extends StoreContract.Presenter {
mMss.get(i).setOnApplyListener(mOnApplyListener);
}
mView.loadMss(mMss);
})
}, throwable -> mView.showMsg(throwable.getMessage()))
);
}
......@@ -249,7 +278,7 @@ public class StorePresenter extends StoreContract.Presenter {
mCompositeDisposable.add(
DBFactory.Store.querySku(mStorePageNum, mSkuGrpId)
.doOnSubscribe(subscription -> mView.dismissLoadingDialog())
.subscribe(ssskus -> mView.loadSkus(ssskus, mStorePageNum == 0))
.subscribe(ssskus -> mView.loadSkus(ssskus, mStorePageNum == 0), throwable -> mView.showMsg(throwable.getMessage()))
);
}
......@@ -262,7 +291,7 @@ public class StorePresenter extends StoreContract.Presenter {
mCompositeDisposable.add(
DBFactory.Store.queryUSku()
.doOnSubscribe(subscription -> mView.dismissLoadingDialog())
.subscribe(usskus -> mView.loadSkus(usskus, true))
.subscribe(usskus -> mView.loadSkus(usskus, true), throwable -> mView.showMsg(throwable.getMessage()))
);
}
......@@ -275,7 +304,7 @@ public class StorePresenter extends StoreContract.Presenter {
mCompositeDisposable.add(
DBFactory.Store.querySku(mSearchPageNum, mKeyword)
.doOnSubscribe(subscription -> mView.dismissLoadingDialog())
.subscribe(ssskus -> mView.loadSearchResult(ssskus, mSearchPageNum == 0))
.subscribe(ssskus -> mView.loadSearchResult(ssskus, mSearchPageNum == 0), throwable -> mView.showMsg(throwable.getMessage()))
);
}
......
package com.xingdata.zzdpos.ui.store.adapter;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseMultiSelectAdapter;
import com.xingdata.zzdpos.base.BaseViewHolder;
import com.xingdata.zzdpos.databinding.ItemStoreGiftBinding;
import com.xingdata.zzdpos.model.Gift;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.util.ArrayList;
public class GiftAdapter extends BaseMultiSelectAdapter<Gift, ItemStoreGiftBinding> {
public GiftAdapter() {
super(R.layout.item_store_gift, new ArrayList<>());
}
@Override
protected void convert(BaseViewHolder helper, ItemStoreGiftBinding mViewBinding, boolean isSelected, Gift item) {
mViewBinding.tvName.setText(item.getSssku().getSpuName());
mViewBinding.tvOriginalPrice.setText(ConvertUtil.fenToYuan(item.getSssku().getSkuRetailPrice1(), true));
StringBuilder sbDateEnd = new StringBuilder(item.getDateEnd().toString());
sbDateEnd.insert(6, "-");
sbDateEnd.insert(4, "-");
mViewBinding.tvDateEnd.setText("换购截止:" + sbDateEnd.toString());
mViewBinding.tvAmt.setText(ConvertUtil.fenToYuanNoZero(item.getAddAmt()) + "元");
mViewBinding.ivChecked.setImageResource(isSelected ? R.mipmap.radio_select_bg : R.mipmap.radio_normal_bg);
}
}
......@@ -86,7 +86,8 @@ public class MsAdapter extends BaseAdapter<Ms, ItemStoreMsBinding> {
strType = mContext.getString(R.string.ms_type_money_off_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftOffAmt()));
break;
case C.MS_TYPE.GIFT:
strType = mContext.getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), ms.getGiftSkuName());
String spuName = DBFactory.Store.querySpuNameBySkuId(ms.getGiftSkuId());
strType = mContext.getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), spuName);
break;
}
......
package com.xingdata.zzdpos.ui.store.fragment;
import android.support.v7.widget.LinearLayoutManager;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentStoreGiftBinding;
import com.xingdata.zzdpos.model.Gift;
import com.xingdata.zzdpos.ui.store.StorePresenter;
import com.xingdata.zzdpos.ui.store.adapter.GiftAdapter;
import java.util.List;
public class GiftFragment extends BaseFragment<StorePresenter, FragmentStoreGiftBinding> {
private GiftAdapter mGiftAdapter;
@Override
public int getLayoutId() {
return R.layout.fragment_store_gift;
}
@Override
public void initView() {
// init gift
mGiftAdapter = new GiftAdapter();
mViewBinding.rlGift.setAdapter(mGiftAdapter);
mViewBinding.rlGift.setLayoutManager(new LinearLayoutManager(mContext));
mGiftAdapter.setOnItemClickListener((adapter, view, position) -> {
mGiftAdapter.invert(position);
mGiftAdapter.notifyItemChanged(position);
});
// init data
mPresenter.initGift();
}
/**
* 加载换购商品信息
*
* @param gifts 换购商品
*/
public void loadGifts(List<Gift> gifts) {
mGiftAdapter.setNewData(gifts);
}
}
......@@ -197,7 +197,8 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
strType = getString(R.string.ms_type_money_off_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftOffAmt()));
break;
case C.MS_TYPE.GIFT:
strType = getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), ms.getGiftSkuName());
String spuName = DBFactory.Store.querySpuNameBySkuId(ms.getGiftSkuId());
strType = getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), spuName);
break;
}
......
......@@ -178,6 +178,11 @@ public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipI
public void setVip(Vip mVip) {
this.vip = mVip;
if (mVip!=null){
vipTag=Byte.parseByte(String.valueOf(mVip.getVipTag()));
}else {
vipTag=null;
}
}
public Vip getmVip() {
......
......@@ -57,8 +57,8 @@ public final class SystemUtil {
e.printStackTrace();
}
}
// return deviceSN;
return "test01";
return "0818562";
// return "test01";
}
/**
......
......@@ -16,7 +16,7 @@
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:gravity="center"
android:text="服务器接口异常"
android:text="系统提示"
android:textSize="@dimen/et_textsize"
android:textStyle="bold"/>
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="android.view.View" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_gift"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="android.view.View" />
</data>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:paddingEnd="@null"
android:paddingStart="@dimen/all_margin">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_pic"
android:layout_width="80dp"
android:layout_height="80dp"
app:failureImage="@mipmap/icon_goods_default"
app:layout_constraintBottom_toBottomOf="@+id/ll_price"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_name"
app:placeholderImage="@mipmap/icon_goods_default"
app:roundedCornerRadius="@dimen/all_shape_radius" />
<ImageView
android:id="@+id/iv_checked"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_margin"
android:src="@mipmap/radio_select_bg"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/tv_name"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="parent" />
<TextView
android:id="@+id/tv_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin"
android:lines="2"
android:text="维达纸巾"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"
android:textStyle="bold"
app:layout_constraintLeft_toRightOf="@id/iv_pic"
app:layout_constraintRight_toLeftOf="@id/iv_checked"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_date_end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="截止时间 : 2017-01-02"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_caption_size"
app:layout_constraintLeft_toLeftOf="@id/tv_name"
app:layout_constraintTop_toBottomOf="@id/tv_name" />
<TextView
android:id="@+id/tv_original_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_spacing"
android:text="原价 : ¥10.0"
android:textSize="@dimen/all_caption_size"
app:layout_constraintLeft_toLeftOf="@id/tv_name"
app:layout_constraintTop_toBottomOf="@id/tv_date_end" />
<LinearLayout
android:id="@+id/ll_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="@id/tv_name"
app:layout_constraintTop_toBottomOf="@id/tv_original_price">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="加"
android:textSize="@dimen/all_caption_size" />
<TextView
android:id="@+id/tv_amt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_marginStart="@dimen/all_spacing"
android:text="4元"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_text_size"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="换购"
android:textSize="@dimen/all_caption_size" />
</LinearLayout>
<View
android:id="@+id/view2"
android:layout_width="0dp"
android:layout_height="@dimen/all_line_width"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_kongming"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_price" />
</android.support.constraint.ConstraintLayout>
</layout>
apply plugin: 'com.android.library'
android {
compileSdkVersion 26
defaultConfig {
minSdkVersion 25
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package com.xingdata.zxpay;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.xingdata.zxpay.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xingdata.zxpay" />
public class C {
}
package com.xingdata.zxpay.model;
import android.support.annotation.Nullable;
import java.util.Date;
public class Host {
private Integer hostMapId;
@Nullable
private String hostName;
@Nullable
private String hostAddr;
@Nullable
private String hostPort;
@Nullable
private Byte hostStatus;
@Nullable
private String hostCompany;
@Nullable
private String hostLawyer;
@Nullable
private String hostLawyerContact;
@Nullable
private String hostContractNumber;
@Nullable
private Long hostCostsRate;
@Nullable
private Long hostClearDate;
@Nullable
private Long hostTotalAmt;
@Nullable
private String hostKeyWechat;
@Nullable
private String hostKeyAlipay;
@Nullable
private String hostKeyUnipay;
@Nullable
private String hostNotiUrl;
@Nullable
private String hostAcqCode;
private Date updateTime;
private Date createTime;
public Integer getHostMapId() {
return hostMapId;
}
public void setHostMapId(Integer hostMapId) {
this.hostMapId = hostMapId;
}
@Nullable
public String getHostName() {
return hostName;
}
public void setHostName(@Nullable String hostName) {
this.hostName = hostName;
}
@Nullable
public String getHostAddr() {
return hostAddr;
}
public void setHostAddr(@Nullable String hostAddr) {
this.hostAddr = hostAddr;
}
@Nullable
public String getHostPort() {
return hostPort;
}
public void setHostPort(@Nullable String hostPort) {
this.hostPort = hostPort;
}
@Nullable
public Byte getHostStatus() {
return hostStatus;
}
public void setHostStatus(@Nullable Byte hostStatus) {
this.hostStatus = hostStatus;
}
@Nullable
public String getHostCompany() {
return hostCompany;
}
public void setHostCompany(@Nullable String hostCompany) {
this.hostCompany = hostCompany;
}
@Nullable
public String getHostLawyer() {
return hostLawyer;
}
public void setHostLawyer(@Nullable String hostLawyer) {
this.hostLawyer = hostLawyer;
}
@Nullable
public String getHostLawyerContact() {
return hostLawyerContact;
}
public void setHostLawyerContact(@Nullable String hostLawyerContact) {
this.hostLawyerContact = hostLawyerContact;
}
@Nullable
public String getHostContractNumber() {
return hostContractNumber;
}
public void setHostContractNumber(@Nullable String hostContractNumber) {
this.hostContractNumber = hostContractNumber;
}
@Nullable
public Long getHostCostsRate() {
return hostCostsRate;
}
public void setHostCostsRate(@Nullable Long hostCostsRate) {
this.hostCostsRate = hostCostsRate;
}
@Nullable
public Long getHostClearDate() {
return hostClearDate;
}
public void setHostClearDate(@Nullable Long hostClearDate) {
this.hostClearDate = hostClearDate;
}
@Nullable
public Long getHostTotalAmt() {
return hostTotalAmt;
}
public void setHostTotalAmt(@Nullable Long hostTotalAmt) {
this.hostTotalAmt = hostTotalAmt;
}
@Nullable
public String getHostKeyWechat() {
return hostKeyWechat;
}
public void setHostKeyWechat(@Nullable String hostKeyWechat) {
this.hostKeyWechat = hostKeyWechat;
}
@Nullable
public String getHostKeyAlipay() {
return hostKeyAlipay;
}
public void setHostKeyAlipay(@Nullable String hostKeyAlipay) {
this.hostKeyAlipay = hostKeyAlipay;
}
@Nullable
public String getHostKeyUnipay() {
return hostKeyUnipay;
}
public void setHostKeyUnipay(@Nullable String hostKeyUnipay) {
this.hostKeyUnipay = hostKeyUnipay;
}
@Nullable
public String getHostNotiUrl() {
return hostNotiUrl;
}
public void setHostNotiUrl(@Nullable String hostNotiUrl) {
this.hostNotiUrl = hostNotiUrl;
}
@Nullable
public String getHostAcqCode() {
return hostAcqCode;
}
public void setHostAcqCode(@Nullable String hostAcqCode) {
this.hostAcqCode = hostAcqCode;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
\ No newline at end of file
package com.xingdata.zxpay.model;
import android.support.annotation.Nullable;
import java.util.Date;
public class Posppp {
private Integer id;
private Integer hostMapId;
@Nullable
private Long opMapId;
@Nullable
private Long channelMapId;
private Long merMapId;
@Nullable
private String hshopName;
@Nullable
private String hshopNameabcn;
private Long casherId;
private Integer hshopNo;
@Nullable
private Integer hposNo;
private Byte pppFlag;
@Nullable
private Integer hposBatch;
@Nullable
private Integer hposTrace;
@Nullable
private String hposKey;
private Date updateTime;
private Date createTime;
@Nullable
private String hostName;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getHostMapId() {
return hostMapId;
}
public void setHostMapId(Integer hostMapId) {
this.hostMapId = hostMapId;
}
@Nullable
public Long getOpMapId() {
return opMapId;
}
public void setOpMapId(@Nullable Long opMapId) {
this.opMapId = opMapId;
}
@Nullable
public Long getChannelMapId() {
return channelMapId;
}
public void setChannelMapId(@Nullable Long channelMapId) {
this.channelMapId = channelMapId;
}
public Long getMerMapId() {
return merMapId;
}
public void setMerMapId(Long merMapId) {
this.merMapId = merMapId;
}
@Nullable
public String getHshopName() {
return hshopName;
}
public void setHshopName(@Nullable String hshopName) {
this.hshopName = hshopName;
}
@Nullable
public String getHshopNameabcn() {
return hshopNameabcn;
}
public void setHshopNameabcn(@Nullable String hshopNameabcn) {
this.hshopNameabcn = hshopNameabcn;
}
public Long getCasherId() {
return casherId;
}
public void setCasherId(Long casherId) {
this.casherId = casherId;
}
public Integer getHshopNo() {
return hshopNo;
}
public void setHshopNo(Integer hshopNo) {
this.hshopNo = hshopNo;
}
@Nullable
public Integer getHposNo() {
return hposNo;
}
public void setHposNo(@Nullable Integer hposNo) {
this.hposNo = hposNo;
}
public Byte getPppFlag() {
return pppFlag;
}
public void setPppFlag(Byte pppFlag) {
this.pppFlag = pppFlag;
}
@Nullable
public Integer getHposBatch() {
return hposBatch;
}
public void setHposBatch(@Nullable Integer hposBatch) {
this.hposBatch = hposBatch;
}
@Nullable
public Integer getHposTrace() {
return hposTrace;
}
public void setHposTrace(@Nullable Integer hposTrace) {
this.hposTrace = hposTrace;
}
@Nullable
public String getHposKey() {
return hposKey;
}
public void setHposKey(@Nullable String hposKey) {
this.hposKey = hposKey;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Nullable
public String getHostName() {
return hostName;
}
public void setHostName(@Nullable String hostName) {
this.hostName = hostName;
}
}
\ No newline at end of file
package com.xingdata.zxpay.model;
import android.support.annotation.Nullable;
import java.util.Date;
public class Shopppp {
private Integer id;
private Integer hostMapId;
@Nullable
private Long opMapId;
@Nullable
private Long channelMapId;
private Long merMapId;
@Nullable
private String hshopName;
@Nullable
private String hshopNameabcn;
@Nullable
private Integer hshopNo;
private Byte pppFlag;
@Nullable
private String shopAppidDisp;
@Nullable
private String shopAppidScan;
@Nullable
private String hshopKeyWechat;
@Nullable
private String hshopKeyAlipay;
@Nullable
private String hshopKeyUnipay;
private Date updateTime;
private Date createTime;
@Nullable
private String hostName;
@Nullable
private Posppp posppp;
@Nullable
private Host host;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getHostMapId() {
return hostMapId;
}
public void setHostMapId(Integer hostMapId) {
this.hostMapId = hostMapId;
}
@Nullable
public Long getOpMapId() {
return opMapId;
}
public void setOpMapId(@Nullable Long opMapId) {
this.opMapId = opMapId;
}
@Nullable
public Long getChannelMapId() {
return channelMapId;
}
public void setChannelMapId(@Nullable Long channelMapId) {
this.channelMapId = channelMapId;
}
public Long getMerMapId() {
return merMapId;
}
public void setMerMapId(Long merMapId) {
this.merMapId = merMapId;
}
@Nullable
public String getHshopName() {
return hshopName;
}
public void setHshopName(@Nullable String hshopName) {
this.hshopName = hshopName;
}
@Nullable
public String getHshopNameabcn() {
return hshopNameabcn;
}
public void setHshopNameabcn(@Nullable String hshopNameabcn) {
this.hshopNameabcn = hshopNameabcn;
}
@Nullable
public Integer getHshopNo() {
return hshopNo;
}
public void setHshopNo(@Nullable Integer hshopNo) {
this.hshopNo = hshopNo;
}
public Byte getPppFlag() {
return pppFlag;
}
public void setPppFlag(Byte pppFlag) {
this.pppFlag = pppFlag;
}
@Nullable
public String getShopAppidDisp() {
return shopAppidDisp;
}
public void setShopAppidDisp(@Nullable String shopAppidDisp) {
this.shopAppidDisp = shopAppidDisp;
}
@Nullable
public String getShopAppidScan() {
return shopAppidScan;
}
public void setShopAppidScan(@Nullable String shopAppidScan) {
this.shopAppidScan = shopAppidScan;
}
@Nullable
public String getHshopKeyWechat() {
return hshopKeyWechat;
}
public void setHshopKeyWechat(@Nullable String hshopKeyWechat) {
this.hshopKeyWechat = hshopKeyWechat;
}
@Nullable
public String getHshopKeyAlipay() {
return hshopKeyAlipay;
}
public void setHshopKeyAlipay(@Nullable String hshopKeyAlipay) {
this.hshopKeyAlipay = hshopKeyAlipay;
}
@Nullable
public String getHshopKeyUnipay() {
return hshopKeyUnipay;
}
public void setHshopKeyUnipay(@Nullable String hshopKeyUnipay) {
this.hshopKeyUnipay = hshopKeyUnipay;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Nullable
public String getHostName() {
return hostName;
}
public void setHostName(@Nullable String hostName) {
this.hostName = hostName;
}
@Nullable
public Posppp getPosppp() {
return posppp;
}
public void setPosppp(@Nullable Posppp posppp) {
this.posppp = posppp;
}
@Nullable
public Host getHost() {
return host;
}
public void setHost(@Nullable Host host) {
this.host = host;
}
}
\ No newline at end of file
<resources>
<string name="app_name">pay</string>
</resources>
package com.xingdata.zxpay;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
include ':app'
include ':app', ':pay'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment