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