模式 换档时间、蜂鸣提醒时间、震动提醒时间 删除操作

master
382696293@qq.com 2 years ago
parent 12f4160395
commit dfcaf37c18

@ -13,6 +13,8 @@ import java.time.LocalTime;
*/
public class WxModeGear extends BaseEntity {
@JsonInclude(value = JsonInclude.Include.NON_DEFAULT)
@JsonIgnore
private Long id;
/**
*
@ -25,6 +27,8 @@ public class WxModeGear extends BaseEntity {
/**
* 123
*/
@JsonInclude(value = JsonInclude.Include.NON_DEFAULT)
@JsonIgnore
private Integer type;
@JsonInclude(value = JsonInclude.Include.NON_DEFAULT)

@ -17,6 +17,7 @@ import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flossom.system.service.IWxModeService;
import org.springframework.transaction.annotation.Transactional;
/**
* Service
@ -299,6 +300,7 @@ public class WxModeServiceImpl implements IWxModeService
}
}
// 保存换挡时间设置
wxModeGearMapper.deleteWxModeGearByModeId(wxMode.getId());
if(CollectionUtils.isNotEmpty(wxMode.getModeGear())) {
List<WxModeGear> modeGearList = wxMode.getModeGear();
for (WxModeGear wxModeGear: modeGearList) {
@ -308,8 +310,6 @@ public class WxModeServiceImpl implements IWxModeService
wxModeGear.setCreateBy(SecurityUtils.getLoginUser().getUsername());
wxModeGear.setCreateTime(DateUtils.getNowDate());
wxModeGearMapper.insertWxModeGear(wxModeGear);
} else {
wxModeGearMapper.updateWxModeGear(wxModeGear);
}
}
}
@ -322,8 +322,6 @@ public class WxModeServiceImpl implements IWxModeService
wxModeGear.setCreateBy(SecurityUtils.getLoginUser().getUsername());
wxModeGear.setCreateTime(DateUtils.getNowDate());
wxModeGearMapper.insertWxModeGear(wxModeGear);
} else {
wxModeGearMapper.updateWxModeGear(wxModeGear);
}
}
}
@ -336,8 +334,6 @@ public class WxModeServiceImpl implements IWxModeService
wxModeGear.setCreateBy(SecurityUtils.getLoginUser().getUsername());
wxModeGear.setCreateTime(DateUtils.getNowDate());
wxModeGearMapper.insertWxModeGear(wxModeGear);
} else {
wxModeGearMapper.updateWxModeGear(wxModeGear);
}
}
}
@ -351,8 +347,12 @@ public class WxModeServiceImpl implements IWxModeService
* @return
*/
@Override
@Transactional
public int deleteWxModeByIds(Long[] ids)
{
for (Long modeId : ids) {
wxModeGearMapper.deleteWxModeGearByModeId(modeId);
}
return wxModeMapper.deleteWxModeByIds(ids);
}

Loading…
Cancel
Save