| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.place.entity.PlaceEntity; |
| | | import org.springblade.modules.place.entity.PlaceExtEntity; |
| | | import org.springblade.modules.place.service.IPlaceService; |
| | | import org.springblade.modules.place.vo.PlaceExtVO; |
| | | import org.springblade.modules.place.mapper.PlaceExtMapper; |
| | | import org.springblade.modules.place.service.IPlaceExtService; |
| | |
| | | |
| | | @Autowired |
| | | private ITaskService taskService; |
| | | |
| | | @Autowired |
| | | private IPlaceService placeService; |
| | | |
| | | /** |
| | | * 自定义查询 |
| | |
| | | // 返回 |
| | | return flag; |
| | | } |
| | | |
| | | /** |
| | | * 场所详情表 新增 |
| | | * @param placeExt |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean savePlaceExt(PlaceExtEntity placeExt) { |
| | | PlaceEntity placeEntity = placeService.getById(placeExt.getPlaceId()); |
| | | TaskEntity taskEntity = new TaskEntity(); |
| | | taskEntity.setId(placeExt.getTaskId()); |
| | | taskEntity.setStatus(placeExt.getConfirmFlag()); |
| | | taskEntity.setType(1); |
| | | taskEntity.setFrequency(3); |
| | | taskEntity.setName(placeEntity.getPlaceName() + "信息完善任务" + System.currentTimeMillis()); |
| | | // 新增任务 |
| | | boolean save = taskService.save(taskEntity); |
| | | if (save){ |
| | | placeExt.setTaskId(taskEntity.getId()); |
| | | placeExt.setConfirmFlag(1); |
| | | placeExt.setCreateTime(new Date()); |
| | | placeExt.setUpdateTime(new Date()); |
| | | placeExt.setCreateUser(AuthUtil.getUserId()); |
| | | placeExt.setUpdateUser(AuthUtil.getUserId()); |
| | | // 新增场所详情 |
| | | save(placeExt); |
| | | } |
| | | return false; |
| | | } |
| | | } |