18 changed files with 476 additions and 54 deletions
@ -0,0 +1,119 @@ |
|||||||
|
package com.kanglai.push.entity; |
||||||
|
|
||||||
|
import android.os.Parcel; |
||||||
|
import android.os.Parcelable; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
|
||||||
|
/** |
||||||
|
* SSO用户表 |
||||||
|
* @Author: liusixiang007 |
||||||
|
* @since: 2024/1/9 |
||||||
|
*/ |
||||||
|
|
||||||
|
@Data |
||||||
|
@Accessors |
||||||
|
public class SsoUser implements Parcelable { |
||||||
|
|
||||||
|
private String id; |
||||||
|
|
||||||
|
/** 邮箱 */ |
||||||
|
private String email; |
||||||
|
|
||||||
|
/** 头像 */ |
||||||
|
private String avatar; |
||||||
|
|
||||||
|
/** 用户类型 */ |
||||||
|
private String identityProvider; |
||||||
|
|
||||||
|
/** 登录ip */ |
||||||
|
private String loginIp; |
||||||
|
|
||||||
|
/** 登录时间 */ |
||||||
|
private String loginTime; |
||||||
|
|
||||||
|
/** 新密码 */ |
||||||
|
private String newPassword; |
||||||
|
|
||||||
|
/** 昵称 */ |
||||||
|
private String nickName; |
||||||
|
|
||||||
|
/** 密码 */ |
||||||
|
private String password; |
||||||
|
|
||||||
|
/** 手机号 */ |
||||||
|
private String phone; |
||||||
|
|
||||||
|
/** 性别 */ |
||||||
|
private String sex; // 0 男 1 女
|
||||||
|
|
||||||
|
/** 状态 */ |
||||||
|
private String status; |
||||||
|
|
||||||
|
/** 多租户id */ |
||||||
|
private String tenantId; |
||||||
|
|
||||||
|
/** 用户名 */ |
||||||
|
private String userName; |
||||||
|
|
||||||
|
public SsoUser(){} |
||||||
|
|
||||||
|
public SsoUser(String id, String sex, String nickName){ |
||||||
|
this.id = id; |
||||||
|
this.sex = sex; |
||||||
|
this.nickName = nickName; |
||||||
|
} |
||||||
|
|
||||||
|
protected SsoUser(Parcel in) { |
||||||
|
id = in.readString(); |
||||||
|
email = in.readString(); |
||||||
|
avatar = in.readString(); |
||||||
|
identityProvider = in.readString(); |
||||||
|
loginIp = in.readString(); |
||||||
|
loginTime = in.readString(); |
||||||
|
newPassword = in.readString(); |
||||||
|
nickName = in.readString(); |
||||||
|
password = in.readString(); |
||||||
|
phone = in.readString(); |
||||||
|
sex = in.readString(); |
||||||
|
status = in.readString(); |
||||||
|
tenantId = in.readString(); |
||||||
|
userName = in.readString(); |
||||||
|
} |
||||||
|
|
||||||
|
public static final Creator<SsoUser> CREATOR = new Creator<SsoUser>() { |
||||||
|
@Override |
||||||
|
public SsoUser createFromParcel(Parcel in) { |
||||||
|
return new SsoUser(in); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public SsoUser[] newArray(int size) { |
||||||
|
return new SsoUser[size]; |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
@Override |
||||||
|
public int describeContents() { |
||||||
|
return 0; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void writeToParcel(Parcel parcel, int i) { |
||||||
|
parcel.writeString(id); |
||||||
|
parcel.writeString(email); |
||||||
|
parcel.writeString(avatar); |
||||||
|
parcel.writeString(identityProvider); |
||||||
|
parcel.writeString(loginIp); |
||||||
|
parcel.writeString(loginTime); |
||||||
|
parcel.writeString(newPassword); |
||||||
|
parcel.writeString(nickName); |
||||||
|
parcel.writeString(password); |
||||||
|
parcel.writeString(phone); |
||||||
|
parcel.writeString(sex); |
||||||
|
parcel.writeString(status); |
||||||
|
parcel.writeString(tenantId); |
||||||
|
parcel.writeString(userName); |
||||||
|
} |
||||||
|
} |
@ -1,25 +0,0 @@ |
|||||||
package com.kanglai.push.ui.vm; |
|
||||||
|
|
||||||
import android.app.Application; |
|
||||||
|
|
||||||
import androidx.annotation.NonNull; |
|
||||||
import androidx.lifecycle.LifecycleOwner; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* AuroraIMUI 测试可行性 |
|
||||||
* @Author: liusixiang007 |
|
||||||
* @since: 2023/12/12 |
|
||||||
*/ |
|
||||||
public class AuroraViewModel extends ToolbarViewModel { |
|
||||||
|
|
||||||
public AuroraViewModel(@NonNull Application application) { |
|
||||||
super(application); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onCreate(@NonNull LifecycleOwner owner) { |
|
||||||
super.onCreate(owner); |
|
||||||
super.setTitleText("AuroraIMUI测试"); |
|
||||||
} |
|
||||||
} |
|
@ -0,0 +1,51 @@ |
|||||||
|
package com.kanglai.push.util; |
||||||
|
|
||||||
|
import com.kanglai.push.app.AppApplication; |
||||||
|
|
||||||
|
import com.kanglai.push.R; |
||||||
|
|
||||||
|
import java.util.Random; |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取随机取名 |
||||||
|
* @Author: liusixiang007 |
||||||
|
* @since: 2024/1/9 |
||||||
|
*/ |
||||||
|
public class RandomUtil { |
||||||
|
|
||||||
|
/** |
||||||
|
* 随机获取一个名字 |
||||||
|
* @param simple 是否单姓 |
||||||
|
* @param len 名字长度 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static String getRandomName(boolean simple, int len) { |
||||||
|
String[] surName = AppApplication.mContext.getResources().getStringArray(R.array.random_sur_name_items); |
||||||
|
String[] doubleSurName = AppApplication.mContext.getResources().getStringArray(R.array.random_double_sur_name_items); |
||||||
|
String[] word = AppApplication.mContext.getResources().getStringArray(R.array.random_word_name_items); |
||||||
|
int surNameLen = surName.length; |
||||||
|
int doubleSurNameLen = doubleSurName.length; |
||||||
|
int wordLen = word.length; |
||||||
|
|
||||||
|
StringBuffer sb = new StringBuffer(); |
||||||
|
Random random = new Random(); |
||||||
|
if(simple){ |
||||||
|
sb.append(surName[random.nextInt(surNameLen)]); |
||||||
|
int surLen = sb.toString().length(); |
||||||
|
for (int i = 0; i < len - surLen; i++) { |
||||||
|
if(sb.toString().length() <= len){ |
||||||
|
sb.append(word[random.nextInt(wordLen)]); |
||||||
|
} |
||||||
|
} |
||||||
|
}else{ |
||||||
|
sb.append(doubleSurName[random.nextInt(doubleSurNameLen)]); |
||||||
|
int doubleSurLen = sb.toString().length(); |
||||||
|
for (int i = 0; i < len - doubleSurLen; i++) { |
||||||
|
if(sb.toString().length() <= len){ |
||||||
|
sb.append(word[random.nextInt(wordLen)]); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return sb.toString(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,66 @@ |
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:width="200dp" |
||||||
|
android:height="200dp" |
||||||
|
android:viewportWidth="1024" |
||||||
|
android:viewportHeight="1024"> |
||||||
|
<path |
||||||
|
android:pathData="M478.6,54a66.7,66.7 0,0 1,66.8 0l346.5,200.1a66.8,66.8 0,0 1,33.4 57.8v400.1a66.8,66.8 0,0 1,-33.4 57.8L545.4,970a66.7,66.7 0,0 1,-66.8 0L132.1,769.9a66.8,66.8 0,0 1,-33.4 -57.8V311.9a66.8,66.8 0,0 1,33.4 -57.8L478.6,54z" |
||||||
|
android:fillColor="#C4D4F7"/> |
||||||
|
<path |
||||||
|
android:pathData="M106,281.7a66.9,66.9 0,0 1,15.2 -19.7C192.3,222.6 410.7,94.6 486.5,50.2a66.8,66.8 0,0 1,58.9 3.9l346.5,200.1a66.7,66.7 0,0 1,24.5 24.6l-361.8,201.2a89.5,89.5 0,0 1,-84.6 1.3c-95.4,-49.3 -320.8,-167 -364.1,-199.6z" |
||||||
|
android:fillColor="#DFEDFD"/> |
||||||
|
<path |
||||||
|
android:pathData="M512.7,978.9l-0.3,-413.7a105.5,105.5 0,0 1,54.3 -92.3l349.8,-194.2a66.7,66.7 0,0 1,8.9 33.2v400.1a66.8,66.8 0,0 1,-33.4 57.8L545.4,970a66.7,66.7 0,0 1,-32.7 8.9z" |
||||||
|
android:fillColor="#AAB5E3"/> |
||||||
|
<path |
||||||
|
android:pathData="M99.4,302.2a66.7,66.7 0,0 1,7.5 -22.3l405.5,223.1V978.9a66.7,66.7 0,0 1,-29.3 -6.6L126.4,766.2a66.8,66.8 0,0 1,-27 -44.5V302.2z" |
||||||
|
android:fillColor="#C3D3F8"/> |
||||||
|
<path |
||||||
|
android:pathData="M462,262.8a50,40 0,1 0,100 0,50 40,0 1,0 -100,0z" |
||||||
|
android:fillColor="#3A4971"/> |
||||||
|
<path |
||||||
|
android:pathData="M462.4,267.7c0.9,-21.5 22.9,-38.7 50,-38.7 25.5,0 46.6,15.3 49.6,35.1 -0.9,21.5 -22.9,38.7 -50,38.7 -25.5,0 -46.6,-15.3 -49.6,-35.1z" |
||||||
|
android:fillColor="#4B5C83"/> |
||||||
|
<path |
||||||
|
android:pathData="M811.9,422.8c16.6,-9.7 51.1,-18 50.9,11.6 -0.1,29.1 -27.7,57.1 -51.5,70.6 -16.4,9.3 -51.2,17.7 -50.9,-11.6 0.2,-28.9 28.1,-57 51.5,-70.6z" |
||||||
|
android:fillColor="#3A4971"/> |
||||||
|
<path |
||||||
|
android:pathData="M760.7,498.3c1,-28.5 28.4,-55.9 51.4,-69.3 15.7,-9.1 47.1,-16.9 50.6,6.9 -1,28.6 -28.1,55.9 -51.4,69.2 -15.4,8.8 -47,16.6 -50.6,-6.7z" |
||||||
|
android:fillColor="#4B5C83"/> |
||||||
|
<path |
||||||
|
android:pathData="M728.8,601.4c16.6,-9.3 51.3,-17.2 51.1,12.1 -0.2,28.9 -28.2,56.2 -51.8,69.1 -16.4,9 -51.4,16.9 -51.1,-12.1 0.3,-28.7 28.5,-56 51.8,-69.1z" |
||||||
|
android:fillColor="#3A4971"/> |
||||||
|
<path |
||||||
|
android:pathData="M677.4,675.4c1.1,-28.2 28.8,-55 51.8,-67.9 15.6,-8.7 47.1,-16.2 50.7,7.2 -1,28.4 -28.5,55.2 -51.8,67.9 -15.4,8.4 -47.2,15.9 -50.7,-7.2z" |
||||||
|
android:fillColor="#4B5C83"/> |
||||||
|
<path |
||||||
|
android:pathData="M645.1,776.9c16.6,-9 51.5,-16.5 51.2,12.6 -0.3,28.6 -28.6,55.2 -52.2,67.6 -16.4,8.6 -51.6,16.2 -51.2,-12.6 0.4,-28.4 28.9,-55.1 52.2,-67.6z" |
||||||
|
android:fillColor="#3A4971"/> |
||||||
|
<path |
||||||
|
android:pathData="M593.2,849.4c1.1,-28 29.2,-54.1 52.2,-66.4 15.6,-8.4 47.3,-15.5 50.9,7.7 -1,28.2 -28.9,54.2 -52.1,66.4 -15.4,8.1 -47.4,15.3 -50.9,-7.8z" |
||||||
|
android:fillColor="#4B5C83"/> |
||||||
|
<path |
||||||
|
android:pathData="M197.4,437.4c25.4,12.6 44.6,43.3 44.2,71.7 -0.4,26.2 -22.2,38.5 -45.3,26.8 -25.1,-12.8 -44.4,-43.5 -44.2,-71.7 0.2,-26.3 22.3,-38.1 45.3,-26.8z" |
||||||
|
android:fillColor="#3A4971"/> |
||||||
|
<path |
||||||
|
android:pathData="M241.2,514.6c-3.1,22.5 -23.5,32.2 -44.9,21.3 -23.2,-11.8 -41.5,-38.9 -43.9,-65.3 3,-22.5 23.5,-31.9 44.9,-21.3 23.5,11.6 41.7,38.8 43.9,65.3z" |
||||||
|
android:fillColor="#4B5C83"/> |
||||||
|
<path |
||||||
|
android:pathData="M195.3,626.5c25.1,13.1 43.8,44.2 43.4,72.5 -0.4,26 -21.7,38.2 -44.5,25.9 -24.8,-13.3 -43.6,-44.3 -43.4,-72.5 0.2,-26.1 21.8,-37.8 44.5,-25.9z" |
||||||
|
android:fillColor="#3A4971"/> |
||||||
|
<path |
||||||
|
android:pathData="M238.2,704.4c-3.1,22.2 -22.9,31.9 -44.1,20.5 -22.9,-12.3 -40.7,-39.8 -43.1,-66.1 2.9,-22.3 23,-31.6 44.1,-20.5 23.2,12.2 40.9,39.6 43.1,66.1z" |
||||||
|
android:fillColor="#4B5C83"/> |
||||||
|
<path |
||||||
|
android:pathData="M382.7,529.1c25.6,12.7 44.2,44.1 43.3,72.6 -0.9,26.3 -22.6,39.7 -46.2,27.7 -25.3,-12.9 -44,-44.2 -43.3,-72.6 0.6,-26.3 22.7,-39.3 46.2,-27.7z" |
||||||
|
android:fillColor="#3A4971"/> |
||||||
|
<path |
||||||
|
android:pathData="M425.5,607.2c-3.5,22.5 -23.8,33.3 -45.7,22.1 -23.4,-11.9 -41.1,-39.6 -43.1,-66.1 3.4,-22.6 23.9,-33 45.7,-22.1 23.7,11.8 41.3,39.5 43.1,66.1z" |
||||||
|
android:fillColor="#4B5C83"/> |
||||||
|
<path |
||||||
|
android:pathData="M377.1,721.6c25.3,13.3 43.4,45 42.5,73.5 -0.9,26 -22.1,39.4 -45.4,26.8 -25,-13.5 -43.2,-45.1 -42.5,-73.5 0.6,-26.1 22.2,-39 45.4,-26.8z" |
||||||
|
android:fillColor="#3A4971"/> |
||||||
|
<path |
||||||
|
android:pathData="M419.1,800.6c-3.5,22.3 -23.3,32.9 -44.9,21.3 -23.1,-12.4 -40.4,-40.4 -42.3,-66.9 3.3,-22.4 23.3,-32.6 44.9,-21.3 23.4,12.3 40.6,40.3 42.3,66.9z" |
||||||
|
android:fillColor="#4B5C83"/> |
||||||
|
</vector> |
@ -1,7 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> |
|
||||||
<corners android:radius="15dp" /> |
|
||||||
<!-- 边框粗细--> |
|
||||||
<stroke android:width="2dp" android:color="@color/black"/> |
|
||||||
<solid android:color="@color/white" /> |
|
||||||
</shape> |
|
@ -1,4 +1,6 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> |
<shape xmlns:android="http://schemas.android.com/apk/res/android"> |
||||||
<solid android:color="@color/swipeable_btn_bg1"/> |
<solid android:color="@color/swipeable_btn_bg1"/> |
||||||
|
<!-- 圆角的半径 --> |
||||||
|
<corners android:radius="14dp"/> |
||||||
</shape> |
</shape> |
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue