| | |
| | | |
| | | int updateByPrimaryKey(PrScheduleRel record); |
| | | |
| | | void deleteByScheduleId(Long scheduleId); |
| | | long deleteByScheduleId(Long scheduleId); |
| | | |
| | | List<PrScheduleRel> selectByScheduleId(Long scheduleId); |
| | | } |
| | |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <delete id="deleteByScheduleId"> |
| | | delete from pr_schedule_rel where schedule_id=#{scheduleId} |
| | | <delete id="deleteByScheduleId" parameterType="java.lang.Long"> |
| | | delete from pr_schedule_rel where schedule_id=#{scheduleId} |
| | | </delete> |
| | | |
| | | <select id="selectByScheduleId" resultMap="BaseResultMap"> |
| | |
| | | int count = roleSv.delete(Long.parseLong(id)); |
| | | |
| | | if (count <= 0) { |
| | | return BaseResponseUtils.buildFail("数据库存储失败"); |
| | | return BaseResponseUtils.buildFail("数据库删除失败"); |
| | | } else { |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | } |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping(path="delete") |
| | | @SsoPowerAop(power = "10200009") |
| | | @Log("删除角色信息") |
| | | public BaseResponse<Boolean> delete(String id){ |
| | | long count = sv.delete(Long.parseLong(id)); |
| | | |
| | | if (count <= 0) { |
| | | return BaseResponseUtils.buildFail("数据库删除失败"); |
| | | } else { |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询任务计划列表 |
| | |
| | | saveRel(schedule); |
| | | return scheduleDao.updateByPrimaryKeySelective(schedule); |
| | | } |
| | | @Transactional |
| | | public long delete(Long id) { |
| | | return this.scheduleRelDao.deleteByScheduleId(id); |
| | | } |
| | | |
| | | |
| | | private void saveRel(PrSchedule schedule) { |
| | | schedule.relList.forEach(rel -> validateRelData(rel, schedule)); |