宠物笼杀菌

This commit is contained in:
易焱 2020-03-28 21:23:14 +08:00
parent 8ed193a0b8
commit bb4366cecb
4 changed files with 19 additions and 4 deletions

View File

@ -453,9 +453,10 @@ public class UserAction {
* @return
*/
@RequestMapping("/setRemindWaterInf.do")
public Object setRemindWaterInf(Device device) {
public Object setRemindWaterInf(Device device, Integer type) {
try {
return this.baseService.setRemindWaterInf(device);
type = type == null ? 0 : type.intValue();
return this.baseService.setRemindWaterInf(device, type);
} catch (Exception e) {
log.error("setRemindWaterInf:deviceId:{},error message:{}", device.getDeviceId(), e.toString());
}

View File

@ -38,6 +38,9 @@ public class PushRemind implements Serializable{
@Column(name = "is_push")
private String isPush;
@Column(name = "notify_type")
private int notifyType;
public PushRemindId getId() {
return id;
}
@ -101,4 +104,12 @@ public class PushRemind implements Serializable{
public void setIsPush(String isPush) {
this.isPush = isPush;
}
public int getNotifyType() {
return notifyType;
}
public void setNotifyType(int notifyType) {
this.notifyType = notifyType;
}
}

View File

@ -105,7 +105,7 @@ public interface BaseService {
public Object getRemindWaterInf(Integer deviceId);
//设置换水提醒
public Object setRemindWaterInf(Device device);
public Object setRemindWaterInf(Device device, int type);
//保存商家信息
public Object saveShopsInfo(ShopsInfo shopsInfo,MultipartFile file1,MultipartFile file2,MultipartFile file3);

View File

@ -1160,7 +1160,7 @@ public class BaseServiceImpl implements BaseService {
}
@Override
public Object setRemindWaterInf(Device device) {
public Object setRemindWaterInf(Device device, int type) {
log.info("setRemindWaterInf begin");
Device tmpDevice = this.deviceDao.get(device.getDeviceId());
if (tmpDevice != null) {
@ -1192,6 +1192,7 @@ public class BaseServiceImpl implements BaseService {
pushRemind.setRemindCycle(tmpDevice.getRemindCycle());
pushRemind.setRemindDate(tmpDevice.getRemindDate());
pushRemind.setIsPush("0");
pushRemind.setNotifyType(type);
this.pushRemindDao.update(pushRemind);
}
} else {
@ -1204,6 +1205,7 @@ public class BaseServiceImpl implements BaseService {
if (pr != null) {
pr.setRemindCycle(tmpDevice.getRemindCycle());
pr.setRemindDate(tmpDevice.getRemindDate());
pr.setNotifyType(type);
this.pushRemindDao.update(pr);
} else {
//推送表ID
@ -1223,6 +1225,7 @@ public class BaseServiceImpl implements BaseService {
pushRemind.setShowName(deviceUser.getShowName());
pushRemind.setLoginType(user.getLoginType());
pushRemind.setIsPush("0");
pushRemind.setNotifyType(type);
this.pushRemindDao.save(pushRemind);
}
}