# Conflicts:
#	yudao-server/src/main/resources/application.yaml
This commit is contained in:
Vinjor 2024-09-24 18:39:58 +08:00
commit 97485e7546
25 changed files with 592 additions and 20 deletions

View File

@ -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<String> createCarMain(@RequestBody AppCarMain carMain) {
return carMainService.createCarMain(carMain);
}
/**
* 更新车辆信息
*
* @param carMain
* @return
*/
@PutMapping("/update")
@Operation(summary = "更新车辆信息")
// @PreAuthorize("@ss.hasPermission('base:car-main:update')")
public CommonResult<String> 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<String> deleteCarMain(@RequestParam("id") String id) {
return carMainService.deleteCarMain(id);
}
/**
* 根据当前用户获得车辆信息
*
* @return
*/
@GetMapping("/get")
@Operation(summary = "获得车辆信息")
// @PreAuthorize("@ss.hasPermission('base:car-main:query')")
public CommonResult<List<AppCarMain>> getCarMain() {
List<AppCarMain> carMain = carMainService.getCarMain();
return CommonResult.success(carMain);
}
}

View File

@ -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<List<CarModel>> getList() {
List<CarModel> carModelList = carModelService.getCarModelList();
return success(carModelList);
}
}

View File

@ -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;
}

View File

@ -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<AppCarMain> {
// 查询当前用户的所有车辆
List<AppCarMain> getUserCarMain(@Param("userId") Long userId);
}

View File

@ -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<AppCarMain> {
/**
* 创建车辆信息
*
* @param carMain 创建信息
* @return 编号
*/
CommonResult<String> createCarMain(AppCarMain carMain);
/**
* 更新车辆信息
*
* @param carMain 更新信息
*/
CommonResult<String> updateCarMain(AppCarMain carMain);
/**
* 删除车辆信息
*
* @param id 编号
*/
CommonResult<String> deleteCarMain(String id);
/**
* 根据当前用户获得车辆信息
*
* @return 车辆信息
*/
List<AppCarMain> getCarMain();
}

View File

@ -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<AppCarMainMapper, AppCarMain> implements AppCarMainService {
@Autowired
private CustomerCarMapper customerCarMapper;
@Autowired
private CustomerMainMapper customerMainMapper;
/**
* 创建车辆信息
*
* @param carMain 创建信息
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public CommonResult<String> createCarMain(AppCarMain carMain) {
baseMapper.insert(carMain);
// 获取当前登录用户
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
// 根据当前登录用户id 查询 base_customer_main 的id
HashMap<String, Object> m = new HashMap<>();
m.put("user_id", loginUser.getId());
List<CustomerMain> 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<String> updateCarMain(AppCarMain carMain) {
baseMapper.updateById(carMain);
return CommonResult.success("修改成功");
}
/**
* 删除车辆信息
*
* @param id 编号
*/
@Override
@Transactional(rollbackFor = Exception.class)
public CommonResult<String> deleteCarMain(String id) {
// 删除主表
baseMapper.deleteById(id);
LambdaUpdateWrapper<CustomerCar> 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<AppCarMain> getCarMain() {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
List<AppCarMain> userCarMain = super.baseMapper.getUserCarMain(loginUser.getId());
return userCarMain;
}
}

View File

@ -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<cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO>
**/
@GetMapping("/getUserCustomer")
@Operation(summary = "获取当前登录用户的客户信息")
public CommonResult<CustomerMainRespVO> getUserCustomer() {
return success(customerMainService.getUserCustomer());
}
}

View File

@ -39,7 +39,6 @@ public class CustomerCouponController {
**/
@PostMapping("/couponVerification")
@Operation(summary = "核销用户卡券")
@PreAuthorize("@ss.hasPermission('base:customer-coupon:create')")
public CommonResult<Boolean> 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<Boolean> 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<CustomerCouponRespVO> getCustomerCoupon(@RequestParam("id") String id) {
return success(customerCouponService.getCustomerCoupon(id));
}

View File

@ -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<CustomerMainRespVO> getCustomerMain(@RequestParam("id") String id) {
return success(customerMainService.getCustomerById(id));
}

View File

@ -74,4 +74,5 @@ public interface CarModelService extends IService<CarModel> {
*/
List<CascaderOptionsVO> searchBrand(CarModelReqVO reqVO);
List<CarModel> getCarModelList();
}

View File

@ -51,6 +51,16 @@ public interface CustomerMainService extends IService<CustomerMain> {
**/
CustomerMainRespVO getCustomerById(String id);
/**
* 获取当前登录用户的客户信息
* @author PQZ
* @date 17:27 2024/9/24
* @return cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO
**/
CustomerMainRespVO getUserCustomer();
/**
* 根据经办人所属企业查询经办人信息
*

View File

@ -123,6 +123,12 @@ public class CarModelServiceImpl extends ServiceImpl<CarModelMapper, CarModel> i
return getChildModel(nameResult,reqVO.getModelName());
}
@Override
public List<CarModel> getCarModelList() {
List<CarModel> carModels = baseMapper.selectByMap(null);
return carModels;
}
/**
* 根据父级品牌集合取所有的型号子选项
*

View File

@ -147,6 +147,7 @@ public class CustomerActiveServiceImpl extends ServiceImpl<CustomerActiveMapper,
orderInfo.setOrderTime(LocalDateTime.now());
orderInfo.setIsOnline("01");
orderInfo.setOrderStatus("0");
orderInfo.setPayType(saveReqVO.getAccountType());
repairOrderInfoService.save(orderInfo);
//保存余额信息
// balanceService.updateByCusId(balance);

View File

@ -48,7 +48,7 @@ public class CustomerCouponServiceImpl extends ServiceImpl<CustomerCouponMapper,
public void couponVerification(CustomerCouponSaveReqVO saveReqVO) {
CustomerCoupon customerCoupon = getById(saveReqVO.getId());
//核销后剩余
BigDecimal newBalance = customerCoupon.getBalance().subtract(saveReqVO.getChangeBalance());
BigDecimal newBalance = customerCoupon.getBalance().subtract(customerCoupon.getUnitPrice());
customerCoupon.setBalance(newBalance);
if (newBalance.compareTo(BigDecimal.ZERO) == 0) {
customerCoupon.setIsValid(GENERAL_NO);
@ -62,9 +62,9 @@ public class CustomerCouponServiceImpl extends ServiceImpl<CustomerCouponMapper,
BALANCE_CHANGE_TYPE_KQHX,
BALANCE_CHANGE_MAIN_KQ,
saveReqVO.getOutRule(),
saveReqVO.getChangeBalance(),
saveReqVO.getUnitPrice(),
newBalance,
"核销" + saveReqVO.getCouponName() + saveReqVO.getChangeBalance() + "次/元,核销后剩余" + newBalance + "次/元"
"核销" + saveReqVO.getCouponName() + saveReqVO.getUnitPrice() + "次/元,核销后剩余" + newBalance + "次/元"
);
}

View File

@ -6,6 +6,8 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
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.custom.entity.CustomerCar;
import cn.iocoder.yudao.module.custom.entity.CustomerItem;
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
@ -210,6 +212,22 @@ public class CustomerMainServiceImpl extends ServiceImpl<CustomerMainMapper, Cus
return result;
}
/**
* 获取当前登录用户的客户信息
*
* @return cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO
* @author PQZ
* @date 17:27 2024/9/24
**/
@Override
public CustomerMainRespVO getUserCustomer() {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
LambdaQueryWrapper<CustomerMain> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(CustomerMain::getUserId,loginUser.getId()).eq(BaseDO::getDeleted,'0');
CustomerMain customerMain = getOne(lambdaQueryWrapper);
return getCustomerById(customerMain.getId());
}
/**
* 根据经办人所属企业查询经办人信息
*

View File

@ -14,6 +14,8 @@ import javax.validation.constraints.*;
public class CustomerActiveSaveReqVO extends CustomerActive {
/**充值金额*/
private BigDecimal topUpAmount;
/**充值金额*/
private String accountType;
/**选中的优惠券*/
private List<MemberCoupon> selectCoupon;
}

View File

@ -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<Boolean> updateCarMain(@RequestBody RepairOrderInfoSaveReqVO saveReqVO) {
repairOrderInfoService.rechargeCallback(saveReqVO.getOrderNo());
return success(true);
}
/**
* 分页查询订单内容
*

View File

@ -61,13 +61,7 @@ public interface RepairOrderInfoService extends IService<RepairOrderInfo> {
**/
RepairOrderInfo getOrderByOrderNo(String orderNo);
/**
* 获得维修模块 订单分页
*
* @param pageReqVO 分页查询
* @return 维修模块 订单分页
*/
PageResult<RepairOrderInfo> getOrderInfoPage(RepairOrderInfoPageReqVO pageReqVO);
/**
* 分页查询订单信息

View File

@ -75,11 +75,13 @@ public class RepairOrderInfoServiceImpl extends ServiceImpl<RepairOrderInfoMappe
**/
@Override
public void rechargeCallback(String orderNo) {
//通过订单编号查询订单
RepairOrderInfo orderInfo = getOrderByOrderNo(orderNo);
if (ORDER_HYCZ.equals(orderInfo.getGoodsType())){
//会员充值回调
balanceService.balanceCallback(orderInfo);
} else {
// TODO: 2024/9/24 维修服务回调
}
orderInfo.setOrderStatus(GENERAL_YES);
orderInfo.setPayTime(LocalDateTime.now());
@ -113,10 +115,6 @@ public class RepairOrderInfoServiceImpl extends ServiceImpl<RepairOrderInfoMappe
return getOne(lambdaQueryWrapper);
}
@Override
public PageResult<RepairOrderInfo> getOrderInfoPage(RepairOrderInfoPageReqVO pageReqVO) {
return null;
}
/**
* 分页查询订单信息
@ -144,6 +142,7 @@ public class RepairOrderInfoServiceImpl extends ServiceImpl<RepairOrderInfoMappe
return baseMapper.getOrderPageByStatus(respVO, page);
}
/**
* 查询订单详情(包括工单)
*

View File

@ -0,0 +1,15 @@
<?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="cn.iocoder.yudao.module.app.car.mapper.AppCarMainMapper">
<select id="getUserCarMain" resultType="cn.iocoder.yudao.module.app.car.entity.AppCarMain">
select main.* from base_customer_car car INNER JOIN base_car_main main on car.car_id = main.id
where car.cus_id = (
select id from base_customer_main
where user_id = #{userId}
and deleted = 0
) and main.deleted = 0
</select>
</mapper>

View File

@ -28,5 +28,6 @@
WHERE
bcc.cus_id = #{cusId}
AND bcc.deleted = 0
AND bcc.is_valid = 1
</select>
</mapper>

View File

@ -20,7 +20,7 @@
and roi.order_no like concat('%', #{entity.orderNo}, '%')
</if>
<if test="entity.goodsTitle != null and entity.goodsTitle != ''">
and roi.goods_totle like concat('%', #{entity.goodsTitle}, '%')
and roi.goods_title like concat('%', #{entity.goodsTitle}, '%')
</if>
<if test="entity.goodsType != null and entity.goodsType != ''">
and roi.goods_type = #{entity.goodsType}
@ -31,7 +31,11 @@
<if test="entity.orderStatus != null and entity.orderStatus != ''">
and roi.order_status = #{entity.orderStatus}
</if>
<if test="entity.payType != null and entity.payType != ''">
and roi.pay_type = #{entity.payType}
</if>
</where>
order by roi.create_time desc
</select>
<select id="getOrderPageByStatus" resultType="cn.iocoder.yudao.module.order.vo.RepairOrderInfoRespVO">

View File

@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataPageReqVO;
import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataRespVO;
import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataSaveReqVO;
@ -101,4 +102,14 @@ public class DictDataController {
ExcelUtils.write(response, "字典数据.xls", "数据", DictDataRespVO.class,
BeanUtils.toBean(list, DictDataRespVO.class));
}
@GetMapping("/type")
@Operation(summary = "根据字典类型查询字典数据信息")
@Parameter(name = "type", description = "字典类型", required = true, example = "common_status")
@TenantIgnore
public CommonResult<List<AppDictDataRespVO>> getDictDataListByType(@RequestParam("type") String type) {
List<DictDataDO> list = dictDataService.getDictDataList(
CommonStatusEnum.ENABLE.getStatus(), type);
return success(BeanUtils.toBean(list, AppDictDataRespVO.class));
}
}

View File

@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.system.controller.app.dict;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.system.controller.app.dict.vo.AppDictDataRespVO;
import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictDataDO;
import cn.iocoder.yudao.module.system.service.dict.DictDataService;
@ -32,6 +33,7 @@ public class AppDictDataController {
@GetMapping("/type")
@Operation(summary = "根据字典类型查询字典数据信息")
@Parameter(name = "type", description = "字典类型", required = true, example = "common_status")
@TenantIgnore
public CommonResult<List<AppDictDataRespVO>> getDictDataListByType(@RequestParam("type") String type) {
List<DictDataDO> list = dictDataService.getDictDataList(
CommonStatusEnum.ENABLE.getStatus(), type);

View File

@ -281,6 +281,7 @@ yudao:
- /admin-api/rescue/loginJcApp
- /admin-api/system/tenant/getListByWebsite
- /admin-api/websocket/**
- /admin-api/system/dict-data/type
- /userClient/pay/**
- /userClient/weChat/**
ignore-tables: