Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
48ad3ffeb4
|
|
@ -60,6 +60,12 @@ public class BookCarController extends BaseController {
|
|||
return bookCarService.deleteById(devInfo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除预约车")
|
||||
@PostMapping("/deleteByIds")
|
||||
public AjaxResult deleteByIds(@RequestBody BookCarInfoDto devInfo) {
|
||||
return bookCarService.deleteByIds(devInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询立即承租详情
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ public class BookCarInfoDto {
|
|||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "主键ids")
|
||||
private Integer[] ids;
|
||||
|
||||
@ApiModelProperty(value = "订单id")
|
||||
private Integer bookId;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,4 +43,6 @@ public interface BookCarMapper {
|
|||
* @return
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
int deleteByIds(@Param("array") Integer[] ids);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ public interface BookCarService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult deleteById(BookCarInfoDto devInfo);
|
||||
|
||||
AjaxResult deleteByIds(BookCarInfoDto devInfo);
|
||||
|
||||
|
||||
/**
|
||||
* 获取立即承租详情
|
||||
* @param devInfo
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import com.bonus.material.book.service.BookCarService;
|
|||
import com.bonus.material.device.domain.vo.DevInfoVo;
|
||||
import com.bonus.material.device.mapper.BmFileInfoMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -113,6 +114,15 @@ public class BookCarServiceImpl implements BookCarService {
|
|||
return result > 0 ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult deleteByIds(BookCarInfoDto devInfo) {
|
||||
if (ArrayUtils.isEmpty(devInfo.getIds())) {
|
||||
return AjaxResult.error("传入设备IDs为空,请刷新后重试");
|
||||
}
|
||||
int result = bookCarMapper.deleteByIds(devInfo.getIds());
|
||||
return result > 0 ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询立即承租详情
|
||||
* @param devInfo
|
||||
|
|
|
|||
|
|
@ -13,6 +13,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
delete from book_car_detail where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
delete from book_car_detail where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getBookCarDetails" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
|
||||
SELECT
|
||||
bcd.id as id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue