Merge remote-tracking branch 'origin/master'
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
commit
af0d88105e
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.home.service.calendar;
|
package cn.iocoder.yudao.module.home.service.calendar;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -115,6 +116,12 @@ public class CalendarServiceImpl implements CalendarService {
|
|||||||
validateCalendarExists(updateReqVO.getId());
|
validateCalendarExists(updateReqVO.getId());
|
||||||
// 更新
|
// 更新
|
||||||
CalendarDO updateObj = BeanUtils.toBean(updateReqVO, CalendarDO.class);
|
CalendarDO updateObj = BeanUtils.toBean(updateReqVO, CalendarDO.class);
|
||||||
|
UpdateWrapper<CalendarDO> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.set("content", updateObj.getContent())
|
||||||
|
.eq("id", updateObj.getId());
|
||||||
|
//单独更新content
|
||||||
|
calendarMapper.update(null, updateWrapper);
|
||||||
|
//更新全部
|
||||||
calendarMapper.updateById(updateObj);
|
calendarMapper.updateById(updateObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user