阿里云推送设备绑定接口修改
This commit is contained in:
parent
eccd60a3a0
commit
f2f9580d1f
|
|
@ -86,12 +86,13 @@ public class UpdateUserAction {
|
|||
|
||||
@RequestMapping(value = "/bindDevice.do")
|
||||
@ResponseBody
|
||||
public Object bindDevice(@RequestParam String deviceId,@RequestParam Integer userId){
|
||||
public Object bindDevice(@RequestParam String deviceId,@RequestParam Integer userId,@RequestParam String phoneType){
|
||||
AliyunDeviceInfo aliyunDeviceInfo = baseService.getAliyunDeviceInfo(deviceId);
|
||||
if (aliyunDeviceInfo == null) {
|
||||
aliyunDeviceInfo = new AliyunDeviceInfo();
|
||||
aliyunDeviceInfo.setAliyunDeviceId(deviceId);
|
||||
aliyunDeviceInfo.setUserId(userId);
|
||||
aliyunDeviceInfo.setPhoneType(phoneType);
|
||||
aliyunDeviceInfo.setBindTime(new Date());
|
||||
aliyunDeviceInfo.setLastUpdateTime(new Date());
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ public class AliyunDeviceInfo implements Serializable{
|
|||
@Column(name = "user_id")
|
||||
private Integer userId;
|
||||
|
||||
@Column(name = "phone_type")
|
||||
private String phoneType;
|
||||
|
||||
@Column(name="bind_time",columnDefinition="timestamp")
|
||||
private Date bindTime;
|
||||
|
||||
|
|
@ -43,6 +46,14 @@ public class AliyunDeviceInfo implements Serializable{
|
|||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getPhoneType() {
|
||||
return phoneType;
|
||||
}
|
||||
|
||||
public void setPhoneType(String phoneType) {
|
||||
this.phoneType = phoneType;
|
||||
}
|
||||
|
||||
public Date getBindTime() {
|
||||
return bindTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#broker_url=tcp://test.ifish7.com:61616
|
||||
broker_url=tcp://www.ifish7.com:61616
|
||||
broker_url=tcp://localhost:61616
|
||||
username=admin
|
||||
#password=admin
|
||||
password=adminifish7
|
||||
|
|
|
|||
Loading…
Reference in New Issue