驿站:汽车服务(车辆)
This commit is contained in:
parent
f70cf9a4c3
commit
be53cf08c6
|
|
@ -0,0 +1,71 @@
|
|||
package com.bonus.sharedstation.app.controller;
|
||||
|
||||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sharedstation.app.domain.CarService;
|
||||
import com.bonus.sharedstation.app.dto.CarServiceDTO;
|
||||
import com.bonus.sharedstation.app.service.ICarServiceService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Tag(name = "app-车辆服务")
|
||||
@RestController
|
||||
@RequestMapping("/information/carservice/app")
|
||||
public class CarServiceAppController {
|
||||
|
||||
@Resource
|
||||
private ICarServiceService carServiceService;
|
||||
|
||||
|
||||
@PostMapping(value = "/add", produces = "application/json; charset=utf-8")
|
||||
@ApiOperation("车辆服务-新增")
|
||||
public AjaxResult add(@RequestBody @Valid CarService dto) {
|
||||
return carServiceService.insert(dto);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(value = "/delete", produces = "application/json; charset=utf-8")
|
||||
@ApiOperation("车辆服务-删除")
|
||||
public AjaxResult deleteById(@RequestBody CarService dto){
|
||||
return carServiceService.delete(dto);
|
||||
}
|
||||
|
||||
@ApiOperation("车辆服务-修改")
|
||||
@PostMapping("/update")
|
||||
public AjaxResult update(@RequestBody @Valid CarService dto){
|
||||
return carServiceService.updateInfoById(dto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("车辆服务-查询")
|
||||
@PostMapping("/getList")
|
||||
public AjaxResult getList(@RequestBody CarServiceDTO dto){
|
||||
return carServiceService.getListPageApp(dto);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "selectById", produces = "application/json; charset=utf-8")
|
||||
@ApiOperation("车辆服务-查询详情")
|
||||
public AjaxResult selectInfoById(@RequestBody CarService dto){
|
||||
return carServiceService.selectInfoById(dto);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,203 @@
|
|||
package com.bonus.sharedstation.app.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车辆服务信息实体类
|
||||
*/
|
||||
|
||||
@TableName("car_service")
|
||||
public class CarService {
|
||||
|
||||
private static final long serialVersionUID = 6197622378439433176L;
|
||||
/**
|
||||
* 唯一标识符
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 服务类型,如车辆年检、车辆保险等
|
||||
*/
|
||||
private String serviceType;
|
||||
|
||||
/**
|
||||
* 服务描述
|
||||
*/
|
||||
private String serviceDescription;
|
||||
|
||||
/**
|
||||
* 服务提供商的名称
|
||||
*/
|
||||
private String providerName;
|
||||
|
||||
/**
|
||||
* 服务提供商的简介
|
||||
*/
|
||||
private String providerDescription;
|
||||
|
||||
/**
|
||||
* 服务提供商的联系电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 微信二维码的URL链接
|
||||
*/
|
||||
private String wechatQrcodeUrl;
|
||||
|
||||
private String logAddress;
|
||||
|
||||
public String getLogAddress() {
|
||||
return logAddress;
|
||||
}
|
||||
|
||||
public void setLogAddress(String logAddress) {
|
||||
this.logAddress = logAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createdBy; // 创建人
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createdTime; // 创建时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updatedTime; // 修改时间
|
||||
private String updatedBy; // 修改人
|
||||
private String isDeleted; // 逻辑删除标识,1表示已删除,0表示未删除
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CarService{" +
|
||||
"id=" + id +
|
||||
", serviceType='" + serviceType + '\'' +
|
||||
", serviceDescription='" + serviceDescription + '\'' +
|
||||
", providerName='" + providerName + '\'' +
|
||||
", providerDescription='" + providerDescription + '\'' +
|
||||
", contactPhone='" + contactPhone + '\'' +
|
||||
", wechatQrcodeUrl='" + wechatQrcodeUrl + '\'' +
|
||||
", createdBy='" + createdBy + '\'' +
|
||||
", createdTime=" + createdTime +
|
||||
", updatedTime=" + updatedTime +
|
||||
", updatedBy='" + updatedBy + '\'' +
|
||||
", isDeleted='" + isDeleted + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public Date getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public void setCreatedTime(Date createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
public Date getUpdatedTime() {
|
||||
return updatedTime;
|
||||
}
|
||||
|
||||
public void setUpdatedTime(Date updatedTime) {
|
||||
this.updatedTime = updatedTime;
|
||||
}
|
||||
|
||||
public String getUpdatedBy() {
|
||||
return updatedBy;
|
||||
}
|
||||
|
||||
public void setUpdatedBy(String updatedBy) {
|
||||
this.updatedBy = updatedBy;
|
||||
}
|
||||
|
||||
public String getIsDeleted() {
|
||||
return isDeleted;
|
||||
}
|
||||
|
||||
public void setIsDeleted(String isDeleted) {
|
||||
this.isDeleted = isDeleted;
|
||||
}
|
||||
|
||||
// Getters and Setters
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getServiceType() {
|
||||
return serviceType;
|
||||
}
|
||||
|
||||
public void setServiceType(String serviceType) {
|
||||
this.serviceType = serviceType;
|
||||
}
|
||||
|
||||
public String getServiceDescription() {
|
||||
return serviceDescription;
|
||||
}
|
||||
|
||||
public void setServiceDescription(String serviceDescription) {
|
||||
this.serviceDescription = serviceDescription;
|
||||
}
|
||||
|
||||
public String getProviderName() {
|
||||
return providerName;
|
||||
}
|
||||
|
||||
public void setProviderName(String providerName) {
|
||||
this.providerName = providerName;
|
||||
}
|
||||
|
||||
public String getProviderDescription() {
|
||||
return providerDescription;
|
||||
}
|
||||
|
||||
public void setProviderDescription(String providerDescription) {
|
||||
this.providerDescription = providerDescription;
|
||||
}
|
||||
|
||||
public String getContactPhone() {
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getWechatQrcodeUrl() {
|
||||
return wechatQrcodeUrl;
|
||||
}
|
||||
|
||||
public void setWechatQrcodeUrl(String wechatQrcodeUrl) {
|
||||
this.wechatQrcodeUrl = wechatQrcodeUrl;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,200 @@
|
|||
package com.bonus.sharedstation.app.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.bonus.sharedstation.common.pojo.PageDTO;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车辆服务信息实体类
|
||||
*/
|
||||
|
||||
@TableName("car_service")
|
||||
public class CarServiceDTO extends PageDTO implements java.io.Serializable{
|
||||
|
||||
private static final long serialVersionUID = 6197622378439433176L;
|
||||
/**
|
||||
* 唯一标识符
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 服务类型,如车辆年检、车辆保险等
|
||||
*/
|
||||
private String serviceType;
|
||||
|
||||
/**
|
||||
* 服务描述
|
||||
*/
|
||||
private String serviceDescription;
|
||||
|
||||
/**
|
||||
* 服务提供商的名称
|
||||
*/
|
||||
private String providerName;
|
||||
|
||||
/**
|
||||
* 服务提供商的简介
|
||||
*/
|
||||
private String providerDescription;
|
||||
|
||||
/**
|
||||
* 服务提供商的联系电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
/**
|
||||
* 微信二维码的URL链接
|
||||
*/
|
||||
private String wechatQrcodeUrl;
|
||||
|
||||
private String logAddress;
|
||||
|
||||
public String getLogAddress() {
|
||||
return logAddress;
|
||||
}
|
||||
|
||||
public void setLogAddress(String logAddress) {
|
||||
this.logAddress = logAddress;
|
||||
}
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createdBy; // 创建人
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createdTime; // 创建时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updatedTime; // 修改时间
|
||||
private String updatedBy; // 修改人
|
||||
private String isDeleted; // 逻辑删除标识,1表示已删除,0表示未删除
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CarServiceDTO{" +
|
||||
"id=" + id +
|
||||
", serviceType='" + serviceType + '\'' +
|
||||
", serviceDescription='" + serviceDescription + '\'' +
|
||||
", providerName='" + providerName + '\'' +
|
||||
", providerDescription='" + providerDescription + '\'' +
|
||||
", contactPhone='" + contactPhone + '\'' +
|
||||
", wechatQrcodeUrl='" + wechatQrcodeUrl + '\'' +
|
||||
", logAddress='" + logAddress + '\'' +
|
||||
", createdBy='" + createdBy + '\'' +
|
||||
", createdTime=" + createdTime +
|
||||
", updatedTime=" + updatedTime +
|
||||
", updatedBy='" + updatedBy + '\'' +
|
||||
", isDeleted='" + isDeleted + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public Date getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public void setCreatedTime(Date createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
public Date getUpdatedTime() {
|
||||
return updatedTime;
|
||||
}
|
||||
|
||||
public void setUpdatedTime(Date updatedTime) {
|
||||
this.updatedTime = updatedTime;
|
||||
}
|
||||
|
||||
public String getUpdatedBy() {
|
||||
return updatedBy;
|
||||
}
|
||||
|
||||
public void setUpdatedBy(String updatedBy) {
|
||||
this.updatedBy = updatedBy;
|
||||
}
|
||||
|
||||
public String getIsDeleted() {
|
||||
return isDeleted;
|
||||
}
|
||||
|
||||
public void setIsDeleted(String isDeleted) {
|
||||
this.isDeleted = isDeleted;
|
||||
}
|
||||
|
||||
// Getters and Setters
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getServiceType() {
|
||||
return serviceType;
|
||||
}
|
||||
|
||||
public void setServiceType(String serviceType) {
|
||||
this.serviceType = serviceType;
|
||||
}
|
||||
|
||||
public String getServiceDescription() {
|
||||
return serviceDescription;
|
||||
}
|
||||
|
||||
public void setServiceDescription(String serviceDescription) {
|
||||
this.serviceDescription = serviceDescription;
|
||||
}
|
||||
|
||||
public String getProviderName() {
|
||||
return providerName;
|
||||
}
|
||||
|
||||
public void setProviderName(String providerName) {
|
||||
this.providerName = providerName;
|
||||
}
|
||||
|
||||
public String getProviderDescription() {
|
||||
return providerDescription;
|
||||
}
|
||||
|
||||
public void setProviderDescription(String providerDescription) {
|
||||
this.providerDescription = providerDescription;
|
||||
}
|
||||
|
||||
public String getContactPhone() {
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getWechatQrcodeUrl() {
|
||||
return wechatQrcodeUrl;
|
||||
}
|
||||
|
||||
public void setWechatQrcodeUrl(String wechatQrcodeUrl) {
|
||||
this.wechatQrcodeUrl = wechatQrcodeUrl;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Copyright (c) 2021, orioc and/or its affiliates. All rights reserved.
|
||||
* Use, Copy is subject to authorized license.
|
||||
*/
|
||||
package com.bonus.sharedstation.app.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sharedstation.app.domain.CarService;
|
||||
import com.bonus.sharedstation.app.dto.CarServiceDTO;
|
||||
|
||||
/**
|
||||
* 汽车服务 Service
|
||||
*
|
||||
* @author zhh
|
||||
* @date 2024-11-15
|
||||
*/
|
||||
public interface ICarServiceService extends IService<CarService> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 汽车服务
|
||||
* @return 操作影响行数
|
||||
*/
|
||||
AjaxResult insert(CarService carService);
|
||||
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
*/
|
||||
AjaxResult updateInfoById(CarService carService);
|
||||
|
||||
//
|
||||
/**
|
||||
* 删除汽车服务
|
||||
*
|
||||
* @param
|
||||
|
||||
* @return 操作影响行数
|
||||
*/
|
||||
AjaxResult delete(CarService carService);
|
||||
//
|
||||
/**
|
||||
* 分页查询列表
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getListPage(CarServiceDTO dto);
|
||||
|
||||
/**
|
||||
* app
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getListPageApp(CarServiceDTO dto);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AjaxResult selectAll(CarService carService);
|
||||
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
AjaxResult selectInfoById(CarService carService);
|
||||
}
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
* Copyright (c) 2021, orioc and/or its affiliates. All rights reserved.
|
||||
* Use, Copy is subject to authorized license.
|
||||
*/
|
||||
package com.bonus.sharedstation.app.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sharedstation.app.domain.CarService;
|
||||
import com.bonus.sharedstation.app.dto.CarServiceDTO;
|
||||
import com.bonus.sharedstation.app.service.ICarServiceService;
|
||||
import com.bonus.sharedstation.web.mapper.CarServiceMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service实现
|
||||
*
|
||||
* @author hyq
|
||||
* @date 2024-03-15
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly = true)
|
||||
@Slf4j
|
||||
public class CarServiceServiceImpl extends ServiceImpl<CarServiceMapper, CarService> implements ICarServiceService {
|
||||
|
||||
|
||||
/**
|
||||
* Dao
|
||||
*/
|
||||
@Resource
|
||||
private CarServiceMapper carServiceMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
public AjaxResult insert(CarService dto) {
|
||||
log.info("新增汽车服务:{} ", dto);
|
||||
//得到登录人
|
||||
dto.setCreatedBy(SecurityUtils.getUsername());
|
||||
dto.setCreatedTime(new Date());
|
||||
boolean b = save(dto);
|
||||
if (!b) {
|
||||
return AjaxResult.error("新增汽车服务失败");
|
||||
}
|
||||
return AjaxResult.success("新增汽车服务成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
public AjaxResult updateInfoById(CarService dto) {
|
||||
log.info("修改 入参: {}", dto);
|
||||
dto.setCreatedBy(SecurityUtils.getUsername());
|
||||
dto.setCreatedTime(new Date());
|
||||
boolean b = updateById(dto);
|
||||
if (!b) {
|
||||
return AjaxResult.error("汽车服务修改失败");
|
||||
}
|
||||
return AjaxResult.success( "汽车服务修改成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getListPage(CarServiceDTO dto) {
|
||||
log.info("查询 入参: {}", dto);
|
||||
LambdaQueryWrapper<CarService> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// 创建分页对象
|
||||
Page<CarService> page = new Page<>(dto.getCurrentPage(), dto.getLimit());
|
||||
queryWrapper
|
||||
.like(CarService::getServiceType, dto.getServiceType())
|
||||
.eq(CarService::getIsDeleted, dto.getIsDeleted())
|
||||
.orderByDesc(CarService::getCreatedTime);
|
||||
|
||||
Page<CarService> result = carServiceMapper.selectPage(page, queryWrapper);
|
||||
//处理参数问题
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getListPageApp(CarServiceDTO dto) {
|
||||
log.info("查询 入参: {}", dto);
|
||||
LambdaQueryWrapper<CarService> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// 创建分页对象
|
||||
Page<CarService> page = new Page<>(dto.getCurrentPage(), dto.getLimit());
|
||||
queryWrapper
|
||||
.like(CarService::getServiceType, dto.getServiceType())
|
||||
.eq(CarService::getIsDeleted, dto.getIsDeleted())
|
||||
.orderByDesc(CarService::getCreatedTime);
|
||||
|
||||
Page<CarService> result = carServiceMapper.selectPage(page, queryWrapper);
|
||||
//处理参数问题
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
public AjaxResult delete(CarService carService) {
|
||||
return AjaxResult.success(carServiceMapper.deleteById(carService.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectAll(CarService carService) {
|
||||
log.info("查询 入参: {}", carService);
|
||||
LambdaQueryWrapper<CarService> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// 创建分页对象
|
||||
queryWrapper
|
||||
.like(CarService::getProviderName, carService.getProviderName())
|
||||
.eq(CarService::getIsDeleted, carService.getIsDeleted())
|
||||
.orderByDesc(CarService::getCreatedTime);
|
||||
|
||||
List<CarService> result = carServiceMapper.selectList(queryWrapper);
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectInfoById(CarService carService) {
|
||||
CarService result = carServiceMapper.selectById(carService.getId());
|
||||
if (StringUtils.isNull(result)) {
|
||||
return AjaxResult.error( "此汽车服务不存在");
|
||||
}
|
||||
//处理参数问题
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2021, orioc and/or its affiliates. All rights reserved.
|
||||
* Use, Copy is subject to authorized license.
|
||||
*/
|
||||
|
||||
package com.bonus.sharedstation.web.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.bonus.sharedstation.app.domain.CarService;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 设备位置 Dao
|
||||
*
|
||||
* @author zhh
|
||||
* @date 2024-11-15
|
||||
*/
|
||||
@Mapper
|
||||
public interface CarServiceMapper extends BaseMapper<CarService> {
|
||||
|
||||
// 根据 ID 删除
|
||||
int deleteById(Integer id);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
|
||||
<mapper namespace="com.bonus.sharedstation.web.mapper.CarServiceMapper">
|
||||
|
||||
<delete id="deleteById" parameterType="java.lang.Integer">
|
||||
update car_service set is_deleted = 1
|
||||
where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
|
||||
<mapper namespace="com.bonus.sharedstation.web.mapper.EmergencyEquipmentMapper">
|
||||
|
||||
<delete id="deleteById" parameterType="java.lang.Integer">
|
||||
update emergency_equipment set is_deleted = 1
|
||||
where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
|
||||
<mapper namespace="com.bonus.sharedstation.web.mapper.FirstAidMapper">
|
||||
|
||||
<resultMap id="FirstAidInfoResultMap" type="com.bonus.sharedstation.web.domain.FirstAidInfo">
|
||||
<id column="id" property="id" jdbcType="INTEGER" />
|
||||
<result column="first_aid_name" property="firstAidName" jdbcType="VARCHAR" />
|
||||
<result column="video_url" property="videoUrl" jdbcType="VARCHAR" />
|
||||
<result column="instruction" property="instruction" jdbcType="LONGVARCHAR" />
|
||||
<result column="logo_address" property="logoAddress" jdbcType="VARCHAR" />
|
||||
<result column="publish_status" property="publishStatus" jdbcType="CHAR" />
|
||||
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
|
||||
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP" />
|
||||
<result column="updated_time" property="updatedTime" jdbcType="TIMESTAMP" />
|
||||
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
|
||||
<result column="is_deleted" property="isDeleted" jdbcType="CHAR" />
|
||||
<result column="back_ground_address" property="backGroundAddress" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteById" parameterType="java.lang.Integer">
|
||||
update first_aid_info set is_deleted = 1
|
||||
where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
|
||||
<mapper namespace="com.bonus.sharedstation.web.mapper.MlConfigurationDateMapper">
|
||||
|
||||
<delete id="deleteById" parameterType="java.lang.Integer">
|
||||
update ml_configuration_date set is_deleted = 1
|
||||
where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue