Compare commits
4 Commits
767b08a025
...
0a5ac82c66
| Author | SHA1 | Date |
|---|---|---|
|
|
0a5ac82c66 | |
|
|
f974100175 | |
|
|
e1e759b4eb | |
|
|
9b200608b1 |
|
|
@ -0,0 +1,226 @@
|
||||||
|
package com.kimgo.wepush.model;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @TableName api_setting
|
||||||
|
*/
|
||||||
|
@TableName(value ="api_setting")
|
||||||
|
public class ApiSetting implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private String phoneNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String accessToken;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String msgtype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String touser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Integer agentid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Integer enableDuplicateCheck;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Integer duplicateCheckInterval;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getPhoneNumber() {
|
||||||
|
return phoneNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setPhoneNumber(String phoneNumber) {
|
||||||
|
this.phoneNumber = phoneNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getAccessToken() {
|
||||||
|
return accessToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setAccessToken(String accessToken) {
|
||||||
|
this.accessToken = accessToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getMsgtype() {
|
||||||
|
return msgtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setMsgtype(String msgtype) {
|
||||||
|
this.msgtype = msgtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getTouser() {
|
||||||
|
return touser;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setTouser(String touser) {
|
||||||
|
this.touser = touser;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public Integer getAgentid() {
|
||||||
|
return agentid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setAgentid(Integer agentid) {
|
||||||
|
this.agentid = agentid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public Integer getEnableDuplicateCheck() {
|
||||||
|
return enableDuplicateCheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setEnableDuplicateCheck(Integer enableDuplicateCheck) {
|
||||||
|
this.enableDuplicateCheck = enableDuplicateCheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public Integer getDuplicateCheckInterval() {
|
||||||
|
return duplicateCheckInterval;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setDuplicateCheckInterval(Integer duplicateCheckInterval) {
|
||||||
|
this.duplicateCheckInterval = duplicateCheckInterval;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object that) {
|
||||||
|
if (this == that) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (that == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (getClass() != that.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ApiSetting other = (ApiSetting) that;
|
||||||
|
return (this.getPhoneNumber() == null ? other.getPhoneNumber() == null : this.getPhoneNumber().equals(other.getPhoneNumber()))
|
||||||
|
&& (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||||
|
&& (this.getAccessToken() == null ? other.getAccessToken() == null : this.getAccessToken().equals(other.getAccessToken()))
|
||||||
|
&& (this.getMsgtype() == null ? other.getMsgtype() == null : this.getMsgtype().equals(other.getMsgtype()))
|
||||||
|
&& (this.getTouser() == null ? other.getTouser() == null : this.getTouser().equals(other.getTouser()))
|
||||||
|
&& (this.getAgentid() == null ? other.getAgentid() == null : this.getAgentid().equals(other.getAgentid()))
|
||||||
|
&& (this.getEnableDuplicateCheck() == null ? other.getEnableDuplicateCheck() == null : this.getEnableDuplicateCheck().equals(other.getEnableDuplicateCheck()))
|
||||||
|
&& (this.getDuplicateCheckInterval() == null ? other.getDuplicateCheckInterval() == null : this.getDuplicateCheckInterval().equals(other.getDuplicateCheckInterval()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((getPhoneNumber() == null) ? 0 : getPhoneNumber().hashCode());
|
||||||
|
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||||
|
result = prime * result + ((getAccessToken() == null) ? 0 : getAccessToken().hashCode());
|
||||||
|
result = prime * result + ((getMsgtype() == null) ? 0 : getMsgtype().hashCode());
|
||||||
|
result = prime * result + ((getTouser() == null) ? 0 : getTouser().hashCode());
|
||||||
|
result = prime * result + ((getAgentid() == null) ? 0 : getAgentid().hashCode());
|
||||||
|
result = prime * result + ((getEnableDuplicateCheck() == null) ? 0 : getEnableDuplicateCheck().hashCode());
|
||||||
|
result = prime * result + ((getDuplicateCheckInterval() == null) ? 0 : getDuplicateCheckInterval().hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(getClass().getSimpleName());
|
||||||
|
sb.append(" [");
|
||||||
|
sb.append("Hash = ").append(hashCode());
|
||||||
|
sb.append(", phoneNumber=").append(phoneNumber);
|
||||||
|
sb.append(", id=").append(id);
|
||||||
|
sb.append(", accessToken=").append(accessToken);
|
||||||
|
sb.append(", msgtype=").append(msgtype);
|
||||||
|
sb.append(", touser=").append(touser);
|
||||||
|
sb.append(", agentid=").append(agentid);
|
||||||
|
sb.append(", enableDuplicateCheck=").append(enableDuplicateCheck);
|
||||||
|
sb.append(", duplicateCheckInterval=").append(duplicateCheckInterval);
|
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -65,8 +65,8 @@ public class CallService {
|
||||||
textCardMessage.setTouser(apiSettingService.getApiSetting().getTouser());
|
textCardMessage.setTouser(apiSettingService.getApiSetting().getTouser());
|
||||||
textCardMessage.setMsgtype(apiSettingService.getApiSetting().getMsgtype());
|
textCardMessage.setMsgtype(apiSettingService.getApiSetting().getMsgtype());
|
||||||
textCardMessage.setAgentid(apiSettingService.getApiSetting().getAgentid());
|
textCardMessage.setAgentid(apiSettingService.getApiSetting().getAgentid());
|
||||||
textCardMessage.setEnable_duplicate_check(apiSettingService.getApiSetting().getEnable_duplicate_check());
|
textCardMessage.setEnable_duplicate_check(apiSettingService.getApiSetting().getEnableDuplicateCheck());
|
||||||
textCardMessage.setDuplicate_check_interval(apiSettingService.getApiSetting().getDuplicate_check_interval());
|
textCardMessage.setDuplicate_check_interval(apiSettingService.getApiSetting().getDuplicateCheckInterval());
|
||||||
TextCardMessage.TextCard textCard = new TextCardMessage.TextCard();
|
TextCardMessage.TextCard textCard = new TextCardMessage.TextCard();
|
||||||
textCard.setTitle("新来电通知");
|
textCard.setTitle("新来电通知");
|
||||||
textCard.setDescription("<div class='gray'>您有一通新来电</div><div class='highlight'>来电号码: " + phoneNumber + "</div><div class='highlight'>来电时间: " + callTime + "</div>如果您认识这个号码,请及时回电。如果不认识,请注意可能是垃圾电话或诈骗电话。");
|
textCard.setDescription("<div class='gray'>您有一通新来电</div><div class='highlight'>来电号码: " + phoneNumber + "</div><div class='highlight'>来电时间: " + callTime + "</div>如果您认识这个号码,请及时回电。如果不认识,请注意可能是垃圾电话或诈骗电话。");
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,8 @@ public class SMSService {
|
||||||
textCardMessage.setTouser(apiSettingService.getApiSetting().getTouser());
|
textCardMessage.setTouser(apiSettingService.getApiSetting().getTouser());
|
||||||
textCardMessage.setMsgtype(apiSettingService.getApiSetting().getMsgtype());
|
textCardMessage.setMsgtype(apiSettingService.getApiSetting().getMsgtype());
|
||||||
textCardMessage.setAgentid(apiSettingService.getApiSetting().getAgentid());
|
textCardMessage.setAgentid(apiSettingService.getApiSetting().getAgentid());
|
||||||
textCardMessage.setEnable_duplicate_check(apiSettingService.getApiSetting().getEnable_duplicate_check());
|
textCardMessage.setEnable_duplicate_check(apiSettingService.getApiSetting().getEnableDuplicateCheck());
|
||||||
textCardMessage.setDuplicate_check_interval(apiSettingService.getApiSetting().getDuplicate_check_interval());
|
textCardMessage.setDuplicate_check_interval(apiSettingService.getApiSetting().getDuplicateCheckInterval());
|
||||||
|
|
||||||
TextCardMessage.TextCard textCard = new TextCardMessage.TextCard();
|
TextCardMessage.TextCard textCard = new TextCardMessage.TextCard();
|
||||||
textCard.setTitle("新短信通知");
|
textCard.setTitle("新短信通知");
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.kimgo.wepush.config.UserConfig;
|
import com.kimgo.wepush.config.UserConfig;
|
||||||
import com.kimgo.wepush.mapper.ApiSettingMapper;
|
import com.kimgo.wepush.mapper.ApiSettingMapper;
|
||||||
import com.kimgo.wepush.mapper.QyWeChatAppInfoMapper;
|
import com.kimgo.wepush.mapper.QyWeChatAppInfoMapper;
|
||||||
|
import com.kimgo.wepush.model.ApiSetting;
|
||||||
import com.kimgo.wepush.model.QyWeChatAppInfo;
|
import com.kimgo.wepush.model.QyWeChatAppInfo;
|
||||||
import com.kimgo.wepush.request.WeChatAPI;
|
import com.kimgo.wepush.request.WeChatAPI;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue