客户管理关联表、扩展表后端代码初始化

This commit is contained in:
PQZ 2024-08-02 09:56:17 +08:00
parent 7e16e197ac
commit e885ad0333
12 changed files with 234 additions and 2 deletions

View File

@ -0,0 +1,20 @@
package cn.iocoder.yudao.module.custom.controller.admin;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 客户管理扩展信息每个租户的下的客户信息
*
* @author : http://www.chiner.pro
* @date : 2024-7-31
*/
@RestController
@RequestMapping("/base/customItem")
@Tag(name = "管理后台 - BASE 企业管理")
@Validated
public class CustomerItemController {
}

View File

@ -0,0 +1,43 @@
package cn.iocoder.yudao.module.custom.entity;
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* 客户车辆关联 DO
*
* @author 后台管理员
*/
@TableName("base_customer_car")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CustomerCar extends TenantBaseDO {
/**
* 主键标识
*/
@TableId(type = IdType.INPUT)
private String id;
/**
* 客户信息主表id
*/
private String cusId;
/**
* 车辆表id
*/
private String carId;
/**
* 是否车主
*/
private String isOwner;
}

View File

@ -0,0 +1,59 @@
package cn.iocoder.yudao.module.custom.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 lombok.*;
import java.util.Date;
/**
* 客户信息扩展 DO
*
* @author pqz
*/
@TableName("base_customer_item")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CustomerItem extends TenantBaseDO {
/**
* 主键标识
*/
@TableId(type = IdType.INPUT)
private String id;
/**
* 客户信息主表id
*/
private String cusId;
/**
* 系统标识
*/
private String systemCode;
/**
* 会员等级;不同的业务表会员等级是独立的
*/
private String userLevel;
/**
* 服务内容
*/
private String serContent;
/**
* 服务开始时间
*/
private Date serTimeStart;
/**
* 服务结束时间
*/
private Date serTimeEnd;
/**
* 其他字段
*/
private String bigJson;
}

View File

@ -0,0 +1,16 @@
package cn.iocoder.yudao.module.custom.mapper;
import cn.iocoder.yudao.module.custom.entity.CustomerCar;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 客户车辆管理关联Mapper
*
* @author pqz
*/
@Mapper
public interface CustomerCarMapper extends BaseMapper<CustomerCar> {
}

View File

@ -0,0 +1,16 @@
package cn.iocoder.yudao.module.custom.mapper;
import cn.iocoder.yudao.module.custom.entity.CustomerItem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 客户管理扩展Mapper
*
* @author pqz
*/
@Mapper
public interface CustomerItemMapper extends BaseMapper<CustomerItem> {
}

View File

@ -0,0 +1,14 @@
package cn.iocoder.yudao.module.custom.service;
import cn.iocoder.yudao.module.custom.entity.CustomerCar;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 客户车辆管理关联Service 接口
*
* @author pqz
*/
public interface CustomerCarService extends IService<CustomerCar> {
}

View File

@ -0,0 +1,14 @@
package cn.iocoder.yudao.module.custom.service;
import cn.iocoder.yudao.module.custom.entity.CustomerItem;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 客户管理 Service 接口
*
* @author pqz
*/
public interface CustomerItemService extends IService<CustomerItem> {
}

View File

@ -0,0 +1,20 @@
package cn.iocoder.yudao.module.custom.service.impl;
import cn.iocoder.yudao.module.custom.entity.CustomerCar;
import cn.iocoder.yudao.module.custom.mapper.CustomerCarMapper;
import cn.iocoder.yudao.module.custom.service.CustomerCarService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
/**
* 客户车辆管理关联
*
* @author pqz
*/
@Service
@Validated
public class CustomerCarServiceImpl extends ServiceImpl<CustomerCarMapper, CustomerCar> implements CustomerCarService {
}

View File

@ -0,0 +1,20 @@
package cn.iocoder.yudao.module.custom.service.impl;
import cn.iocoder.yudao.module.custom.entity.CustomerItem;
import cn.iocoder.yudao.module.custom.mapper.CustomerItemMapper;
import cn.iocoder.yudao.module.custom.service.CustomerItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
/**
* 客户管理 Service 实现类
*
* @author pqz
*/
@Service
@Validated
public class CustomerItemServiceImpl extends ServiceImpl<CustomerItemMapper, CustomerItem> implements CustomerItemService {
}

View File

@ -1,11 +1,11 @@
package cn.iocoder.yudao.module.custom.vo;
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 客户管理新增/修改 Request VO")
@Data
public class CustomerMainSaveReqVO {
public class CustomerMainSaveReqVO extends CustomerMain {
}

View File

@ -0,0 +1,5 @@
<?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.custom.mapper.CustomerCarMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.custom.mapper.CustomerItemMapper">
</mapper>