Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supplier
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王宇航
supplier
Commits
0028c801
Commit
0028c801
authored
Apr 21, 2021
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、支付模塊調整
parent
871b5035
Hide whitespace changes
Inline
Side-by-side
Showing
90 changed files
with
525 additions
and
650 deletions
+525
-650
component-login/src/main/java/com/gingersoft/gsa/cloud/login/ComponentLogin.java
+1
-1
component-main/src/main/java/com/gingersoft/gsa/cloud/main/ComponentMain.java
+2
-1
component-main/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/HomePresenter.java
+0
-4
component-main/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/NewMainPresenter.java
+0
-4
component-main/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/SettlementReportPresenter.java
+0
-4
component-pay/src/main/java/com/gingersoft/gsa/cloud/pay/mvp/ui/activity/PayResultActivity.java
+8
-17
component-table/src/main/java/com/gingersoft/gsa/cloud/table/di/module/SetMealModule.java
+9
-9
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/action/order/CancelOrder.java
+52
-13
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/action/order/PrintOrderAction.java
+0
-4
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/action/order/RefundOrder.java
+3
-9
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/action/order/TipsOrder.java
+3
-10
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/contract/SetMealContract.java
+2
-1
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/SetMealModel.java
+20
-0
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/bean/response/OrderManagerResponse.java
+1
-1
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
+1
-1
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/orderManager/AllOrderPresenter.java
+1
-1
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/orderManager/OrderDetailPresenter.java
+1
-1
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/MealStandActivity.java
+8
-7
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderPayActivity.java
+106
-107
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/orderManager/OrderCenterActivity.java
+1
-1
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/orderManager/OrderDetailActivity.java
+1
-6
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/discount/NomalDiscountFragment.java
+2
-4
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/mealstand/SetMealFragment.java
+9
-4
component-table/src/main/res/layout/table_activity_meal_stand.xml
+0
-2
library-base/src/main/java/com/jess/arms/utils/ArmsUtils.java
+18
-28
library-common/src/main/java/com/gingersoft/gsa/cloud/common/logan/LoganManager.java
+2
-2
library-order/src/main/AndroidManifest.xml
+0
-7
library-order/src/main/java/com/gingersoft/gsa/cloud/order/bean/event/MealPayResultParam.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/order/bean/request/MealOrderPayRequest.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/order/discount/MultyDiscount.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/EventListener.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/PayDeviceFactory.java
+10
-10
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/PaymentControl.java
+16
-8
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/contract/PayMethodContract.java
+24
-17
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/phone/PhoneCallbackListener.java
+1
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/phone/PhonePayAction.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/phone/PhonePayActionImp.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/PosPay.java
+28
-26
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/PosPayAction.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/base/bean/BaseBgRequest.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/base/bean/BaseBgResponse.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/base/bean/BasePosRequest.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/base/bean/BasePosResponse.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/base/bean/PosMatter.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/base/bean/PosPayLog.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/base/fragment/PosActionStatusExceptionFragment.java
+3
-8
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/bbpos/BBPosDevice.java
+9
-9
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/bbpos/BBposCallback.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/HywebCallback.java
+1
-3
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/HywebDevice.java
+23
-23
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/PosCallbackListener.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/request/bg/GetTxnIdRequest.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/request/pos/AdjustTipRequest.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/request/pos/PrintPaymentStubRequest.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/request/pos/RefundRequest.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/request/pos/RetrievalRequest.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/request/pos/SaleRequest.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/request/pos/SettlementRequest.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/request/pos/VoidRequest.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/bg/GetCancelTxnIdResponse.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/bg/GetRefundIdResponse.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/bg/GetTipTxnIdResponse.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/bg/GetTxnIdResponse.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/pos/AdjustTipRespose.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/pos/HywebPosResponse.java
+2
-2
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/pos/PrintPaymentStubResponse.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/pos/RefundRespose.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/pos/RetrievalRespose.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/pos/SaleRespose.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/pos/SettlementRespose.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/bean/response/pos/VoidRespose.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/command/CommandImpl.java
+11
-11
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/constant/HywebActionStatusCode.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/constant/HywebMethodConstant.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/constant/TransactionStatusCode.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/imp/IHywebAction.java
+5
-5
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/imp/PrintPaymentStubImpl.java
+4
-4
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/imp/RefundActionImpl.java
+8
-8
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/imp/RetrievalActionImpl.java
+8
-8
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/imp/SaleActionImpl.java
+9
-9
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/imp/SettlementActionImpl.java
+4
-4
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/imp/TipsActionImpl.java
+8
-8
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/hyweb/imp/VoidActionImpl.java
+8
-8
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/yedpay/YedpayCallback.java
+1
-4
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/yedpay/YedpayDevice.java
+14
-17
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/device/pos/yedpay/constant/YedpayConstant.java
+1
-1
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/lifecycle/activity/PayFlowActivity.java
+0
-124
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/lifecycle/case/PayFlowCase.kt
+0
-14
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/lifecycle/fragment/PayFlowFragment.java
+12
-7
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/lifecycle/presenter/PayFlowPresenter.java
+16
-13
No files found.
component-login/src/main/java/com/gingersoft/gsa/cloud/login/ComponentLogin.java
View file @
0028c801
...
@@ -13,7 +13,7 @@ import com.gingersoft.gsa.cloud.login.mvp.ui.activity.ChooseRestaurantActivity;
...
@@ -13,7 +13,7 @@ import com.gingersoft.gsa.cloud.login.mvp.ui.activity.ChooseRestaurantActivity;
import
com.gingersoft.gsa.cloud.login.mvp.ui.activity.LoginActivity
;
import
com.gingersoft.gsa.cloud.login.mvp.ui.activity.LoginActivity
;
import
com.gingersoft.gsa.cloud.login.mvp.ui.activity.SwitchServerActivity
;
import
com.gingersoft.gsa.cloud.login.mvp.ui.activity.SwitchServerActivity
;
import
com.gingersoft.gsa.cloud.login.mvp.ui.activity.WelcomeActivity
;
import
com.gingersoft.gsa.cloud.login.mvp.ui.activity.WelcomeActivity
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.command.CommandImpl
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.command.CommandImpl
;
public
class
ComponentLogin
implements
IComponent
{
public
class
ComponentLogin
implements
IComponent
{
...
...
component-main/src/main/java/com/gingersoft/gsa/cloud/main/ComponentMain.java
View file @
0028c801
...
@@ -132,7 +132,8 @@ public class ComponentMain implements IComponent {
...
@@ -132,7 +132,8 @@ public class ComponentMain implements IComponent {
}
}
private
void
openActivity
(
CC
cc
)
{
private
void
openActivity
(
CC
cc
)
{
Intent
intent
=
new
Intent
(
cc
.
getContext
(),
MainActivity
.
class
);
// Intent intent = new Intent(cc.getContext(), MainActivity.class);
Intent
intent
=
new
Intent
(
cc
.
getContext
(),
NewMainActivity
.
class
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
cc
.
getContext
().
startActivity
(
intent
);
cc
.
getContext
().
startActivity
(
intent
);
}
}
...
...
component-main/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/HomePresenter.java
View file @
0028c801
...
@@ -9,7 +9,6 @@ import com.billy.cc.core.component.CC;
...
@@ -9,7 +9,6 @@ import com.billy.cc.core.component.CC;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.common.constans.HttpsConstans
;
import
com.gingersoft.gsa.cloud.common.constans.HttpsConstans
;
import
com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager
;
import
com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.common.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.common.webview.WebviewHelper
;
import
com.gingersoft.gsa.cloud.common.webview.WebviewHelper
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
...
@@ -18,9 +17,6 @@ import com.gingersoft.gsa.cloud.main.mvp.model.bean.CheckVersionRequest;
...
@@ -18,9 +17,6 @@ import com.gingersoft.gsa.cloud.main.mvp.model.bean.CheckVersionRequest;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.MainBusinessBean
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.MainBusinessBean
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.activity.MainActivity
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.activity.MainActivity
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.fragment.HomeFragment
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.fragment.HomeFragment
;
import
com.gingersoft.gsa.cloud.pay.pos.OnPosActionListener
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPay
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.jess.arms.di.scope.FragmentScope
;
import
com.jess.arms.di.scope.FragmentScope
;
import
com.jess.arms.http.imageloader.ImageLoader
;
import
com.jess.arms.http.imageloader.ImageLoader
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.integration.AppManager
;
...
...
component-main/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/NewMainPresenter.java
View file @
0028c801
...
@@ -8,15 +8,11 @@ import android.text.TextUtils;
...
@@ -8,15 +8,11 @@ import android.text.TextUtils;
import
com.billy.cc.core.component.CC
;
import
com.billy.cc.core.component.CC
;
import
com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager
;
import
com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.webview.WebviewHelper
;
import
com.gingersoft.gsa.cloud.common.webview.WebviewHelper
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.main.mvp.contract.NewMainContract
;
import
com.gingersoft.gsa.cloud.main.mvp.contract.NewMainContract
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.CheckVersionRequest
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.CheckVersionRequest
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.activity.NewMainActivity
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.activity.NewMainActivity
;
import
com.gingersoft.gsa.cloud.pay.pos.OnPosActionListener
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPay
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.jess.arms.di.scope.ActivityScope
;
import
com.jess.arms.di.scope.ActivityScope
;
import
com.jess.arms.http.imageloader.ImageLoader
;
import
com.jess.arms.http.imageloader.ImageLoader
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.integration.AppManager
;
...
...
component-main/src/main/java/com/gingersoft/gsa/cloud/main/mvp/presenter/SettlementReportPresenter.java
View file @
0028c801
...
@@ -7,16 +7,12 @@ import com.gingersoft.gsa.cloud.common.bean.BaseResult;
...
@@ -7,16 +7,12 @@ import com.gingersoft.gsa.cloud.common.bean.BaseResult;
import
com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager
;
import
com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager
;
import
com.gingersoft.gsa.cloud.common.core.settlement.SettlementReport
;
import
com.gingersoft.gsa.cloud.common.core.settlement.SettlementReport
;
import
com.gingersoft.gsa.cloud.common.utils.JsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.JsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.main.R
;
import
com.gingersoft.gsa.cloud.main.R
;
import
com.gingersoft.gsa.cloud.main.mvp.contract.SettlementReportContract
;
import
com.gingersoft.gsa.cloud.main.mvp.contract.SettlementReportContract
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.SendSettlement
;
import
com.gingersoft.gsa.cloud.main.mvp.model.bean.SendSettlement
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.activity.SettlementReportActivity
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.activity.SettlementReportActivity
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.adapter.SettlementReportItem5Adapter
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.adapter.SettlementReportItem5Adapter
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.adapter.SettlementReportItemAdapter
;
import
com.gingersoft.gsa.cloud.main.mvp.ui.adapter.SettlementReportItemAdapter
;
import
com.gingersoft.gsa.cloud.pay.pos.OnPosActionListener
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPay
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.ui.bean.view.SectionTextItem3
;
import
com.gingersoft.gsa.cloud.ui.bean.view.SectionTextItem3
;
import
com.gingersoft.gsa.cloud.ui.bean.view.SectionTextItem5
;
import
com.gingersoft.gsa.cloud.ui.bean.view.SectionTextItem5
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.CommonTipDialog
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.CommonTipDialog
;
...
...
component-pay/src/main/java/com/gingersoft/gsa/cloud/pay/mvp/ui/activity/PayResultActivity.java
View file @
0028c801
...
@@ -10,11 +10,9 @@ import android.view.View;
...
@@ -10,11 +10,9 @@ import android.view.View;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
androidx.core.content.ContextCompat
;
import
androidx.core.content.ContextCompat
;
import
com.billy.cc.core.component.CC
;
import
com.billy.cc.core.component.CC
;
import
com.billy.cc.core.component.CCUtil
;
import
com.billy.cc.core.component.CCUtil
;
import
com.gingersoft.gsa.cloud.common.constans.AppConstans
;
import
com.gingersoft.gsa.cloud.common.constans.AppConstans
;
...
@@ -27,22 +25,18 @@ import com.gingersoft.gsa.cloud.component.ComponentAction;
...
@@ -27,22 +25,18 @@ import com.gingersoft.gsa.cloud.component.ComponentAction;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.order.bean.event.MealPayResultParam
;
import
com.gingersoft.gsa.cloud.order.bean.event.MealPayResultParam
;
import
com.gingersoft.gsa.cloud.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.R
;
import
com.gingersoft.gsa.cloud.pay.R
;
import
com.gingersoft.gsa.cloud.pay.R2
;
import
com.gingersoft.gsa.cloud.pay.R2
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.di.component.DaggerPayResultComponent
;
import
com.gingersoft.gsa.cloud.pay.di.component.DaggerPayResultComponent
;
import
com.gingersoft.gsa.cloud.pay.mvp.contract.PayResultContract
;
import
com.gingersoft.gsa.cloud.pay.mvp.contract.PayResultContract
;
import
com.gingersoft.gsa.cloud.pay.mvp.presenter.PayResultPresenter
;
import
com.gingersoft.gsa.cloud.pay.mvp.presenter.PayResultPresenter
;
import
com.gingersoft.gsa.cloud.pay.pos.OnPosActionListener
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.PosAction
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.request.pos.AdjustTipRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPay
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.request.pos.RetrievalRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.response.pos.SaleRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.AdjustTipRequest
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.RetrievalRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.AdjustTipRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.SaleRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.util.PayMethodUtils
;
import
com.gingersoft.gsa.cloud.pay.util.PayMethodUtils
;
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
;
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
;
import
com.gingersoft.gsa.cloud.print.bean.adapter.PrintContentAdapter
;
import
com.gingersoft.gsa.cloud.print.bean.adapter.PrintContentAdapter
;
...
@@ -56,12 +50,9 @@ import com.kingja.loadsir.core.LoadService;
...
@@ -56,12 +50,9 @@ import com.kingja.loadsir.core.LoadService;
import
com.kingja.loadsir.core.LoadSir
;
import
com.kingja.loadsir.core.LoadSir
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaButton
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaButton
;
import
com.qmuiteam.qmui.widget.QMUITopBar
;
import
com.qmuiteam.qmui.widget.QMUITopBar
;
import
java.util.List
;
import
java.util.List
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
import
static
com
.
jess
.
arms
.
utils
.
Preconditions
.
checkNotNull
;
import
static
com
.
jess
.
arms
.
utils
.
Preconditions
.
checkNotNull
;
...
@@ -152,7 +143,7 @@ public class PayResultActivity extends BaseFragmentActivity<PayResultPresenter>
...
@@ -152,7 +143,7 @@ public class PayResultActivity extends BaseFragmentActivity<PayResultPresenter>
callback1
.
showFinalStrategy
(
true
);
callback1
.
showFinalStrategy
(
true
);
}
}
//支付状态异常 重试查询
//支付状态异常 重试查询
retrievalStatus
(
P
os
Action
.
SALE
);
retrievalStatus
(
P
ay
Action
.
SALE
);
retryCount
--;
retryCount
--;
}
}
});
});
...
@@ -212,7 +203,7 @@ public class PayResultActivity extends BaseFragmentActivity<PayResultPresenter>
...
@@ -212,7 +203,7 @@ public class PayResultActivity extends BaseFragmentActivity<PayResultPresenter>
return
drawable
;
return
drawable
;
}
}
private
void
retrievalStatus
(
P
os
Action
posAction
)
{
private
void
retrievalStatus
(
P
ay
Action
posAction
)
{
RetrievalRequest
retrievalRequest
=
new
RetrievalRequest
();
RetrievalRequest
retrievalRequest
=
new
RetrievalRequest
();
retrievalRequest
.
setTXN_ID
(
mMealPayResultParam
.
getTxnId
());
retrievalRequest
.
setTXN_ID
(
mMealPayResultParam
.
getTxnId
());
// PosPay.retrieval(mContext, this, mMealPayResultParam.getMealOrderPayRequest().getOrderId(), posAction, retrievalRequest, new OnPosActionListener() {
// PosPay.retrieval(mContext, this, mMealPayResultParam.getMealOrderPayRequest().getOrderId(), posAction, retrievalRequest, new OnPosActionListener() {
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/di/module/SetMealModule.java
View file @
0028c801
...
@@ -6,7 +6,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
...
@@ -6,7 +6,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import
com.gingersoft.gsa.cloud.database.bean.ComboItem
;
import
com.gingersoft.gsa.cloud.database.bean.ComboItem
;
import
com.gingersoft.gsa.cloud.database.bean.Food
;
import
com.gingersoft.gsa.cloud.database.bean.Food
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.
MealStand
Contract
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.
SetMeal
Contract
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.ComboAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.ComboAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.FoodAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.FoodAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.FoodGroupAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.FoodGroupAdapter
;
...
@@ -82,26 +82,26 @@ public abstract class SetMealModule {
...
@@ -82,26 +82,26 @@ public abstract class SetMealModule {
@FragmentScope
@FragmentScope
@Provides
@Provides
static
FoodGroupAdapter
provideFoodGroupAdapter
(
MealStand
Contract
.
View
IView
,
@Named
(
"foodGroupList"
)
List
<
Food
>
foodGroupList
)
{
static
FoodGroupAdapter
provideFoodGroupAdapter
(
SetMeal
Contract
.
View
IView
,
@Named
(
"foodGroupList"
)
List
<
Food
>
foodGroupList
)
{
return
new
FoodGroupAdapter
(
IView
.
getActivity
(),
foodGroupList
,
IView
.
getFromType
());
return
new
FoodGroupAdapter
(
IView
.
getActivity
2
(),
foodGroupList
,
IView
.
getFromType
());
}
}
@FragmentScope
@FragmentScope
@Provides
@Provides
static
FoodAdapter
provideFoodAdapter
(
MealStand
Contract
.
View
IView
,
@Named
(
"foodList"
)
List
<
Food
>
foodList
)
{
static
FoodAdapter
provideFoodAdapter
(
SetMeal
Contract
.
View
IView
,
@Named
(
"foodList"
)
List
<
Food
>
foodList
)
{
return
new
FoodAdapter
(
IView
.
getActivity
(),
foodList
,
IView
.
getFromType
());
return
new
FoodAdapter
(
IView
.
getActivity
2
(),
foodList
,
IView
.
getFromType
());
}
}
@FragmentScope
@FragmentScope
@Provides
@Provides
static
ComboAdapter
provideComboAdapter
(
MealStand
Contract
.
View
IView
,
List
<
ComboItem
>
comboItemList
)
{
static
ComboAdapter
provideComboAdapter
(
SetMeal
Contract
.
View
IView
,
List
<
ComboItem
>
comboItemList
)
{
return
new
ComboAdapter
(
IView
.
getActivity
(),
comboItemList
);
return
new
ComboAdapter
(
IView
.
getActivity
2
(),
comboItemList
);
}
}
@FragmentScope
@FragmentScope
@Provides
@Provides
static
ModifierAdapter
provideModifierAdapter
(
MealStand
Contract
.
View
IView
,
List
<
Modifier
>
modifierList
)
{
static
ModifierAdapter
provideModifierAdapter
(
SetMeal
Contract
.
View
IView
,
List
<
Modifier
>
modifierList
)
{
return
new
ModifierAdapter
(
IView
.
getActivity
(),
modifierList
);
return
new
ModifierAdapter
(
IView
.
getActivity
2
(),
modifierList
);
}
}
@Named
(
"foodGridLayoutManager"
)
@Named
(
"foodGridLayoutManager"
)
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/action/order/CancelOrder.java
View file @
0028c801
...
@@ -2,17 +2,16 @@ package com.gingersoft.gsa.cloud.table.mvp.action.order;
...
@@ -2,17 +2,16 @@ package com.gingersoft.gsa.cloud.table.mvp.action.order;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.gingersoft.gsa.cloud.common.
logan.Logan
Manager
;
import
com.gingersoft.gsa.cloud.common.
core.restaurant.RestaurantInfo
Manager
;
import
com.gingersoft.gsa.cloud.common.patterns.Strategy
;
import
com.gingersoft.gsa.cloud.common.patterns.Strategy
;
import
com.gingersoft.gsa.cloud.common.utils.AppDevices
;
import
com.gingersoft.gsa.cloud.common.utils.AppDevices
;
import
com.gingersoft.gsa.cloud.pay.bean.PosActionStatusExceptionParam
;
import
com.gingersoft.gsa.cloud.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.pay.pos.OnPosActionListener
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.pos.PosAction
;
import
com.gingersoft.gsa.cloud.pay.PaymentControl
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPay
;
import
com.gingersoft.gsa.cloud.pay.RequestParms
;
import
com.gingersoft.gsa.cloud.pay.pos.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.pay.ResultCallback
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.VoidRequest
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.request.pos.VoidRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.VoidRespose
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.response.OrderManagerResponse
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.response.OrderManagerResponse
;
import
com.jess.arms.base.BaseFragmentActivity
;
import
com.jess.arms.base.BaseFragmentActivity
;
...
@@ -20,6 +19,8 @@ import com.jess.arms.mvp.IView;
...
@@ -20,6 +19,8 @@ import com.jess.arms.mvp.IView;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
import
java.util.List
;
/**
/**
* @作者: bin
* @作者: bin
* @創建時間: 2021-01-15 15:19
* @創建時間: 2021-01-15 15:19
...
@@ -56,8 +57,8 @@ public class CancelOrder implements Strategy<OrderManagerResponse> {
...
@@ -56,8 +57,8 @@ public class CancelOrder implements Strategy<OrderManagerResponse> {
dialogBuilder
.
setMessage
(
"是否取消訂單?"
);
dialogBuilder
.
setMessage
(
"是否取消訂單?"
);
dialogBuilder
.
addAction
(
0
,
"確認"
,
QMUIDialogAction
.
ACTION_PROP_NEGATIVE
,
(
dialog
,
index
)
->
{
dialogBuilder
.
addAction
(
0
,
"確認"
,
QMUIDialogAction
.
ACTION_PROP_NEGATIVE
,
(
dialog
,
index
)
->
{
dialog
.
dismiss
();
dialog
.
dismiss
();
if
(
datasBean
.
withHywebPay
()
&&
AppDevices
.
isHywebPos
())
{
if
(
AppDevices
.
isPosPay
())
{
hyweb
OrderCancle
(
datasBean
);
pos
OrderCancle
(
datasBean
);
}
else
{
}
else
{
if
(
cancelListener
!=
null
)
{
if
(
cancelListener
!=
null
)
{
cancelListener
.
cancel
(
datasBean
.
getId
());
cancelListener
.
cancel
(
datasBean
.
getId
());
...
@@ -68,7 +69,7 @@ public class CancelOrder implements Strategy<OrderManagerResponse> {
...
@@ -68,7 +69,7 @@ public class CancelOrder implements Strategy<OrderManagerResponse> {
dialogBuilder
.
create
(
R
.
style
.
MyDialogTheme2
).
show
();
dialogBuilder
.
create
(
R
.
style
.
MyDialogTheme2
).
show
();
}
}
private
void
hyweb
OrderCancle
(
OrderManagerResponse
datasBean
)
{
private
void
pos
OrderCancle
(
OrderManagerResponse
datasBean
)
{
GetTxnIdRequest
txnIdRequest
=
new
GetTxnIdRequest
();
GetTxnIdRequest
txnIdRequest
=
new
GetTxnIdRequest
();
txnIdRequest
.
setOrderId
(
datasBean
.
getId
());
txnIdRequest
.
setOrderId
(
datasBean
.
getId
());
if
(!
TextUtils
.
isEmpty
(
datasBean
.
getTableNumber
()))
{
if
(!
TextUtils
.
isEmpty
(
datasBean
.
getTableNumber
()))
{
...
@@ -78,7 +79,45 @@ public class CancelOrder implements Strategy<OrderManagerResponse> {
...
@@ -78,7 +79,45 @@ public class CancelOrder implements Strategy<OrderManagerResponse> {
}
}
txnIdRequest
.
setAmount
(
datasBean
.
getAmount
());
txnIdRequest
.
setAmount
(
datasBean
.
getAmount
());
VoidRequest
voidRequest
=
new
VoidRequest
();
VoidRequest
voidRequest
=
new
VoidRequest
();
// PosPay.voidO(mActivity, mRootView, voidRequest, txnIdRequest, new OnPosActionListener<VoidRespose>() {
int
payType
=
1106
;
List
<
OrderManagerResponse
.
OrderPayBean
>
orderPays
=
datasBean
.
getOrderPays
();
for
(
int
i
=
0
;
i
<
orderPays
.
size
();
i
++)
{
final
OrderManagerResponse
.
OrderPayBean
orderPayBean
=
orderPays
.
get
(
i
);
if
(
AppDevices
.
isYedpay
())
{
payType
=
orderPayBean
.
getPayType
();
}
}
RequestParms
build
=
RequestParms
.
builder
()
.
action
(
PayAction
.
REFUND
)
.
orderId
(
DoshokuOrder
.
getInstance
().
getOrderId
())
.
resturantId
(
RestaurantInfoManager
.
newInstance
().
getRestaurantId
())
.
payType
(
payType
)
.
refundReason
(
"客戶退款"
)
.
resultCallback
(
new
ResultCallback
()
{
@Override
public
void
onSuccess
()
{
if
(
cancelListener
!=
null
)
{
cancelListener
.
refeshOrders
();
}
}
@Override
public
void
onFailure
(
Throwable
t
)
{
}
})
.
build
();
PaymentControl
.
newInstance
().
showPayFlowFragment
(
mActivity
,
build
);
// PosPay.builder()
// .context(GsaCloudApplication.getAppContext())
// .lifecycleView(mRootView)
// .posRequest(voidRequest)
// .bgRequest(txnIdRequest)
// .callback(new PosCallbackListener<VoidRespose>() {
//
//
// @Override
// @Override
// public void onPosSuccess(VoidRespose response) {
// public void onPosSuccess(VoidRespose response) {
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/action/order/PrintOrderAction.java
View file @
0028c801
...
@@ -2,7 +2,6 @@ package com.gingersoft.gsa.cloud.table.mvp.action.order;
...
@@ -2,7 +2,6 @@ package com.gingersoft.gsa.cloud.table.mvp.action.order;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.util.Log
;
import
com.billy.cc.core.component.CC
;
import
com.billy.cc.core.component.CC
;
import
com.gingersoft.gsa.cloud.common.constans.PrintConstans
;
import
com.gingersoft.gsa.cloud.common.constans.PrintConstans
;
import
com.gingersoft.gsa.cloud.common.core.table.TableBean
;
import
com.gingersoft.gsa.cloud.common.core.table.TableBean
;
...
@@ -18,9 +17,6 @@ import com.gingersoft.gsa.cloud.order.cart.ShoppingCart;
...
@@ -18,9 +17,6 @@ import com.gingersoft.gsa.cloud.order.cart.ShoppingCart;
import
com.gingersoft.gsa.cloud.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.pos.OnPosActionListener
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPay
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
;
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
;
import
com.gingersoft.gsa.cloud.print.bean.adapter.PrintContentAdapter
;
import
com.gingersoft.gsa.cloud.print.bean.adapter.PrintContentAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.response.OrderManagerResponse
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.response.OrderManagerResponse
;
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/action/order/RefundOrder.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
action
.
order
;
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
action
.
order
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.gingersoft.gsa.cloud.common.logan.LoganManager
;
import
com.gingersoft.gsa.cloud.common.patterns.Strategy
;
import
com.gingersoft.gsa.cloud.common.patterns.Strategy
;
import
com.gingersoft.gsa.cloud.pay.bean.PosActionStatusExceptionParam
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.OnPosActionListener
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.request.pos.RefundRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.PosAction
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPay
;
import
com.gingersoft.gsa.cloud.pay.pos.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.RefundRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.RefundRespose
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.response.OrderManagerResponse
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.response.OrderManagerResponse
;
import
com.jess.arms.base.BaseFragmentActivity
;
import
com.jess.arms.base.BaseFragmentActivity
;
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/action/order/TipsOrder.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
action
.
order
;
package
com
.
gingersoft
.
gsa
.
cloud
.
table
.
mvp
.
action
.
order
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.gingersoft.gsa.cloud.common.logan.LoganManager
;
import
com.gingersoft.gsa.cloud.common.patterns.Strategy
;
import
com.gingersoft.gsa.cloud.common.patterns.Strategy
;
import
com.gingersoft.gsa.cloud.common.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.common.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.pay.bean.PosActionStatusExceptionParam
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.OnPosActionListener
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.request.pos.AdjustTipRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.PosAction
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPay
;
import
com.gingersoft.gsa.cloud.pay.pos.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.AdjustTipRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.AdjustTipRespose
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.response.OrderManagerResponse
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.response.OrderManagerResponse
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.KeyboardDialog
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.KeyboardDialog
;
import
com.jess.arms.base.BaseFragmentActivity
;
import
com.jess.arms.base.BaseFragmentActivity
;
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/contract/SetMealContract.java
View file @
0028c801
...
@@ -57,7 +57,6 @@ public interface SetMealContract {
...
@@ -57,7 +57,6 @@ public interface SetMealContract {
void
resetPluMode
();
void
resetPluMode
();
void
setMealRvScrollToPosition
(
int
position
);
void
setMealRvScrollToPosition
(
int
position
);
void
returnFoodGroupList
(
List
<
Food
>
foodGroupList
);
void
returnFoodGroupList
(
List
<
Food
>
foodGroupList
);
...
@@ -69,6 +68,8 @@ public interface SetMealContract {
...
@@ -69,6 +68,8 @@ public interface SetMealContract {
void
returnModifierList
(
List
<
Modifier
>
modifierList
);
void
returnModifierList
(
List
<
Modifier
>
modifierList
);
MealStandActivity
getActivity2
();
MealStandActivity
getActivity2
();
int
getFromType
();
}
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/SetMealModel.java
View file @
0028c801
...
@@ -2,11 +2,13 @@ package com.gingersoft.gsa.cloud.table.mvp.model;
...
@@ -2,11 +2,13 @@ package com.gingersoft.gsa.cloud.table.mvp.model;
import
android.app.Application
;
import
android.app.Application
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.database.bean.ComboItem
;
import
com.gingersoft.gsa.cloud.database.bean.ComboItem
;
import
com.gingersoft.gsa.cloud.database.bean.Food
;
import
com.gingersoft.gsa.cloud.database.bean.Food
;
import
com.gingersoft.gsa.cloud.database.bean.FoodCombo
;
import
com.gingersoft.gsa.cloud.database.bean.FoodCombo
;
import
com.gingersoft.gsa.cloud.database.bean.FoodModifier
;
import
com.gingersoft.gsa.cloud.database.bean.FoodModifier
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.response.BaseOrderResponse
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.jess.arms.integration.IRepositoryManager
;
import
com.jess.arms.integration.IRepositoryManager
;
import
com.jess.arms.mvp.BaseModel
;
import
com.jess.arms.mvp.BaseModel
;
...
@@ -19,7 +21,9 @@ import com.gingersoft.gsa.cloud.table.mvp.contract.SetMealContract;
...
@@ -19,7 +21,9 @@ import com.gingersoft.gsa.cloud.table.mvp.contract.SetMealContract;
import
java.util.List
;
import
java.util.List
;
import
io.reactivex.Observable
;
import
io.reactivex.Single
;
import
io.reactivex.Single
;
import
okhttp3.RequestBody
;
/**
/**
...
@@ -82,4 +86,19 @@ public class SetMealModel extends BaseModel implements SetMealContract.Model {
...
@@ -82,4 +86,19 @@ public class SetMealModel extends BaseModel implements SetMealContract.Model {
public
Single
<
List
<
FoodModifier
>>
queryDB_FoodModifierList
(
long
fid
)
{
public
Single
<
List
<
FoodModifier
>>
queryDB_FoodModifierList
(
long
fid
)
{
return
null
;
return
null
;
}
}
@Override
public
Observable
<
BaseResult
>
toOrderPay
(
RequestBody
requestBody
)
{
return
null
;
}
@Override
public
Observable
<
BaseResult
>
updateOrder
(
RequestBody
formBody
)
{
return
null
;
}
@Override
public
Observable
<
BaseOrderResponse
>
calculationPrice
(
long
orderId
)
{
return
null
;
}
}
}
\ No newline at end of file
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/bean/response/OrderManagerResponse.java
View file @
0028c801
...
@@ -10,7 +10,7 @@ import com.gingersoft.gsa.cloud.order.bean.response.OrderDiscountResponse;
...
@@ -10,7 +10,7 @@ import com.gingersoft.gsa.cloud.order.bean.response.OrderDiscountResponse;
import
com.gingersoft.gsa.cloud.order.bean.response.OrderResponse
;
import
com.gingersoft.gsa.cloud.order.bean.response.OrderResponse
;
import
com.gingersoft.gsa.cloud.pay.contract.PayMethodContract
;
import
com.gingersoft.gsa.cloud.pay.contract.PayMethodContract
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.HywebMethodConstant
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.constant.HywebMethodConstant
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.List
;
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/TablePresenter.java
View file @
0028c801
...
@@ -29,7 +29,7 @@ import com.gingersoft.gsa.cloud.order.order.BaseOrder;
...
@@ -29,7 +29,7 @@ import com.gingersoft.gsa.cloud.order.order.BaseOrder;
import
com.gingersoft.gsa.cloud.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.pay.bean.PosActionStatusExceptionParam
;
import
com.gingersoft.gsa.cloud.pay.bean.PosActionStatusExceptionParam
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.
pos
.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.table.FunctionTable
;
import
com.gingersoft.gsa.cloud.table.FunctionTable
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.TableContract
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.TableContract
;
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/orderManager/AllOrderPresenter.java
View file @
0028c801
...
@@ -5,7 +5,7 @@ import android.content.Context;
...
@@ -5,7 +5,7 @@ import android.content.Context;
import
android.content.Intent
;
import
android.content.Intent
;
import
com.gingersoft.gsa.cloud.pay.bean.PosActionStatusExceptionParam
;
import
com.gingersoft.gsa.cloud.pay.bean.PosActionStatusExceptionParam
;
import
com.gingersoft.gsa.cloud.pay.
pos
.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.AllOrderContract
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.AllOrderContract
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.response.OrderManagerResponse
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.response.OrderManagerResponse
;
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/orderManager/OrderDetailPresenter.java
View file @
0028c801
...
@@ -9,7 +9,7 @@ import com.gingersoft.gsa.cloud.order.bean.response.OrderDiscountResponse;
...
@@ -9,7 +9,7 @@ import com.gingersoft.gsa.cloud.order.bean.response.OrderDiscountResponse;
import
com.gingersoft.gsa.cloud.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.contract.PayMethodContract
;
import
com.gingersoft.gsa.cloud.pay.contract.PayMethodContract
;
import
com.gingersoft.gsa.cloud.pay.
pos
.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.pay.util.PayMethodUtils
;
import
com.gingersoft.gsa.cloud.pay.util.PayMethodUtils
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.OrderDetailContract
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.OrderDetailContract
;
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/MealStandActivity.java
View file @
0028c801
...
@@ -30,6 +30,7 @@ import android.widget.TextView;
...
@@ -30,6 +30,7 @@ import android.widget.TextView;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
androidx.core.widget.NestedScrollView
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.recyclerview.widget.DefaultItemAnimator
;
import
androidx.recyclerview.widget.DefaultItemAnimator
;
...
@@ -71,7 +72,7 @@ import com.gingersoft.gsa.cloud.table.mvp.contract.MealStandContract;
...
@@ -71,7 +72,7 @@ import com.gingersoft.gsa.cloud.table.mvp.contract.MealStandContract;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.SoldoutCtrFood
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.SoldoutCtrFood
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.event.InitTableEvent
;
import
com.gingersoft.gsa.cloud.table.mvp.model.bean.event.InitTableEvent
;
import
com.gingersoft.gsa.cloud.table.mvp.model.constant.OrderConentActionConstant
;
import
com.gingersoft.gsa.cloud.table.mvp.model.constant.OrderConentActionConstant
;
import
com.gingersoft.gsa.cloud.table.mvp.presenter.MealStandPresenter
;
import
com.gingersoft.gsa.cloud.table.mvp.presenter.
mealstand.
MealStandPresenter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.BaseFragmentAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.BaseFragmentAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.FoodGroupAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.FoodGroupAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.SelectMealAdapter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.SelectMealAdapter
;
...
@@ -157,7 +158,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -157,7 +158,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
RecyclerView
rv_discount
;
RecyclerView
rv_discount
;
@BindView
(
R2
.
id
.
scroll_combo
)
@BindView
(
R2
.
id
.
scroll_combo
)
ScrollView
scroll_combo
;
Nested
ScrollView
scroll_combo
;
@BindView
(
R2
.
id
.
rl_fine_tabs
)
@BindView
(
R2
.
id
.
rl_fine_tabs
)
RelativeLayout
rl_fine_tabs
;
RelativeLayout
rl_fine_tabs
;
...
@@ -283,10 +284,10 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -283,10 +284,10 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
private
ImageView
[]
ivPoints
;
private
ImageView
[]
ivPoints
;
private
int
mPageIndex
;
private
int
mPageIndex
;
private
int
totalPage
;
private
int
totalPage
;
//
@Inject
@Inject
//
@Named("foodGroupList")
@Named
(
"foodGroupList"
)
List
<
Food
>
mFoodGroupList
;
List
<
Food
>
mFoodGroupList
;
//
@Inject
@Inject
FoodGroupAdapter
mFoodGroupAdapter
;
FoodGroupAdapter
mFoodGroupAdapter
;
private
static
final
int
ORDER_CONTENT_CODE
=
1002
;
private
static
final
int
ORDER_CONTENT_CODE
=
1002
;
...
@@ -431,9 +432,9 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -431,9 +432,9 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
PagerConfig
.
setShowLog
(
true
);
PagerConfig
.
setShowLog
(
true
);
// 使用原生的 Adapter 即可
// 使用原生的 Adapter 即可
mFoodGroupAdapter
=
new
FoodGroupAdapter
(
this
,
foodGroupList
,
1
);
//
mFoodGroupAdapter = new FoodGroupAdapter(this, foodGroupList, 1);
//
mFoodGroupAdapter.setFoodGroupList(mFoodGroupList);
mFoodGroupAdapter
.
setFoodGroupList
(
mFoodGroupList
);
rv_food_group
.
setAdapter
(
mFoodGroupAdapter
);
rv_food_group
.
setAdapter
(
mFoodGroupAdapter
);
mFoodGroupAdapter
.
setOnItemClickListener
(
new
FoodGroupAdapter
.
OnItemClickListener
()
{
mFoodGroupAdapter
.
setOnItemClickListener
(
new
FoodGroupAdapter
.
OnItemClickListener
()
{
@Override
@Override
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/OrderPayActivity.java
View file @
0028c801
...
@@ -15,9 +15,9 @@ import androidx.recyclerview.widget.RecyclerView;
...
@@ -15,9 +15,9 @@ import androidx.recyclerview.widget.RecyclerView;
import
com.billy.cc.core.component.CC
;
import
com.billy.cc.core.component.CC
;
import
com.billy.cc.core.component.CCResult
;
import
com.billy.cc.core.component.CCResult
;
import
com.billy.cc.core.component.IComponentCallback
;
import
com.billy.cc.core.component.IComponentCallback
;
import
com.gingersoft.gsa.cloud.app.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.common.constans.PrintConstans
;
import
com.gingersoft.gsa.cloud.common.constans.PrintConstans
;
import
com.gingersoft.gsa.cloud.common.core.member.MemberInfo
;
import
com.gingersoft.gsa.cloud.common.core.member.MemberInfo
;
import
com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager
;
import
com.gingersoft.gsa.cloud.common.core.table.TableBean
;
import
com.gingersoft.gsa.cloud.common.core.table.TableBean
;
import
com.gingersoft.gsa.cloud.common.core.user.UserContext
;
import
com.gingersoft.gsa.cloud.common.core.user.UserContext
;
import
com.gingersoft.gsa.cloud.common.logan.LoganManager
;
import
com.gingersoft.gsa.cloud.common.logan.LoganManager
;
...
@@ -25,23 +25,19 @@ import com.gingersoft.gsa.cloud.common.utils.AppDevices;
...
@@ -25,23 +25,19 @@ import com.gingersoft.gsa.cloud.common.utils.AppDevices;
import
com.gingersoft.gsa.cloud.common.utils.BigDecimalUtils
;
import
com.gingersoft.gsa.cloud.common.utils.BigDecimalUtils
;
import
com.gingersoft.gsa.cloud.common.utils.LanguageUtils
;
import
com.gingersoft.gsa.cloud.common.utils.LanguageUtils
;
import
com.gingersoft.gsa.cloud.common.utils.VibratorUtils
;
import
com.gingersoft.gsa.cloud.common.utils.VibratorUtils
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.component.ComponentAction
;
import
com.gingersoft.gsa.cloud.component.ComponentAction
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.order.bean.event.MealPayResultParam
;
import
com.gingersoft.gsa.cloud.order.bean.event.MealPayResultParam
;
import
com.gingersoft.gsa.cloud.order.bean.request.MealOrderPayRequest
;
import
com.gingersoft.gsa.cloud.order.bean.request.MealOrderPayRequest
;
import
com.gingersoft.gsa.cloud.order.billItem.BillItem
;
import
com.gingersoft.gsa.cloud.order.billItem.BillItem
;
import
com.gingersoft.gsa.cloud.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PaymentControl
;
import
com.gingersoft.gsa.cloud.pay.RequestParms
;
import
com.gingersoft.gsa.cloud.pay.ResultCallback
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.contract.PayTypeContract
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.OnPosActionListener
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.response.pos.SaleRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPay
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.SaleRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.SaleRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.PayMethodConstant
;
import
com.gingersoft.gsa.cloud.pay.util.PayMethodUtils
;
import
com.gingersoft.gsa.cloud.pay.util.PayMethodUtils
;
import
com.gingersoft.gsa.cloud.print.PrinterUtils
;
import
com.gingersoft.gsa.cloud.print.PrinterUtils
;
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
;
import
com.gingersoft.gsa.cloud.print.bean.PrintContent
;
...
@@ -55,7 +51,7 @@ import com.gingersoft.gsa.cloud.table.mvp.presenter.OrderPayPresenter;
...
@@ -55,7 +51,7 @@ import com.gingersoft.gsa.cloud.table.mvp.presenter.OrderPayPresenter;
import
com.gingersoft.gsa.cloud.ui.view.OrderPayView
;
import
com.gingersoft.gsa.cloud.ui.view.OrderPayView
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog
;
import
com.gyf.immersionbar.ImmersionBar
;
import
com.gyf.immersionbar.ImmersionBar
;
import
com.jess.arms.base.BaseActivity
;
import
com.jess.arms.base.Base
Fragment
Activity
;
import
com.jess.arms.base.DefaultAdapter
;
import
com.jess.arms.base.DefaultAdapter
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.integration.AppManager
;
...
@@ -93,7 +89,7 @@ import static com.jess.arms.utils.Preconditions.checkNotNull;
...
@@ -93,7 +89,7 @@ import static com.jess.arms.utils.Preconditions.checkNotNull;
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
* ================================================
*/
*/
public
class
OrderPayActivity
extends
BaseActivity
<
OrderPayPresenter
>
implements
OrderPayContract
.
View
,
View
.
OnLongClickListener
{
public
class
OrderPayActivity
extends
Base
Fragment
Activity
<
OrderPayPresenter
>
implements
OrderPayContract
.
View
,
View
.
OnLongClickListener
{
@Inject
@Inject
AppManager
mAppManager
;
AppManager
mAppManager
;
...
@@ -324,7 +320,8 @@ public class OrderPayActivity extends BaseActivity<OrderPayPresenter> implements
...
@@ -324,7 +320,8 @@ public class OrderPayActivity extends BaseActivity<OrderPayPresenter> implements
}
}
@Override
@Override
public
void
onBackPressed
()
{
public
void
onBackPressedSupport
()
{
super
.
onBackPressedSupport
();
backPressed
();
backPressed
();
}
}
...
@@ -536,112 +533,114 @@ public class OrderPayActivity extends BaseActivity<OrderPayPresenter> implements
...
@@ -536,112 +533,114 @@ public class OrderPayActivity extends BaseActivity<OrderPayPresenter> implements
mPresenter
.
setBillMoneyList
(
mBillMoneyList
);
mPresenter
.
setBillMoneyList
(
mBillMoneyList
);
if
(
AppDevices
.
isHywebPos
())
{
int
hasYedpayMethodIndex
=
PayMethodUtils
.
hasYedpayMethod
(
mBillMoneyList
);
int
hywebPayMethodIndex
=
PayMethodUtils
.
hasHywebPayMethod
(
mBillMoneyList
);
if
(
hasYedpayMethodIndex
!=
-
1
)
{
if
(
hywebPayMethodIndex
!=
-
1
)
{
// int hywebPayMethodIndex = PayMethodUtils.hasHywebPayMethod(mBillMoneyList);
PayMethod
hywebPayMethod
=
mBillMoneyList
.
get
(
hywebPayMethodIndex
);
SaleRequest
saleRequest
=
new
SaleRequest
();
if
(
hasYedpayMethodIndex
!=
-
1
)
{
switch
(
hywebPayMethod
.
getPayType
())
{
PayMethod
payMethod
=
mBillMoneyList
.
get
(
hasYedpayMethodIndex
);
case
PayTypeContract
.
PAY_METHOD_ID_1030
:
// PayMethod hywebPayMethod = mBillMoneyList.get(hasYedpayMethodIndex);
saleRequest
.
setPAYMENT_APP_ID
(
PayMethodConstant
.
PAY_TYPE_CC
);
// SaleRequest saleRequest = new SaleRequest();
break
;
// switch (hywebPayMethod.getPayType()) {
case
PayTypeContract
.
PAY_METHOD_ID_1031
:
// case PayMethodContract.PAY_METHOD_ID_1030:
saleRequest
.
setPAYMENT_APP_ID
(
PayMethodConstant
.
PAY_TYPE_QRC
);
// saleRequest.setPAYMENT_APP_ID(HywebMethodConstant.PAY_TYPE_CC);
break
;
// break;
case
PayTypeContract
.
PAY_METHOD_ID_1032
:
// case PayMethodContract.PAY_METHOD_ID_1031:
saleRequest
.
setPAYMENT_APP_ID
(
PayMethodConstant
.
PAY_TYPE_OPS
);
// saleRequest.setPAYMENT_APP_ID(HywebMethodConstant.PAY_TYPE_QRC);
break
;
// break;
case
PayTypeContract
.
PAY_METHOD_ID_1033
:
// case PayMethodContract.PAY_METHOD_ID_1032:
saleRequest
.
setPAYMENT_APP_ID
(
PayMethodConstant
.
PAY_TYPE_AE
);
// saleRequest.setPAYMENT_APP_ID(HywebMethodConstant.PAY_TYPE_OPS);
break
;
// break;
default
:
// case PayMethodContract.PAY_METHOD_ID_1033:
break
;
// saleRequest.setPAYMENT_APP_ID(HywebMethodConstant.PAY_TYPE_AE);
}
// break;
saleRequest
.
setTXN_AMT
(
DoshokuOrder
.
getInstance
().
getShoppingCart
().
getTotalAmount
());
// default:
saleRequest
.
setTIPS
(
0
);
// break;
// }
GetTxnIdRequest
txnIdRequest
=
new
GetTxnIdRequest
();
// saleRequest.setTXN_AMT(DoshokuOrder.getInstance().getShoppingCart().getTotalAmount());
txnIdRequest
.
setOrderId
(
DoshokuOrder
.
getInstance
().
getOrderId
());
// saleRequest.setTIPS(0);
if
(!
TextUtils
.
isEmpty
(
DoshokuOrder
.
getInstance
().
getOpenTableInfo
().
getTableNumber
()))
{
//
txnIdRequest
.
setTableExtId
(
DoshokuOrder
.
getInstance
().
getOpenTableInfo
().
getId
());
// GetTxnIdRequest txnIdRequest = new GetTxnIdRequest();
}
else
{
// txnIdRequest.setOrderId(DoshokuOrder.getInstance().getOrderId());
txnIdRequest
.
setTableId
((
DoshokuOrder
.
getInstance
().
getOpenTableInfo
().
getId
()));
// if (!TextUtils.isEmpty(DoshokuOrder.getInstance().getOpenTableInfo().getTableNumber())) {
}
// txnIdRequest.setTableExtId(DoshokuOrder.getInstance().getOpenTableInfo().getId());
txnIdRequest
.
setPayMethodId
(
hywebPayMethod
.
getId
());
// } else {
txnIdRequest
.
setAmount
(
hywebPayMethod
.
getPayMoney
());
// txnIdRequest.setTableId((DoshokuOrder.getInstance().getOpenTableInfo().getId()));
// }
MealOrderPayRequest
orderPayRequest
=
mPresenter
.
getOrderPayRequest
(
gsaPayView
);
// txnIdRequest.setPayMethodId(hywebPayMethod.getId());
List
<
BillItem
>
billItemList
=
DoshokuOrder
.
getInstance
().
getShoppingCart
().
getBillItemList
();
// txnIdRequest.setAmount(hywebPayMethod.getPayMoney());
//
txnIdRequest
.
setContent
(
GsonUtils
.
GsonString
(
orderPayRequest
));
// MealOrderPayRequest orderPayRequest = mPresenter.getOrderPayRequest(gsaPayView);
// txnIdRequest.setContent(GsonUtils.GsonString(orderPayRequest));
PosPay
.
builder
()
//
.
context
(
GsaCloudApplication
.
getAppContext
())
// List<BillItem> billItemList = DoshokuOrder.getInstance().getShoppingCart().getBillItemList();
.
lifecycleView
(
OrderPayActivity
.
this
)
.
posRequest
(
saleRequest
)
RequestParms
parms
=
RequestParms
.
builder
()
.
bgRequest
(
txnIdRequest
)
.
action
(
PayAction
.
SALE
)
.
onPosActionListener
(
new
OnPosActionListener
<
SaleRespose
>()
{
.
resturantId
(
RestaurantInfoManager
.
newInstance
().
getRestaurantId
())
@Override
.
orderId
(
DoshokuOrder
.
getInstance
().
getOrderId
())
public
void
onPosSuccess
(
SaleRespose
response
)
{
.
payType
(
payMethod
.
getPayType
())
startPaymentDetailActivity
(
saleRequest
.
getTXN_ID
(),
DoshokuOrder
.
getInstance
().
getOpenTableInfo
(),
orderPayRequest
,
billItemList
,
payMethods
,
response
);
.
payMoney
(
payMethod
.
getPayMoney
())
}
.
resultCallback
(
new
ResultCallback
()
{
@Override
public
void
onPosException
(
SaleRespose
response
,
Exception
e
)
{
startPaymentDetailActivity
(
saleRequest
.
getTXN_ID
(),
DoshokuOrder
.
getInstance
().
getOpenTableInfo
(),
orderPayRequest
,
billItemList
,
payMethods
,
response
);
}
@Override
public
void
onPosInvalid
(
String
e
)
{
}
@Override
@Override
public
void
onUpdateStatusSuccess
(
SaleRespose
response
)
{
public
void
onSuccess
()
{
if
(
HywebActionStatusCode
.
withSuccess
(
response
.
getSTATUS
()))
{
paySuccess
();
paySuccess
();
}
}
}
@Override
@Override
public
void
on
UpdateStatusError
(
Throwable
e
)
{
public
void
on
Failure
(
Throwable
t
)
{
}
}
})
})
.
build
()
.
build
();
.
pay
();
PaymentControl
.
newInstance
().
showPayFlowFragment
(
this
,
parms
);
// PosPay.pay(mContext, OrderPayActivity.this, saleRequest, txnIdRequest, new OnPosActionListener<SaleRespose>() {
// Intent intent = new Intent(mContext, PayFlowActivity.class);
//
// intent.putExtra("requestParms",build);
// @Override
// launchActivity(intent);
// public void onPosSuccess(SaleRespose response) {
// startPaymentDetailActivity(saleRequest.getTXN_ID(), DoshokuOrder.getInstance().getOpenTableInfo(),orderPayRequest,billItemList,payMethods,response);
// PosPay.builder()
// }
// .context(GsaCloudApplication.getAppContext())
// .lifecycleView(OrderPayActivity.this)
// .payType(hywebPayMethod.getPayType())
// .payMoney(hywebPayMethod.getPayMoney())
// .posRequest(saleRequest)
// .bgRequest(txnIdRequest)
// .callback(new PosCallbackListener<SaleRespose>() {
// @Override
// public void onPosSuccess(SaleRespose response) {
// startPaymentDetailActivity(saleRequest.getTXN_ID(), DoshokuOrder.getInstance().getOpenTableInfo(), orderPayRequest, billItemList, payMethods, response);
// }
//
//
// @Override
//
@Override
//
public void onPosException(SaleRespose response,
Exception e) {
//
public void onPosException(SaleRespose response,
Exception e) {
//
startPaymentDetailActivity(saleRequest.getTXN_ID(), DoshokuOrder.getInstance().getOpenTableInfo(),orderPayRequest,billItemList,payMethods,
response);
//
startPaymentDetailActivity(saleRequest.getTXN_ID(), DoshokuOrder.getInstance().getOpenTableInfo(), orderPayRequest, billItemList, payMethods,
response);
// }
//
}
//
//
// @Override
//
@Override
// public void onPosInvalid(String e) {
//
public void onPosInvalid(String e) {
//
//
// }
//
}
//
//
// @Override
//
@Override
// public void onUpdateStatusSuccess(SaleRespose response) {
//
public void onUpdateStatusSuccess(SaleRespose response) {
// if (HywebActionStatusCode.withSuccess(response.getSTATUS())) {
//
if (HywebActionStatusCode.withSuccess(response.getSTATUS())) {
// paySuccess();
//
paySuccess();
// }
//
}
// }
//
}
//
//
// @Override
//
@Override
// public void onUpdateStatusError(Throwable e) {
//
public void onUpdateStatusError(Throwable e) {
//
//
// }
// }
// });
// })
// .yedpayCallback((intent) -> {
// startActivityForResult(intent, PayConstans.YEDPAY_START_RESULT_CODE);
// })
// .build()
// .pay();
}
else
{
}
else
{
mPresenter
.
sendOrderBefore
();
mPresenter
.
sendOrderBefore
();
}
}
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/orderManager/OrderCenterActivity.java
View file @
0028c801
...
@@ -18,7 +18,7 @@ import androidx.viewpager.widget.ViewPager;
...
@@ -18,7 +18,7 @@ import androidx.viewpager.widget.ViewPager;
import
com.gingersoft.gsa.cloud.common.logan.LoganManager
;
import
com.gingersoft.gsa.cloud.common.logan.LoganManager
;
import
com.gingersoft.gsa.cloud.order.contract.OrderStatusContract
;
import
com.gingersoft.gsa.cloud.order.contract.OrderStatusContract
;
import
com.gingersoft.gsa.cloud.pay.
pos
.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.di.component.DaggerOrderCenterComponent
;
import
com.gingersoft.gsa.cloud.table.di.component.DaggerOrderCenterComponent
;
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/orderManager/OrderDetailActivity.java
View file @
0028c801
...
@@ -5,7 +5,6 @@ import android.os.Build;
...
@@ -5,7 +5,6 @@ import android.os.Build;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.View
;
import
android.view.Window
;
import
android.widget.FrameLayout
;
import
android.widget.FrameLayout
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
...
@@ -24,13 +23,9 @@ import com.gingersoft.gsa.cloud.common.utils.LanguageUtils;
...
@@ -24,13 +23,9 @@ import com.gingersoft.gsa.cloud.common.utils.LanguageUtils;
import
com.gingersoft.gsa.cloud.common.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.common.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.order.commodity.OrderDetail
;
import
com.gingersoft.gsa.cloud.order.contract.OrderStatusContract
;
import
com.gingersoft.gsa.cloud.order.contract.OrderStatusContract
;
import
com.gingersoft.gsa.cloud.order.order.DoshokuOrder
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.RequestParms
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.bean.PosActionStatusExceptionParam
;
import
com.gingersoft.gsa.cloud.pay.bean.PosActionStatusExceptionParam
;
import
com.gingersoft.gsa.cloud.pay.lifecycle.fragment.PayFlowFragment
;
import
com.gingersoft.gsa.cloud.pay.device.pos.base.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.pay.pos.fragment.PosActionStatusExceptionFragment
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.di.component.DaggerOrderDetailComponent
;
import
com.gingersoft.gsa.cloud.table.di.component.DaggerOrderDetailComponent
;
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/discount/NomalDiscountFragment.java
View file @
0028c801
...
@@ -5,18 +5,16 @@ import android.os.Bundle;
...
@@ -5,18 +5,16 @@ import android.os.Bundle;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
androidx.recyclerview.widget.GridLayoutManager
;
import
androidx.recyclerview.widget.GridLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.gingersoft.gsa.cloud.common.loadsir.EmptyCallback
;
import
com.gingersoft.gsa.cloud.common.loadsir.EmptyCallback
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.di.component.Dagger
Bil
lDiscountComponent
;
import
com.gingersoft.gsa.cloud.table.di.component.Dagger
Noma
lDiscountComponent
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.NomalDiscountContract
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.NomalDiscountContract
;
import
com.gingersoft.gsa.cloud.table.mvp.presenter.discount.NomalDiscountPresenter
;
import
com.gingersoft.gsa.cloud.table.mvp.presenter.discount.NomalDiscountPresenter
;
import
com.gingersoft.gsa.cloud.ui.adapter.TagViewAdapter
;
import
com.gingersoft.gsa.cloud.ui.adapter.TagViewAdapter
;
...
@@ -68,7 +66,7 @@ public class NomalDiscountFragment extends BaseFragment<NomalDiscountPresenter>
...
@@ -68,7 +66,7 @@ public class NomalDiscountFragment extends BaseFragment<NomalDiscountPresenter>
@Override
@Override
public
void
setupFragmentComponent
(
@NonNull
AppComponent
appComponent
)
{
public
void
setupFragmentComponent
(
@NonNull
AppComponent
appComponent
)
{
Dagger
Bil
lDiscountComponent
//如找不到该类,请编译一下项目
Dagger
Noma
lDiscountComponent
//如找不到该类,请编译一下项目
.
builder
()
.
builder
()
.
appComponent
(
appComponent
)
.
appComponent
(
appComponent
)
.
view
(
this
)
.
view
(
this
)
...
...
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/fragment/mealstand/SetMealFragment.java
View file @
0028c801
...
@@ -41,6 +41,7 @@ import com.gingersoft.gsa.cloud.order.order.DoshokuOrder;
...
@@ -41,6 +41,7 @@ import com.gingersoft.gsa.cloud.order.order.DoshokuOrder;
import
com.gingersoft.gsa.cloud.table.BuildConfig
;
import
com.gingersoft.gsa.cloud.table.BuildConfig
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.R2
;
import
com.gingersoft.gsa.cloud.table.di.component.DaggerSetMealComponent
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.SetMealContract
;
import
com.gingersoft.gsa.cloud.table.mvp.contract.SetMealContract
;
import
com.gingersoft.gsa.cloud.table.mvp.presenter.mealstand.SetMealPresenter
;
import
com.gingersoft.gsa.cloud.table.mvp.presenter.mealstand.SetMealPresenter
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.MealStandActivity
;
import
com.gingersoft.gsa.cloud.table.mvp.ui.activity.MealStandActivity
;
...
@@ -271,7 +272,6 @@ public class SetMealFragment extends BaseFragment<SetMealPresenter> implements S
...
@@ -271,7 +272,6 @@ public class SetMealFragment extends BaseFragment<SetMealPresenter> implements S
}
}
}
}
private
void
showComboModifierLayout
()
{
private
void
showComboModifierLayout
()
{
try
{
try
{
View
vsContent
=
vbComboModifier
.
inflate
();
View
vsContent
=
vbComboModifier
.
inflate
();
...
@@ -520,9 +520,9 @@ public class SetMealFragment extends BaseFragment<SetMealPresenter> implements S
...
@@ -520,9 +520,9 @@ public class SetMealFragment extends BaseFragment<SetMealPresenter> implements S
isPluMode
=
(
boolean
)
SPUtils
.
get
(
MealConstant
.
EXIT_IS_PLU_MODE
,
false
);
isPluMode
=
(
boolean
)
SPUtils
.
get
(
MealConstant
.
EXIT_IS_PLU_MODE
,
false
);
if
(
isPluMode
)
{
if
(
isPluMode
)
{
showViewModeVisibility
(
MealConstant
.
ViewMode_keys
);
showViewModeVisibility
(
MealConstant
.
ViewMode_keys
);
btnFid
.
setBackgroundColor
(
ArmsUtils
.
getColor
(
R
.
color
.
theme_hint_color
));
btnFid
.
setBackgroundColor
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
theme_hint_color
));
}
else
{
}
else
{
btnFid
.
setBackground
(
ArmsUtils
.
getDrawablebyResource
(
R
.
drawable
.
ui_selector_item_background
));
btnFid
.
setBackground
(
ArmsUtils
.
getDrawablebyResource
(
mContext
,
R
.
drawable
.
ui_selector_item_background
));
}
}
}
}
...
@@ -530,7 +530,7 @@ public class SetMealFragment extends BaseFragment<SetMealPresenter> implements S
...
@@ -530,7 +530,7 @@ public class SetMealFragment extends BaseFragment<SetMealPresenter> implements S
public
void
resetPluMode
()
{
public
void
resetPluMode
()
{
isPluMode
=
false
;
isPluMode
=
false
;
SPUtils
.
put
(
MealConstant
.
EXIT_IS_PLU_MODE
,
false
);
SPUtils
.
put
(
MealConstant
.
EXIT_IS_PLU_MODE
,
false
);
btnFid
.
setBackground
(
ArmsUtils
.
getDrawablebyResource
(
R
.
drawable
.
ui_selector_item_background
));
btnFid
.
setBackground
(
ArmsUtils
.
getDrawablebyResource
(
mContext
,
R
.
drawable
.
ui_selector_item_background
));
}
}
@Override
@Override
...
@@ -564,6 +564,11 @@ public class SetMealFragment extends BaseFragment<SetMealPresenter> implements S
...
@@ -564,6 +564,11 @@ public class SetMealFragment extends BaseFragment<SetMealPresenter> implements S
}
}
@Override
@Override
public
int
getFromType
()
{
return
1
;
}
@Override
public
void
recordOperat
(
boolean
isPressButtonSound
)
{
public
void
recordOperat
(
boolean
isPressButtonSound
)
{
}
}
...
...
component-table/src/main/res/layout/table_activity_meal_stand.xml
View file @
0028c801
...
@@ -362,8 +362,6 @@
...
@@ -362,8 +362,6 @@
android:layout_below=
"@+id/ll_meals"
android:layout_below=
"@+id/ll_meals"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_modify"
android:id=
"@+id/ll_modify"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
library-base/src/main/java/com/jess/arms/utils/ArmsUtils.java
View file @
0028c801
...
@@ -72,7 +72,7 @@ public class ArmsUtils {
...
@@ -72,7 +72,7 @@ public class ArmsUtils {
* @param res
* @param res
*/
*/
public
static
void
setViewHintSize
(
Context
context
,
int
size
,
TextView
v
,
int
res
)
{
public
static
void
setViewHintSize
(
Context
context
,
int
size
,
TextView
v
,
int
res
)
{
SpannableString
ss
=
new
SpannableString
(
getResources
().
getString
(
SpannableString
ss
=
new
SpannableString
(
getResources
(
context
).
getString
(
res
));
res
));
// 新建一个属性对象,设置文字的大小
// 新建一个属性对象,设置文字的大小
AbsoluteSizeSpan
ass
=
new
AbsoluteSizeSpan
(
size
,
true
);
AbsoluteSizeSpan
ass
=
new
AbsoluteSizeSpan
(
size
,
true
);
...
@@ -91,29 +91,29 @@ public class ArmsUtils {
...
@@ -91,29 +91,29 @@ public class ArmsUtils {
* @return
* @return
*/
*/
public
static
int
dip2px
(
Context
context
,
float
dpValue
)
{
public
static
int
dip2px
(
Context
context
,
float
dpValue
)
{
final
float
scale
=
getResources
().
getDisplayMetrics
().
density
;
final
float
scale
=
getResources
(
context
).
getDisplayMetrics
().
density
;
return
(
int
)
(
dpValue
*
scale
+
0.5f
);
return
(
int
)
(
dpValue
*
scale
+
0.5f
);
}
}
/**
/**
* 获得资源
* 获得资源
*/
*/
public
static
Resources
getResources
()
{
public
static
Resources
getResources
(
Context
context
)
{
return
Resources
.
getSystem
();
return
context
.
getResources
();
}
}
/**
/**
* 得到字符数组
* 得到字符数组
*/
*/
public
static
String
[]
getStringArray
(
Context
context
,
int
id
)
{
public
static
String
[]
getStringArray
(
Context
context
,
int
id
)
{
return
getResources
().
getStringArray
(
id
);
return
getResources
(
context
).
getStringArray
(
id
);
}
}
/**
/**
* pix转dip
* pix转dip
*/
*/
public
static
int
pix2dip
(
Context
context
,
int
pix
)
{
public
static
int
pix2dip
(
Context
context
,
int
pix
)
{
final
float
densityDpi
=
getResources
().
getDisplayMetrics
().
density
;
final
float
densityDpi
=
getResources
(
context
).
getDisplayMetrics
().
density
;
return
(
int
)
(
pix
/
densityDpi
+
0.5f
);
return
(
int
)
(
pix
/
densityDpi
+
0.5f
);
}
}
...
@@ -126,7 +126,7 @@ public class ArmsUtils {
...
@@ -126,7 +126,7 @@ public class ArmsUtils {
* @return
* @return
*/
*/
public
static
int
getDimens
(
Context
context
,
int
id
)
{
public
static
int
getDimens
(
Context
context
,
int
id
)
{
return
(
int
)
getResources
().
getDimension
(
id
);
return
(
int
)
getResources
(
context
).
getDimension
(
id
);
}
}
/**
/**
...
@@ -137,7 +137,7 @@ public class ArmsUtils {
...
@@ -137,7 +137,7 @@ public class ArmsUtils {
* @return
* @return
*/
*/
public
static
float
getDimens
(
Context
context
,
String
dimenName
)
{
public
static
float
getDimens
(
Context
context
,
String
dimenName
)
{
return
getResources
(
).
getDimension
(
getResources
(
).
getIdentifier
(
dimenName
,
"dimen"
,
context
.
getPackageName
()));
return
getResources
(
context
).
getDimension
(
getResources
(
context
).
getIdentifier
(
dimenName
,
"dimen"
,
context
.
getPackageName
()));
}
}
/**
/**
...
@@ -147,7 +147,7 @@ public class ArmsUtils {
...
@@ -147,7 +147,7 @@ public class ArmsUtils {
*/
*/
public
static
String
getString
(
Context
context
,
int
stringID
)
{
public
static
String
getString
(
Context
context
,
int
stringID
)
{
return
getResources
().
getString
(
stringID
);
return
getResources
(
context
).
getString
(
stringID
);
}
}
/**
/**
...
@@ -157,7 +157,7 @@ public class ArmsUtils {
...
@@ -157,7 +157,7 @@ public class ArmsUtils {
*/
*/
public
static
String
getString
(
Context
context
,
String
strName
)
{
public
static
String
getString
(
Context
context
,
String
strName
)
{
return
getString
(
context
,
getResources
().
getIdentifier
(
strName
,
"string"
,
context
.
getPackageName
()));
return
getString
(
context
,
getResources
(
context
).
getIdentifier
(
strName
,
"string"
,
context
.
getPackageName
()));
}
}
/**
/**
...
@@ -169,7 +169,7 @@ public class ArmsUtils {
...
@@ -169,7 +169,7 @@ public class ArmsUtils {
* @return
* @return
*/
*/
public
static
<
T
extends
View
>
T
findViewByName
(
Context
context
,
View
view
,
String
viewName
)
{
public
static
<
T
extends
View
>
T
findViewByName
(
Context
context
,
View
view
,
String
viewName
)
{
int
id
=
getResources
().
getIdentifier
(
viewName
,
"id"
,
context
.
getPackageName
());
int
id
=
getResources
(
context
).
getIdentifier
(
viewName
,
"id"
,
context
.
getPackageName
());
T
v
=
(
T
)
view
.
findViewById
(
id
);
T
v
=
(
T
)
view
.
findViewById
(
id
);
return
v
;
return
v
;
}
}
...
@@ -183,7 +183,7 @@ public class ArmsUtils {
...
@@ -183,7 +183,7 @@ public class ArmsUtils {
* @return
* @return
*/
*/
public
static
<
T
extends
View
>
T
findViewByName
(
Context
context
,
Activity
activity
,
String
viewName
)
{
public
static
<
T
extends
View
>
T
findViewByName
(
Context
context
,
Activity
activity
,
String
viewName
)
{
int
id
=
getResources
().
getIdentifier
(
viewName
,
"id"
,
context
.
getPackageName
());
int
id
=
getResources
(
context
).
getIdentifier
(
viewName
,
"id"
,
context
.
getPackageName
());
T
v
=
(
T
)
activity
.
findViewById
(
id
);
T
v
=
(
T
)
activity
.
findViewById
(
id
);
return
v
;
return
v
;
}
}
...
@@ -195,7 +195,7 @@ public class ArmsUtils {
...
@@ -195,7 +195,7 @@ public class ArmsUtils {
* @return
* @return
*/
*/
public
static
int
findLayout
(
Context
context
,
String
layoutName
)
{
public
static
int
findLayout
(
Context
context
,
String
layoutName
)
{
int
id
=
getResources
().
getIdentifier
(
layoutName
,
"layout"
,
context
.
getPackageName
());
int
id
=
getResources
(
context
).
getIdentifier
(
layoutName
,
"layout"
,
context
.
getPackageName
());
return
id
;
return
id
;
}
}
...
@@ -258,10 +258,7 @@ public class ArmsUtils {
...
@@ -258,10 +258,7 @@ public class ArmsUtils {
* @return
* @return
*/
*/
public
static
Drawable
getDrawablebyResource
(
Context
context
,
int
rID
)
{
public
static
Drawable
getDrawablebyResource
(
Context
context
,
int
rID
)
{
return
getResources
().
getDrawable
(
rID
);
return
getResources
(
context
).
getDrawable
(
rID
);
}
public
static
Drawable
getDrawablebyResource
(
int
rID
)
{
return
getResources
().
getDrawable
(
rID
);
}
}
/**
/**
...
@@ -315,7 +312,7 @@ public class ArmsUtils {
...
@@ -315,7 +312,7 @@ public class ArmsUtils {
* @return
* @return
*/
*/
public
static
int
getScreenWidth
(
Context
context
)
{
public
static
int
getScreenWidth
(
Context
context
)
{
return
getResources
().
getDisplayMetrics
().
widthPixels
;
return
getResources
(
context
).
getDisplayMetrics
().
widthPixels
;
}
}
/**
/**
...
@@ -324,7 +321,7 @@ public class ArmsUtils {
...
@@ -324,7 +321,7 @@ public class ArmsUtils {
* @return
* @return
*/
*/
public
static
int
getScreenHeidth
(
Context
context
)
{
public
static
int
getScreenHeidth
(
Context
context
)
{
return
getResources
().
getDisplayMetrics
().
heightPixels
;
return
getResources
(
context
).
getDisplayMetrics
().
heightPixels
;
}
}
...
@@ -332,21 +329,14 @@ public class ArmsUtils {
...
@@ -332,21 +329,14 @@ public class ArmsUtils {
* 获得颜色
* 获得颜色
*/
*/
public
static
int
getColor
(
Context
context
,
int
rid
)
{
public
static
int
getColor
(
Context
context
,
int
rid
)
{
return
getResources
().
getColor
(
rid
);
return
getResources
(
context
).
getColor
(
rid
);
}
/**
* 获得颜色
*/
public
static
int
getColor
(
int
rid
)
{
return
getResources
().
getColor
(
rid
);
}
}
/**
/**
* 获得颜色
* 获得颜色
*/
*/
public
static
int
getColor
(
Context
context
,
String
colorName
)
{
public
static
int
getColor
(
Context
context
,
String
colorName
)
{
return
getColor
(
context
,
getResources
().
getIdentifier
(
colorName
,
"color"
,
context
.
getPackageName
()));
return
getColor
(
context
,
getResources
(
context
).
getIdentifier
(
colorName
,
"color"
,
context
.
getPackageName
()));
}
}
/**
/**
...
...
library-common/src/main/java/com/gingersoft/gsa/cloud/common/logan/LoganManager.java
View file @
0028c801
...
@@ -30,9 +30,9 @@ public class LoganManager {
...
@@ -30,9 +30,9 @@ public class LoganManager {
public
static
void
w_code
(
String
TAG
,
String
log
)
{
public
static
void
w_code
(
String
TAG
,
String
log
)
{
Logan
.
w
(
log
,
LoganConfig
.
CODE_LEVLE
);
Logan
.
w
(
log
,
LoganConfig
.
CODE_LEVLE
);
if
(
BuildConfig
.
DEBUG
)
{
//
if (BuildConfig.DEBUG) {
Logan
.
f
();
Logan
.
f
();
}
//
}
printLog
(
TAG
,
log
);
printLog
(
TAG
,
log
);
}
}
...
...
library-order/src/main/AndroidManifest.xml
View file @
0028c801
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.gingersoft.gsa.cloud.order"
>
package=
"com.gingersoft.gsa.cloud.order"
>
<application>
<activity
android:name=
"com.gingersoft.gsa.cloud.pay.lifecycle.activity.PayFlowActivity"
/>
</application>
</manifest>
</manifest>
library-order/src/main/java/com/gingersoft/gsa/cloud/order/bean/event/MealPayResultParam.java
View file @
0028c801
...
@@ -7,7 +7,7 @@ import com.gingersoft.gsa.cloud.common.core.table.TableBean;
...
@@ -7,7 +7,7 @@ import com.gingersoft.gsa.cloud.common.core.table.TableBean;
import
com.gingersoft.gsa.cloud.order.bean.request.MealOrderPayRequest
;
import
com.gingersoft.gsa.cloud.order.bean.request.MealOrderPayRequest
;
import
com.gingersoft.gsa.cloud.order.billItem.BillItem
;
import
com.gingersoft.gsa.cloud.order.billItem.BillItem
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.bean.PayMethod
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.SaleRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.SaleRespose
;
import
java.util.List
;
import
java.util.List
;
import
lombok.Data
;
import
lombok.Data
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/order/bean/request/MealOrderPayRequest.java
View file @
0028c801
...
@@ -3,7 +3,7 @@ package com.gingersoft.gsa.cloud.order.bean.request;
...
@@ -3,7 +3,7 @@ package com.gingersoft.gsa.cloud.order.bean.request;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.PosMatter
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/order/discount/MultyDiscount.java
View file @
0028c801
...
@@ -17,8 +17,8 @@ public abstract class MultyDiscount extends BillItem {
...
@@ -17,8 +17,8 @@ public abstract class MultyDiscount extends BillItem {
/**責任鏈中的下一個對象*/
/**責任鏈中的下一個對象*/
protected
MultyDiscount
nextMultyDiscount
;
protected
MultyDiscount
nextMultyDiscount
;
/**
/**
* 本次折扣金额
* 本次折扣金额
*/
*/
protected
double
discountMoney
=
0.0
;
protected
double
discountMoney
=
0.0
;
public
MultyDiscount
(
String
name
,
int
status
,
MultyDiscount
nextMultyDiscount
)
{
public
MultyDiscount
(
String
name
,
int
status
,
MultyDiscount
nextMultyDiscount
)
{
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/EventListener.java
View file @
0028c801
...
@@ -4,8 +4,8 @@ package com.gingersoft.gsa.cloud.pay;
...
@@ -4,8 +4,8 @@ package com.gingersoft.gsa.cloud.pay;
* @作者: bin
* @作者: bin
* @創建時間: 2021-04-14 12:28
* @創建時間: 2021-04-14 12:28
* @更新時間: 2021-04-14 12:28
* @更新時間: 2021-04-14 12:28
* @描述:
* @描述:
回调整个支付过程
*/
*
*
/
public
class
EventListener
{
public
class
EventListener
{
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
Origin
Factory.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
PayDevice
Factory.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
;
import
com.gingersoft.gsa.cloud.common.utils.AppDevices
;
import
com.gingersoft.gsa.cloud.common.utils.AppDevices
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPayAction
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.PosPayAction
;
import
com.gingersoft.gsa.cloud.pay.
pos.bbpos.BBPosManager
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.bbpos.BBPosDevice
;
import
com.gingersoft.gsa.cloud.pay.
pos.hyweb.HywebManager
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.hyweb.HywebDevice
;
import
com.gingersoft.gsa.cloud.pay.
pos.yedpay.YedpayManager
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.yedpay.YedpayDevice
;
/**
/**
* @作者: bin
* @作者: bin
...
@@ -12,17 +12,17 @@ import com.gingersoft.gsa.cloud.pay.pos.yedpay.YedpayManager;
...
@@ -12,17 +12,17 @@ import com.gingersoft.gsa.cloud.pay.pos.yedpay.YedpayManager;
* @更新時間: 2021-04-14 12:28
* @更新時間: 2021-04-14 12:28
* @描述:
* @描述:
*/
*/
public
class
Origin
Factory
{
public
class
PayDevice
Factory
{
public
static
PosPayAction
createPay
Origin
(
RequestParms
requestParms
)
{
public
static
PosPayAction
createPay
Device
(
)
{
if
(
AppDevices
.
isHywebPos
())
{
if
(
AppDevices
.
isHywebPos
())
{
return
Hyweb
Manager
.
newInstance
();
return
Hyweb
Device
.
newInstance
();
}
else
if
(
AppDevices
.
isBBPos
())
{
}
else
if
(
AppDevices
.
isBBPos
())
{
return
BBPos
Manager
.
newInstance
();
return
BBPos
Device
.
newInstance
();
}
else
if
(
AppDevices
.
isYedpay
())
{
}
else
if
(
AppDevices
.
isYedpay
())
{
return
Yedpay
Manager
.
newInstance
(
requestParms
);
return
Yedpay
Device
.
newInstance
(
);
}
}
return
Yedpay
Manager
.
newInstance
(
requestParms
);
return
Yedpay
Device
.
newInstance
(
);
}
}
}
}
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/PaymentControl.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPayAction
;
import
androidx.fragment.app.FragmentActivity
;
import
com.gingersoft.gsa.cloud.pay.lifecycle.fragment.PayFlowFragment
;
import
com.gingersoft.gsa.cloud.pay.device.pos.PosPayAction
;
import
com.jess.arms.utils.Preconditions
;
import
com.jess.arms.utils.Preconditions
;
import
lombok.Getter
;
import
lombok.Getter
;
...
@@ -26,45 +29,50 @@ public class PaymentControl {
...
@@ -26,45 +29,50 @@ public class PaymentControl {
}
}
public
void
pay
(
RequestParms
requestParms
)
{
public
void
pay
(
RequestParms
requestParms
)
{
final
PosPayAction
payOrigin
=
OriginFactory
.
createPayOrigin
(
requestParms
);
final
PosPayAction
payOrigin
=
PayDeviceFactory
.
createPayOrigin
(
);
Preconditions
.
checkNotNull
(
payOrigin
);
Preconditions
.
checkNotNull
(
payOrigin
);
payOrigin
.
pay
(
requestParms
);
payOrigin
.
pay
(
requestParms
);
}
}
public
void
tip
(
RequestParms
requestParms
)
{
public
void
tip
(
RequestParms
requestParms
)
{
final
PosPayAction
payOrigin
=
OriginFactory
.
createPayOrigin
(
requestParms
);
final
PosPayAction
payOrigin
=
PayDeviceFactory
.
createPayOrigin
(
);
Preconditions
.
checkNotNull
(
payOrigin
);
Preconditions
.
checkNotNull
(
payOrigin
);
payOrigin
.
tip
(
requestParms
);
payOrigin
.
tip
(
requestParms
);
}
}
public
void
refund
(
RequestParms
requestParms
)
{
public
void
refund
(
RequestParms
requestParms
)
{
final
PosPayAction
payOrigin
=
OriginFactory
.
createPayOrigin
(
requestParms
);
final
PosPayAction
payOrigin
=
PayDeviceFactory
.
createPayOrigin
(
);
Preconditions
.
checkNotNull
(
payOrigin
);
Preconditions
.
checkNotNull
(
payOrigin
);
payOrigin
.
refund
(
requestParms
);
payOrigin
.
refund
(
requestParms
);
}
}
public
void
voidO
(
RequestParms
requestParms
)
{
public
void
voidO
(
RequestParms
requestParms
)
{
final
PosPayAction
payOrigin
=
OriginFactory
.
createPayOrigin
(
requestParms
);
final
PosPayAction
payOrigin
=
PayDeviceFactory
.
createPayOrigin
(
);
Preconditions
.
checkNotNull
(
payOrigin
);
Preconditions
.
checkNotNull
(
payOrigin
);
payOrigin
.
void0
(
this
);
payOrigin
.
void0
(
this
);
}
}
public
void
retrieval
(
RequestParms
requestParms
)
{
public
void
retrieval
(
RequestParms
requestParms
)
{
final
PosPayAction
payOrigin
=
OriginFactory
.
createPayOrigin
(
requestParms
);
final
PosPayAction
payOrigin
=
PayDeviceFactory
.
createPayOrigin
(
);
Preconditions
.
checkNotNull
(
payOrigin
);
Preconditions
.
checkNotNull
(
payOrigin
);
payOrigin
.
retrieval
(
this
);
payOrigin
.
retrieval
(
this
);
}
}
public
void
printStub
(
RequestParms
requestParms
)
{
public
void
printStub
(
RequestParms
requestParms
)
{
final
PosPayAction
payOrigin
=
OriginFactory
.
createPayOrigin
(
requestParms
);
final
PosPayAction
payOrigin
=
PayDeviceFactory
.
createPayOrigin
(
);
Preconditions
.
checkNotNull
(
payOrigin
);
Preconditions
.
checkNotNull
(
payOrigin
);
payOrigin
.
printStub
(
this
);
payOrigin
.
printStub
(
this
);
}
}
public
void
settlement
(
RequestParms
requestParms
)
{
public
void
settlement
(
RequestParms
requestParms
)
{
final
PosPayAction
payOrigin
=
OriginFactory
.
createPayOrigin
(
requestParms
);
final
PosPayAction
payOrigin
=
PayDeviceFactory
.
createPayOrigin
(
);
Preconditions
.
checkNotNull
(
payOrigin
);
Preconditions
.
checkNotNull
(
payOrigin
);
payOrigin
.
settlement
(
this
);
payOrigin
.
settlement
(
this
);
}
}
public
void
showPayFlowFragment
(
FragmentActivity
fragmentActivity
,
RequestParms
requestParms
){
PayFlowFragment
payFlowFragment
=
PayFlowFragment
.
newInstance
(
requestParms
);
payFlowFragment
.
show
(
fragmentActivity
.
getSupportFragmentManager
(),
"PayFlowDialogFragment"
);
}
}
}
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/contract/PayMethodContract.java
View file @
0028c801
...
@@ -4,38 +4,32 @@ package com.gingersoft.gsa.cloud.pay.contract;
...
@@ -4,38 +4,32 @@ package com.gingersoft.gsa.cloud.pay.contract;
* @作者: bin
* @作者: bin
* @創建時間: 2020-12-28 10:40
* @創建時間: 2020-12-28 10:40
* @更新時間: 2020-12-28 10:40
* @更新時間: 2020-12-28 10:40
* @描述:支付方式
類型
* @描述:支付方式
*/
*/
public
class
Pay
Type
Contract
{
public
class
Pay
Method
Contract
{
/**
/**
* 支付方式
* 支付方式
*
* 1:寶達通
* 1:寶達通
* 8:支付寶
* 8:支付寶
* 1001:現金
* 1001:現金
* 1021:Google Pay
* 1021:Google Pay
* 1023:支付寶HK
* 1023:支付寶HK
*
*
* <p>
* 1030:N5卡片
* 1031:N5掃碼
* 1032:N5八達通
* 1033:N5美國運通
*/
*/
public
static
final
int
PAY_METHOD_ID_1
=
1
;
public
static
final
int
PAY_METHOD_ID_1100
=
1100
;
public
static
final
int
PAY_METHOD_ID_8
=
8
;
public
static
final
int
PAY_METHOD_ID_1001
=
1001
;
public
static
final
int
PAY_METHOD_ID_1101
=
1101
;
public
static
final
int
PAY_METHOD_ID_1103
=
1103
;
public
static
final
int
PAY_METHOD_ID_1021
=
1021
;
public
static
final
int
PAY_METHOD_ID_1021
=
1021
;
public
static
final
int
PAY_METHOD_ID_1023
=
1023
;
public
static
final
int
PAY_METHOD_ID_1023
=
1023
;
/**
/**
* Hyweb POS支付方式
* Hyweb POS支付方式
*
* 1030:N5卡片
* 1031:N5掃碼
* 1032:N5八達通
* 1033:N5美國運通
*/
*/
public
static
final
int
PAY_METHOD_ID_1030
=
1030
;
public
static
final
int
PAY_METHOD_ID_1030
=
1030
;
public
static
final
int
PAY_METHOD_ID_1031
=
1031
;
public
static
final
int
PAY_METHOD_ID_1031
=
1031
;
...
@@ -43,4 +37,17 @@ public class PayTypeContract {
...
@@ -43,4 +37,17 @@ public class PayTypeContract {
public
static
final
int
PAY_METHOD_ID_1033
=
1033
;
public
static
final
int
PAY_METHOD_ID_1033
=
1033
;
public
static
final
int
[]
HYWEB_PAY_METHODS
=
{
PAY_METHOD_ID_1030
,
PAY_METHOD_ID_1031
,
PAY_METHOD_ID_1032
,
PAY_METHOD_ID_1033
};
public
static
final
int
[]
HYWEB_PAY_METHODS
=
{
PAY_METHOD_ID_1030
,
PAY_METHOD_ID_1031
,
PAY_METHOD_ID_1032
,
PAY_METHOD_ID_1033
};
/**
* Yedpay POS支付方式
*/
public
static
final
int
PAY_METHOD_ID_1040
=
1106
;
public
static
final
int
PAY_METHOD_ID_1041
=
1041
;
public
static
final
int
PAY_METHOD_ID_1042
=
1042
;
public
static
final
int
[]
YEDPAY_PAY_METHODS
=
{
PAY_METHOD_ID_1040
,
PAY_METHOD_ID_1041
,
PAY_METHOD_ID_1042
};
/**
* 积分支付
*/
public
static
final
int
PAY_METHOD_INTEGRAL
=
2000
;
}
}
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/phone/PhoneCallbackListener.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
phone/PhoneCallbackListener.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
phone
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
phone
;
import
com.gingersoft.gsa.cloud.pay.Callback
;
import
com.gingersoft.gsa.cloud.pay.Callback
;
import
com.gingersoft.gsa.cloud.pay.pos.bean.BasePosResponse
;
/**
/**
* @作者: bin
* @作者: bin
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/phone/PhonePayAction.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
phone/PhonePayAction.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
phone
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
phone
;
import
com.gingersoft.gsa.cloud.pay.base.BasePayAction
;
import
com.gingersoft.gsa.cloud.pay.base.BasePayAction
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/phone/PhonePayActionImp.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
phone/PhonePayActionImp.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
phone
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
phone
;
/**
/**
* @作者: bin
* @作者: bin
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/PosPay.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/pos/
PosPay.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
;
import
android.content.Context
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPayAction
;
import
com.gingersoft.gsa.cloud.pay.Callback
;
import
com.gingersoft.gsa.cloud.pay.pos.bean.BaseBgRequest
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.pos.bean.BasePosRequest
;
import
com.gingersoft.gsa.cloud.pay.PayDeviceFactory
;
import
com.gingersoft.gsa.cloud.pay.pos.yedpay.YedpayCallback
;
import
com.gingersoft.gsa.cloud.pay.device.pos.base.bean.BaseBgRequest
;
import
com.gingersoft.gsa.cloud.pay.device.pos.base.bean.BasePosRequest
;
import
com.gingersoft.gsa.cloud.pay.device.pos.yedpay.YedpayCallback
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.utils.Preconditions
;
import
com.jess.arms.utils.Preconditions
;
...
@@ -38,44 +40,44 @@ public final class PosPay {
...
@@ -38,44 +40,44 @@ public final class PosPay {
final
YedpayCallback
yedpayCallback
;
final
YedpayCallback
yedpayCallback
;
public
void
pay
()
{
public
void
pay
()
{
final
PosPayAction
pay
Origin
=
OriginFactory
.
createPayOrigin
(
null
);
final
PosPayAction
pay
Device
=
PayDeviceFactory
.
createPayDevice
(
);
Preconditions
.
checkNotNull
(
pay
Origin
);
Preconditions
.
checkNotNull
(
pay
Device
);
pay
Origin
.
pay
(
this
);
pay
Device
.
pay
(
this
);
}
}
public
void
tip
()
{
public
void
tip
()
{
final
PosPayAction
pay
Origin
=
OriginFactory
.
createPayOrigin
(
null
);
final
PosPayAction
pay
Device
=
PayDeviceFactory
.
createPayDevice
(
);
Preconditions
.
checkNotNull
(
pay
Origin
);
Preconditions
.
checkNotNull
(
pay
Device
);
pay
Origin
.
tip
(
this
);
pay
Device
.
tip
(
this
);
}
}
public
void
refund
()
{
public
void
refund
()
{
final
PosPayAction
pay
Origin
=
OriginFactory
.
createPayOrigin
(
null
);
final
PosPayAction
pay
Device
=
PayDeviceFactory
.
createPayDevice
(
);
Preconditions
.
checkNotNull
(
pay
Origin
);
Preconditions
.
checkNotNull
(
pay
Device
);
pay
Origin
.
refund
(
this
);
pay
Device
.
refund
(
this
);
}
}
public
void
voidO
()
{
public
void
voidO
()
{
final
PosPayAction
pay
Origin
=
OriginFactory
.
createPayOrigin
(
null
);
final
PosPayAction
pay
Device
=
PayDeviceFactory
.
createPayDevice
(
);
Preconditions
.
checkNotNull
(
pay
Origin
);
Preconditions
.
checkNotNull
(
pay
Device
);
pay
Origin
.
void0
(
this
);
pay
Device
.
void0
(
this
);
}
}
public
void
retrieval
()
{
public
void
retrieval
()
{
final
PosPayAction
pay
Origin
=
OriginFactory
.
createPayOrigin
(
null
);
final
PosPayAction
pay
Device
=
PayDeviceFactory
.
createPayDevice
(
);
Preconditions
.
checkNotNull
(
pay
Origin
);
Preconditions
.
checkNotNull
(
pay
Device
);
pay
Origin
.
retrieval
(
this
);
pay
Device
.
retrieval
(
this
);
}
}
public
void
printStub
()
{
public
void
printStub
()
{
final
PosPayAction
pay
Origin
=
OriginFactory
.
createPayOrigin
(
null
);
final
PosPayAction
pay
Device
=
PayDeviceFactory
.
createPayDevice
(
);
Preconditions
.
checkNotNull
(
pay
Origin
);
Preconditions
.
checkNotNull
(
pay
Device
);
pay
Origin
.
printStub
(
this
);
pay
Device
.
printStub
(
this
);
}
}
public
void
settlement
()
{
public
void
settlement
()
{
final
PosPayAction
pay
Origin
=
OriginFactory
.
createPayOrigin
(
null
);
final
PosPayAction
pay
Device
=
PayDeviceFactory
.
createPayDevice
(
);
Preconditions
.
checkNotNull
(
pay
Origin
);
Preconditions
.
checkNotNull
(
pay
Device
);
pay
Origin
.
settlement
(
this
);
pay
Device
.
settlement
(
this
);
}
}
}
}
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/PosPayAction.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/PosPayAction.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
;
import
com.gingersoft.gsa.cloud.pay.base.BasePayAction
;
import
com.gingersoft.gsa.cloud.pay.base.BasePayAction
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
pos
/bean/BaseBgRequest.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/pos/base
/bean/BaseBgRequest.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
bean
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
base
.
bean
;
/**
/**
* @作者: bin
* @作者: bin
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
pos
/bean/BaseBgResponse.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/pos/base
/bean/BaseBgResponse.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
bean
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
base
.
bean
;
/**
/**
* @作者: bin
* @作者: bin
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
pos
/bean/BasePosRequest.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/pos/base
/bean/BasePosRequest.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
bean
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
base
.
bean
;
/**
/**
* @作者: bin
* @作者: bin
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
pos
/bean/BasePosResponse.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/pos/base
/bean/BasePosResponse.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
bean
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
base
.
bean
;
/**
/**
* @作者: bin
* @作者: bin
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
pos
/bean/PosMatter.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/pos/base
/bean/PosMatter.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
bean
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
base
.
bean
;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
pos
/bean/PosPayLog.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/pos/base
/bean/PosPayLog.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
bean
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
base
.
bean
;
import
lombok.Data
;
import
lombok.Data
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
pos
/fragment/PosActionStatusExceptionFragment.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/pos/base
/fragment/PosActionStatusExceptionFragment.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
fragment
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
base
.
fragment
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
...
@@ -24,11 +24,8 @@ import com.gingersoft.gsa.cloud.common.loadsir.pos.PosVoidStatusExceptionCallbac
...
@@ -24,11 +24,8 @@ import com.gingersoft.gsa.cloud.common.loadsir.pos.PosVoidStatusExceptionCallbac
import
com.gingersoft.gsa.cloud.order.R
;
import
com.gingersoft.gsa.cloud.order.R
;
import
com.gingersoft.gsa.cloud.order.R2
;
import
com.gingersoft.gsa.cloud.order.R2
;
import
com.gingersoft.gsa.cloud.pay.bean.PosActionStatusExceptionParam
;
import
com.gingersoft.gsa.cloud.pay.bean.PosActionStatusExceptionParam
;
import
com.gingersoft.gsa.cloud.pay.pos.OnPosActionListener
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.bean.request.pos.RetrievalRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPay
;
import
com.gingersoft.gsa.cloud.pay.device.pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.RetrievalRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.HywebActionStatusCode
;
import
com.jess.arms.base.BaseFragment
;
import
com.jess.arms.base.BaseFragment
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
...
@@ -38,8 +35,6 @@ import com.kingja.loadsir.core.LoadSir;
...
@@ -38,8 +35,6 @@ import com.kingja.loadsir.core.LoadSir;
import
com.kingja.loadsir.core.Transport
;
import
com.kingja.loadsir.core.Transport
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaButton
;
import
com.qmuiteam.qmui.alpha.QMUIAlphaButton
;
import
org.simple.eventbus.EventBus
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
pos/bbpos/BBPosManager
.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/pos/bbpos/BBPosDevice
.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
bbpos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
bbpos
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPayAction
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.PosPayAction
;
/**
/**
* @作者: bin
* @作者: bin
...
@@ -8,18 +8,18 @@ import com.gingersoft.gsa.cloud.pay.pos.PosPayAction;
...
@@ -8,18 +8,18 @@ import com.gingersoft.gsa.cloud.pay.pos.PosPayAction;
* @更新時間: 2021-04-14 12:08
* @更新時間: 2021-04-14 12:08
* @描述:
* @描述:
*/
*/
public
class
BBPos
Manager
implements
PosPayAction
{
public
class
BBPos
Device
implements
PosPayAction
{
private
static
BBPos
Manager
sBBPosManager
;
private
static
BBPos
Device
sBBPosDevice
;
public
static
BBPos
Manager
newInstance
()
{
public
static
BBPos
Device
newInstance
()
{
if
(
sBBPos
Manager
==
null
)
{
if
(
sBBPos
Device
==
null
)
{
sBBPos
Manager
=
new
BBPosManager
();
sBBPos
Device
=
new
BBPosDevice
();
}
}
return
sBBPos
Manager
;
return
sBBPos
Device
;
}
}
private
BBPos
Manager
()
{
private
BBPos
Device
()
{
}
}
@Override
@Override
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/bbpos/BBposCallback.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/bbpos/BBposCallback.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
bbpos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
bbpos
;
import
com.gingersoft.gsa.cloud.pay.Callback
;
import
com.gingersoft.gsa.cloud.pay.Callback
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/HywebCallback.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/HywebCallback.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
;
import
android.content.Intent
;
import
com.gingersoft.gsa.cloud.pay.Callback
;
import
com.gingersoft.gsa.cloud.pay.Callback
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
pos/hyweb/HywebManager
.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/pos/hyweb/HywebDevice
.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
;
import
com.gingersoft.gsa.cloud.pay.PosPay
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.
PosPay
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPayAction
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.PosPayAction
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.AdjustTipRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.AdjustTipRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.RefundRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.RefundRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.RetrievalRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.RetrievalRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.SaleRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.SaleRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.VoidRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.VoidRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.imp.PrintPaymentStubImpl
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.imp.PrintPaymentStubImpl
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.imp.RefundActionImpl
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.imp.RefundActionImpl
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.imp.RetrievalActionImpl
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.imp.RetrievalActionImpl
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.imp.SaleActionImpl
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.imp.SaleActionImpl
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.imp.SettlementActionImpl
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.imp.SettlementActionImpl
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.imp.TipsActionImpl
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.imp.TipsActionImpl
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.imp.VoidActionImpl
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.imp.VoidActionImpl
;
/**
/**
* @作者: bin
* @作者: bin
...
@@ -23,18 +23,18 @@ import com.gingersoft.gsa.cloud.pay.pos.hyweb.imp.VoidActionImpl;
...
@@ -23,18 +23,18 @@ import com.gingersoft.gsa.cloud.pay.pos.hyweb.imp.VoidActionImpl;
* @更新時間: 2021-04-14 12:08
* @更新時間: 2021-04-14 12:08
* @描述:
* @描述:
*/
*/
public
class
Hyweb
Manager
implements
PosPayAction
<
PosPay
>
{
public
class
Hyweb
Device
implements
PosPayAction
<
PosPay
>
{
private
static
Hyweb
Manager
sHywebManager
;
private
static
Hyweb
Device
sHywebDevice
;
public
static
Hyweb
Manager
newInstance
()
{
public
static
Hyweb
Device
newInstance
()
{
if
(
sHyweb
Manager
==
null
)
{
if
(
sHyweb
Device
==
null
)
{
sHyweb
Manager
=
new
HywebManager
();
sHyweb
Device
=
new
HywebDevice
();
}
}
return
sHyweb
Manager
;
return
sHyweb
Device
;
}
}
private
Hyweb
Manager
()
{
private
Hyweb
Device
()
{
}
}
@Override
@Override
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/PosCallbackListener.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/PosCallbackListener.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
;
import
com.gingersoft.gsa.cloud.pay.Callback
;
import
com.gingersoft.gsa.cloud.pay.Callback
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.BasePosResponse
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.BasePosResponse
;
/**
/**
* @作者: bin
* @作者: bin
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/request/bg/GetTxnIdRequest.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/request/bg/GetTxnIdRequest.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
request
.
bg
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
request
.
bg
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.BaseBgRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.BaseBgRequest
;
import
lombok.Data
;
import
lombok.Data
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/request/pos/AdjustTipRequest.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/request/pos/AdjustTipRequest.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
request
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
request
.
pos
;
import
com.etps.aca.lib.constant.Constant
;
import
com.etps.aca.lib.constant.Constant
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.BasePosRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.BasePosRequest
;
import
lombok.Data
;
import
lombok.Data
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/request/pos/PrintPaymentStubRequest.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/request/pos/PrintPaymentStubRequest.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
request
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
request
.
pos
;
import
com.etps.aca.lib.constant.Constant
;
import
com.etps.aca.lib.constant.Constant
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.BasePosRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.BasePosRequest
;
import
lombok.Data
;
import
lombok.Data
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/request/pos/RefundRequest.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/request/pos/RefundRequest.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
request
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
request
.
pos
;
import
com.etps.aca.lib.constant.Constant
;
import
com.etps.aca.lib.constant.Constant
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.BasePosRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.BasePosRequest
;
import
lombok.Data
;
import
lombok.Data
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/request/pos/RetrievalRequest.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/request/pos/RetrievalRequest.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
request
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
request
.
pos
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.BasePosRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.BasePosRequest
;
import
lombok.Data
;
import
lombok.Data
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/request/pos/SaleRequest.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/request/pos/SaleRequest.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
request
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
request
.
pos
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.BasePosRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.BasePosRequest
;
import
lombok.Data
;
import
lombok.Data
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/request/pos/SettlementRequest.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/request/pos/SettlementRequest.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
request
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
request
.
pos
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.BasePosRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.BasePosRequest
;
import
lombok.Data
;
import
lombok.Data
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/request/pos/VoidRequest.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/request/pos/VoidRequest.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
request
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
request
.
pos
;
import
com.etps.aca.lib.constant.Constant
;
import
com.etps.aca.lib.constant.Constant
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.BasePosRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.BasePosRequest
;
import
lombok.Data
;
import
lombok.Data
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/bg/GetCancelTxnIdResponse.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/bg/GetCancelTxnIdResponse.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
bg
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
bg
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/bg/GetRefundIdResponse.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/bg/GetRefundIdResponse.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
bg
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
bg
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/bg/GetTipTxnIdResponse.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/bg/GetTipTxnIdResponse.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
bg
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
bg
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/bg/GetTxnIdResponse.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/bg/GetTxnIdResponse.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
bg
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
bg
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/pos/AdjustTipRespose.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/pos/AdjustTipRespose.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
pos
;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/pos/HywebPosResponse.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/pos/HywebPosResponse.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
pos
;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.BasePosResponse
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.BasePosResponse
;
import
lombok.Data
;
import
lombok.Data
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/pos/PrintPaymentStubResponse.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/pos/PrintPaymentStubResponse.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
pos
;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/pos/RefundRespose.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/pos/RefundRespose.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
pos
;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/pos/RetrievalRespose.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/pos/RetrievalRespose.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
pos
;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/pos/SaleRespose.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/pos/SaleRespose.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
pos
;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/pos/SettlementRespose.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/pos/SettlementRespose.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
pos
;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/bean/response/pos/VoidRespose.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/bean/response/pos/VoidRespose.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
bean
.
response
.
pos
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
bean
.
response
.
pos
;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/command/CommandImpl.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/command/CommandImpl.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
command
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
command
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
...
@@ -15,17 +15,17 @@ import com.gingersoft.gsa.cloud.common.utils.log.LogUtil;
...
@@ -15,17 +15,17 @@ import com.gingersoft.gsa.cloud.common.utils.log.LogUtil;
import
com.gingersoft.gsa.cloud.component.ComponentAction
;
import
com.gingersoft.gsa.cloud.component.ComponentAction
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.imp.IHywebAction
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.imp.IHywebAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.AdjustTipRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.AdjustTipRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.PrintPaymentStubResponse
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.PrintPaymentStubResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.RefundRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.RefundRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.RetrievalRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.RetrievalRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.SaleRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.SaleRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.SettlementRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.SettlementRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.VoidRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.VoidRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.constant.HywebActionStatusCode
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.jess.arms.utils.ArmsUtils
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/constant/HywebActionStatusCode.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/constant/HywebActionStatusCode.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
constant
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
constant
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/constant/HywebMethodConstant.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/constant/HywebMethodConstant.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
constant
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
constant
;
/**
/**
* @作者: bin
* @作者: bin
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/constant/TransactionStatusCode.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/constant/TransactionStatusCode.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
constant
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
constant
;
/**
/**
* @作者: bin
* @作者: bin
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/imp/IHywebAction.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/imp/IHywebAction.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
imp
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
imp
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
import
com.etps.aca.lib.util.CommandUtil
;
import
com.etps.aca.lib.util.CommandUtil
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.widget.StatusLoadingDialog
;
import
com.gingersoft.gsa.cloud.pay.widget.StatusLoadingDialog
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/imp/PrintPaymentStubImpl.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/imp/PrintPaymentStubImpl.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
imp
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
imp
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.PrintPaymentStubRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.PrintPaymentStubRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
/**
/**
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/imp/RefundActionImpl.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/imp/RefundActionImpl.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
imp
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
imp
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
...
@@ -10,14 +10,14 @@ import com.gingersoft.gsa.cloud.common.logan.LoganManager;
...
@@ -10,14 +10,14 @@ import com.gingersoft.gsa.cloud.common.logan.LoganManager;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.common.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.RefundRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.RefundRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.bg.GetRefundIdResponse
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.bg.GetRefundIdResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.RefundRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.RefundRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.constant.HywebActionStatusCode
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.xuexiang.rxutil2.rxjava.RxSchedulerUtils
;
import
com.xuexiang.rxutil2.rxjava.RxSchedulerUtils
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/imp/RetrievalActionImpl.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/imp/RetrievalActionImpl.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
imp
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
imp
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
...
@@ -12,14 +12,14 @@ import com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils;
...
@@ -12,14 +12,14 @@ import com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils;
import
com.gingersoft.gsa.cloud.common.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.common.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.order.bean.request.MealOrderPayRequest
;
import
com.gingersoft.gsa.cloud.order.bean.request.MealOrderPayRequest
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.RetrievalRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.RetrievalRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.RetrievalRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.RetrievalRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.SettlementRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.SettlementRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.TransactionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.constant.TransactionStatusCode
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
import
com.xuexiang.rxutil2.rxjava.RxSchedulerUtils
;
import
com.xuexiang.rxutil2.rxjava.RxSchedulerUtils
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/imp/SaleActionImpl.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/imp/SaleActionImpl.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
imp
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
imp
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
...
@@ -15,15 +15,15 @@ import com.gingersoft.gsa.cloud.component.ComponentName;
...
@@ -15,15 +15,15 @@ import com.gingersoft.gsa.cloud.component.ComponentName;
import
com.gingersoft.gsa.cloud.order.bean.event.MealPayResultParam
;
import
com.gingersoft.gsa.cloud.order.bean.event.MealPayResultParam
;
import
com.gingersoft.gsa.cloud.order.bean.request.MealOrderPayRequest
;
import
com.gingersoft.gsa.cloud.order.bean.request.MealOrderPayRequest
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.SaleRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.SaleRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.bg.GetTxnIdResponse
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.bg.GetTxnIdResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.HywebPosResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.SaleRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.SaleRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.widget.StatusLoadingDialog
;
import
com.gingersoft.gsa.cloud.pay.widget.StatusLoadingDialog
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.jess.arms.utils.RxLifecycleUtils
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/imp/SettlementActionImpl.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/imp/SettlementActionImpl.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
imp
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
imp
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
...
@@ -10,10 +10,10 @@ import com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager;
...
@@ -10,10 +10,10 @@ import com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.common.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.SettlementRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.SettlementRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.SettlementRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.SettlementRespose
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.xuexiang.rxutil2.rxjava.RxSchedulerUtils
;
import
com.xuexiang.rxutil2.rxjava.RxSchedulerUtils
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/imp/TipsActionImpl.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/imp/TipsActionImpl.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
imp
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
imp
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
...
@@ -10,14 +10,14 @@ import com.gingersoft.gsa.cloud.common.logan.LoganManager;
...
@@ -10,14 +10,14 @@ import com.gingersoft.gsa.cloud.common.logan.LoganManager;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.common.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.AdjustTipRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.AdjustTipRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.bg.GetTipTxnIdResponse
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.bg.GetTipTxnIdResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.AdjustTipRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.AdjustTipRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.constant.HywebActionStatusCode
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.xuexiang.rxutil2.rxjava.RxSchedulerUtils
;
import
com.xuexiang.rxutil2.rxjava.RxSchedulerUtils
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/hyweb/imp/VoidActionImpl.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/hyweb/imp/VoidActionImpl.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
hyweb
.
imp
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
hyweb
.
imp
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
...
@@ -10,14 +10,14 @@ import com.gingersoft.gsa.cloud.common.logan.LoganManager;
...
@@ -10,14 +10,14 @@ import com.gingersoft.gsa.cloud.common.logan.LoganManager;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.common.utils.okhttpUtils.OkHttp3Utils
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.contract.PayExceptionCode
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.PosCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.PayAction
;
import
com.gingersoft.gsa.cloud.pay.
pos
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.
device.pos.base
.bean.PosMatter
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.bg.GetTxnIdRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.request.pos.VoidRequest
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.request.pos.VoidRequest
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.bg.GetCancelTxnIdResponse
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.bg.GetCancelTxnIdResponse
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos.VoidRespose
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.bean.response.pos.VoidRespose
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.constant.HywebActionStatusCode
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.constant.HywebActionStatusCode
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
com.xuexiang.rxutil2.rxjava.RxSchedulerUtils
;
import
com.xuexiang.rxutil2.rxjava.RxSchedulerUtils
;
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/yedpay/YedpayCallback.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/yedpay/YedpayCallback.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
yedpay
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
yedpay
;
import
android.content.Intent
;
import
com.gingersoft.gsa.cloud.pay.Callback
;
import
com.gingersoft.gsa.cloud.pay.Callback
;
import
com.gingersoft.gsa.cloud.pay.pos.bean.BasePosResponse
;
/**
/**
* @作者: bin
* @作者: bin
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
pos/yedpay/YedpayManager
.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/pos/yedpay/YedpayDevice
.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
yedpay
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
yedpay
;
import
android.util.SparseArray
;
import
android.util.SparseArray
;
import
com.gingersoft.gsa.cloud.pay.RequestParms
;
import
com.gingersoft.gsa.cloud.pay.RequestParms
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPayAction
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.PosPayAction
;
import
com.gingersoft.gsa.cloud.pay.pos.yedpay.constant.YedpayConstant
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.yedpay.constant.YedpayConstant
;
/**
/**
* @作者: bin
* @作者: bin
...
@@ -12,24 +12,19 @@ import com.gingersoft.gsa.cloud.pay.pos.yedpay.constant.YedpayConstant;
...
@@ -12,24 +12,19 @@ import com.gingersoft.gsa.cloud.pay.pos.yedpay.constant.YedpayConstant;
* @更新時間: 2021-04-14 12:08
* @更新時間: 2021-04-14 12:08
* @描述:
* @描述:
*/
*/
public
class
Yedpay
Manager
implements
PosPayAction
<
RequestParms
>
{
public
class
Yedpay
Device
implements
PosPayAction
<
RequestParms
>
{
private
static
Yedpay
Manager
sYedpayManager
;
private
static
Yedpay
Device
sYedpayDevice
;
private
final
SparseArray
<
String
>
mYedpayTypeMap
=
new
SparseArray
<>();
private
final
SparseArray
<
String
>
mYedpayTypeMap
=
new
SparseArray
<>();
private
RequestParms
mRequestParms
;
private
YedpayCallback
mYedpayCallback
;
public
static
YedpayDevice
newInstance
()
{
public
static
YedpayManager
newInstance
(
RequestParms
requestParms
)
{
if
(
sYedpayDevice
==
null
)
{
if
(
sYedpayManager
==
null
)
{
sYedpayDevice
=
new
YedpayDevice
();
sYedpayManager
=
new
YedpayManager
(
requestParms
);
}
}
return
sYedpay
Manager
;
return
sYedpay
Device
;
}
}
private
YedpayManager
(
RequestParms
requestParms
)
{
private
YedpayDevice
()
{
this
.
mRequestParms
=
requestParms
;
this
.
mYedpayCallback
=
(
YedpayCallback
)
requestParms
.
getCallback
();
initPayTypeMap
();
initPayTypeMap
();
}
}
...
@@ -73,12 +68,14 @@ public class YedpayManager implements PosPayAction<RequestParms> {
...
@@ -73,12 +68,14 @@ public class YedpayManager implements PosPayAction<RequestParms> {
@Override
@Override
public
void
pay
(
RequestParms
params
)
{
public
void
pay
(
RequestParms
params
)
{
String
uriString
=
"yedpayapp://transaction?g="
+
getPayType
(
params
.
getPayType
())
+
"&a="
+
params
.
getPayMoney
()
+
""
;
String
uriString
=
"yedpayapp://transaction?g="
+
getPayType
(
params
.
getPayType
())
+
"&a="
+
params
.
getPayMoney
()
+
""
;
mYedpayCallback
.
callSaleUri
(
uriString
);
YedpayCallback
callback
=
(
YedpayCallback
)
params
.
getCallback
();
callback
.
callSaleUri
(
uriString
);
}
}
@Override
@Override
public
void
refund
(
RequestParms
params
)
{
public
void
refund
(
RequestParms
params
)
{
mYedpayCallback
.
refundResult
(
true
);
YedpayCallback
callback
=
(
YedpayCallback
)
params
.
getCallback
();
callback
.
refundResult
(
true
);
}
}
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/pos/yedpay/constant/YedpayConstant.java
→
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/
device/
pos/yedpay/constant/YedpayConstant.java
View file @
0028c801
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
pos
.
yedpay
.
constant
;
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
device
.
pos
.
yedpay
.
constant
;
/**
/**
* @作者: bin
* @作者: bin
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/lifecycle/activity/PayFlowActivity.java
deleted
100644 → 0
View file @
871b5035
package
com
.
gingersoft
.
gsa
.
cloud
.
pay
.
lifecycle
.
activity
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.view.Window
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
com.gingersoft.gsa.cloud.pay.RequestParms
;
import
com.gingersoft.gsa.cloud.pay.lifecycle.fragment.PayFlowFragment
;
import
com.jess.arms.base.BaseFragmentActivity
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.mvp.BasePresenter
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.utils.ArmsUtils
;
import
me.yokeyword.fragmentation.anim.DefaultHorizontalAnimator
;
import
me.yokeyword.fragmentation.anim.FragmentAnimator
;
import
static
com
.
jess
.
arms
.
utils
.
Preconditions
.
checkNotNull
;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 05/13/2020 14:47
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public
class
PayFlowActivity
extends
BaseFragmentActivity
<
BasePresenter
>
implements
IView
{
@Override
public
void
setupActivityComponent
(
@NonNull
AppComponent
appComponent
)
{
// DaggerPayFlowComponent //如找不到该类,请编译一下项目
// .builder()
// .appComponent(appComponent)
// .view(this)
// .build()
// .inject(this);
}
@Override
public
int
initView
(
@Nullable
Bundle
savedInstanceState
)
{
return
0
;
//如果你不需要框架帮你设置 setContentView(id) 需要自行设置,请返回 0
}
@Override
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
if
(
findFragment
(
PayFlowFragment
.
class
)
==
null
)
{
RequestParms
requestParms
=
(
RequestParms
)
getIntent
().
getSerializableExtra
(
"requestParms"
);
// loadRootFragment(Window.ID_ANDROID_CONTENT, PayFlowFragment.newInstance(requestParms));
PayFlowFragment
statusExceptionFragment
=
PayFlowFragment
.
newInstance
(
requestParms
);
statusExceptionFragment
.
show
(
getSupportFragmentManager
(),
"PayFlowDialogFragment"
);
}
}
@Override
public
void
onBackPressedSupport
()
{
// 对于 4个类别的主Fragment内的回退back逻辑,已经在其onBackPressedSupport里各自处理了
super
.
onBackPressedSupport
();
}
@Override
public
FragmentAnimator
onCreateFragmentAnimator
()
{
// 设置横向(和安卓4.x动画相同)
return
new
DefaultHorizontalAnimator
();
}
@Override
public
void
initIntent
()
{
}
@Override
public
void
initTopBar
()
{
}
@Override
public
void
initLanguage
()
{
}
@Override
public
void
initLayoutParams
()
{
}
@Override
public
void
initLayoutVisible
()
{
}
@Override
public
void
showLoading
(
String
message
)
{
}
@Override
public
void
hideLoading
()
{
}
@Override
public
void
showMessage
(
@NonNull
String
message
)
{
checkNotNull
(
message
);
ArmsUtils
.
makeText
(
this
,
message
);
}
@Override
public
void
launchActivity
(
@NonNull
Intent
intent
)
{
checkNotNull
(
intent
);
ArmsUtils
.
startActivity
(
intent
);
}
@Override
public
void
killMyself
()
{
finish
();
}
}
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/lifecycle/case/PayFlowCase.kt
deleted
100644 → 0
View file @
871b5035
package
com.gingersoft.gsa.cloud.pay.lifecycle.case
/**
* @作者: bin
* @創建時間: 2021-04-16 10:05
* @更新時間: 2021-04-16 10:05
* @描述:
*/
class
PayFlowCase
{
}
\ No newline at end of file
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/lifecycle/fragment/PayFlowFragment.java
View file @
0028c801
...
@@ -13,8 +13,10 @@ import android.view.WindowManager;
...
@@ -13,8 +13,10 @@ import android.view.WindowManager;
import
android.widget.FrameLayout
;
import
android.widget.FrameLayout
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.gingersoft.gsa.cloud.common.logan.LoganManager
;
import
com.gingersoft.gsa.cloud.common.logan.LoganManager
;
import
com.gingersoft.gsa.cloud.order.R
;
import
com.gingersoft.gsa.cloud.order.R
;
import
com.gingersoft.gsa.cloud.order.R2
;
import
com.gingersoft.gsa.cloud.order.R2
;
...
@@ -31,7 +33,9 @@ import com.jess.arms.utils.ArmsUtils;
...
@@ -31,7 +33,9 @@ import com.jess.arms.utils.ArmsUtils;
import
com.gingersoft.gsa.cloud.pay.lifecycle.contract.PayFlowContract
;
import
com.gingersoft.gsa.cloud.pay.lifecycle.contract.PayFlowContract
;
import
com.gingersoft.gsa.cloud.pay.lifecycle.presenter.PayFlowPresenter
;
import
com.gingersoft.gsa.cloud.pay.lifecycle.presenter.PayFlowPresenter
;
import
com.qmuiteam.qmui.util.QMUIDisplayHelper
;
import
com.qmuiteam.qmui.util.QMUIDisplayHelper
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
static
com
.
jess
.
arms
.
utils
.
Preconditions
.
checkNotNull
;
import
static
com
.
jess
.
arms
.
utils
.
Preconditions
.
checkNotNull
;
...
@@ -91,12 +95,6 @@ public class PayFlowFragment extends BaseDialogFragment<PayFlowPresenter> implem
...
@@ -91,12 +95,6 @@ public class PayFlowFragment extends BaseDialogFragment<PayFlowPresenter> implem
public
void
onStart
()
{
public
void
onStart
()
{
super
.
onStart
();
super
.
onStart
();
mWindow
.
setBackgroundDrawable
(
new
ColorDrawable
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
trans
)));
mWindow
.
setBackgroundDrawable
(
new
ColorDrawable
(
ArmsUtils
.
getColor
(
mContext
,
R
.
color
.
trans
)));
// WindowManager.LayoutParams lp = mWindow.getAttributes();
// lp.width = QMUIDisplayHelper.dp2px(mContext,100);
// lp.height = QMUIDisplayHelper.dp2px(mContext,200);
// lp.gravity = Gravity.CENTER;
// lp.windowAnimations = android.R.style.Animation_InputMethod;
// mWindow.setAttributes(lp);
}
}
@Override
@Override
...
@@ -140,10 +138,12 @@ public class PayFlowFragment extends BaseDialogFragment<PayFlowPresenter> implem
...
@@ -140,10 +138,12 @@ public class PayFlowFragment extends BaseDialogFragment<PayFlowPresenter> implem
public
void
loadSuccess
()
{
public
void
loadSuccess
()
{
as_status
.
loadSuccess
();
as_status
.
loadSuccess
();
killMyself
();
}
}
public
void
loadFailure
()
{
public
void
loadFailure
()
{
as_status
.
loadFailure
();
as_status
.
loadFailure
();
killMyself
();
}
}
public
void
clearLoadingAnim
()
{
public
void
clearLoadingAnim
()
{
...
@@ -183,7 +183,7 @@ public class PayFlowFragment extends BaseDialogFragment<PayFlowPresenter> implem
...
@@ -183,7 +183,7 @@ public class PayFlowFragment extends BaseDialogFragment<PayFlowPresenter> implem
as_status
.
postDelayed
(
new
Runnable
()
{
as_status
.
postDelayed
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
getDialog
().
cancel
();
dismiss
();
}
}
},
mCancelDelayMillis
);
},
mCancelDelayMillis
);
}
}
...
@@ -203,7 +203,12 @@ public class PayFlowFragment extends BaseDialogFragment<PayFlowPresenter> implem
...
@@ -203,7 +203,12 @@ public class PayFlowFragment extends BaseDialogFragment<PayFlowPresenter> implem
}
}
break
;
break
;
}
}
default
:
showStatusLoadingDialog
(
PayStep
.
FAILURE
);
break
;
}
}
}
else
{
showStatusLoadingDialog
(
PayStep
.
FAILURE
);
}
}
}
}
...
...
library-order/src/main/java/com/gingersoft/gsa/cloud/pay/lifecycle/presenter/PayFlowPresenter.java
View file @
0028c801
...
@@ -5,7 +5,6 @@ import android.content.Intent;
...
@@ -5,7 +5,6 @@ import android.content.Intent;
import
android.net.Uri
;
import
android.net.Uri
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.common.core.user.UserContext
;
import
com.gingersoft.gsa.cloud.common.rxjava.ErrorHandleSingleSubscriber
;
import
com.gingersoft.gsa.cloud.common.rxjava.ErrorHandleSingleSubscriber
;
import
com.gingersoft.gsa.cloud.common.utils.AppDevices
;
import
com.gingersoft.gsa.cloud.common.utils.AppDevices
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
...
@@ -14,12 +13,12 @@ import com.gingersoft.gsa.cloud.pay.PaymentControl;
...
@@ -14,12 +13,12 @@ import com.gingersoft.gsa.cloud.pay.PaymentControl;
import
com.gingersoft.gsa.cloud.pay.RequestParms
;
import
com.gingersoft.gsa.cloud.pay.RequestParms
;
import
com.gingersoft.gsa.cloud.pay.ResultCallback
;
import
com.gingersoft.gsa.cloud.pay.ResultCallback
;
import
com.gingersoft.gsa.cloud.pay.lifecycle.model.bean.YedpayFindSaleStatusBean
;
import
com.gingersoft.gsa.cloud.pay.lifecycle.model.bean.YedpayFindSaleStatusBean
;
import
com.gingersoft.gsa.cloud.pay.phone.PhoneCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.
device.
phone.PhoneCallbackListener
;
import
com.gingersoft.gsa.cloud.pay.pos.PosPayAction
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.PosPayAction
;
import
com.gingersoft.gsa.cloud.pay.pos.bbpos.BBposCallback
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.bbpos.BBposCallback
;
import
com.gingersoft.gsa.cloud.pay.pos.hyweb.HywebCallback
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.hyweb.HywebCallback
;
import
com.gingersoft.gsa.cloud.pay.pos.yedpay.YedpayCallback
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.yedpay.YedpayCallback
;
import
com.gingersoft.gsa.cloud.pay.pos.yedpay.constant.YedpayConstant
;
import
com.gingersoft.gsa.cloud.pay.
device.
pos.yedpay.constant.YedpayConstant
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.di.scope.FragmentScope
;
import
com.jess.arms.di.scope.FragmentScope
;
import
com.jess.arms.mvp.BasePresenter
;
import
com.jess.arms.mvp.BasePresenter
;
...
@@ -78,10 +77,6 @@ public class PayFlowPresenter extends BasePresenter<PayFlowContract.Model, PayFl
...
@@ -78,10 +77,6 @@ public class PayFlowPresenter extends BasePresenter<PayFlowContract.Model, PayFl
this
.
mApplication
=
null
;
this
.
mApplication
=
null
;
}
}
public
void
yedPayActivityForResult
()
{
}
public
void
yedPayUpdateStatus
(
String
transactionId
,
long
orderId
,
int
payType
,
int
restaurantId
)
{
public
void
yedPayUpdateStatus
(
String
transactionId
,
long
orderId
,
int
payType
,
int
restaurantId
)
{
RequestBody
requestBody
=
new
FormBody
.
Builder
()
RequestBody
requestBody
=
new
FormBody
.
Builder
()
.
add
(
"transactionId"
,
transactionId
)
.
add
(
"transactionId"
,
transactionId
)
...
@@ -126,17 +121,16 @@ public class PayFlowPresenter extends BasePresenter<PayFlowContract.Model, PayFl
...
@@ -126,17 +121,16 @@ public class PayFlowPresenter extends BasePresenter<PayFlowContract.Model, PayFl
mResultCallback
.
onFailure
(
null
);
mResultCallback
.
onFailure
(
null
);
}
}
}
}
mRootView
.
killMyself
();
}
}
@Override
@Override
public
void
onError
(
Throwable
t
)
{
public
void
onError
(
Throwable
t
)
{
super
.
onError
(
t
);
super
.
onError
(
t
);
mRootView
.
showStatusLoadingDialog
(
PayStep
.
FAILURE
);
if
(
mResultCallback
!=
null
)
{
if
(
mResultCallback
!=
null
)
{
mResultCallback
.
onFailure
(
t
);
mResultCallback
.
onFailure
(
t
);
}
}
mRootView
.
killMyself
();
}
}
});
});
}
}
...
@@ -169,6 +163,15 @@ public class PayFlowPresenter extends BasePresenter<PayFlowContract.Model, PayFl
...
@@ -169,6 +163,15 @@ public class PayFlowPresenter extends BasePresenter<PayFlowContract.Model, PayFl
}
}
}
}
}
}
@Override
public
void
onError
(
Throwable
t
)
{
super
.
onError
(
t
);
mRootView
.
showStatusLoadingDialog
(
PayStep
.
FAILURE
);
if
(
mResultCallback
!=
null
)
{
mResultCallback
.
onFailure
(
t
);
}
}
});
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment