Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
721e254f
Commit
721e254f
authored
Sep 07, 2021
by
shiyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建商户订单组件
parent
7eb87917
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
291 additions
and
1 deletion
+291
-1
XRouterPathConstants.kt
.../java/com/yidian/bcommon/constant/XRouterPathConstants.kt
+15
-0
.gitignore
Components/BMerchantOrder/.gitignore
+1
-0
build.gradle
Components/BMerchantOrder/build.gradle
+71
-0
consumer-rules.pro
Components/BMerchantOrder/consumer-rules.pro
+0
-0
proguard-rules.pro
Components/BMerchantOrder/proguard-rules.pro
+21
-0
ExampleInstrumentedTest.kt
...an/shenghuoquan/bmerchantorder/ExampleInstrumentedTest.kt
+24
-0
AndroidManifest.xml
Components/BMerchantOrder/src/main/AndroidManifest.xml
+11
-0
BMerchantOrderApplication.kt
...nghuoquan/bmerchantorder/app/BMerchantOrderApplication.kt
+45
-0
ClassMapUtil.kt
...om/yidian/shenghuoquan/bmerchantorder/app/ClassMapUtil.kt
+19
-0
MerchantOrderCenterActivity.kt
...ghuoquan/bmerchantorder/ui/MerchantOrderCenterActivity.kt
+29
-0
MerchantOrderCenterViewModel.kt
.../bmerchantorder/viewmodel/MerchantOrderCenterViewModel.kt
+7
-0
AndroidManifest.xml
...ents/BMerchantOrder/src/main/manifest/AndroidManifest.xml
+5
-0
bmerchantorder_activity_merchant_order_center.xml
.../layout/bmerchantorder_activity_merchant_order_center.xml
+16
-0
attr.xml
Components/BMerchantOrder/src/main/res/values/attr.xml
+2
-0
color.xml
Components/BMerchantOrder/src/main/res/values/color.xml
+2
-0
strings.xml
Components/BMerchantOrder/src/main/res/values/strings.xml
+4
-0
ExampleUnitTest.kt
...com/yidian/shenghuoquan/bmerchantorder/ExampleUnitTest.kt
+17
-0
BUserOrderApplication.kt
...dian/shenghuoquan/buserorder/app/BUserOrderApplication.kt
+1
-1
settings.gradle
settings.gradle
+1
-0
No files found.
CommonLib/BCommon/src/main/java/com/yidian/bcommon/constant/XRouterPathConstants.kt
View file @
721e254f
...
@@ -163,6 +163,21 @@ class XRouterPathConstants {
...
@@ -163,6 +163,21 @@ class XRouterPathConstants {
// 订单 — 订单列表
// 订单 — 订单列表
const
val
ORDER_LIST_ACTIVITY
=
"/b/user_order/order_list"
const
val
ORDER_LIST_ACTIVITY
=
"/b/user_order/order_list"
/**
* BMerchantOrder组件内的页面
*/
// 商户订单 — 订单中心
const
val
MERCHANT_ORDER_CENTER_ACTIVITY
=
"/b/merchant_order/merchant_order_center"
// 商户订单 — 订单列表
const
val
MERCHANT_ORDER_LIST_ACTIVITY
=
"/b/merchant_order/merchant_order_list"
// 商户订单 — 订单搜索
const
val
MERCHANT_ORDER_SEARCH_ACTIVITY
=
"/b/merchant_order/merchant_order_search"
// 商户订单 — 订单详情
const
val
MERCHANT_ORDER_DETAILS_ACTIVITY
=
"/b/merchant_order/merchant_order_details"
/**
/**
* C端页面
* C端页面
*/
*/
...
...
Components/BMerchantOrder/.gitignore
0 → 100644
View file @
721e254f
/build
\ No newline at end of file
Components/BMerchantOrder/build.gradle
0 → 100644
View file @
721e254f
if
(
rootProject
.
ext
.
android
.
isApplication
)
{
apply
plugin:
'com.android.application'
apply
plugin:
'yac-engine'
}
else
{
apply
plugin:
'com.android.library'
}
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-kapt'
apply
plugin:
'kotlin-parcelize'
rootProject
.
ext
.
artifact_id
=
'merchantOrder'
apply
from:
'../../publish.gradle'
android
{
compileSdkVersion
build_versions
.
compileSdkVersion
defaultConfig
{
if
(
rootProject
.
ext
.
android
.
isApplication
)
{
applicationId
"com.yidian.shenghuoquan.bmerchantorder"
}
minSdkVersion
build_versions
.
minSdkVersion
targetSdkVersion
build_versions
.
targetSdkVersion
versionCode
rootProject
.
ext
.
android
.
versionCode
versionName
rootProject
.
ext
.
android
.
versionName
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles
"consumer-rules.pro"
}
buildTypes
{
release
{
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
}
}
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
kotlinOptions
{
jvmTarget
=
'1.8'
}
sourceSets
{
main
{
if
(
rootProject
.
ext
.
android
.
isApplication
)
{
manifest
.
srcFile
'src/main/manifest/AndroidManifest.xml'
}
else
{
manifest
.
srcFile
'src/main/AndroidManifest.xml'
}
}
}
buildFeatures
{
viewBinding
true
dataBinding
true
}
kapt
{
generateStubs
=
true
}
}
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
,
'*.aar'
])
implementation
"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
rootProject
.
ext
.
dependencies
.
other
.
each
{
implementation
project
(
it
)
}
compileOnly
rootProject
.
ext
.
dependencies
.
privateImplementation
testImplementation
rootProject
.
ext
.
dependencies
.
testImplementation
androidTestImplementation
rootProject
.
ext
.
dependencies
.
androidTestImplementation
}
\ No newline at end of file
Components/BMerchantOrder/consumer-rules.pro
0 → 100644
View file @
721e254f
Components/BMerchantOrder/proguard-rules.pro
0 → 100644
View file @
721e254f
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
Components/BMerchantOrder/src/androidTest/java/com/yidian/shenghuoquan/bmerchantorder/ExampleInstrumentedTest.kt
0 → 100644
View file @
721e254f
package
com.yidian.shenghuoquan.bmerchantorder
import
androidx.test.platform.app.InstrumentationRegistry
import
androidx.test.ext.junit.runners.AndroidJUnit4
import
org.junit.Test
import
org.junit.runner.RunWith
import
org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith
(
AndroidJUnit4
::
class
)
class
ExampleInstrumentedTest
{
@Test
fun
useAppContext
()
{
// Context of the app under test.
val
appContext
=
InstrumentationRegistry
.
getInstrumentation
().
targetContext
assertEquals
(
"com.yidian.shenghuoquan.bmerchantorder.test"
,
appContext
.
packageName
)
}
}
Components/BMerchantOrder/src/main/AndroidManifest.xml
0 → 100644
View file @
721e254f
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.yidian.shenghuoquan.bmerchantorder"
>
<application>
<activity
android:name=
".ui.MerchantOrderCenterActivity"
android:theme=
"@style/AppTheme"
/>
</application>
</manifest>
\ No newline at end of file
Components/BMerchantOrder/src/main/java/com/yidian/shenghuoquan/bmerchantorder/app/BMerchantOrderApplication.kt
0 → 100644
View file @
721e254f
package
com.yidian.shenghuoquan.bmerchantorder.app
import
android.content.Intent
import
com.yidian.bcommon.app.YdBaseApplication
import
com.yidian.bcommon.constant.XRouterPathConstants
import
com.yidian.news.util.ProcessUtil
import
com.yidian.xpage.XPageManager
import
com.yidian.xpage.node.XPageHandler
import
com.yidian.xpage.node.XPageNode
import
com.yidian.xpage.node.XPageNodePageType
import
com.yidian.yac.core.core.YacModuleSpec
@YacModuleSpec
class
BMerchantOrderApplication
:
YdBaseApplication
()
{
override
fun
onCreate
()
{
super
.
onCreate
()
if
(
ProcessUtil
.
isMainProcess
(
this
))
{
registerXPage
()
initService
()
}
}
private
fun
initService
()
{
}
private
fun
registerXPage
()
{
ClassMapUtil
.
xPageNodeMap
.
forEach
{
val
node
=
XPageNode
(
it
.
key
,
XPageNodePageType
.
NATIVE
,
object
:
XPageHandler
{
override
fun
handler
(
params
:
Map
<
String
,
Any
?
>?)
{
val
intent
=
Intent
()
if
(
params
!=
null
)
{
intent
.
putExtra
(
XRouterPathConstants
.
ParamsKey
,
params
as
HashMap
)
}
intent
.
setClass
(
context
,
it
.
value
)
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
context
.
startActivity
(
intent
)
}
})
XPageManager
.
registeredNode
(
node
)
}
}
}
Components/BMerchantOrder/src/main/java/com/yidian/shenghuoquan/bmerchantorder/app/ClassMapUtil.kt
0 → 100644
View file @
721e254f
package
com.yidian.shenghuoquan.bmerchantorder.app
import
com.yidian.bcommon.constant.XRouterPathConstants
import
com.yidian.shenghuoquan.bmerchantorder.ui.MerchantOrderCenterActivity
/**
* 注册XPageNode工具类
*/
object
ClassMapUtil
{
val
xPageNodeMap
=
mapOf
(
XRouterPathConstants
.
Companion
.
MERCHANT_ORDER_CENTER_ACTIVITY
to
MerchantOrderCenterActivity
::
class
.
java
,
// XRouterPathConstants.Companion.MERCHANT_ORDER_LIST_ACTIVITY to OrderDetailActivity::class.java,
// XRouterPathConstants.Companion.MERCHANT_ORDER_SEARCH_ACTIVITY to SelectPickupPointActivity::class.java,
// XRouterPathConstants.Companion.MERCHANT_ORDER_DETAILS_ACTIVITY to OrderListActivity::class.java,
)
}
Components/BMerchantOrder/src/main/java/com/yidian/shenghuoquan/bmerchantorder/ui/MerchantOrderCenterActivity.kt
0 → 100644
View file @
721e254f
package
com.yidian.shenghuoquan.bmerchantorder.ui
import
androidx.activity.viewModels
import
com.yidian.bcommon.constant.XRouterPathConstants
import
com.yidian.bcommon.mvvm.BaseMvvmActivity
import
com.yidian.shenghuoquan.bmerchantorder.R
import
com.yidian.shenghuoquan.bmerchantorder.databinding.BmerchantorderActivityMerchantOrderCenterBinding
import
com.yidian.shenghuoquan.bmerchantorder.viewmodel.MerchantOrderCenterViewModel
import
com.yidian.xpage.XPageViewProtocol
/**
* 商户订单中心
*/
class
MerchantOrderCenterActivity
:
BaseMvvmActivity
<
BmerchantorderActivityMerchantOrderCenterBinding
,
MerchantOrderCenterViewModel
>(),
XPageViewProtocol
{
override
val
layoutId
:
Int
=
R
.
layout
.
bmerchantorder_activity_merchant_order_center
override
val
vm
:
MerchantOrderCenterViewModel
by
viewModels
()
override
fun
getXPageName
():
String
{
return
XRouterPathConstants
.
MERCHANT_ORDER_CENTER_ACTIVITY
}
override
fun
initView
()
{
}
}
Components/BMerchantOrder/src/main/java/com/yidian/shenghuoquan/bmerchantorder/viewmodel/MerchantOrderCenterViewModel.kt
0 → 100644
View file @
721e254f
package
com.yidian.shenghuoquan.bmerchantorder.viewmodel
import
com.yidian.bcommon.mvvm.BaseViewModel
class
MerchantOrderCenterViewModel
:
BaseViewModel
()
{
}
Components/BMerchantOrder/src/main/manifest/AndroidManifest.xml
0 → 100644
View file @
721e254f
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.yidian.shenghuoquan.bmerchantorder"
>
</manifest>
Components/BMerchantOrder/src/main/res/layout/bmerchantorder_activity_merchant_order_center.xml
0 → 100644
View file @
721e254f
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<variable
name=
"vm"
type=
"com.yidian.shenghuoquan.bmerchantorder.viewmodel.MerchantOrderCenterViewModel"
/>
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
\ No newline at end of file
Components/BMerchantOrder/src/main/res/values/attr.xml
0 → 100644
View file @
721e254f
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>
\ No newline at end of file
Components/BMerchantOrder/src/main/res/values/color.xml
0 → 100644
View file @
721e254f
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>
\ No newline at end of file
Components/BMerchantOrder/src/main/res/values/strings.xml
0 → 100644
View file @
721e254f
<?xml version="1.0" encoding="utf-8"?>
<resources>
</resources>
\ No newline at end of file
Components/BMerchantOrder/src/test/java/com/yidian/shenghuoquan/bmerchantorder/ExampleUnitTest.kt
0 → 100644
View file @
721e254f
package
com.yidian.shenghuoquan.bmerchantorder
import
org.junit.Test
import
org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class
ExampleUnitTest
{
@Test
fun
addition_isCorrect
()
{
assertEquals
(
4
,
2
+
2
)
}
}
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/app/BOrderApplication.kt
→
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/app/B
User
OrderApplication.kt
View file @
721e254f
...
@@ -11,7 +11,7 @@ import com.yidian.xpage.node.XPageNodePageType
...
@@ -11,7 +11,7 @@ import com.yidian.xpage.node.XPageNodePageType
import
com.yidian.yac.core.core.YacModuleSpec
import
com.yidian.yac.core.core.YacModuleSpec
@YacModuleSpec
@YacModuleSpec
class
BOrderApplication
:
YdBaseApplication
()
{
class
B
User
OrderApplication
:
YdBaseApplication
()
{
override
fun
onCreate
()
{
override
fun
onCreate
()
{
super
.
onCreate
()
super
.
onCreate
()
...
...
settings.gradle
View file @
721e254f
...
@@ -11,3 +11,4 @@ include ':Components:BGeneralBusiness'
...
@@ -11,3 +11,4 @@ include ':Components:BGeneralBusiness'
include
':Components:BUserOrder'
include
':Components:BUserOrder'
include
':Components:BMediator'
include
':Components:BMediator'
include
':Components:BDemo'
include
':Components:BDemo'
include
':Components:BMerchantOrder'
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