mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-02 17:07:41 +08:00
引入Lombok & 升级gradle版本
This commit is contained in:
parent
c450315d26
commit
143c0ea8c9
@ -1,10 +1,9 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-android-extensions'
|
//apply plugin: 'kotlin-android-extensions'
|
||||||
apply from: 'version.gradle'
|
apply from: 'version.gradle'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
buildToolsVersion '29.0.3'
|
|
||||||
compileSdkVersion 29
|
compileSdkVersion 29
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility 1.8
|
sourceCompatibility 1.8
|
||||||
@ -82,11 +81,14 @@ dependencies {
|
|||||||
implementation 'com.umeng.umsdk:abtest:1.0.0'
|
implementation 'com.umeng.umsdk:abtest:1.0.0'
|
||||||
|
|
||||||
//XUpdate
|
//XUpdate
|
||||||
implementation 'com.github.xuexiangjys:XUpdate:2.0.7'
|
implementation 'com.github.xuexiangjys:XUpdate:2.1.0'
|
||||||
implementation 'com.github.xuexiangjys.XUpdateAPI:xupdate-easy:1.0.0'
|
implementation 'com.github.xuexiangjys.XUpdateAPI:xupdate-easy:1.0.0'
|
||||||
implementation 'com.github.xuexiangjys.XUpdateAPI:xupdate-downloader-aria:1.0.0'
|
implementation 'com.github.xuexiangjys.XUpdateAPI:xupdate-downloader-aria:1.0.0'
|
||||||
|
|
||||||
//EmailKit
|
//EmailKit
|
||||||
implementation 'com.github.mailhu:emailkit:4.2.2'
|
implementation 'com.github.mailhu:emailkit:4.2.2'
|
||||||
|
|
||||||
|
//Lombok
|
||||||
|
compileOnly 'org.projectlombok:lombok:1.18.20'
|
||||||
|
annotationProcessor 'org.projectlombok:lombok:1.18.20'
|
||||||
}
|
}
|
||||||
|
@ -676,7 +676,7 @@ public class SenderActivity extends AppCompatActivity {
|
|||||||
final EditText editTextWebNotifyWebServer = view1.findViewById(R.id.editTextWebNotifyWebServer);
|
final EditText editTextWebNotifyWebServer = view1.findViewById(R.id.editTextWebNotifyWebServer);
|
||||||
if (webNotifySettingVo != null) editTextWebNotifyWebServer.setText(webNotifySettingVo.getWebServer());
|
if (webNotifySettingVo != null) editTextWebNotifyWebServer.setText(webNotifySettingVo.getWebServer());
|
||||||
final EditText editTextWebNotifyWebParams = view1.findViewById(R.id.editTextWebNotifyWebParams);
|
final EditText editTextWebNotifyWebParams = view1.findViewById(R.id.editTextWebNotifyWebParams);
|
||||||
if (webNotifySettingVo != null) editTextWebNotifyWebParams.setText(webNotifySettingVo.getwebParams());
|
if (webNotifySettingVo != null) editTextWebNotifyWebParams.setText(webNotifySettingVo.getWebParams());
|
||||||
final EditText editTextWebNotifySecret = view1.findViewById(R.id.editTextWebNotifySecret);
|
final EditText editTextWebNotifySecret = view1.findViewById(R.id.editTextWebNotifySecret);
|
||||||
if (webNotifySettingVo != null) editTextWebNotifySecret.setText(webNotifySettingVo.getSecret());
|
if (webNotifySettingVo != null) editTextWebNotifySecret.setText(webNotifySettingVo.getSecret());
|
||||||
final RadioGroup radioGroupWebNotifyMethod = (RadioGroup) view1.findViewById(R.id.radioGroupWebNotifyMethod);
|
final RadioGroup radioGroupWebNotifyMethod = (RadioGroup) view1.findViewById(R.id.radioGroupWebNotifyMethod);
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package com.idormy.sms.forwarder.model;
|
package com.idormy.sms.forwarder.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class LogModel {
|
public class LogModel {
|
||||||
private String from;
|
private String from;
|
||||||
private String content;
|
private String content;
|
||||||
@ -14,46 +17,6 @@ public class LogModel {
|
|||||||
this.ruleId = ruleId;
|
this.ruleId = ruleId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFrom() {
|
|
||||||
return from;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFrom(String from) {
|
|
||||||
this.from = from;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getContent() {
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setContent(String content) {
|
|
||||||
this.content = content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSimInfo() {
|
|
||||||
return simInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSimInfo(String simInfo) {
|
|
||||||
this.simInfo = simInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getRuleId() {
|
|
||||||
return ruleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRuleId(Long ruleId) {
|
|
||||||
this.ruleId = ruleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getTime() {
|
|
||||||
return time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTime(Long time) {
|
|
||||||
this.time = time;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "LogModel{" +
|
return "LogModel{" +
|
||||||
|
@ -11,6 +11,9 @@ import java.util.Map;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.regex.PatternSyntaxException;
|
import java.util.regex.PatternSyntaxException;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class RuleModel {
|
public class RuleModel {
|
||||||
public static final String FILED_TRANSPOND_ALL = "transpond_all";
|
public static final String FILED_TRANSPOND_ALL = "transpond_all";
|
||||||
public static final String FILED_PHONE_NUM = "phone_num";
|
public static final String FILED_PHONE_NUM = "phone_num";
|
||||||
@ -245,63 +248,6 @@ public class RuleModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(Long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getSenderId() {
|
|
||||||
return senderId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSenderId(Long senderId) {
|
|
||||||
this.senderId = senderId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getTime() {
|
|
||||||
return time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTime(Long time) {
|
|
||||||
this.time = time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFiled() {
|
|
||||||
return filed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFiled(String filed) {
|
|
||||||
this.filed = filed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSimSlot() {
|
|
||||||
return simSlot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSimSlot(String simSlot) {
|
|
||||||
this.simSlot = simSlot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCheck() {
|
|
||||||
return check;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCheck(String check) {
|
|
||||||
this.check = check;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValue(String value) {
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "RuleModel{" +
|
return "RuleModel{" +
|
||||||
|
@ -2,7 +2,9 @@ package com.idormy.sms.forwarder.model;
|
|||||||
|
|
||||||
import com.idormy.sms.forwarder.R;
|
import com.idormy.sms.forwarder.R;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class SenderModel {
|
public class SenderModel {
|
||||||
public static final int STATUS_ON = 1;
|
public static final int STATUS_ON = 1;
|
||||||
public static final int STATUS_OFF = 0;
|
public static final int STATUS_OFF = 0;
|
||||||
@ -19,9 +21,7 @@ public class SenderModel {
|
|||||||
private String name;
|
private String name;
|
||||||
private int status;
|
private int status;
|
||||||
private int type;
|
private int type;
|
||||||
|
|
||||||
private String jsonSetting;
|
private String jsonSetting;
|
||||||
|
|
||||||
private long time;
|
private long time;
|
||||||
|
|
||||||
public SenderModel() {
|
public SenderModel() {
|
||||||
@ -59,46 +59,6 @@ public class SenderModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(Long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getStatus() {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(int status) {
|
|
||||||
this.status = status == STATUS_ON ? STATUS_ON : STATUS_OFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(int type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getJsonSetting() {
|
|
||||||
return jsonSetting;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJsonSetting(String jsonSetting) {
|
|
||||||
this.jsonSetting = jsonSetting;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getImageId() {
|
public int getImageId() {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case (TYPE_DINGDING):
|
case (TYPE_DINGDING):
|
||||||
@ -123,14 +83,6 @@ public class SenderModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTime() {
|
|
||||||
return time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTime(long time) {
|
|
||||||
this.time = time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSmsSimSlotId(int id) {
|
public int getSmsSimSlotId(int id) {
|
||||||
if (id == R.id.btnSmsSimSlot1) {
|
if (id == R.id.btnSmsSimSlot1) {
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -2,6 +2,9 @@ package com.idormy.sms.forwarder.model.vo;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class BarkSettingVo implements Serializable {
|
public class BarkSettingVo implements Serializable {
|
||||||
private String server;
|
private String server;
|
||||||
|
|
||||||
@ -12,11 +15,4 @@ public class BarkSettingVo implements Serializable {
|
|||||||
this.server = server;
|
this.server = server;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getServer() {
|
|
||||||
return server;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setServer(String server) {
|
|
||||||
this.server = server;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,9 @@ package com.idormy.sms.forwarder.model.vo;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class DingDingSettingVo implements Serializable {
|
public class DingDingSettingVo implements Serializable {
|
||||||
private String token;
|
private String token;
|
||||||
private String secret;
|
private String secret;
|
||||||
@ -17,36 +20,4 @@ public class DingDingSettingVo implements Serializable {
|
|||||||
this.atMobils = atMobils;
|
this.atMobils = atMobils;
|
||||||
this.atAll = atAll;
|
this.atAll = atAll;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getToken() {
|
|
||||||
return token;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setToken(String token) {
|
|
||||||
this.token = token;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSecret() {
|
|
||||||
return secret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSecret(String secret) {
|
|
||||||
this.secret = secret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAtMobils() {
|
|
||||||
return atMobils;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAtMobils(String atMobils) {
|
|
||||||
this.atMobils = atMobils;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getAtAll() {
|
|
||||||
return atAll;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAtAll(Boolean atAll) {
|
|
||||||
this.atAll = atAll;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,9 @@ package com.idormy.sms.forwarder.model.vo;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class EmailSettingVo implements Serializable {
|
public class EmailSettingVo implements Serializable {
|
||||||
private String host;
|
private String host;
|
||||||
private String port;
|
private String port;
|
||||||
@ -24,59 +27,4 @@ public class EmailSettingVo implements Serializable {
|
|||||||
this.toEmail = toEmail;
|
this.toEmail = toEmail;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getHost() {
|
|
||||||
return host;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHost(String host) {
|
|
||||||
this.host = host;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPort() {
|
|
||||||
return port;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPort(String port) {
|
|
||||||
this.port = port;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getSsl() {
|
|
||||||
return ssl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSsl(Boolean ssl) {
|
|
||||||
this.ssl = ssl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFromEmail() {
|
|
||||||
return fromEmail;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFromEmail(String fromEmail) {
|
|
||||||
this.fromEmail = fromEmail;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNickname() {
|
|
||||||
return nickname;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNickname(String nickname) {
|
|
||||||
this.nickname = nickname;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPwd() {
|
|
||||||
return pwd;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPwd(String pwd) {
|
|
||||||
this.pwd = pwd;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getToEmail() {
|
|
||||||
return toEmail;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setToEmail(String toEmail) {
|
|
||||||
this.toEmail = toEmail;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,9 @@ package com.idormy.sms.forwarder.model.vo;
|
|||||||
|
|
||||||
import com.idormy.sms.forwarder.R;
|
import com.idormy.sms.forwarder.R;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class LogVo {
|
public class LogVo {
|
||||||
private Long id;
|
private Long id;
|
||||||
private String from;
|
private String from;
|
||||||
@ -28,58 +31,6 @@ public class LogVo {
|
|||||||
this.forwardResponse = forwardResponse;
|
this.forwardResponse = forwardResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFrom() {
|
|
||||||
return from;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFrom(String from) {
|
|
||||||
this.from = from;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getContent() {
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setContent(String content) {
|
|
||||||
this.content = content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSimInfo() {
|
|
||||||
return simInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSimInfo(String simInfo) {
|
|
||||||
this.simInfo = simInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRule() {
|
|
||||||
return rule;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRule(String rule) {
|
|
||||||
this.rule = rule;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTime() {
|
|
||||||
return time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getForwardResponse() {
|
|
||||||
return forwardResponse;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSenderImageId() {
|
|
||||||
return senderImageId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSenderImageId(int senderImageId) {
|
|
||||||
this.senderImageId = senderImageId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSimImageId() {
|
public int getSimImageId() {
|
||||||
if (this.simInfo != null && !this.simInfo.isEmpty()
|
if (this.simInfo != null && !this.simInfo.isEmpty()
|
||||||
&& this.simInfo.replace("-", "").substring(0, 4).equals("SIM2")) {
|
&& this.simInfo.replace("-", "").substring(0, 4).equals("SIM2")) {
|
||||||
|
@ -2,6 +2,9 @@ package com.idormy.sms.forwarder.model.vo;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class QYWXAppSettingVo implements Serializable {
|
public class QYWXAppSettingVo implements Serializable {
|
||||||
private String corpID;
|
private String corpID;
|
||||||
private String agentID;
|
private String agentID;
|
||||||
@ -20,43 +23,4 @@ public class QYWXAppSettingVo implements Serializable {
|
|||||||
this.atAll = atAll;
|
this.atAll = atAll;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCorpID() {
|
|
||||||
return corpID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCorpID(String corpID) {
|
|
||||||
this.corpID = corpID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAgentID() {
|
|
||||||
return agentID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAgentID(String agentID) {
|
|
||||||
this.agentID = agentID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSecret() {
|
|
||||||
return secret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSecret(String secret) {
|
|
||||||
this.secret = secret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getToUser() {
|
|
||||||
return toUser;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setToUser(String toUser) {
|
|
||||||
this.toUser = toUser;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getAtAll() {
|
|
||||||
return atAll;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAtAll(Boolean atAll) {
|
|
||||||
this.atAll = atAll;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,9 @@ package com.idormy.sms.forwarder.model.vo;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class QYWXGroupRobotSettingVo implements Serializable {
|
public class QYWXGroupRobotSettingVo implements Serializable {
|
||||||
private String webHook;
|
private String webHook;
|
||||||
|
|
||||||
@ -12,11 +15,4 @@ public class QYWXGroupRobotSettingVo implements Serializable {
|
|||||||
this.webHook = webHook;
|
this.webHook = webHook;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getWebHook() {
|
|
||||||
return webHook;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWebHook(String webHook) {
|
|
||||||
this.webHook = webHook;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,9 @@ package com.idormy.sms.forwarder.model.vo;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class ServerChanSettingVo implements Serializable {
|
public class ServerChanSettingVo implements Serializable {
|
||||||
private String sendKey;
|
private String sendKey;
|
||||||
|
|
||||||
@ -12,11 +15,4 @@ public class ServerChanSettingVo implements Serializable {
|
|||||||
this.sendKey = sendKey;
|
this.sendKey = sendKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSendKey() {
|
|
||||||
return sendKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSendKey(String sendKey) {
|
|
||||||
this.sendKey = sendKey;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,9 @@ import com.idormy.sms.forwarder.R;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class SmsSettingVo implements Serializable {
|
public class SmsSettingVo implements Serializable {
|
||||||
private int simSlot;
|
private int simSlot;
|
||||||
private String mobiles;
|
private String mobiles;
|
||||||
@ -18,30 +21,6 @@ public class SmsSettingVo implements Serializable {
|
|||||||
this.onlyNoNetwork = onlyNoNetwork;
|
this.onlyNoNetwork = onlyNoNetwork;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSimSlot() {
|
|
||||||
return simSlot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSimSlot(int simSlot) {
|
|
||||||
this.simSlot = simSlot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMobiles() {
|
|
||||||
return mobiles;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMobiles(String mobiles) {
|
|
||||||
this.mobiles = mobiles;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getOnlyNoNetwork() {
|
|
||||||
return onlyNoNetwork;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOnlyNoNetwork(Boolean onlyNoNetwork) {
|
|
||||||
this.onlyNoNetwork = onlyNoNetwork;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSmsSimSlotCheckId() {
|
public int getSmsSimSlotCheckId() {
|
||||||
if (simSlot == 1) {
|
if (simSlot == 1) {
|
||||||
return R.id.btnSmsSimSlot1;
|
return R.id.btnSmsSimSlot1;
|
||||||
|
@ -6,6 +6,9 @@ import java.io.Serializable;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class SmsVo implements Serializable {
|
public class SmsVo implements Serializable {
|
||||||
String mobile;
|
String mobile;
|
||||||
String content;
|
String content;
|
||||||
@ -22,38 +25,6 @@ public class SmsVo implements Serializable {
|
|||||||
this.simInfo = simInfo;
|
this.simInfo = simInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMobile() {
|
|
||||||
return mobile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMobile(String mobile) {
|
|
||||||
this.mobile = mobile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getContent() {
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setContent(String content) {
|
|
||||||
this.content = content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getDate() {
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDate(Date date) {
|
|
||||||
this.date = date;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSimInfo() {
|
|
||||||
return simInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSimInfo(String simInfo) {
|
|
||||||
this.simInfo = simInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSmsVoForSend() {
|
public String getSmsVoForSend() {
|
||||||
boolean switchAddExtra = SettingUtil.getSwitchAddExtra();
|
boolean switchAddExtra = SettingUtil.getSwitchAddExtra();
|
||||||
boolean switchSmsTemplate = SettingUtil.getSwitchSmsTemplate();
|
boolean switchSmsTemplate = SettingUtil.getSwitchSmsTemplate();
|
||||||
|
@ -2,6 +2,9 @@ package com.idormy.sms.forwarder.model.vo;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class TelegramSettingVo implements Serializable {
|
public class TelegramSettingVo implements Serializable {
|
||||||
private String apiToken;
|
private String apiToken;
|
||||||
private String chatId;
|
private String chatId;
|
||||||
@ -13,20 +16,4 @@ public class TelegramSettingVo implements Serializable {
|
|||||||
this.apiToken = apiToken;
|
this.apiToken = apiToken;
|
||||||
this.chatId = chatId;
|
this.chatId = chatId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getApiToken() {
|
|
||||||
return apiToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApiToken(String apiToken) {
|
|
||||||
this.apiToken = apiToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getChatId() {
|
|
||||||
return chatId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setChatId(String chatId) {
|
|
||||||
this.chatId = chatId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,9 @@ import com.idormy.sms.forwarder.R;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class WebNotifySettingVo implements Serializable {
|
public class WebNotifySettingVo implements Serializable {
|
||||||
private String webServer;
|
private String webServer;
|
||||||
private String secret;
|
private String secret;
|
||||||
@ -20,38 +23,6 @@ public class WebNotifySettingVo implements Serializable {
|
|||||||
this.webParams = webParams;
|
this.webParams = webParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getWebServer() {
|
|
||||||
return webServer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWebServer(String webServer) {
|
|
||||||
this.webServer = webServer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getwebParams() {
|
|
||||||
return webParams;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWebParams(String webParams) {
|
|
||||||
this.webParams = webParams;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSecret() {
|
|
||||||
return secret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSecret(String secret) {
|
|
||||||
this.secret = secret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMethod() {
|
|
||||||
return method;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMethod(String method) {
|
|
||||||
this.method = method;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getWebNotifyMethodCheckId() {
|
public int getWebNotifyMethodCheckId() {
|
||||||
if (method == null || method.equals("POST")) {
|
if (method == null || method.equals("POST")) {
|
||||||
return R.id.radioWebNotifyMethodPost;
|
return R.id.radioWebNotifyMethodPost;
|
||||||
|
@ -1,5 +1,15 @@
|
|||||||
package com.idormy.sms.forwarder.sender;
|
package com.idormy.sms.forwarder.sender;
|
||||||
|
|
||||||
|
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_BARK;
|
||||||
|
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_DINGDING;
|
||||||
|
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_EMAIL;
|
||||||
|
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_QYWX_APP;
|
||||||
|
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_QYWX_GROUP_ROBOT;
|
||||||
|
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_SERVER_CHAN;
|
||||||
|
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_SMS;
|
||||||
|
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_TELEGRAM;
|
||||||
|
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_WEB_NOTIFY;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -24,16 +34,6 @@ import com.idormy.sms.forwarder.utils.RuleUtil;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_BARK;
|
|
||||||
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_DINGDING;
|
|
||||||
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_EMAIL;
|
|
||||||
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_QYWX_APP;
|
|
||||||
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_QYWX_GROUP_ROBOT;
|
|
||||||
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_SERVER_CHAN;
|
|
||||||
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_SMS;
|
|
||||||
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_TELEGRAM;
|
|
||||||
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_WEB_NOTIFY;
|
|
||||||
|
|
||||||
public class SendUtil {
|
public class SendUtil {
|
||||||
private static String TAG = "SendUtil";
|
private static String TAG = "SendUtil";
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ public class SendUtil {
|
|||||||
WebNotifySettingVo webNotifySettingVo = JSON.parseObject(senderModel.getJsonSetting(), WebNotifySettingVo.class);
|
WebNotifySettingVo webNotifySettingVo = JSON.parseObject(senderModel.getJsonSetting(), WebNotifySettingVo.class);
|
||||||
if (webNotifySettingVo != null) {
|
if (webNotifySettingVo != null) {
|
||||||
try {
|
try {
|
||||||
SenderWebNotifyMsg.sendMsg(logId, handError, webNotifySettingVo.getWebServer(), webNotifySettingVo.getwebParams(), webNotifySettingVo.getSecret(), webNotifySettingVo.getMethod(), smsVo.getMobile(), smsVo.getSmsVoForSend());
|
SenderWebNotifyMsg.sendMsg(logId, handError, webNotifySettingVo.getWebServer(), webNotifySettingVo.getWebParams(), webNotifySettingVo.getSecret(), webNotifySettingVo.getMethod(), smsVo.getMobile(), smsVo.getSmsVoForSend());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LogUtil.updateLog(logId, 0, e.getMessage());
|
LogUtil.updateLog(logId, 0, e.getMessage());
|
||||||
Log.e(TAG, "senderSendMsg: SenderWebNotifyMsg error " + e.getMessage());
|
Log.e(TAG, "senderSendMsg: SenderWebNotifyMsg error " + e.getMessage());
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
ext {
|
ext {
|
||||||
appVersionCode = 25
|
appVersionCode = 26
|
||||||
appVersionName = "1.7.5"
|
appVersionName = "2.0.0"
|
||||||
}
|
}
|
@ -5,12 +5,12 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
|
// maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
|
||||||
maven { url 'https://repo1.maven.org/maven2/' }
|
maven { url 'https://repo1.maven.org/maven2/' }
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.2.2'
|
classpath 'com.android.tools.build:gradle:7.0.2'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath 'com.chenenyu:img-optimizer:1.2.0' //图片压缩
|
classpath 'com.chenenyu:img-optimizer:1.2.0' //图片压缩
|
||||||
}
|
}
|
||||||
@ -20,7 +20,7 @@ allprojects {
|
|||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
|
// maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
|
||||||
maven { url 'https://repo1.maven.org/maven2/' }
|
maven { url 'https://repo1.maven.org/maven2/' }
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
}
|
}
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user