diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarMainController.java new file mode 100644 index 00000000..37874f74 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarMainController.java @@ -0,0 +1,81 @@ +package cn.iocoder.yudao.module.app.car.controller; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.app.car.entity.AppCarMain; +import cn.iocoder.yudao.module.app.car.service.AppCarMainService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.checkerframework.checker.units.qual.A; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +@Tag(name = "小程序 - 我的车辆") +@RestController +@RequestMapping("/userClient/base/myCar") +@Validated +public class AppCarMainController { + + @Autowired + private AppCarMainService carMainService; + + /** + * 创建车辆信息 + * + * @param carMain + * @return + */ + @PostMapping("/create") + @Operation(summary = "创建车辆信息") +// @PreAuthorize("@ss.hasPermission('base:car-main:create')") + public CommonResult createCarMain(@RequestBody AppCarMain carMain) { + return carMainService.createCarMain(carMain); + } + + /** + * 更新车辆信息 + * + * @param carMain + * @return + */ + @PutMapping("/update") + @Operation(summary = "更新车辆信息") +// @PreAuthorize("@ss.hasPermission('base:car-main:update')") + public CommonResult updateCarMain(@RequestBody AppCarMain carMain) { + return carMainService.updateCarMain(carMain); + } + + /** + * 删除车辆信息 + * + * @param id + * @return + */ + @DeleteMapping("/delete") + @Operation(summary = "删除车辆信息") + @Parameter(name = "id", description = "编号", required = true) +// @PreAuthorize("@ss.hasPermission('base:car-main:delete')") + public CommonResult deleteCarMain(@RequestParam("id") String id) { + return carMainService.deleteCarMain(id); + } + + /** + * 根据当前用户获得车辆信息 + * + * @return + */ + @GetMapping("/get") + @Operation(summary = "获得车辆信息") +// @PreAuthorize("@ss.hasPermission('base:car-main:query')") + public CommonResult> getCarMain() { + + List carMain = carMainService.getCarMain(); + return CommonResult.success(carMain); + } + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarModelController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarModelController.java new file mode 100644 index 00000000..40c7320c --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarModelController.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.app.car.controller; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.custom.entity.CarModel; +import cn.iocoder.yudao.module.custom.service.CarModelService; +import cn.iocoder.yudao.module.custom.vo.CarModelReqVO; +import cn.iocoder.yudao.module.custom.vo.CarModelRespVO; +import cn.iocoder.yudao.module.custom.vo.CascaderOptionsVO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + + +@Tag(name = "管理后台 - 车辆品牌型号") +@RestController +@RequestMapping("/userClient/base/carModel") +@Validated +public class AppCarModelController { + + @Autowired + private CarModelService carModelService; + + + /** + * 获得全部车辆品牌 + * + * @return + */ + @GetMapping("/list") + @Operation(summary = "查询车辆品牌") + public CommonResult> getList() { + List carModelList = carModelService.getCarModelList(); + return success(carModelList); + } + + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/entity/AppCarMain.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/entity/AppCarMain.java new file mode 100644 index 00000000..51fdd255 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/entity/AppCarMain.java @@ -0,0 +1,136 @@ +package cn.iocoder.yudao.module.app.car.entity; + +import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.Date; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; + +/** + * 车辆信息 DO + * + * @author 后台管理员 + */ +@TableName("base_car_main") +@Data +@EqualsAndHashCode(callSuper = true) +public class AppCarMain extends TenantBaseDO { + + /** + * 主键标识 + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + /** + * 发动机号码 + */ + private String engineNumber; + /** + * 车架号 + */ + private String vin; + /** + * 车牌号 + */ + private String licenseNumber; + /** + * 车辆型号 + */ + private String carModel; + /** + * 保养日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date maintenanceDate; + /** + * 保养里程 + */ + private BigDecimal maintenanceMileage; + /** + * 年检日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + private Date inspectionDate; + /** + * 保险日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + private Date insuranceDate; + /** + * 二级维护时间 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date checkDate; + /** + * 下次保养日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date nextMaintenanceDate; + /** + * 下次保养里程 + */ + private BigDecimal nextMaintenanceMileage; + /** + * 下次年检日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date nextInspectionDate; + /** + * 保险到期日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date insuranceExpiryDate; + /** + * 下次二级维护时间 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date nextCheckDate; + /** + * 车辆品牌 + */ + private String carBrand; + /** + * 车辆性质:营运 非营运等 + */ + private String carNature; + /** + * 车辆类别:私家车 货车 教练车 公务车 出租车 + */ + private String carCategory; + /** + * 车辆注册日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date carRegisterDate; + /** + * 行驶证图片 + */ + private String carLicenseImg; + /** + * 最近办理业务 + */ + private String recentlyHandledBusiness; + /** + * 最近办理业务的时间 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date recentlyHandleBusinessTime; + /** + * 车辆型号(输入框) + */ + private String carModelInput; + /** + * 车辆品牌(输入框) + */ + private String carBrandInput; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/mapper/AppCarMainMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/mapper/AppCarMainMapper.java new file mode 100644 index 00000000..3a0c852e --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/mapper/AppCarMainMapper.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.app.car.mapper; + +import cn.iocoder.yudao.module.app.car.entity.AppCarMain; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface AppCarMainMapper extends BaseMapper { + + +// 查询当前用户的所有车辆 + List getUserCarMain(@Param("userId") Long userId); + +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/AppCarMainService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/AppCarMainService.java new file mode 100644 index 00000000..50f23cb4 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/AppCarMainService.java @@ -0,0 +1,49 @@ +package cn.iocoder.yudao.module.app.car.service; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.app.car.entity.AppCarMain; +import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * 车辆信息 Service 接口 + * + * @author 后台管理员 + */ +public interface AppCarMainService extends IService { + + /** + * 创建车辆信息 + * + * @param carMain 创建信息 + * @return 编号 + */ + CommonResult createCarMain(AppCarMain carMain); + + /** + * 更新车辆信息 + * + * @param carMain 更新信息 + */ + CommonResult updateCarMain(AppCarMain carMain); + + /** + * 删除车辆信息 + * + * @param id 编号 + */ + CommonResult deleteCarMain(String id); + + /** + * 根据当前用户获得车辆信息 + * + * @return 车辆信息 + */ + List getCarMain(); + + + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/impl/AppCarMainServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/impl/AppCarMainServiceImpl.java new file mode 100644 index 00000000..84204cf1 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/impl/AppCarMainServiceImpl.java @@ -0,0 +1,113 @@ +package cn.iocoder.yudao.module.app.car.service.impl; + + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.app.car.entity.AppCarMain; +import cn.iocoder.yudao.module.app.car.mapper.AppCarMainMapper; +import cn.iocoder.yudao.module.app.car.service.AppCarMainService; +import cn.iocoder.yudao.module.custom.entity.CustomerCar; +import cn.iocoder.yudao.module.custom.entity.CustomerMain; +import cn.iocoder.yudao.module.custom.mapper.CustomerCarMapper; +import cn.iocoder.yudao.module.custom.mapper.CustomerMainMapper; +import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; +import cn.iocoder.yudao.module.label.service.BusiLabelService; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.HashMap; +import java.util.List; + +/** + * 车辆信息 Service 实现类 + * + * @author 后台管理员 + */ +@Service +public class AppCarMainServiceImpl extends ServiceImpl implements AppCarMainService { + + @Autowired + private CustomerCarMapper customerCarMapper; + @Autowired + private CustomerMainMapper customerMainMapper; + + /** + * 创建车辆信息 + * + * @param carMain 创建信息 + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult createCarMain(AppCarMain carMain) { + + baseMapper.insert(carMain); +// 获取当前登录用户 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); +// 根据当前登录用户id 查询 base_customer_main 的id + HashMap m = new HashMap<>(); + m.put("user_id", loginUser.getId()); + List customerMains = customerMainMapper.selectByMap(m); +// 关联表添加数据 + CustomerCar customerCar = new CustomerCar(); + customerCar.setCarId(carMain.getId()); + customerCar.setCusId(customerMains.get(0).getId()); + customerCarMapper.insert(customerCar); + + // 返回 + return CommonResult.success("新增成功"); + } + + /** + * 更新车辆信息 + * + * @param carMain 更新信息 + */ + @Override + public CommonResult updateCarMain(AppCarMain carMain) { + baseMapper.updateById(carMain); + return CommonResult.success("修改成功"); + } + + /** + * 删除车辆信息 + * + * @param id 编号 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult deleteCarMain(String id) { +// 删除主表 + baseMapper.deleteById(id); + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(CustomerCar::getCarId, id); + CustomerCar customerCar = new CustomerCar(); + customerCar.setDeleted(true); +// 删除关联表 + customerCarMapper.update(customerCar, updateWrapper); + return CommonResult.success("删除成功"); + } + + /** + * 获得车辆信息 + * + * @return + */ + @Override + public List getCarMain() { + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + List userCarMain = super.baseMapper.getUserCarMain(loginUser.getId()); + + + return userCarMain; + } + + + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/customer/admin/CustomerMainApi.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/customer/admin/CustomerMainApi.java new file mode 100644 index 00000000..c44359a5 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/customer/admin/CustomerMainApi.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.app.customer.admin; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.conf.entity.BaseType; +import cn.iocoder.yudao.module.custom.entity.CustomerMain; +import cn.iocoder.yudao.module.custom.service.CustomerMainService; +import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +/** + * 客户管理API + * @author PQZ + * @date 18:17 2024/9/24 +**/ +@RestController +@RequestMapping("/userClient/customer") +public class CustomerMainApi { + + @Resource + private CustomerMainService customerMainService; + + /** + * 查询当前登录客户信息 + * @author PQZ + * @date 17:24 2024/9/24 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + **/ + @GetMapping("/getUserCustomer") + @Operation(summary = "获取当前登录用户的客户信息") + public CommonResult getUserCustomer() { + return success(customerMainService.getUserCustomer()); + } + +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerCouponController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerCouponController.java index 70951a5d..cc1fe147 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerCouponController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerCouponController.java @@ -39,7 +39,6 @@ public class CustomerCouponController { **/ @PostMapping("/couponVerification") @Operation(summary = "核销用户卡券") - @PreAuthorize("@ss.hasPermission('base:customer-coupon:create')") public CommonResult createCustomerCoupon(@Valid @RequestBody CustomerCouponSaveReqVO saveReqVO) { customerCouponService.couponVerification(saveReqVO); return success(true); @@ -57,7 +56,6 @@ public class CustomerCouponController { @DeleteMapping("/delete") @Operation(summary = "删除用户卡券") @Parameter(name = "id", description = "编号", required = true) - @PreAuthorize("@ss.hasPermission('base:customer-coupon:delete')") public CommonResult deleteCustomerCoupon(@RequestParam("id") String id) { customerCouponService.deleteCustomerCoupon(id); return success(true); @@ -74,7 +72,6 @@ public class CustomerCouponController { @GetMapping("/get") @Operation(summary = "获得用户卡券") @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('base:customer-coupon:query')") public CommonResult getCustomerCoupon(@RequestParam("id") String id) { return success(customerCouponService.getCustomerCoupon(id)); } diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java index a55afc83..efb20f30 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java @@ -129,7 +129,6 @@ public class CustomerMainController { @GetMapping("/get") @Operation(summary = "获得客户管理") @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('base:customer-main:query')") public CommonResult getCustomerMain(@RequestParam("id") String id) { return success(customerMainService.getCustomerById(id)); } diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java index 793ee7bd..8376736c 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java @@ -74,4 +74,5 @@ public interface CarModelService extends IService { */ List searchBrand(CarModelReqVO reqVO); + List getCarModelList(); } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java index f90b9c95..fa6761e9 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java @@ -51,6 +51,16 @@ public interface CustomerMainService extends IService { **/ CustomerMainRespVO getCustomerById(String id); + /** + * 获取当前登录用户的客户信息 + * @author PQZ + * @date 17:27 2024/9/24 + * @return cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO + **/ + CustomerMainRespVO getUserCustomer(); + + + /** * 根据经办人所属企业查询经办人信息 * diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java index 02d3aed0..8154d6c4 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java @@ -123,6 +123,12 @@ public class CarModelServiceImpl extends ServiceImpl i return getChildModel(nameResult,reqVO.getModelName()); } + @Override + public List getCarModelList() { + List carModels = baseMapper.selectByMap(null); + return carModels; + } + /** * 根据父级品牌集合取所有的型号子选项 * diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java index a1994ab7..413cdd7b 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java @@ -147,6 +147,7 @@ public class CustomerActiveServiceImpl extends ServiceImpl lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(CustomerMain::getUserId,loginUser.getId()).eq(BaseDO::getDeleted,'0'); + CustomerMain customerMain = getOne(lambdaQueryWrapper); + return getCustomerById(customerMain.getId()); + } + /** * 根据经办人所属企业查询经办人信息 * diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerActiveSaveReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerActiveSaveReqVO.java index 9df90275..c08dc23f 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerActiveSaveReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerActiveSaveReqVO.java @@ -14,6 +14,8 @@ import javax.validation.constraints.*; public class CustomerActiveSaveReqVO extends CustomerActive { /**充值金额*/ private BigDecimal topUpAmount; + /**充值金额*/ + private String accountType; /**选中的优惠券*/ private List selectCoupon; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java index 286ed727..3a84dad1 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.order.entity.RepairOrderInfo; import cn.iocoder.yudao.module.order.service.RepairOrderInfoService; import cn.iocoder.yudao.module.order.vo.RepairOrderInfoPageReqVO; import cn.iocoder.yudao.module.order.vo.RepairOrderInfoRespVO; +import cn.iocoder.yudao.module.order.vo.RepairOrderInfoSaveReqVO; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.v3.oas.annotations.Operation; @@ -48,6 +49,21 @@ public class RepairOrderInfoController { return success(BeanUtils.toBean(orderInfo, RepairOrderInfoRespVO.class)); } + + + /** + * 更新订单信息 + * + * @param saveReqVO 订单信息 + */ + @PutMapping("/update") + @Operation(summary = "更新车辆信息") + @PreAuthorize("@ss.hasPermission('base:car-main:update')") + public CommonResult updateCarMain(@RequestBody RepairOrderInfoSaveReqVO saveReqVO) { + repairOrderInfoService.rechargeCallback(saveReqVO.getOrderNo()); + return success(true); + } + /** * 分页查询订单内容 * diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java index 2c895981..2a2e0649 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java @@ -61,13 +61,7 @@ public interface RepairOrderInfoService extends IService { **/ RepairOrderInfo getOrderByOrderNo(String orderNo); - /** - * 获得维修模块 订单分页 - * - * @param pageReqVO 分页查询 - * @return 维修模块 订单分页 - */ - PageResult getOrderInfoPage(RepairOrderInfoPageReqVO pageReqVO); + /** * 分页查询订单信息 diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java index 42562e9c..30d9ffd4 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java @@ -75,11 +75,13 @@ public class RepairOrderInfoServiceImpl extends ServiceImpl getOrderInfoPage(RepairOrderInfoPageReqVO pageReqVO) { - return null; - } /** * 分页查询订单信息 @@ -144,6 +142,7 @@ public class RepairOrderInfoServiceImpl extends ServiceImpl + + + + + + \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/custom/CustomerCouponMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CustomerCouponMapper.xml index d35a7c11..da826a10 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CustomerCouponMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CustomerCouponMapper.xml @@ -28,5 +28,6 @@ WHERE bcc.cus_id = #{cusId} AND bcc.deleted = 0 + AND bcc.is_valid = 1 \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml b/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml index eceefe24..22a1d4ce 100644 --- a/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml +++ b/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml @@ -20,7 +20,7 @@ and roi.order_no like concat('%', #{entity.orderNo}, '%') - and roi.goods_totle like concat('%', #{entity.goodsTitle}, '%') + and roi.goods_title like concat('%', #{entity.goodsTitle}, '%') and roi.goods_type = #{entity.goodsType} @@ -31,7 +31,11 @@ and roi.order_status = #{entity.orderStatus} + + and roi.pay_type = #{entity.payType} + + order by roi.create_time desc