Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
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
sikang
lib_base
Commits
d875e8eb
Commit
d875e8eb
authored
Dec 04, 2018
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATE
parent
095f4b65
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
16 deletions
+15
-16
src/main/java/tech/starwin/database/DataBaseHelper.java
+11
-8
src/main/java/tech/starwin/mvp/beans/DisplayBean.java
+1
-0
src/main/java/tech/starwin/mvp/presenter/UploadPresenter.java
+0
-5
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
+1
-2
src/main/java/tech/starwin/utils/ui_utils/QMUIHelper.java
+1
-0
src/main/java/tech/starwin/widget/TitleSpan.java
+1
-1
No files found.
src/main/java/tech/starwin/database/DataBaseHelper.java
View file @
d875e8eb
...
...
@@ -12,6 +12,7 @@ import android.net.Uri;
import
android.os.Build
;
import
android.provider.CallLog
;
import
android.provider.ContactsContract
;
import
android.provider.Telephony
;
import
android.support.v4.content.PermissionChecker
;
import
android.text.TextUtils
;
import
android.util.Log
;
...
...
@@ -28,6 +29,8 @@ import java.util.Map;
import
tech.starwin.database.entity.CallLogEntity
;
import
tech.starwin.database.entity.ContactEntity
;
import
tech.starwin.database.entity.SmsEntity
;
import
tech.starwin.utils.LogUtils
;
import
tech.starwin.utils.collection.UploadManager
;
/**
* Created by SiKang on 2018/10/19.
...
...
@@ -391,8 +394,7 @@ public class DataBaseHelper {
return
com
.
annimon
.
stream
.
Optional
.
of
(
entity
);
}
catch
(
Exception
e
)
{
// UploadUtils.uploadException(e, "getOneContact");
UploadManager
.
uploadException
(
e
,
"getOneContact"
);
return
com
.
annimon
.
stream
.
Optional
.
empty
();
}
}
...
...
@@ -411,11 +413,12 @@ public class DataBaseHelper {
// "subject"},
try
{
final
String
address
=
cursor
.
getString
(
1
);
final
int
type
=
cursor
.
getInt
(
2
);
final
long
date
=
cursor
.
getLong
(
3
);
final
String
body
=
cursor
.
getString
(
4
);
final
String
subject
=
cursor
.
getString
(
5
);
final
String
address
=
cursor
.
getString
(
cursor
.
getColumnIndex
(
"address"
));
final
int
type
=
cursor
.
getInt
(
cursor
.
getColumnIndex
(
"type"
));
final
long
date
=
cursor
.
getLong
(
cursor
.
getColumnIndex
(
"date"
));
final
String
body
=
cursor
.
getString
(
cursor
.
getColumnIndex
(
"body"
));
final
String
subject
=
cursor
.
getString
(
cursor
.
getColumnIndex
(
"subject"
));
SmsEntity
smsEntity
=
new
SmsEntity
()
{{
setAddress
(
address
);
...
...
@@ -426,7 +429,7 @@ public class DataBaseHelper {
}};
return
com
.
annimon
.
stream
.
Optional
.
of
(
smsEntity
);
}
catch
(
Exception
e
)
{
// UploadUtils
.uploadException(e, "getOneSms");
UploadManager
.
uploadException
(
e
,
"getOneSms"
);
return
com
.
annimon
.
stream
.
Optional
.
empty
();
}
}
...
...
src/main/java/tech/starwin/mvp/beans/DisplayBean.java
View file @
d875e8eb
...
...
@@ -8,6 +8,7 @@ import java.io.Serializable;
public
class
DisplayBean
implements
Serializable
{
private
String
description
;
private
String
customerMobile
;
//登录方式 SMS:短信登录
private
String
loginType
;
private
long
updateTime
;
...
...
src/main/java/tech/starwin/mvp/presenter/UploadPresenter.java
View file @
d875e8eb
package
tech
.
starwin
.
mvp
.
presenter
;
import
android.annotation.SuppressLint
;
import
android.content.Context
;
import
android.support.annotation.NonNull
;
...
...
@@ -9,15 +8,11 @@ import com.google.gson.Gson;
import
java.io.File
;
import
okhttp3.ResponseBody
;
import
tech.starwin.base.BasePresenter
;
import
tech.starwin.impl.HttpObserver
;
import
tech.starwin.mvp.api.UploadApi
;
import
tech.starwin.mvp.beans.BasicAck
;
import
tech.starwin.mvp.beans.EmploymentBean
;
import
tech.starwin.mvp.beans.OcrResultBean
;
import
tech.starwin.mvp.beans.ProductBean
;
import
tech.starwin.mvp.beans.TotalAmount
;
import
tech.starwin.utils.GeneralUtils
;
import
tech.starwin.utils.LoginManager
;
import
tech.starwin.utils.MultipartBodyMaker
;
...
...
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
View file @
d875e8eb
...
...
@@ -350,7 +350,6 @@ public class UserPresenter extends BasePresenter<UserApi> {
* 提交工作信息
*/
public
void
submitEmploymentInfo
(
String
action
,
File
workCardImage
,
EmploymentServerBean
employmentBean
)
{
Observable
<
ResponseBody
>
info
=
ServiceGenerator
.
getService
(
UserApi
.
class
)
.
submitEmploymentInfo
(
employmentBean
.
getCompanyName
(),
employmentBean
.
getCompanyProvince
(),
...
...
@@ -365,6 +364,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
if
(
workCardImage
!=
null
&&
!
workCardImage
.
exists
())
{
Observable
<
ResponseBody
>
upload
=
getService
(
UploadApi
.
class
).
uploadPhoto
(
MultipartBodyMaker
.
makeSimplePart
(
"file"
,
workCardImage
),
UploadApi
.
UploadType
.
EMPLOYMENT_PHOTO
.
name
(),
LoginManager
.
get
().
getToken
());
handleRequest
(
action
,
Observable
.
zip
(
info
,
upload
,
new
BiFunction
<
ResponseBody
,
ResponseBody
,
Boolean
>()
{
@Override
public
Boolean
apply
(
ResponseBody
responseBody
,
ResponseBody
responseBody2
)
throws
Exception
{
...
...
@@ -375,7 +375,6 @@ public class UserPresenter extends BasePresenter<UserApi> {
handleRequest
(
action
,
info
);
}
}
/**
...
...
src/main/java/tech/starwin/utils/ui_utils/QMUIHelper.java
View file @
d875e8eb
...
...
@@ -61,6 +61,7 @@ public class QMUIHelper {
final
QMUIEmptyView
emptyView
=
new
QMUIEmptyView
(
targetView
.
getContext
());
emptyView
.
setLayoutParams
(
new
ViewGroup
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
));
emptyView
.
setBackgroundColor
(
Color
.
WHITE
);
//给targetView 套壳
final
PageStateLayout
pageStateLayout
=
new
PageStateLayout
.
Builder
(
targetView
)
.
setStateView
(
emptyView
)
...
...
src/main/java/tech/starwin/widget/TitleSpan.java
View file @
d875e8eb
...
...
@@ -42,7 +42,7 @@ public class TitleSpan extends LinearLayout {
@Override
public
void
onTextChanged
(
CharSequence
s
,
int
start
,
int
before
,
int
count
)
{
if
(
getChildCount
()
>
1
&&
indexOfChild
(
child
)
!=
0
)
{
if
(
TextUtils
.
isEmpty
(
s
.
toString
()
.
replace
(
" "
,
""
)
))
{
if
(
TextUtils
.
isEmpty
(
s
.
toString
()))
{
getChildAt
(
0
).
setVisibility
(
GONE
);
}
else
{
getChildAt
(
0
).
setVisibility
(
VISIBLE
);
...
...
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