first commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
## 领域层
|
||||
|
||||
活儿都给domainService干,异常都给domainService抛
|
||||
|
||||
1、领域中的对象由实体和值对象组成。对值对象的访问必须经由所属的实体对象;
|
||||
|
||||
2、相关联的一组实体与值对象组成聚合,对聚合内的对象的访问必须经由聚合根对象。
|
||||
|
||||
3、跨实体的操作必须经由领域服务。
|
||||
|
||||
4、应用服务层只通过领域服务或者聚合根来组织业务,自身不带任务实现逻辑。
|
||||
|
||||
5、业务与数据隔离。领域层只关注业务,数据支撑全部交由基础层
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.mhd.user.domain.appLocation.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
/**
|
||||
* APP位置信息对象 app_location
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AppLocation extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("APP位置id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long appLocationId;
|
||||
|
||||
@ApiModelProperty("用户表ID")
|
||||
@Excel(name = "用户表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
@Excel(name = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
@Excel(name = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty("速度")
|
||||
@Excel(name = "速度")
|
||||
private Long speed;
|
||||
|
||||
@ApiModelProperty("位置信息")
|
||||
@Excel(name = "位置信息")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("运单号")
|
||||
@Excel(name = "运单号")
|
||||
private String waybillNum;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String licensePlate;
|
||||
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.mhd.user.domain.appLocation.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.user.domain.appLocation.entity.AppLocation;
|
||||
import com.mhd.user.domain.appLocation.repository.po.AppLocationPO;
|
||||
import com.mhd.user.domain.appLocation.repository.todo.AppLocationDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* APP位置信息Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
public interface IAppLocationService extends IService<AppLocation>
|
||||
{
|
||||
/**
|
||||
* 分页查询APP位置信息列表
|
||||
*/
|
||||
public List<AppLocationPO> queryList(AppLocationDO appLocationDO);
|
||||
|
||||
/**
|
||||
* 新增APP位置信息
|
||||
*/
|
||||
public Boolean insert(AppLocationDO appLocationDO);
|
||||
|
||||
/**
|
||||
* 修改APP位置信息
|
||||
*/
|
||||
public Boolean update(AppLocationDO appLocationDO);
|
||||
|
||||
/**
|
||||
* 批量删除APP位置信息
|
||||
*/
|
||||
public Boolean delete(Long[] appLocationIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询APP位置信息
|
||||
*/
|
||||
public AppLocationPO getInfo(Long appLocationId);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.mhd.user.domain.appLocation.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.appLocation.entity.AppLocation;
|
||||
import com.mhd.user.domain.appLocation.repository.po.AppLocationPO;
|
||||
import com.mhd.user.domain.appLocation.repository.todo.AppLocationDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
/**
|
||||
* APP位置信息Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
public interface AppLocationMapper extends BaseMapper<AppLocation>
|
||||
{
|
||||
/**
|
||||
* 查询APP位置信息列表
|
||||
*/
|
||||
public List<AppLocationPO> queryList(AppLocationDO appLocationDO);
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.mhd.user.domain.appLocation.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.user.domain.appLocation.entity.AppLocation;
|
||||
import com.mhd.user.domain.appLocation.repository.facade.IAppLocationService;
|
||||
import com.mhd.user.domain.appLocation.repository.mapper.AppLocationMapper;
|
||||
import com.mhd.user.domain.appLocation.repository.po.AppLocationPO;
|
||||
import com.mhd.user.domain.appLocation.repository.todo.AppLocationDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* APP位置信息Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
@Service
|
||||
public class AppLocationImpl extends ServiceImpl<AppLocationMapper, AppLocation> implements IAppLocationService{
|
||||
@Autowired
|
||||
private AppLocationMapper appLocationMapper;
|
||||
|
||||
/**
|
||||
* 查询APP位置信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<AppLocationPO> queryList(AppLocationDO appLocationDO)
|
||||
{
|
||||
return appLocationMapper.queryList(appLocationDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增APP位置信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(AppLocationDO appLocationDO) {
|
||||
AppLocation appLocation = new AppLocation();
|
||||
BeanUtils.copyProperties(appLocationDO,appLocation);
|
||||
return this.save(appLocation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改APP位置信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(AppLocationDO appLocationDO) {
|
||||
AppLocation appLocation = new AppLocation();
|
||||
BeanUtils.copyProperties(appLocationDO,appLocation);
|
||||
return this.updateById(appLocation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除APP位置信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] appLocationIds ) {
|
||||
List<AppLocation> list = new ArrayList<>();
|
||||
for (Long id : appLocationIds) {
|
||||
AppLocation appLocation = new AppLocation();
|
||||
appLocation.setAppLocationId(id);
|
||||
appLocation.setDelFlag(2);
|
||||
list.add(appLocation);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改APP位置信息
|
||||
*/
|
||||
@Override
|
||||
public AppLocationPO getInfo(Long appLocationId) {
|
||||
AppLocation appLocation = this.getById(appLocationId);
|
||||
AppLocationPO appLocationPO = new AppLocationPO();
|
||||
BeanUtils.copyProperties(appLocation,appLocationPO);
|
||||
return appLocationPO;
|
||||
}
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.mhd.user.domain.appLocation.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
|
||||
/**
|
||||
* APP位置信息对象 app_location
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "APP位置信息对象", description = "APP位置信息响应对象")
|
||||
public class AppLocationPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("APP位置id")
|
||||
private Long appLocationId;
|
||||
|
||||
@ApiModelProperty("用户表ID")
|
||||
@Excel(name = "用户表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
@Excel(name = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
@Excel(name = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty("速度")
|
||||
@Excel(name = "速度")
|
||||
private Long speed;
|
||||
|
||||
@ApiModelProperty("位置信息")
|
||||
@Excel(name = "位置信息")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("运单号")
|
||||
@Excel(name = "运单号")
|
||||
private String waybillNum;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String licensePlate;
|
||||
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.mhd.user.domain.appLocation.repository.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 车辆定位
|
||||
* @Author: lfs
|
||||
* @Date: 2020-03-09 10:55:11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class TmsVehicleLocationVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
/**是否删除(0-未删除,1-已删除)*/
|
||||
@ApiModelProperty(value = "是否删除(0-未删除,1-已删除)")
|
||||
private Integer isDelete;
|
||||
/**车辆id*/
|
||||
@ApiModelProperty(value = "车辆id")
|
||||
private String vehicleId;
|
||||
/**车牌号*/
|
||||
@ApiModelProperty(value = "车牌号")
|
||||
private String vehicleLicenseNumber;
|
||||
/**司机编码*/
|
||||
@ApiModelProperty(value = "司机编码")
|
||||
private String driverId;
|
||||
/**经度*/
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
/**纬度*/
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
/**详细地址*/
|
||||
@ApiModelProperty(value = "详细地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "运单号")
|
||||
private String transportationNumber;
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
package com.mhd.user.domain.appLocation.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* APP位置信息对象 app_location
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AppLocationDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("APP位置id")
|
||||
private Long appLocationId;
|
||||
|
||||
@ApiModelProperty("用户表ID")
|
||||
@Excel(name = "用户表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
@Excel(name = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
@Excel(name = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty("速度")
|
||||
@Excel(name = "速度")
|
||||
private Long speed;
|
||||
|
||||
@ApiModelProperty("位置信息")
|
||||
@Excel(name = "位置信息")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("运单号")
|
||||
@Excel(name = "运单号")
|
||||
private String waybillNum;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String licensePlate;
|
||||
|
||||
@ApiModelProperty(value = "开始日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty(value = "定位方式(0-APP定位,1-中交行路,2-好运宝轨迹)")
|
||||
private Integer type;
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.mhd.user.domain.appLocation.service;
|
||||
|
||||
import com.mhd.user.domain.appLocation.repository.facade.IAppLocationService;
|
||||
import com.mhd.user.domain.appLocation.repository.po.AppLocationPO;
|
||||
import com.mhd.user.domain.appLocation.repository.todo.AppLocationDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* APP位置信息
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class AppLocationDomainService {
|
||||
|
||||
@Autowired
|
||||
private IAppLocationService appLocationService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询APP位置信息列表
|
||||
*/
|
||||
public List<AppLocationPO> queryList(AppLocationDO appLocationDO) {
|
||||
return appLocationService.queryList(appLocationDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增APP位置信息
|
||||
*/
|
||||
public Boolean insert(AppLocationDO appLocationDO) {
|
||||
|
||||
return appLocationService.insert(appLocationDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改APP位置信息
|
||||
*/
|
||||
public Boolean update(AppLocationDO appLocationDO) {
|
||||
return appLocationService.update(appLocationDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除APP位置信息
|
||||
*/
|
||||
public Boolean delete(Long[] appLocationIds) {
|
||||
return appLocationService.delete(appLocationIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取APP位置信息详细信息
|
||||
*/
|
||||
public AppLocationPO getInfo(Long appLocationId)
|
||||
{
|
||||
return appLocationService.getInfo(appLocationId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.mhd.user.domain.driverCurrentPosition.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
/**
|
||||
* 司机当前位置信息对象 driver_current_position
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DriverCurrentPosition extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("司机位置id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long driverCurrentPositionId;
|
||||
|
||||
@ApiModelProperty("用户表ID")
|
||||
@Excel(name = "用户表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
@Excel(name = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
@Excel(name = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty("位置信息")
|
||||
@Excel(name = "位置信息")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String licensePlate;
|
||||
|
||||
@ApiModelProperty("行进方向")
|
||||
@Excel(name = "行进方向")
|
||||
private String drivingDirection;
|
||||
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.mhd.user.domain.driverCurrentPosition.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.user.domain.driverCurrentPosition.entity.DriverCurrentPosition;
|
||||
import com.mhd.common.core.domain.DriverCurrentPositionPO;
|
||||
import com.mhd.user.domain.driverCurrentPosition.repository.todo.DriverCurrentPositionDO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 司机当前位置信息Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
public interface IDriverCurrentPositionService extends IService<DriverCurrentPosition>
|
||||
{
|
||||
/**
|
||||
* 分页查询司机当前位置信息列表
|
||||
*/
|
||||
public List<DriverCurrentPositionPO> queryList(DriverCurrentPositionDO driverCurrentPositionDO);
|
||||
|
||||
/**
|
||||
* 新增司机当前位置信息
|
||||
*/
|
||||
public Boolean insert(DriverCurrentPositionDO driverCurrentPositionDO);
|
||||
|
||||
/**
|
||||
* 修改司机当前位置信息
|
||||
*/
|
||||
public Boolean update(DriverCurrentPositionDO driverCurrentPositionDO);
|
||||
|
||||
/**
|
||||
* 批量删除司机当前位置信息
|
||||
*/
|
||||
public Boolean delete(Long[] driverCurrentPositionIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询司机当前位置信息
|
||||
*/
|
||||
public DriverCurrentPositionPO getInfo(Long driverCurrentPositionId);
|
||||
|
||||
DriverCurrentPositionPO getDriverLatestLocation(Long userId);
|
||||
|
||||
List<Long> getOnlineDriver(Date time);
|
||||
|
||||
List<DriverCurrentPositionPO> getOnlineVehicle(Date time);
|
||||
|
||||
List<DriverCurrentPositionPO> getOfflineVehicle(Date time);
|
||||
|
||||
DriverCurrentPositionPO getVehicleLatestLocation(String licensePlate);
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.mhd.user.domain.driverCurrentPosition.repository.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.driverCurrentPosition.entity.DriverCurrentPosition;
|
||||
import com.mhd.common.core.domain.DriverCurrentPositionPO;
|
||||
import com.mhd.user.domain.driverCurrentPosition.repository.todo.DriverCurrentPositionDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 司机当前位置信息Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
public interface DriverCurrentPositionMapper extends BaseMapper<DriverCurrentPosition>
|
||||
{
|
||||
/**
|
||||
* 查询司机当前位置信息列表
|
||||
*/
|
||||
public List<DriverCurrentPositionPO> queryList(DriverCurrentPositionDO driverCurrentPositionDO);
|
||||
|
||||
DriverCurrentPositionPO getDriverLatestLocation(@Param("userId") Long userId);
|
||||
|
||||
List<Long> getOnlineDriver(@Param("time") Date time);
|
||||
|
||||
List<DriverCurrentPositionPO> getOnlineVehicle(@Param("time") Date time);
|
||||
|
||||
List<DriverCurrentPositionPO> getOfflineVehicle(@Param("time") Date time);
|
||||
|
||||
DriverCurrentPositionPO getVehicleLatestLocation(String licensePlate);
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package com.mhd.user.domain.driverCurrentPosition.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.user.domain.driverCurrentPosition.entity.DriverCurrentPosition;
|
||||
import com.mhd.user.domain.driverCurrentPosition.repository.facade.IDriverCurrentPositionService;
|
||||
import com.mhd.user.domain.driverCurrentPosition.repository.mapper.DriverCurrentPositionMapper;
|
||||
import com.mhd.common.core.domain.DriverCurrentPositionPO;
|
||||
import com.mhd.user.domain.driverCurrentPosition.repository.todo.DriverCurrentPositionDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 司机当前位置信息Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
@Service
|
||||
public class DriverCurrentPositionImpl extends ServiceImpl<DriverCurrentPositionMapper, DriverCurrentPosition> implements IDriverCurrentPositionService{
|
||||
@Autowired
|
||||
private DriverCurrentPositionMapper driverCurrentPositionMapper;
|
||||
|
||||
/**
|
||||
* 查询司机当前位置信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<DriverCurrentPositionPO> queryList(DriverCurrentPositionDO driverCurrentPositionDO)
|
||||
{
|
||||
return driverCurrentPositionMapper.queryList(driverCurrentPositionDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增司机当前位置信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(DriverCurrentPositionDO driverCurrentPositionDO) {
|
||||
DriverCurrentPosition driverCurrentPosition = new DriverCurrentPosition();
|
||||
BeanUtils.copyProperties(driverCurrentPositionDO,driverCurrentPosition);
|
||||
return this.save(driverCurrentPosition);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改司机当前位置信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(DriverCurrentPositionDO driverCurrentPositionDO) {
|
||||
DriverCurrentPosition driverCurrentPosition = new DriverCurrentPosition();
|
||||
BeanUtils.copyProperties(driverCurrentPositionDO,driverCurrentPosition);
|
||||
return this.updateById(driverCurrentPosition);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除司机当前位置信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] driverCurrentPositionIds ) {
|
||||
List<DriverCurrentPosition> list = new ArrayList<>();
|
||||
for (Long id : driverCurrentPositionIds) {
|
||||
DriverCurrentPosition driverCurrentPosition = new DriverCurrentPosition();
|
||||
driverCurrentPosition.setDriverCurrentPositionId(id);
|
||||
driverCurrentPosition.setDelFlag(2);
|
||||
list.add(driverCurrentPosition);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改司机当前位置信息
|
||||
*/
|
||||
@Override
|
||||
public DriverCurrentPositionPO getInfo(Long driverCurrentPositionId) {
|
||||
DriverCurrentPosition driverCurrentPosition = this.getById(driverCurrentPositionId);
|
||||
DriverCurrentPositionPO driverCurrentPositionPO = new DriverCurrentPositionPO();
|
||||
BeanUtils.copyProperties(driverCurrentPosition,driverCurrentPositionPO);
|
||||
return driverCurrentPositionPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DriverCurrentPositionPO getDriverLatestLocation(Long userId) {
|
||||
return driverCurrentPositionMapper.getDriverLatestLocation(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> getOnlineDriver(Date time) {
|
||||
return driverCurrentPositionMapper.getOnlineDriver(time);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DriverCurrentPositionPO> getOnlineVehicle(Date time) {
|
||||
return driverCurrentPositionMapper.getOnlineVehicle(time);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DriverCurrentPositionPO> getOfflineVehicle(Date time) {
|
||||
return driverCurrentPositionMapper.getOfflineVehicle(time);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DriverCurrentPositionPO getVehicleLatestLocation(String licensePlate) {
|
||||
return driverCurrentPositionMapper.getVehicleLatestLocation(licensePlate);
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package com.mhd.user.domain.driverCurrentPosition.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 司机当前位置信息对象 driver_current_position
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DriverCurrentPositionDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("司机位置id")
|
||||
private Long driverCurrentPositionId;
|
||||
|
||||
@ApiModelProperty("用户表ID")
|
||||
@Excel(name = "用户表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
@Excel(name = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
@Excel(name = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty("位置信息")
|
||||
@Excel(name = "位置信息")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String licensePlate;
|
||||
|
||||
@ApiModelProperty("行进方向")
|
||||
@Excel(name = "行进方向")
|
||||
private String drivingDirection;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.mhd.user.domain.driverCurrentPosition.service;
|
||||
|
||||
import com.mhd.user.domain.driverCurrentPosition.repository.facade.IDriverCurrentPositionService;
|
||||
import com.mhd.common.core.domain.DriverCurrentPositionPO;
|
||||
import com.mhd.user.domain.driverCurrentPosition.repository.todo.DriverCurrentPositionDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 司机当前位置信息
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-04
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DriverCurrentPositionDomainService {
|
||||
|
||||
@Autowired
|
||||
private IDriverCurrentPositionService driverCurrentPositionService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询司机当前位置信息列表
|
||||
*/
|
||||
public List<DriverCurrentPositionPO> queryList(DriverCurrentPositionDO driverCurrentPositionDO) {
|
||||
return driverCurrentPositionService.queryList(driverCurrentPositionDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增司机当前位置信息
|
||||
*/
|
||||
public Boolean insert(DriverCurrentPositionDO driverCurrentPositionDO) {
|
||||
|
||||
return driverCurrentPositionService.insert(driverCurrentPositionDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改司机当前位置信息
|
||||
*/
|
||||
public Boolean update(DriverCurrentPositionDO driverCurrentPositionDO) {
|
||||
return driverCurrentPositionService.update(driverCurrentPositionDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除司机当前位置信息
|
||||
*/
|
||||
public Boolean delete(Long[] driverCurrentPositionIds) {
|
||||
return driverCurrentPositionService.delete(driverCurrentPositionIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取司机当前位置信息详细信息
|
||||
*/
|
||||
public DriverCurrentPositionPO getInfo(Long driverCurrentPositionId)
|
||||
{
|
||||
return driverCurrentPositionService.getInfo(driverCurrentPositionId);
|
||||
}
|
||||
|
||||
|
||||
public DriverCurrentPositionPO getDriverLatestLocation(Long userId) {
|
||||
return driverCurrentPositionService.getDriverLatestLocation(userId);
|
||||
}
|
||||
|
||||
public List<Long> getOnlineDriver(Date time) {
|
||||
return driverCurrentPositionService.getOnlineDriver(time);
|
||||
}
|
||||
|
||||
public List<DriverCurrentPositionPO> getOnlineVehicle(Date time) {
|
||||
return driverCurrentPositionService.getOnlineVehicle(time);
|
||||
}
|
||||
|
||||
public List<DriverCurrentPositionPO> getOfflineVehicle(Date time) {
|
||||
return driverCurrentPositionService.getOfflineVehicle(time);
|
||||
}
|
||||
|
||||
public DriverCurrentPositionPO getVehicleLatestLocation(String licensePlate) {
|
||||
return driverCurrentPositionService.getVehicleLatestLocation(licensePlate);
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.mhd.user.domain.driverFollowShipper.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
/**
|
||||
* 车主关注货主对象 driver_follow_shipper
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DriverFollowShipper extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long driverFollowShipperId;
|
||||
|
||||
@ApiModelProperty("司机用户主表ID(车主)")
|
||||
@Excel(name = "司机用户主表ID(车主)")
|
||||
private Long driverUserId;
|
||||
|
||||
@ApiModelProperty("货主用户主表ID")
|
||||
@Excel(name = "货主用户主表ID")
|
||||
private Long shipperUserId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织表name")
|
||||
@Excel(name = "组织表name")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.mhd.user.domain.driverFollowShipper.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.user.domain.driverFollowShipper.entity.DriverFollowShipper;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.po.DriverFollowShipperPO;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.todo.DriverFollowShipperDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车主关注货主Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
public interface IDriverFollowShipperService extends IService<DriverFollowShipper>
|
||||
{
|
||||
/**
|
||||
* 分页查询车主关注货主列表
|
||||
*/
|
||||
public List<DriverFollowShipperPO> queryList(DriverFollowShipperDO driverFollowShipperDO);
|
||||
|
||||
/**
|
||||
* 新增车主关注货主
|
||||
*/
|
||||
public Boolean insert(DriverFollowShipperDO driverFollowShipperDO);
|
||||
|
||||
/**
|
||||
* 修改车主关注货主
|
||||
*/
|
||||
public Boolean update(DriverFollowShipperDO driverFollowShipperDO);
|
||||
|
||||
/**
|
||||
* 批量删除车主关注货主
|
||||
*/
|
||||
public Boolean delete(Long[] driverFollowShipperIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询车主关注货主
|
||||
*/
|
||||
public DriverFollowShipperPO getInfo(Long driverFollowShipperId);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.mhd.user.domain.driverFollowShipper.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.driverFollowShipper.entity.DriverFollowShipper;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.po.DriverFollowShipperPO;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.todo.DriverFollowShipperDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
/**
|
||||
* 车主关注货主Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
public interface DriverFollowShipperMapper extends BaseMapper<DriverFollowShipper>
|
||||
{
|
||||
/**
|
||||
* 查询车主关注货主列表
|
||||
*/
|
||||
public List<DriverFollowShipperPO> queryList(DriverFollowShipperDO driverFollowShipperDO);
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.mhd.user.domain.driverFollowShipper.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.user.domain.driverFollowShipper.entity.DriverFollowShipper;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.facade.IDriverFollowShipperService;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.mapper.DriverFollowShipperMapper;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.po.DriverFollowShipperPO;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.todo.DriverFollowShipperDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车主关注货主Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
@Service
|
||||
public class DriverFollowShipperImpl extends ServiceImpl<DriverFollowShipperMapper, DriverFollowShipper> implements IDriverFollowShipperService{
|
||||
@Autowired
|
||||
private DriverFollowShipperMapper driverFollowShipperMapper;
|
||||
|
||||
/**
|
||||
* 查询车主关注货主列表
|
||||
*/
|
||||
@Override
|
||||
public List<DriverFollowShipperPO> queryList(DriverFollowShipperDO driverFollowShipperDO)
|
||||
{
|
||||
return driverFollowShipperMapper.queryList(driverFollowShipperDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车主关注货主
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(DriverFollowShipperDO driverFollowShipperDO) {
|
||||
DriverFollowShipper driverFollowShipper = new DriverFollowShipper();
|
||||
BeanUtils.copyProperties(driverFollowShipperDO,driverFollowShipper);
|
||||
return this.save(driverFollowShipper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车主关注货主
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(DriverFollowShipperDO driverFollowShipperDO) {
|
||||
DriverFollowShipper driverFollowShipper = new DriverFollowShipper();
|
||||
BeanUtils.copyProperties(driverFollowShipperDO,driverFollowShipper);
|
||||
return this.updateById(driverFollowShipper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车主关注货主
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] driverFollowShipperIds ) {
|
||||
List<DriverFollowShipper> list = new ArrayList<>();
|
||||
for (Long id : driverFollowShipperIds) {
|
||||
DriverFollowShipper driverFollowShipper = new DriverFollowShipper();
|
||||
driverFollowShipper.setDriverFollowShipperId(id);
|
||||
driverFollowShipper.setDelFlag(2);
|
||||
list.add(driverFollowShipper);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车主关注货主
|
||||
*/
|
||||
@Override
|
||||
public DriverFollowShipperPO getInfo(Long driverFollowShipperId) {
|
||||
DriverFollowShipper driverFollowShipper = this.getById(driverFollowShipperId);
|
||||
DriverFollowShipperPO driverFollowShipperPO = new DriverFollowShipperPO();
|
||||
BeanUtils.copyProperties(driverFollowShipper,driverFollowShipperPO);
|
||||
return driverFollowShipperPO;
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.mhd.user.domain.driverFollowShipper.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 车主关注货主对象 driver_follow_shipper
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "车主关注货主对象", description = "车主关注货主响应对象")
|
||||
public class DriverFollowShipperPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
private Long driverFollowShipperId;
|
||||
|
||||
@ApiModelProperty("司机用户主表ID(车主)")
|
||||
@Excel(name = "司机用户主表ID(车主)")
|
||||
private Long driverUserId;
|
||||
|
||||
@ApiModelProperty("货主用户主表ID")
|
||||
@Excel(name = "货主用户主表ID")
|
||||
private Long shipperUserId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织表name")
|
||||
@Excel(name = "组织表name")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.mhd.user.domain.driverFollowShipper.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 车主关注货主对象 driver_follow_shipper
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DriverFollowShipperDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
private Long driverFollowShipperId;
|
||||
|
||||
@ApiModelProperty("司机用户主表ID(车主)")
|
||||
@Excel(name = "司机用户主表ID(车主)")
|
||||
private Long driverUserId;
|
||||
|
||||
@ApiModelProperty("货主用户主表ID")
|
||||
@Excel(name = "货主用户主表ID")
|
||||
private Long shipperUserId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织表name")
|
||||
@Excel(name = "组织表name")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("用户操作类型(1-关注,2-取消关注)")
|
||||
private Integer followType;
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.mhd.user.domain.driverFollowShipper.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mhd.user.domain.driverFollowShipper.entity.DriverFollowShipper;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.facade.IDriverFollowShipperService;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.po.DriverFollowShipperPO;
|
||||
import com.mhd.user.domain.driverFollowShipper.repository.todo.DriverFollowShipperDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 车主关注货主
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DriverFollowShipperDomainService {
|
||||
|
||||
@Autowired
|
||||
private IDriverFollowShipperService driverFollowShipperService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询车主关注货主列表
|
||||
*/
|
||||
public List<DriverFollowShipperPO> queryList(DriverFollowShipperDO driverFollowShipperDO) {
|
||||
return driverFollowShipperService.queryList(driverFollowShipperDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增车主关注货主
|
||||
*/
|
||||
public Boolean insert(DriverFollowShipperDO driverFollowShipperDO) {
|
||||
|
||||
return driverFollowShipperService.insert(driverFollowShipperDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车主关注货主
|
||||
*/
|
||||
public Boolean update(DriverFollowShipperDO driverFollowShipperDO) {
|
||||
return driverFollowShipperService.update(driverFollowShipperDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车主关注货主
|
||||
*/
|
||||
public Boolean delete(Long[] driverFollowShipperIds) {
|
||||
return driverFollowShipperService.delete(driverFollowShipperIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车主关注货主详细信息
|
||||
*/
|
||||
public DriverFollowShipperPO getInfo(Long driverFollowShipperId)
|
||||
{
|
||||
return driverFollowShipperService.getInfo(driverFollowShipperId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据货主用户id 删除司机关注
|
||||
* @param shipperUserId 货主用户id
|
||||
* @param driverUserId 司机用户id
|
||||
* @return
|
||||
*/
|
||||
public boolean deleteByShipperUserId(Long shipperUserId, Long driverUserId) {
|
||||
LambdaQueryWrapper<DriverFollowShipper> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(DriverFollowShipper::getDelFlag,0);
|
||||
queryWrapper.eq(DriverFollowShipper::getShipperUserId,shipperUserId);
|
||||
queryWrapper.eq(DriverFollowShipper::getDriverUserId,driverUserId);
|
||||
return driverFollowShipperService.remove(queryWrapper);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.mhd.user.domain.motorcade.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 车队对象 motorcade
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
@Data
|
||||
public class Motorcade extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车队id */
|
||||
@ApiModelProperty("车队id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long motorcadeId;
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
/** 车队名称 */
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
/** 车队头像 */
|
||||
@ApiModelProperty("车队头像")
|
||||
@Excel(name = "车队头像")
|
||||
private String motorcadeImage;
|
||||
/** 车队介绍 */
|
||||
@ApiModelProperty("车队介绍")
|
||||
@Excel(name = "车队介绍")
|
||||
private String motorcadeDescribtion;
|
||||
/** 车队认证状态(1.正在审核2.认证成功3.认证失败) */
|
||||
@ApiModelProperty("车队认证状态(1.正在审核2.认证成功3.认证失败)")
|
||||
@Excel(name = "车队认证状态", readConverterExp = "1=.正在审核2.认证成功3.认证失败")
|
||||
private Long motorcadeStatus;
|
||||
@ApiModelProperty("车队审核备注")
|
||||
@Excel(name = "车队审核备注")
|
||||
private String motorcadeRejectReason;
|
||||
/** 车队队长userId */
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长名称")
|
||||
@Excel(name = "车队队长名称")
|
||||
private String motorcadeHeaderName;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长账号")
|
||||
@Excel(name = "车队队长账号")
|
||||
private String motorcadeHeaderAccount;
|
||||
/** 车队评分 */
|
||||
@ApiModelProperty("车队评分")
|
||||
@Excel(name = "车队评分")
|
||||
private BigDecimal motorcadeScore;
|
||||
/** 审核人员id */
|
||||
@ApiModelProperty("审核人员id")
|
||||
@Excel(name = "审核人员id")
|
||||
private Long checkPersonId;
|
||||
/** 审核人员名称 */
|
||||
@ApiModelProperty("审核人员名称")
|
||||
@Excel(name = "审核人员名称")
|
||||
private String checkPersonName;
|
||||
/** 审核时间 */
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date checkPersonTime;
|
||||
/** 车队状态(0-无状态,1-正常,2-解散,3-黑名单) */
|
||||
@ApiModelProperty("车队状态(0-无状态,1-正常,2-解散,3-黑名单)")
|
||||
@Excel(name = "车队状态(0-无状态,1-正常,2-解散,3-黑名单)")
|
||||
private Long motorcadeDissolutionStatus;
|
||||
|
||||
/** 黑名单备注 */
|
||||
@ApiModelProperty("黑名单备注")
|
||||
@Excel(name = "黑名单备注")
|
||||
private String blackListReason;
|
||||
|
||||
@ApiModelProperty(name = "承运商编码")
|
||||
private String driverEnterpriseCode;
|
||||
|
||||
@ApiModelProperty(value = "数据来源(1-数字物流 2-TMS)")
|
||||
private Integer dataSources;
|
||||
@ApiModelProperty(value = "是否默认车队(1-是 2-否)")
|
||||
private Integer defaultFlag;
|
||||
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.mhd.user.domain.motorcade.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 车队司机记录对象 motorcade_record
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadeDriver extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车队司机表 */
|
||||
@ApiModelProperty("车队司机表")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long motorcadeDriverId;
|
||||
/** 用户id */
|
||||
@ApiModelProperty("用户id")
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
/** 车队id */
|
||||
@ApiModelProperty("车队id")
|
||||
@Excel(name = "车队id")
|
||||
private Long motorcadeId;
|
||||
|
||||
@ApiModelProperty(name = "tms推送状态: 1-未推送 2- 已推送")
|
||||
private Integer tmsPushStatus;
|
||||
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.mhd.user.domain.motorcade.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 车队邀请记录对象 motorcade_record
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadeRecord extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车队邀请记录表 */
|
||||
@ApiModelProperty("车队邀请记录表")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long motorcadeRecordId;
|
||||
/** 用户id */
|
||||
@ApiModelProperty("用户id")
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
/** 车队id */
|
||||
@ApiModelProperty("车队id")
|
||||
@Excel(name = "车队id")
|
||||
private Long motorcadeId;
|
||||
/** 车队名称 */
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
/** 车队头像 */
|
||||
@ApiModelProperty("车队头像")
|
||||
@Excel(name = "车队头像")
|
||||
private String motorcadeImage;
|
||||
/** 车队介绍 */
|
||||
@ApiModelProperty("车队介绍")
|
||||
@Excel(name = "车队介绍")
|
||||
private String motorcadeDescribtion;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长名称")
|
||||
@Excel(name = "车队队长名称")
|
||||
private String motorcadeHeaderName;
|
||||
/** 车队评分 */
|
||||
@ApiModelProperty("车队评分")
|
||||
@Excel(name = "车队评分")
|
||||
private BigDecimal motorcadeScore;
|
||||
/** 车队认证状态(0.无状态1.已加入2.已拒绝3.已退出) */
|
||||
@ApiModelProperty("车队认证状态(0.无状态1.已加入2.已拒绝3.已退出)")
|
||||
@Excel(name = "车队认证状态", readConverterExp = "0=.无状态1.已加入2.已拒绝3.已退出")
|
||||
private Long motorcadeRecordStatus;
|
||||
/** 接受邀请时间/退出时间 */
|
||||
@ApiModelProperty("接受邀请时间/退出时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date recordTime;
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.mhd.user.domain.motorcade.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeDriver;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeRecord;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeRecordPo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeRecordDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车队司机Service接口
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
public interface MotorcadeDriverRepositoryInterface extends IService<MotorcadeDriver>
|
||||
{
|
||||
|
||||
/**
|
||||
* 根据用户查询车队id
|
||||
*/
|
||||
public List<Long> selectMotorcadeIdByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据车队id查询司机id
|
||||
*/
|
||||
public List<MotorcadeDriverPo> selectDriverIdByMotorcadeId(List<Long> motorcadeIds);
|
||||
|
||||
/**
|
||||
* 新增车队司机
|
||||
*/
|
||||
public Boolean insert(MotorcadeDriver motorcadeDriver);
|
||||
|
||||
/**
|
||||
* 批量删除车队司机
|
||||
*/
|
||||
public Boolean delete(Long[] motorcadeDriverIds);
|
||||
|
||||
/**
|
||||
* 批量新增车队司机
|
||||
*
|
||||
* @param list 车队司机集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchAddMotorcadeDriver(List<MotorcadeDriver> list);
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.mhd.user.domain.motorcade.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.user.domain.motorcade.entity.Motorcade;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeRecord;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverAppPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeRecordPo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeRecordDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车队邀请记录Service接口
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
public interface MotorcadeRecordRepositoryInterface extends IService<MotorcadeRecord>
|
||||
{
|
||||
/**
|
||||
* 分页查询车队邀请记录列表
|
||||
*/
|
||||
public List<MotorcadeRecordPo> queryList(MotorcadeRecordDO motorcadeRecordDo);
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表(是否新邀请)
|
||||
*/
|
||||
public List<MotorcadeRecordPo> selectRecordList(MotorcadeRecordDO motorcadeRecordDo);
|
||||
|
||||
/**
|
||||
* 新增车队邀请记录
|
||||
*/
|
||||
public Boolean insert(MotorcadeRecordDO motorcadeRecordDo);
|
||||
|
||||
/**
|
||||
* 修改车队邀请记录
|
||||
*/
|
||||
public Boolean update(MotorcadeRecordDO motorcadeRecordDo);
|
||||
|
||||
/**
|
||||
* 批量删除车队邀请记录
|
||||
*/
|
||||
public Boolean delete(Long[] motorcadeRecordIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录
|
||||
*/
|
||||
public MotorcadeRecordPo getInfo(Long motorcadeRecordId);
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表
|
||||
*/
|
||||
List<MotorcadeDriverAppPo> invitationRecordList(MotorcadeRecordDO motorcadeRecordDo);
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表 -PC
|
||||
*/
|
||||
List<MotorcadeRecordPo> invitationRecordListPC(MotorcadeRecordDO motorcadeRecordDo);
|
||||
|
||||
List<MotorcadeRecord> getByMotorHeaderId(Long userId);
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
package com.mhd.user.domain.motorcade.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.user.domain.motorcade.entity.Motorcade;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeDriver;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeAppPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadePo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDO;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDriverDO;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserDriverPo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车队Service接口
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
public interface MotorcadeRepositoryInterface extends IService<Motorcade>
|
||||
{
|
||||
/**
|
||||
* 分页查询车队列表
|
||||
*/
|
||||
public List<MotorcadePo> queryList(MotorcadeDO motorcadeDo);
|
||||
|
||||
/**
|
||||
* 查询我加入的所以车队id
|
||||
*/
|
||||
public List<Long> selectMotorcadeIdList(Long driverId);
|
||||
|
||||
/**
|
||||
* 新增车队
|
||||
*/
|
||||
public Motorcade insert(MotorcadeDO motorcadeDo);
|
||||
|
||||
/**
|
||||
* 修改车队
|
||||
*/
|
||||
public Boolean update(MotorcadeDO motorcadeDo);
|
||||
|
||||
/**
|
||||
* 批量删除车队
|
||||
*/
|
||||
public Boolean delete(Long[] motorcadeIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询车队
|
||||
*/
|
||||
public MotorcadePo getInfo(Long motorcadeId);
|
||||
|
||||
/**
|
||||
* 根据车队长id,查询该车队长下所有司机信息
|
||||
* @param driverId
|
||||
* @return
|
||||
*/
|
||||
List<MotorcadeDriver> selectMotorcadeDriverByDriverId(Long driverId);
|
||||
|
||||
/**
|
||||
* APP查询当前用户车队列表信息
|
||||
* @param motorcadeDo
|
||||
* @return
|
||||
*/
|
||||
List<MotorcadeAppPo> queryMyMotorcadeList(MotorcadeDO motorcadeDo);
|
||||
|
||||
List<MotorcadeDriverPo> getDriverListById(MotorcadeDO motorcadeDo);
|
||||
|
||||
List<UserDriverPo> fleetInviteDriverList(MotorcadeDriverDO motorcadeDriverDO);
|
||||
|
||||
List<MotorcadePo> getAllOtherMotorcade(Long userId);
|
||||
|
||||
List<MotorcadePo> queryNonePagingList(Long organizationId);
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.mhd.user.domain.motorcade.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeDriver;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeRecord;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadePo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeRecordPo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDO;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeRecordDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车队司机Mapper接口
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
public interface MotorcadeDriverMapper extends BaseMapper<MotorcadeDriver>
|
||||
{
|
||||
|
||||
/**
|
||||
* 根据用户查询车队id
|
||||
*/
|
||||
public List<Long> selectMotorcadeIdByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据车队id查询司机id
|
||||
*/
|
||||
public List<MotorcadeDriverPo> selectDriverIdByMotorcadeId(@Param("motorcadeIds") List<Long> motorcadeIds);
|
||||
|
||||
/**
|
||||
* 批量新增车队司机
|
||||
*
|
||||
* @param list 车队司机集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchAddMotorcadeDriver(List<MotorcadeDriver> list);
|
||||
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.mhd.user.domain.motorcade.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.motorcade.entity.Motorcade;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeDriver;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeAppPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadePo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDO;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDriverDO;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserDriverPo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 车队Mapper接口
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
public interface MotorcadeMapper extends BaseMapper<Motorcade>
|
||||
{
|
||||
/**
|
||||
* 查询车队列表
|
||||
*/
|
||||
public List<MotorcadePo> queryList(MotorcadeDO motorcadeDo);
|
||||
|
||||
List<MotorcadePo> queryNonePagingList(@Param("organizationId") Long organizationId);
|
||||
|
||||
/**
|
||||
* 查询我加入的所以车队id
|
||||
*/
|
||||
public List<Long> selectMotorcadeIdList(Long driverId);
|
||||
|
||||
/**
|
||||
* 根据车队长id,查询该车队长下所有司机信息
|
||||
* @param driverId
|
||||
* @return
|
||||
*/
|
||||
List<MotorcadeDriver> selectMotorcadeDriverByDriverId(@Param("driverId") Long driverId);
|
||||
|
||||
/**
|
||||
* APP查询当前用户车队列表信息
|
||||
* @param motorcadeDo
|
||||
* @return
|
||||
*/
|
||||
List<MotorcadeAppPo> queryMyMotorcadeList(@Param("motorcadeDo") MotorcadeDO motorcadeDo);
|
||||
|
||||
/**
|
||||
* 根据车队Id查询司机列表
|
||||
* @param motorcadeDo
|
||||
* @return
|
||||
*/
|
||||
List<MotorcadeDriverPo> getDriverListById(@Param("motorcadeDo") MotorcadeDO motorcadeDo);
|
||||
|
||||
List<UserDriverPo> fleetInviteDriverList(@Param("motorcadeDriverDO") MotorcadeDriverDO motorcadeDriverDO);
|
||||
|
||||
@Select("SELECT m.* FROM `motorcade_driver` md LEFT JOIN motorcade m ON md.motorcade_id = m.motorcade_id WHERE md.del_flag = 1 AND m.del_flag = 1 AND md.user_id = #{userId} AND m.motorcade_header_id != #{userId}")
|
||||
List<MotorcadePo> getAllOtherMotorcade(@Param("userId") Long userId);
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.mhd.user.domain.motorcade.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeRecord;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverAppPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeRecordPo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeRecordDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 车队邀请记录Mapper接口
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
public interface MotorcadeRecordMapper extends BaseMapper<MotorcadeRecord>
|
||||
{
|
||||
/**
|
||||
* 查询车队邀请记录列表
|
||||
*/
|
||||
public List<MotorcadeRecordPo> queryList(@Param("motorcadeRecordDo") MotorcadeRecordDO motorcadeRecordDo);
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表(是否新邀请)
|
||||
*/
|
||||
public List<MotorcadeRecordPo> selectRecordList(MotorcadeRecordDO motorcadeRecordDo);
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表
|
||||
*/
|
||||
List<MotorcadeDriverAppPo> invitationRecordList(@Param("motorcadeRecordDo")MotorcadeRecordDO motorcadeRecordDo);
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表 - PC
|
||||
*/
|
||||
List<MotorcadeRecordPo> invitationRecordListPC(@Param("motorcadeRecordDo")MotorcadeRecordDO motorcadeRecordDo);
|
||||
|
||||
@Select("SELECT * FROM `motorcade_record` WHERE del_flag = 1 AND motorcade_id IN (SELECT motorcade_id FROM motorcade WHERE del_flag = 1 and motorcade_header_id = #{userId})")
|
||||
List<MotorcadeRecord> getByMotorHeaderId(@Param("userId") Long userId);
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.mhd.user.domain.motorcade.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeDriver;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeRecord;
|
||||
import com.mhd.user.domain.motorcade.repository.facade.MotorcadeDriverRepositoryInterface;
|
||||
import com.mhd.user.domain.motorcade.repository.facade.MotorcadeRecordRepositoryInterface;
|
||||
import com.mhd.user.domain.motorcade.repository.mapper.MotorcadeDriverMapper;
|
||||
import com.mhd.user.domain.motorcade.repository.mapper.MotorcadeRecordMapper;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeRecordPo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeRecordDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车队司机Service业务层处理
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
@Service
|
||||
public class MotorcadeDriverRepositoryImpl extends ServiceImpl<MotorcadeDriverMapper, MotorcadeDriver> implements MotorcadeDriverRepositoryInterface {
|
||||
|
||||
@Autowired
|
||||
private MotorcadeDriverMapper motorcadeDriverMapper;
|
||||
|
||||
/**
|
||||
* 根据用户查询车队id
|
||||
*/
|
||||
@Override
|
||||
public List<Long> selectMotorcadeIdByUserId(Long userId){
|
||||
return motorcadeDriverMapper.selectMotorcadeIdByUserId(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车队id查询司机id
|
||||
*/
|
||||
@Override
|
||||
public List<MotorcadeDriverPo> selectDriverIdByMotorcadeId(List<Long> motorcadeIds){
|
||||
return motorcadeDriverMapper.selectDriverIdByMotorcadeId(motorcadeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车队司机
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(MotorcadeDriver motorcadeDriver) {
|
||||
return this.save(motorcadeDriver);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队司机
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] motorcadeDriverIds ) {
|
||||
List<MotorcadeDriver> list = new ArrayList<>();
|
||||
for (Long id : motorcadeDriverIds) {
|
||||
MotorcadeDriver motorcadeDriver = new MotorcadeDriver();
|
||||
motorcadeDriver.setMotorcadeDriverId(id);
|
||||
motorcadeDriver.setDelFlag(2);
|
||||
list.add(motorcadeDriver);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增车队司机
|
||||
*
|
||||
* @param list 车队司机集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int batchAddMotorcadeDriver(List<MotorcadeDriver> list){
|
||||
return motorcadeDriverMapper.batchAddMotorcadeDriver(list);
|
||||
}
|
||||
}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
package com.mhd.user.domain.motorcade.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.user.domain.motorcade.entity.Motorcade;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeRecord;
|
||||
import com.mhd.user.domain.motorcade.repository.facade.MotorcadeRecordRepositoryInterface;
|
||||
import com.mhd.user.domain.motorcade.repository.mapper.MotorcadeRecordMapper;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverAppPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeRecordPo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeRecordDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车队邀请记录Service业务层处理
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
@Service
|
||||
public class MotorcadeRecordRepositoryImpl extends ServiceImpl<MotorcadeRecordMapper, MotorcadeRecord> implements MotorcadeRecordRepositoryInterface {
|
||||
@Autowired
|
||||
private MotorcadeRecordMapper motorcadeRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<MotorcadeRecordPo> queryList(MotorcadeRecordDO motorcadeRecordDo)
|
||||
{
|
||||
return motorcadeRecordMapper.queryList(motorcadeRecordDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表(是否新邀请)
|
||||
*/
|
||||
@Override
|
||||
public List<MotorcadeRecordPo> selectRecordList(MotorcadeRecordDO motorcadeRecordDo){
|
||||
return motorcadeRecordMapper.selectRecordList(motorcadeRecordDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车队邀请记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(MotorcadeRecordDO motorcadeRecordDo) {
|
||||
MotorcadeRecord motorcadeRecord = new MotorcadeRecord();
|
||||
BeanUtils.copyProperties(motorcadeRecordDo,motorcadeRecord);
|
||||
return this.save(motorcadeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车队邀请记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(MotorcadeRecordDO motorcadeRecordDo) {
|
||||
MotorcadeRecord motorcadeRecord = new MotorcadeRecord();
|
||||
BeanUtils.copyProperties(motorcadeRecordDo,motorcadeRecord);
|
||||
return this.updateById(motorcadeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队邀请记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] motorcadeRecordIds ) {
|
||||
List<MotorcadeRecord> list = new ArrayList<>();
|
||||
for (Long id : motorcadeRecordIds) {
|
||||
MotorcadeRecord motorcadeRecord = new MotorcadeRecord();
|
||||
motorcadeRecord.setMotorcadeRecordId(id);
|
||||
motorcadeRecord.setDelFlag(2);
|
||||
list.add(motorcadeRecord);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车队邀请记录
|
||||
*/
|
||||
@Override
|
||||
public MotorcadeRecordPo getInfo(Long motorcadeRecordId) {
|
||||
LambdaQueryWrapper<MotorcadeRecord> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MotorcadeRecord::getMotorcadeRecordId,motorcadeRecordId);
|
||||
queryWrapper.eq(MotorcadeRecord::getDelFlag,1);
|
||||
MotorcadeRecord motorcadeRecord = this.getOne(queryWrapper);
|
||||
MotorcadeRecordPo motorcadeRecordPo = new MotorcadeRecordPo();
|
||||
if(null == motorcadeRecord){
|
||||
return null;
|
||||
}
|
||||
BeanUtils.copyProperties(motorcadeRecord,motorcadeRecordPo);
|
||||
return motorcadeRecordPo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<MotorcadeDriverAppPo> invitationRecordList(MotorcadeRecordDO motorcadeRecordDo) {
|
||||
return motorcadeRecordMapper.invitationRecordList(motorcadeRecordDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表 - PC
|
||||
*/
|
||||
@Override
|
||||
public List<MotorcadeRecordPo> invitationRecordListPC(MotorcadeRecordDO motorcadeRecordDo) {
|
||||
return motorcadeRecordMapper.invitationRecordListPC(motorcadeRecordDo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MotorcadeRecord> getByMotorHeaderId(Long userId) {
|
||||
return motorcadeRecordMapper.getByMotorHeaderId(userId);
|
||||
}
|
||||
}
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
package com.mhd.user.domain.motorcade.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.user.domain.motorcade.entity.Motorcade;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeDriver;
|
||||
import com.mhd.user.domain.motorcade.repository.facade.MotorcadeRepositoryInterface;
|
||||
import com.mhd.user.domain.motorcade.repository.mapper.MotorcadeMapper;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeAppPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadePo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDO;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDriverDO;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserDriverPo;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车队Service业务层处理
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
@Service
|
||||
public class MotorcadeRepositoryImpl extends ServiceImpl<MotorcadeMapper, Motorcade> implements MotorcadeRepositoryInterface {
|
||||
@Autowired
|
||||
private MotorcadeMapper motorcadeMapper;
|
||||
|
||||
/**
|
||||
* 查询车队列表
|
||||
*/
|
||||
@Override
|
||||
public List<MotorcadePo> queryList(MotorcadeDO motorcadeDo)
|
||||
{
|
||||
return motorcadeMapper.queryList(motorcadeDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我加入的所以车队id
|
||||
*/
|
||||
@Override
|
||||
public List<Long> selectMotorcadeIdList(Long driverId){
|
||||
return motorcadeMapper.selectMotorcadeIdList(driverId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车队
|
||||
*/
|
||||
@Override
|
||||
public Motorcade insert(MotorcadeDO motorcadeDo) {
|
||||
Motorcade motorcade = new Motorcade();
|
||||
BeanUtils.copyProperties(motorcadeDo,motorcade);
|
||||
this.save(motorcade);
|
||||
return motorcade;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车队
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(MotorcadeDO motorcadeDo) {
|
||||
Motorcade motorcade = new Motorcade();
|
||||
BeanUtils.copyProperties(motorcadeDo,motorcade);
|
||||
return this.updateById(motorcade);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] motorcadeIds ) {
|
||||
List<Motorcade> list = new ArrayList<>();
|
||||
for (Long id : motorcadeIds) {
|
||||
Motorcade motorcade = new Motorcade();
|
||||
motorcade.setMotorcadeId(id);
|
||||
motorcade.setDelFlag(2);
|
||||
list.add(motorcade);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车队
|
||||
*/
|
||||
@Override
|
||||
public MotorcadePo getInfo(Long motorcadeId) {
|
||||
LambdaQueryWrapper<Motorcade> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(Motorcade::getMotorcadeId,motorcadeId);
|
||||
queryWrapper.eq(Motorcade::getDelFlag,1);
|
||||
Motorcade motorcade = this.getOne(queryWrapper);
|
||||
MotorcadePo motorcadePo = new MotorcadePo();
|
||||
if(null != motorcade){
|
||||
BeanUtils.copyProperties(motorcade,motorcadePo);
|
||||
}
|
||||
return motorcadePo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MotorcadeDriver> selectMotorcadeDriverByDriverId(Long driverId) {
|
||||
return motorcadeMapper.selectMotorcadeDriverByDriverId(driverId);
|
||||
}
|
||||
|
||||
/**
|
||||
* APP查询当前用户车队列表信息
|
||||
* @param motorcadeDo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MotorcadeAppPo> queryMyMotorcadeList(MotorcadeDO motorcadeDo) {
|
||||
return motorcadeMapper.queryMyMotorcadeList(motorcadeDo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MotorcadeDriverPo> getDriverListById(MotorcadeDO motorcadeDo) {
|
||||
return motorcadeMapper.getDriverListById(motorcadeDo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserDriverPo> fleetInviteDriverList(MotorcadeDriverDO motorcadeDriverDO) {
|
||||
return motorcadeMapper.fleetInviteDriverList(motorcadeDriverDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MotorcadePo> getAllOtherMotorcade(Long userId) {
|
||||
return motorcadeMapper.getAllOtherMotorcade(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MotorcadePo> queryNonePagingList(Long organizationId) {
|
||||
return motorcadeMapper.queryNonePagingList(organizationId);
|
||||
}
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
package com.mhd.user.domain.motorcade.repository.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* APP车队对象 motorcade
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadeAppPo extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车队id */
|
||||
@ApiModelProperty("车队id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long motorcadeId;
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName = "";
|
||||
/** 车队名称 */
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName = "";
|
||||
/** 车队头像 */
|
||||
@ApiModelProperty("车队头像")
|
||||
@Excel(name = "车队头像")
|
||||
private String motorcadeImage = "";
|
||||
/** 车队长联系方式 */
|
||||
@ApiModelProperty("车队长联系方式")
|
||||
@Excel(name = "车队长联系方式")
|
||||
private String userPhone = "";
|
||||
/** 车队介绍 */
|
||||
@ApiModelProperty("车队介绍")
|
||||
@Excel(name = "车队介绍")
|
||||
private String motorcadeDescribtion = "";
|
||||
/** 车队认证状态(1.正在审核2.认证成功3.认证失败) */
|
||||
@ApiModelProperty("车队认证状态(0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效)")
|
||||
@Excel(name = "车队认证状态", readConverterExp = "0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Long motorcadeStatus = 0L;
|
||||
@ApiModelProperty("车队审核备注")
|
||||
@Excel(name = "车队审核备注")
|
||||
private String motorcadeRejectReason = "";
|
||||
/** 车队队长userId */
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长名称")
|
||||
@Excel(name = "车队队长名称")
|
||||
private String motorcadeHeaderName = "";
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长账号")
|
||||
@Excel(name = "车队队长账号")
|
||||
private String motorcadeHeaderAccount = "";
|
||||
/** 车队评分 */
|
||||
@ApiModelProperty("车队评分")
|
||||
@Excel(name = "车队评分")
|
||||
private BigDecimal motorcadeScore = BigDecimal.ZERO;
|
||||
/** 审核人员id */
|
||||
@ApiModelProperty("审核人员id")
|
||||
@Excel(name = "审核人员id")
|
||||
private Long checkPersonId;
|
||||
/** 审核人员名称 */
|
||||
@ApiModelProperty("审核人员名称")
|
||||
@Excel(name = "审核人员名称")
|
||||
private String checkPersonName = "";
|
||||
/** 审核时间 */
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date checkPersonTime;
|
||||
/** 车队状态(0-无状态,1-正常,2-解散,3-黑名单) */
|
||||
@ApiModelProperty("车队状态(0-无状态,1-正常,2-解散,3-黑名单)")
|
||||
@Excel(name = "车队状态(0-无状态,1-正常,2-解散,3-黑名单)")
|
||||
private Long motorcadeDissolutionStatus;
|
||||
@ApiModelProperty("司机数")
|
||||
@Excel(name = "司机数")
|
||||
private Integer driverNum = 0;
|
||||
/** 车辆数 */
|
||||
@ApiModelProperty("车辆数")
|
||||
@Excel(name = "车辆数")
|
||||
private Integer vehicleNum = 0;
|
||||
/** 新的邀请数量 */
|
||||
@ApiModelProperty("新的邀请数量")
|
||||
@Excel(name = "新的邀请数量")
|
||||
private Integer invitationNum = 0;
|
||||
|
||||
|
||||
@ApiModelProperty("我的车队列表")
|
||||
@Excel(name = "我的车队列表")
|
||||
private List<MotorcadeAppPo> myMotorcadeList = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty("我加入的车队列表")
|
||||
@Excel(name = "我加入的车队列表")
|
||||
private List<MotorcadeAppPo> joinMotorcadeList = new ArrayList<>();
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty("用户id")
|
||||
private String userIds = "";
|
||||
|
||||
/** 黑名单备注 */
|
||||
@ApiModelProperty("黑名单备注")
|
||||
@Excel(name = "黑名单备注")
|
||||
private String blackListReason;
|
||||
|
||||
@ApiModelProperty(value = "是否默认车队(1-是 2-否)")
|
||||
private Integer defaultFlag;
|
||||
|
||||
@ApiModelProperty(name = "是否签署代收协议(0-无状态,1-未签署,2-已签署)")
|
||||
private Integer contractStatus = 0;
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.mhd.user.domain.motorcade.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class MotorcadeDriverAppPo extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户主表ID")
|
||||
private Long userId = 0L;
|
||||
@ApiModelProperty(name = "手机号码")
|
||||
private String userPhone = "";
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName = "";
|
||||
@ApiModelProperty(name = "用户头像")
|
||||
private String avatar="";
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber = "";
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private Long vehicleId;
|
||||
@ApiModelProperty(name = "车辆类别:1-个人车辆 2-企业车辆")
|
||||
private Integer vehicleCategory;
|
||||
@ApiModelProperty(name = "车辆类型(数据字典id)")
|
||||
private String vehicleTypeId;
|
||||
@ApiModelProperty(name = "车辆类型(数据字典name)")
|
||||
private String vehicleTypeName;
|
||||
|
||||
@ApiModelProperty(name = "承运人个体司机认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer driverFill = 1;
|
||||
@ApiModelProperty(name = "用户实名认证状态:0-无状态,1-已注册未认证,2-已认证待审核,3-审核通过,4-已驳回")
|
||||
private Integer userAuthStatus = 1;
|
||||
|
||||
/** 车队认证状态(0.无状态1.已加入2.已拒绝3.已退出) */
|
||||
@ApiModelProperty("车队认证状态(0.无状态1.已加入2.已拒绝3.已退出)")
|
||||
private Long motorcadeRecordStatus;
|
||||
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
|
||||
@ApiModelProperty(name = "运单量")
|
||||
private Integer waybillNum = 0;
|
||||
|
||||
@ApiModelProperty(name = "评分")
|
||||
private BigDecimal score = BigDecimal.ZERO;
|
||||
|
||||
@ApiModelProperty(name = "角色编码")
|
||||
private String roleCode;
|
||||
|
||||
@ApiModelProperty(name = "车队ID")
|
||||
private Long motorcadeId = 0L;
|
||||
|
||||
@ApiModelProperty(name = "运输企业id")
|
||||
private Long userDriverEnterpriseId = 0L;
|
||||
|
||||
@ApiModelProperty(name = "是否签署代收协议(0-无状态,1-未签署,2-已签署)")
|
||||
private Integer contractStatus = 0;
|
||||
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package com.mhd.user.domain.motorcade.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class MotorcadeDriverPo extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户主表ID")
|
||||
private Long userId = 0L;
|
||||
@ApiModelProperty(name = "手机号码")
|
||||
private String userPhone = "";
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName = "";
|
||||
@ApiModelProperty(name = "用户头像")
|
||||
private String avatar = "";
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber = "";
|
||||
@ApiModelProperty(name = "车辆类别:1-个人车辆 2-企业车辆")
|
||||
private Integer vehicleCategory;
|
||||
@ApiModelProperty(name = "车辆类型(数据字典id)")
|
||||
private String vehicleTypeId;
|
||||
@ApiModelProperty(name = "车辆类型(数据字典name)")
|
||||
private String vehicleTypeName;
|
||||
|
||||
@ApiModelProperty(name = "承运人个体司机认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer driverFill = 1;
|
||||
@ApiModelProperty(name = "用户实名认证状态:0-无状态,1-已注册未认证,2-已认证待审核,3-审核通过,4-已驳回")
|
||||
private Integer userAuthStatus = 1;
|
||||
|
||||
/**
|
||||
* 车队认证状态(0.无状态1.已加入2.已拒绝3.已退出)
|
||||
*/
|
||||
@ApiModelProperty("车队认证状态(0.无状态1.已加入2.已拒绝3.已退出)")
|
||||
private Long motorcadeRecordStatus;
|
||||
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
|
||||
@ApiModelProperty(name = "运单量")
|
||||
private Integer waybillNum = 0;
|
||||
|
||||
@ApiModelProperty(name = "评分")
|
||||
private BigDecimal score = BigDecimal.ZERO;
|
||||
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehiclePlateNumbers;
|
||||
|
||||
@ApiModelProperty(name = "车辆总数")
|
||||
private Integer vehicleNum;
|
||||
|
||||
/** 用户账号 */
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
@ApiModelProperty("代收款协议地址")
|
||||
private String agreementUrl;
|
||||
|
||||
@ApiModelProperty("司机类型:1-自有司机,2-挂靠")
|
||||
private Integer driverType;
|
||||
|
||||
@ApiModelProperty(name = "tms推送状态: 1-未推送 2- 已推送")
|
||||
private Integer tmsPushStatus;
|
||||
|
||||
@ApiModelProperty("流程id")
|
||||
private String fileId;
|
||||
|
||||
@ApiModelProperty("签署PDF地址")
|
||||
private String agreementUrlPdf;
|
||||
|
||||
@ApiModelProperty("合同状态:1.无状态,2-已填充模板,3-已发起签署,4-签署完毕")
|
||||
private Integer contractStatus;
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
package com.mhd.user.domain.motorcade.repository.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.fieldsetvalue.NeedSetValue;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 车队对象 motorcade
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadePo extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车队id */
|
||||
@ApiModelProperty("车队id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long motorcadeId;
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
/** 车队名称 */
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
/** 车队头像 */
|
||||
@ApiModelProperty("车队头像")
|
||||
@Excel(name = "车队头像")
|
||||
@NeedSetValue
|
||||
private String motorcadeImage;
|
||||
/** 车队介绍 */
|
||||
@ApiModelProperty("车队介绍")
|
||||
@Excel(name = "车队介绍")
|
||||
private String motorcadeDescribtion;
|
||||
/** 车队认证状态(1.正在审核2.认证成功3.认证失败) */
|
||||
@ApiModelProperty("车队认证状态(0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效)")
|
||||
@Excel(name = "车队认证状态", readConverterExp = "0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Long motorcadeStatus;
|
||||
@ApiModelProperty("车队审核备注")
|
||||
@Excel(name = "车队审核备注")
|
||||
private String motorcadeRejectReason = "";
|
||||
/** 车队队长userId */
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长名称")
|
||||
@Excel(name = "车队队长名称")
|
||||
private String motorcadeHeaderName;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长账号")
|
||||
@Excel(name = "车队队长账号")
|
||||
private String motorcadeHeaderAccount;
|
||||
/** 车队评分 */
|
||||
@ApiModelProperty("车队评分")
|
||||
@Excel(name = "车队评分")
|
||||
private BigDecimal motorcadeScore;
|
||||
/** 审核人员id */
|
||||
@ApiModelProperty("审核人员id")
|
||||
@Excel(name = "审核人员id")
|
||||
private Long checkPersonId;
|
||||
/** 审核人员名称 */
|
||||
@ApiModelProperty("审核人员名称")
|
||||
@Excel(name = "审核人员名称")
|
||||
private String checkPersonName;
|
||||
/** 审核时间 */
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date checkPersonTime;
|
||||
/** 车队状态(0-无状态,1-正常,2-解散,3-黑名单) */
|
||||
@ApiModelProperty("车队状态(0-无状态,1-正常,2-解散,3-黑名单)")
|
||||
@Excel(name = "车队状态(0-无状态,1-正常,2-解散,3-黑名单)")
|
||||
private Long motorcadeDissolutionStatus;
|
||||
@ApiModelProperty("司机数")
|
||||
@Excel(name = "司机数")
|
||||
private Integer driverNum;
|
||||
/** 车辆数 */
|
||||
@ApiModelProperty("车辆数")
|
||||
@Excel(name = "车辆数")
|
||||
private Integer vehicleNum;
|
||||
|
||||
/** 黑名单备注 */
|
||||
@ApiModelProperty("黑名单备注")
|
||||
@Excel(name = "黑名单备注")
|
||||
private String blackListReason;
|
||||
|
||||
@ApiModelProperty(name = "承运商编码")
|
||||
private String driverEnterpriseCode;
|
||||
|
||||
@ApiModelProperty(value = "数据来源(1-数字物流 2-TMS)")
|
||||
private Integer dataSources;
|
||||
|
||||
@ApiModelProperty(value = "是否默认车队(1-是 2-否)")
|
||||
private Integer defaultFlag;
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package com.mhd.user.domain.motorcade.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.domain.po.VehiclePo;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 车队邀请记录对象 motorcade_record
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadeRecordPo extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车队邀请记录表 */
|
||||
@ApiModelProperty("车队邀请记录表")
|
||||
private Long motorcadeRecordId;
|
||||
/** 用户id */
|
||||
@ApiModelProperty("用户id")
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
/** 车队id */
|
||||
@ApiModelProperty("车队id")
|
||||
@Excel(name = "车队id")
|
||||
private Long motorcadeId;
|
||||
/** 车队名称 */
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
/** 车队头像 */
|
||||
@ApiModelProperty("车队头像")
|
||||
@Excel(name = "车队头像")
|
||||
private String motorcadeImage;
|
||||
/** 车队介绍 */
|
||||
@ApiModelProperty("车队介绍")
|
||||
@Excel(name = "车队介绍")
|
||||
private String motorcadeDescribtion;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长名称")
|
||||
@Excel(name = "车队队长名称")
|
||||
private String motorcadeHeaderName;
|
||||
/** 车队评分 */
|
||||
@ApiModelProperty("车队评分")
|
||||
@Excel(name = "车队评分")
|
||||
private BigDecimal motorcadeScore;
|
||||
/** 车队认证状态(0.无状态1.已加入2.已拒绝3.已退出) */
|
||||
@ApiModelProperty("车队认证状态(0.无状态1.已加入2.已拒绝3.已退出)")
|
||||
@Excel(name = "车队认证状态", readConverterExp = "0=.无状态1.已加入2.已拒绝3.已退出")
|
||||
private Long motorcadeRecordStatus;
|
||||
/** 邀请时间 */
|
||||
@ApiModelProperty("接受邀请时间/退出时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "接受邀请时间/退出时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date recordTime;
|
||||
@ApiModelProperty(name = "车辆集合")
|
||||
private List<VehiclePo> vehicleList = null;
|
||||
@ApiModelProperty(name = "车辆map集合")
|
||||
private List<Map<String,String>> vehicleMapList = null;
|
||||
|
||||
@ApiModelProperty(name = "手机号码")
|
||||
private String userPhone;
|
||||
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber;
|
||||
|
||||
@ApiModelProperty("车辆ID")
|
||||
private String vehicleId;
|
||||
}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
package com.mhd.user.domain.motorcade.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserDO;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.annotation.fieldsetvalue.NeedSetValue;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 车队对象 motorcade
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadeDO extends UserDO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车队id */
|
||||
@ApiModelProperty("车队id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long motorcadeId;
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
/** 车队名称 */
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
/** 车队头像 */
|
||||
@ApiModelProperty("车队头像")
|
||||
@Excel(name = "车队头像")
|
||||
@NeedSetValue
|
||||
private String motorcadeImage;
|
||||
/** 车队介绍 */
|
||||
@ApiModelProperty("车队介绍")
|
||||
@Excel(name = "车队介绍")
|
||||
private String motorcadeDescribtion;
|
||||
/** 车队认证状态(1.正在审核2.认证成功3.认证失败) */
|
||||
@ApiModelProperty("车队认证状态(0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效)")
|
||||
@Excel(name = "车队认证状态", readConverterExp = "0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Long motorcadeStatus;
|
||||
@ApiModelProperty("车队审核备注")
|
||||
@Excel(name = "车队审核备注")
|
||||
private String motorcadeRejectReason;
|
||||
/** 车队队长userId */
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长名称")
|
||||
@Excel(name = "车队队长名称")
|
||||
private String motorcadeHeaderName;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长账号")
|
||||
@Excel(name = "车队队长账号")
|
||||
private String motorcadeHeaderAccount;
|
||||
/** 车队评分 */
|
||||
@ApiModelProperty("车队评分")
|
||||
@Excel(name = "车队评分")
|
||||
private BigDecimal motorcadeScore;
|
||||
/** 审核人员id */
|
||||
@ApiModelProperty("审核人员id")
|
||||
@Excel(name = "审核人员id")
|
||||
private Long checkPersonId;
|
||||
/** 审核人员名称 */
|
||||
@ApiModelProperty("审核人员名称")
|
||||
@Excel(name = "审核人员名称")
|
||||
private String checkPersonName;
|
||||
/** 审核时间 */
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date checkPersonTime;
|
||||
/** 车队状态(0-无状态,1-正常,2-解散,3-黑名单) */
|
||||
@ApiModelProperty("车队状态(0-无状态,1-正常,2-解散,3-黑名单)")
|
||||
@Excel(name = "车队状态(0-无状态,1-正常,2-解散,3-黑名单)")
|
||||
private Long motorcadeDissolutionStatus;
|
||||
@ApiModelProperty(name = "车队id集合")
|
||||
private List<Long> motorcadeIds;
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty(name = "PC承运人车队长认证步骤(0-用户注册,1-提交认证资料)")
|
||||
private Integer stepFlagC;
|
||||
|
||||
@ApiModelProperty("关联车队用户id")
|
||||
@Excel(name = "关联车队用户id")
|
||||
private Long myMotorcadeUserId;
|
||||
|
||||
/** 黑名单备注 */
|
||||
@ApiModelProperty("黑名单备注")
|
||||
@Excel(name = "黑名单备注")
|
||||
private String blackListReason;
|
||||
|
||||
@ApiModelProperty(name = "承运商编码")
|
||||
private String driverEnterpriseCode;
|
||||
|
||||
@ApiModelProperty(value = "数据来源(1-数字物流 2-TMS)")
|
||||
private Integer dataSources;
|
||||
|
||||
@ApiModelProperty(value = "是否默认车队(1-是 2-否)")
|
||||
private Integer defaultFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间起")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTimeFrom;
|
||||
@ApiModelProperty(value = "创建时间止")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTimeTo;
|
||||
@ApiModelProperty(value = "审核时间起")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date userAuthTimeFrom;
|
||||
@ApiModelProperty(value = "审核时间止")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date userAuthTimeTo;
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package com.mhd.user.domain.motorcade.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class MotorcadeDriverDO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty("车队id")
|
||||
private Long motorcadeId;
|
||||
|
||||
@ApiModelProperty(name = "用户主表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(name = "手机号码")
|
||||
private String userPhone;
|
||||
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(name = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber;
|
||||
|
||||
@ApiModelProperty(name = "车辆类别:1-个人车辆 2-企业车辆")
|
||||
private Integer vehicleCategory;
|
||||
|
||||
@ApiModelProperty(name = "车辆类型(数据字典id)")
|
||||
private String vehicleTypeId;
|
||||
|
||||
@ApiModelProperty(name = "车辆类型(数据字典name)")
|
||||
private String vehicleTypeName;
|
||||
|
||||
@ApiModelProperty(name = "承运人个体司机认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer driverFill;
|
||||
|
||||
@ApiModelProperty(name = "用户实名认证状态:0-无状态,1-已注册未认证,2-已认证待审核,3-审核通过,4-已驳回")
|
||||
private Integer userAuthStatus;
|
||||
|
||||
@ApiModelProperty("车队认证状态(0.无状态1.已加入2.已拒绝3.已退出)")
|
||||
private Long motorcadeRecordStatus;
|
||||
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
|
||||
@ApiModelProperty(name = "运单量")
|
||||
private Integer waybillNum;
|
||||
|
||||
@ApiModelProperty(name = "评分")
|
||||
private BigDecimal score;
|
||||
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehiclePlateNumbers;
|
||||
|
||||
@ApiModelProperty(name = "车辆总数")
|
||||
private Integer vehicleNum;
|
||||
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty(name = "tms推送状态: 1-未推送 2- 已推送")
|
||||
private Integer tmsPushStatus;
|
||||
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.mhd.user.domain.motorcade.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 车队邀请记录对象 motorcade_record
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadeRecordDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车队邀请记录表 */
|
||||
@ApiModelProperty("车队邀请记录表")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long motorcadeRecordId;
|
||||
/** 用户id */
|
||||
@ApiModelProperty("用户id")
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
/** 车队id */
|
||||
@ApiModelProperty("车队id")
|
||||
@Excel(name = "车队id")
|
||||
private Long motorcadeId;
|
||||
/** 车队名称 */
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
/** 车队头像 */
|
||||
@ApiModelProperty("车队头像")
|
||||
@Excel(name = "车队头像")
|
||||
private String motorcadeImage;
|
||||
/** 车队介绍 */
|
||||
@ApiModelProperty("车队介绍")
|
||||
@Excel(name = "车队介绍")
|
||||
private String motorcadeDescribtion;
|
||||
/** 车队队长名称 */
|
||||
@ApiModelProperty("车队队长名称")
|
||||
@Excel(name = "车队队长名称")
|
||||
private String motorcadeHeaderName;
|
||||
/** 车队评分 */
|
||||
@ApiModelProperty("车队评分")
|
||||
@Excel(name = "车队评分")
|
||||
private BigDecimal motorcadeScore;
|
||||
/** 车队认证状态(0.无状态1.已加入2.已拒绝3.已退出) */
|
||||
@ApiModelProperty("车队认证状态(0.无状态1.已加入2.已拒绝3.已退出)")
|
||||
@Excel(name = "车队认证状态", readConverterExp = "0=.无状态1.已加入2.已拒绝3.已退出")
|
||||
private Long motorcadeRecordStatus;
|
||||
/** 邀请时间 */
|
||||
@ApiModelProperty("接受邀请时间/退出时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "接受邀请时间/退出时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date recordTime;
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
@ApiModelProperty(name = "是否新邀请")
|
||||
private Integer isNew;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "创建开始日期")
|
||||
private Date createStartTime;
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "创建结束日期")
|
||||
private Date createEndTime;
|
||||
|
||||
/** 车队名称 */
|
||||
@ApiModelProperty("司机信息")
|
||||
private String driverInfo;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
@Excel(name = "用户id")
|
||||
private String userIds;
|
||||
}
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
package com.mhd.user.domain.motorcade.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.user.domain.motorcade.entity.Motorcade;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeDriver;
|
||||
import com.mhd.user.domain.motorcade.repository.facade.MotorcadeRepositoryInterface;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeAppPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadePo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDO;
|
||||
import com.mhd.common.core.annotation.fieldsetvalue.NeedSetValueMethod;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeDriverDO;
|
||||
import com.mhd.user.domain.userAggregate.repository.po.UserDriverPo;
|
||||
import com.mhd.user.infrastructure.util.annotation.DataPermissions;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 车队
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class MotorcadeDomainService {
|
||||
|
||||
@Autowired
|
||||
private MotorcadeRepositoryInterface motorcadeInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询车队列表
|
||||
*/
|
||||
@NeedSetValueMethod
|
||||
@DataPermissions(cacheName = "master")
|
||||
public List<MotorcadePo> queryList(MotorcadeDO motorcadeDo) {
|
||||
return motorcadeInterface.queryList(motorcadeDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我加入的所以车队id
|
||||
*/
|
||||
public List<Long> selectMotorcadeIdList(Long driverId){
|
||||
return motorcadeInterface.selectMotorcadeIdList(driverId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增车队
|
||||
*/
|
||||
public Motorcade insert(MotorcadeDO motorcadeDo) {
|
||||
|
||||
return motorcadeInterface.insert(motorcadeDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车队
|
||||
*/
|
||||
public Boolean update(MotorcadeDO motorcadeDo) {
|
||||
return motorcadeInterface.update(motorcadeDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队
|
||||
*/
|
||||
public Boolean delete(Long[] motorcadeIds) {
|
||||
return motorcadeInterface.delete(motorcadeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车队详细信息
|
||||
*/
|
||||
public MotorcadePo getInfo(Long motorcadeId)
|
||||
{
|
||||
return motorcadeInterface.getInfo(motorcadeId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据司机id查询司机名下车队信息
|
||||
* @param driverId
|
||||
* @return
|
||||
*/
|
||||
public List<Motorcade> selectMotorcadeByDriverId(Long driverId) {
|
||||
return motorcadeInterface.getBaseMapper().selectList(new QueryWrapper<Motorcade>()
|
||||
.lambda().eq(Motorcade::getMotorcadeHeaderId,driverId).eq(Motorcade::getDelFlag,1));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车队长id,查询该车队长下所有司机信息
|
||||
* @param driverId
|
||||
* @return
|
||||
*/
|
||||
public List<MotorcadeDriver> selectMotorcadeDriverByDriverId(Long driverId) {
|
||||
return motorcadeInterface.selectMotorcadeDriverByDriverId(driverId);
|
||||
}
|
||||
|
||||
/**
|
||||
* APP查询当前用户车队列表信息
|
||||
* @param motorcadeDo
|
||||
* @return
|
||||
*/
|
||||
public List<MotorcadeAppPo> queryMyMotorcadeList(MotorcadeDO motorcadeDo) {
|
||||
return motorcadeInterface.queryMyMotorcadeList(motorcadeDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据lambda查询单条数据
|
||||
* @param queryWrapper
|
||||
* @return
|
||||
*/
|
||||
public Motorcade selectOneByLambda(LambdaQueryWrapper<Motorcade> queryWrapper) {
|
||||
return motorcadeInterface.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
public Boolean updateBatchById(List<Motorcade> ids) {
|
||||
return motorcadeInterface.updateBatchById(ids);
|
||||
}
|
||||
|
||||
public List<Motorcade> selectListByIds(List<Long> motorcadeIds) {
|
||||
|
||||
return motorcadeInterface
|
||||
.lambdaQuery()
|
||||
.eq(Motorcade::getDelFlag,1)
|
||||
.in(Motorcade::getMotorcadeId,motorcadeIds)
|
||||
.list();
|
||||
}
|
||||
|
||||
public List<MotorcadeDriverPo> getDriverListById(MotorcadeDO motorcadeDo) {
|
||||
return motorcadeInterface.getDriverListById(motorcadeDo);
|
||||
}
|
||||
|
||||
public Boolean deletePC(List<Long> motorcadeIds) {
|
||||
List<Motorcade> ids = new ArrayList<>();
|
||||
for (Long id : motorcadeIds) {
|
||||
Motorcade motorcade = new Motorcade();
|
||||
motorcade.setMotorcadeId(id);
|
||||
motorcade.setDelFlag(2);
|
||||
ids.add(motorcade);
|
||||
}
|
||||
return motorcadeInterface.updateBatchById(ids);
|
||||
|
||||
}
|
||||
|
||||
public Motorcade getInfoByOpen(String driverEnterpriseCode, Integer dataSources) {
|
||||
return motorcadeInterface
|
||||
.lambdaQuery()
|
||||
.eq(Motorcade::getDelFlag,1)
|
||||
.eq(Motorcade::getDriverEnterpriseCode,driverEnterpriseCode)
|
||||
.eq(Motorcade::getDataSources,dataSources)
|
||||
.one();
|
||||
}
|
||||
|
||||
public boolean saveOrUpdate(Motorcade motorcade) {
|
||||
return motorcadeInterface.saveOrUpdate(motorcade);
|
||||
}
|
||||
|
||||
public List<UserDriverPo> fleetInviteDriverList(MotorcadeDriverDO motorcadeDriverDO) {
|
||||
return motorcadeInterface.fleetInviteDriverList(motorcadeDriverDO);
|
||||
}
|
||||
|
||||
public Motorcade getDefaultMotorcade() {
|
||||
return motorcadeInterface
|
||||
.lambdaQuery()
|
||||
.eq(Motorcade::getDelFlag,1)
|
||||
.eq(Motorcade::getDefaultFlag,1)
|
||||
.eq(Motorcade::getMotorcadeStatus,3)
|
||||
.one();
|
||||
}
|
||||
|
||||
public List<MotorcadePo> getAllOtherMotorcade(Long userId) {
|
||||
return motorcadeInterface.getAllOtherMotorcade(userId);
|
||||
}
|
||||
|
||||
|
||||
public List<MotorcadePo> queryNonePagingList() {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null && loginUser.getUserPo() != null &&loginUser.getUserPo().getTopOrganizationId()!= null){
|
||||
return motorcadeInterface.queryNonePagingList(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
package com.mhd.user.domain.motorcade.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeDriver;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeRecord;
|
||||
import com.mhd.user.domain.motorcade.repository.facade.MotorcadeDriverRepositoryInterface;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverPo;
|
||||
import com.mhd.user.domain.userAggregate.entity.UserEntity;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* 车队司机
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class MotorcadeDriverDomainService {
|
||||
|
||||
@Autowired
|
||||
private MotorcadeDriverRepositoryInterface motorcadeDriverInterface;
|
||||
|
||||
/**
|
||||
* 根据用户查询车队id
|
||||
*/
|
||||
public List<Long> selectMotorcadeIdByUserId(Long userId){
|
||||
return motorcadeDriverInterface.selectMotorcadeIdByUserId(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车队id查询司机id
|
||||
*/
|
||||
public List<MotorcadeDriverPo> selectDriverIdByMotorcadeId(List<Long> motorcadeIds){
|
||||
return motorcadeDriverInterface.selectDriverIdByMotorcadeId(motorcadeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车队id查询司机id
|
||||
*/
|
||||
public List<Long> selectDriverIdByMotorcadeId(Long motorcadeId) {
|
||||
return motorcadeDriverInterface
|
||||
.lambdaQuery()
|
||||
.select(MotorcadeDriver::getUserId)
|
||||
.eq(MotorcadeDriver::getMotorcadeId, motorcadeId)
|
||||
.eq(MotorcadeDriver::getDelFlag, 1)
|
||||
.list()
|
||||
.stream()
|
||||
.map(MotorcadeDriver::getUserId)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车队司机
|
||||
*/
|
||||
public Boolean insert(MotorcadeDriver motorcadeDriver) {
|
||||
|
||||
return motorcadeDriverInterface.insert(motorcadeDriver);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队司机
|
||||
*/
|
||||
public Boolean delete(Long[] motorcadeDriverIds) {
|
||||
return motorcadeDriverInterface.delete(motorcadeDriverIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增车队司机
|
||||
*
|
||||
* @param list 车队司机集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchAddMotorcadeDriver(List<MotorcadeDriver> list){
|
||||
return motorcadeDriverInterface.batchAddMotorcadeDriver(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车队id删除关联关系
|
||||
* @param motorcadeId
|
||||
* @return
|
||||
*/
|
||||
public Boolean removeByMotorcadeId(Long motorcadeId) {
|
||||
//判断是否有绑定关系
|
||||
LambdaUpdateWrapper<MotorcadeDriver> queryWrapper = new LambdaUpdateWrapper<>();
|
||||
queryWrapper.set(MotorcadeDriver::getDelFlag,2);
|
||||
|
||||
queryWrapper.eq(MotorcadeDriver::getMotorcadeId,motorcadeId);
|
||||
return motorcadeDriverInterface.update(queryWrapper);
|
||||
}
|
||||
|
||||
public MotorcadeDriver selectByLambda(LambdaQueryWrapper<MotorcadeDriver> queryWrapper) {
|
||||
return motorcadeDriverInterface.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据lambda表达式更新
|
||||
* @param updateWrapper
|
||||
* @return
|
||||
*/
|
||||
public Boolean updateByLambda(LambdaUpdateWrapper<MotorcadeDriver> updateWrapper) {
|
||||
return motorcadeDriverInterface.update(updateWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 司机退出车队
|
||||
* 根据车队和司机,移除绑定关系
|
||||
* @param motorcadeId
|
||||
* @param userid
|
||||
*/
|
||||
public Boolean removeByMotorcadeIdAndUserId(Long motorcadeId, Long userid) {
|
||||
//删除车队司机关系
|
||||
LambdaQueryWrapper<MotorcadeDriver> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MotorcadeDriver::getMotorcadeId,motorcadeId);
|
||||
queryWrapper.eq(MotorcadeDriver::getUserId,userid);
|
||||
queryWrapper.eq(MotorcadeDriver::getDelFlag,1);
|
||||
|
||||
return motorcadeDriverInterface.remove(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据userId获取加入车队数量
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public Integer getMotorcadeSumByUserId(Long userId) {
|
||||
return motorcadeDriverInterface
|
||||
.lambdaQuery()
|
||||
.eq(MotorcadeDriver::getUserId, userId)
|
||||
.eq(MotorcadeDriver::getDelFlag, 1)
|
||||
.count();
|
||||
}
|
||||
|
||||
public MotorcadeDriver getInfoByDriveId(Long motorcadeId, Long userId) {
|
||||
return motorcadeDriverInterface
|
||||
.lambdaQuery()
|
||||
.eq(MotorcadeDriver::getMotorcadeId, motorcadeId)
|
||||
.eq(MotorcadeDriver::getUserId, userId)
|
||||
.eq(MotorcadeDriver::getDelFlag, 1)
|
||||
.one();
|
||||
}
|
||||
|
||||
public List<MotorcadeDriver> getListByMotorcadeId(Long motorcadeId) {
|
||||
return motorcadeDriverInterface
|
||||
.lambdaQuery()
|
||||
.eq(MotorcadeDriver::getMotorcadeId, motorcadeId)
|
||||
.eq(MotorcadeDriver::getDelFlag, 1)
|
||||
.list();
|
||||
}
|
||||
|
||||
public List<MotorcadeDriver> getListByDriveId(Long userId) {
|
||||
return motorcadeDriverInterface
|
||||
.lambdaQuery()
|
||||
.eq(MotorcadeDriver::getUserId, userId)
|
||||
.eq(MotorcadeDriver::getDelFlag, 1)
|
||||
.list();
|
||||
}
|
||||
|
||||
public boolean deleteByMotorcadeIdAndUserId(Long motorcadeId, Long userId) {
|
||||
return motorcadeDriverInterface
|
||||
.lambdaUpdate()
|
||||
.set(MotorcadeDriver::getDelFlag, 2)
|
||||
.eq(ObjectUtil.isNotNull(motorcadeId), MotorcadeDriver::getMotorcadeId, motorcadeId)
|
||||
.eq(MotorcadeDriver::getUserId, userId)
|
||||
.update();
|
||||
}
|
||||
|
||||
public MotorcadeDriver selectOneByLambda(LambdaQueryWrapper<MotorcadeDriver> queryWrapper) {
|
||||
return motorcadeDriverInterface.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
public boolean updateById(MotorcadeDriver motorcadeDriver) {
|
||||
return motorcadeDriverInterface.updateById(motorcadeDriver);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批量修改实体
|
||||
* @author ZhouGY
|
||||
* @date 2024/6/24 15:18
|
||||
* @param motorcadeDriverList
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean batchUpdateByIds(List<MotorcadeDriver> motorcadeDriverList){
|
||||
return motorcadeDriverInterface.updateBatchById(motorcadeDriverList);
|
||||
}
|
||||
}
|
||||
+156
@@ -0,0 +1,156 @@
|
||||
package com.mhd.user.domain.motorcade.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.mhd.user.domain.motorcade.entity.Motorcade;
|
||||
import com.mhd.user.domain.motorcade.entity.MotorcadeRecord;
|
||||
import com.mhd.user.domain.motorcade.repository.facade.MotorcadeRecordRepositoryInterface;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeDriverAppPo;
|
||||
import com.mhd.user.domain.motorcade.repository.po.MotorcadeRecordPo;
|
||||
import com.mhd.user.domain.motorcade.repository.todo.MotorcadeRecordDO;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 车队邀请记录
|
||||
*
|
||||
* @author zihao
|
||||
* @date 2023-05-24
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class MotorcadeRecordDomainService {
|
||||
|
||||
@Autowired
|
||||
private MotorcadeRecordRepositoryInterface motorcadeRecordInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询车队邀请记录列表
|
||||
*/
|
||||
public List<MotorcadeRecordPo> queryList(MotorcadeRecordDO motorcadeRecordDo) {
|
||||
return motorcadeRecordInterface.queryList(motorcadeRecordDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表(是否新邀请)
|
||||
*/
|
||||
public List<MotorcadeRecordPo> selectRecordList(MotorcadeRecordDO motorcadeRecordDo){
|
||||
return motorcadeRecordInterface.selectRecordList(motorcadeRecordDo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增车队邀请记录
|
||||
*/
|
||||
public Boolean insert(MotorcadeRecordDO motorcadeRecordDo) {
|
||||
|
||||
return motorcadeRecordInterface.insert(motorcadeRecordDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车队邀请记录
|
||||
*/
|
||||
public Boolean update(MotorcadeRecordDO motorcadeRecordDo) {
|
||||
return motorcadeRecordInterface.update(motorcadeRecordDo);
|
||||
}
|
||||
|
||||
public Boolean updateById(MotorcadeRecord motorcadeRecord) {
|
||||
return motorcadeRecordInterface.updateById(motorcadeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队邀请记录
|
||||
*/
|
||||
public Boolean delete(Long[] motorcadeRecordIds) {
|
||||
return motorcadeRecordInterface.delete(motorcadeRecordIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车队邀请记录详细信息
|
||||
*/
|
||||
public MotorcadeRecordPo getInfo(Long motorcadeRecordId)
|
||||
{
|
||||
return motorcadeRecordInterface.getInfo(motorcadeRecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表
|
||||
*/
|
||||
public List<MotorcadeDriverAppPo> invitationRecordList(MotorcadeRecordDO motorcadeRecordDo) {
|
||||
return motorcadeRecordInterface.invitationRecordList(motorcadeRecordDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车队邀请记录列表 - PC
|
||||
*/
|
||||
public List<MotorcadeRecordPo> invitationRecordListPC(MotorcadeRecordDO motorcadeRecordDo) {
|
||||
return motorcadeRecordInterface.invitationRecordListPC(motorcadeRecordDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据lambda表达式查询
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
public List<MotorcadeRecord> selectByLambda(LambdaQueryWrapper<MotorcadeRecord> query) {
|
||||
return motorcadeRecordInterface.list(query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出车队
|
||||
* @param motorcadeId
|
||||
* @param userid
|
||||
* @return
|
||||
*/
|
||||
public Boolean exitMotorcade(Long motorcadeId, Long userid) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
//修改该用户在该车队下的邀请记录(已加入),改为已退出
|
||||
LambdaUpdateWrapper<MotorcadeRecord> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(MotorcadeRecord::getMotorcadeId,motorcadeId);
|
||||
updateWrapper.eq(MotorcadeRecord::getUserId,userid);
|
||||
updateWrapper.eq(MotorcadeRecord::getMotorcadeRecordStatus,1);
|
||||
updateWrapper.eq(MotorcadeRecord::getDelFlag,1);
|
||||
|
||||
updateWrapper.set(MotorcadeRecord::getMotorcadeRecordStatus,3);
|
||||
updateWrapper.set(MotorcadeRecord::getRecordTime,new Date());
|
||||
updateWrapper.set(MotorcadeRecord::getUpdateBy,loginUser.getUserid());
|
||||
updateWrapper.set(MotorcadeRecord::getUpdateByName,loginUser.getUsername());
|
||||
updateWrapper.set(MotorcadeRecord::getUpdateTime,new Date());
|
||||
|
||||
return motorcadeRecordInterface.update(updateWrapper);
|
||||
}
|
||||
|
||||
public MotorcadeRecord save(MotorcadeRecordDO motorcadeRecordDO) {
|
||||
MotorcadeRecord motorcadeRecord = new MotorcadeRecord();
|
||||
BeanUtils.copyProperties(motorcadeRecordDO,motorcadeRecord);
|
||||
motorcadeRecordInterface.save(motorcadeRecord);
|
||||
motorcadeRecordDO.setMotorcadeRecordId(motorcadeRecord.getMotorcadeRecordId());
|
||||
return motorcadeRecord;
|
||||
}
|
||||
|
||||
public MotorcadeRecord selectOneByLambda(LambdaQueryWrapper<MotorcadeRecord> queryWrapper) {
|
||||
return motorcadeRecordInterface.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
public List<MotorcadeRecord> getByMotorHeaderId(Long userId) {
|
||||
return motorcadeRecordInterface.getByMotorHeaderId(userId);
|
||||
}
|
||||
|
||||
public void updateBatchById(List<MotorcadeRecord> moList) {
|
||||
motorcadeRecordInterface.updateBatchById(moList);
|
||||
}
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package com.mhd.user.domain.motorcadeCollection.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
/**
|
||||
* 车队代收协议对象 motorcade_collection
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-20
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadeCollection extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("车队代收款协议表id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long motorcadeCollectionId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织表name")
|
||||
@Excel(name = "组织表name")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("车队id")
|
||||
@Excel(name = "车队id")
|
||||
private Long motorcadeId;
|
||||
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
|
||||
@ApiModelProperty("签订协议司机用户id")
|
||||
@Excel(name = "签订协议司机用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("代收款协议地址")
|
||||
@Excel(name = "代收款协议地址")
|
||||
private String agreementUrl;
|
||||
|
||||
@ApiModelProperty("合同编号")
|
||||
private String contractNo;
|
||||
|
||||
@ApiModelProperty("流程id")
|
||||
private String flowId;
|
||||
|
||||
@ApiModelProperty("流程id")
|
||||
private String fileId;
|
||||
|
||||
@ApiModelProperty("签署PDF地址")
|
||||
private String agreementUrlPdf;
|
||||
|
||||
@ApiModelProperty("合同状态:1.无状态,2-已填充模板,3-已发起签署,4-签署完毕")
|
||||
private Integer contractStatus;
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.mhd.user.domain.motorcadeCollection.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.user.domain.motorcadeCollection.entity.MotorcadeCollection;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.po.MotorcadeCollectionPO;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.todo.MotorcadeCollectionDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车队代收协议Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-20
|
||||
*/
|
||||
public interface IMotorcadeCollectionService extends IService<MotorcadeCollection>
|
||||
{
|
||||
/**
|
||||
* 分页查询车队代收协议列表
|
||||
*/
|
||||
public List<MotorcadeCollectionPO> queryList(MotorcadeCollectionDO motorcadeCollectionDO);
|
||||
|
||||
/**
|
||||
* 新增车队代收协议
|
||||
*/
|
||||
public Boolean insert(MotorcadeCollectionDO motorcadeCollectionDO);
|
||||
|
||||
/**
|
||||
* 修改车队代收协议
|
||||
*/
|
||||
public Boolean update(MotorcadeCollectionDO motorcadeCollectionDO);
|
||||
|
||||
/**
|
||||
* 批量删除车队代收协议
|
||||
*/
|
||||
public Boolean delete(Long[] motorcadeCollectionIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询车队代收协议
|
||||
*/
|
||||
public MotorcadeCollectionPO getInfo(Long motorcadeCollectionId);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.mhd.user.domain.motorcadeCollection.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.motorcadeCollection.entity.MotorcadeCollection;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.po.MotorcadeCollectionPO;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.todo.MotorcadeCollectionDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
/**
|
||||
* 车队代收协议Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-20
|
||||
*/
|
||||
public interface MotorcadeCollectionMapper extends BaseMapper<MotorcadeCollection>
|
||||
{
|
||||
/**
|
||||
* 查询车队代收协议列表
|
||||
*/
|
||||
public List<MotorcadeCollectionPO> queryList(MotorcadeCollectionDO motorcadeCollectionDO);
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.mhd.user.domain.motorcadeCollection.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.user.domain.motorcadeCollection.entity.MotorcadeCollection;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.facade.IMotorcadeCollectionService;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.mapper.MotorcadeCollectionMapper;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.po.MotorcadeCollectionPO;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.todo.MotorcadeCollectionDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车队代收协议Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-20
|
||||
*/
|
||||
@Service
|
||||
public class MotorcadeCollectionImpl extends ServiceImpl<MotorcadeCollectionMapper, MotorcadeCollection> implements IMotorcadeCollectionService{
|
||||
@Autowired
|
||||
private MotorcadeCollectionMapper motorcadeCollectionMapper;
|
||||
|
||||
/**
|
||||
* 查询车队代收协议列表
|
||||
*/
|
||||
@Override
|
||||
public List<MotorcadeCollectionPO> queryList(MotorcadeCollectionDO motorcadeCollectionDO)
|
||||
{
|
||||
return motorcadeCollectionMapper.queryList(motorcadeCollectionDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车队代收协议
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(MotorcadeCollectionDO motorcadeCollectionDO) {
|
||||
MotorcadeCollection motorcadeCollection = new MotorcadeCollection();
|
||||
BeanUtils.copyProperties(motorcadeCollectionDO,motorcadeCollection);
|
||||
return this.save(motorcadeCollection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车队代收协议
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(MotorcadeCollectionDO motorcadeCollectionDO) {
|
||||
MotorcadeCollection motorcadeCollection = new MotorcadeCollection();
|
||||
BeanUtils.copyProperties(motorcadeCollectionDO,motorcadeCollection);
|
||||
return this.updateById(motorcadeCollection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队代收协议
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] motorcadeCollectionIds ) {
|
||||
List<MotorcadeCollection> list = new ArrayList<>();
|
||||
for (Long id : motorcadeCollectionIds) {
|
||||
MotorcadeCollection motorcadeCollection = new MotorcadeCollection();
|
||||
motorcadeCollection.setMotorcadeCollectionId(id);
|
||||
motorcadeCollection.setDelFlag(2);
|
||||
list.add(motorcadeCollection);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车队代收协议
|
||||
*/
|
||||
@Override
|
||||
public MotorcadeCollectionPO getInfo(Long motorcadeCollectionId) {
|
||||
MotorcadeCollection motorcadeCollection = this.getById(motorcadeCollectionId);
|
||||
MotorcadeCollectionPO motorcadeCollectionPO = new MotorcadeCollectionPO();
|
||||
BeanUtils.copyProperties(motorcadeCollection,motorcadeCollectionPO);
|
||||
return motorcadeCollectionPO;
|
||||
}
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.mhd.user.domain.motorcadeCollection.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 车队代收协议对象 motorcade_collection
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-20
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "车队代收协议对象", description = "车队代收协议响应对象")
|
||||
public class MotorcadeCollectionPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("车队代收款协议表id")
|
||||
private Long motorcadeCollectionId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织表name")
|
||||
@Excel(name = "组织表name")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("车队id")
|
||||
@Excel(name = "车队id")
|
||||
private Long motorcadeId;
|
||||
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
|
||||
@ApiModelProperty("签订协议司机用户id")
|
||||
@Excel(name = "签订协议司机用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("代收款协议地址")
|
||||
@Excel(name = "代收款协议地址")
|
||||
private String agreementUrl;
|
||||
|
||||
@ApiModelProperty("合同编号")
|
||||
private String contractNo;
|
||||
|
||||
@ApiModelProperty("流程id")
|
||||
private String flowId;
|
||||
|
||||
@ApiModelProperty("合同状态:1.无状态,2-已填充模板,3-已发起签署,4-签署完毕")
|
||||
private Integer contractStatus;
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.mhd.user.domain.motorcadeCollection.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 车队代收协议对象 motorcade_collection
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-20
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MotorcadeCollectionDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("车队代收款协议表id")
|
||||
private Long motorcadeCollectionId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织表name")
|
||||
@Excel(name = "组织表name")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("车队id")
|
||||
@Excel(name = "车队id")
|
||||
private Long motorcadeId;
|
||||
|
||||
@ApiModelProperty("车队名称")
|
||||
@Excel(name = "车队名称")
|
||||
private String motorcadeName;
|
||||
|
||||
@ApiModelProperty("车队队长userId")
|
||||
@Excel(name = "车队队长userId")
|
||||
private Long motorcadeHeaderId;
|
||||
|
||||
@ApiModelProperty("签订协议司机用户id")
|
||||
@Excel(name = "签订协议司机用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("代收款协议地址")
|
||||
@Excel(name = "代收款协议地址")
|
||||
private String agreementUrl;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("合同编号")
|
||||
private String contractNo;
|
||||
|
||||
@ApiModelProperty("流程id")
|
||||
private String flowId;
|
||||
|
||||
@ApiModelProperty("合同状态:1.无状态,2-已填充模板,3-已发起签署,4-签署完毕")
|
||||
private Integer contractStatus;
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
package com.mhd.user.domain.motorcadeCollection.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.user.domain.motorcadeCollection.entity.MotorcadeCollection;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.facade.IMotorcadeCollectionService;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.po.MotorcadeCollectionPO;
|
||||
import com.mhd.user.domain.motorcadeCollection.repository.todo.MotorcadeCollectionDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 车队代收协议
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-20
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class MotorcadeCollectionDomainService {
|
||||
|
||||
@Autowired
|
||||
private IMotorcadeCollectionService motorcadeCollectionService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询车队代收协议列表
|
||||
*/
|
||||
public List<MotorcadeCollectionPO> queryList(MotorcadeCollectionDO motorcadeCollectionDO) {
|
||||
return motorcadeCollectionService.queryList(motorcadeCollectionDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增车队代收协议
|
||||
*/
|
||||
public Boolean insert(MotorcadeCollectionDO motorcadeCollectionDO) {
|
||||
|
||||
return motorcadeCollectionService.insert(motorcadeCollectionDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车队代收协议
|
||||
*/
|
||||
public Boolean update(MotorcadeCollectionDO motorcadeCollectionDO) {
|
||||
return motorcadeCollectionService.update(motorcadeCollectionDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除车队代收协议
|
||||
*/
|
||||
public Boolean delete(Long[] motorcadeCollectionIds) {
|
||||
return motorcadeCollectionService.delete(motorcadeCollectionIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车队代收协议详细信息
|
||||
*/
|
||||
public MotorcadeCollectionPO getInfo(Long motorcadeCollectionId)
|
||||
{
|
||||
return motorcadeCollectionService.getInfo(motorcadeCollectionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车队id和用户id查询代收款协议
|
||||
* @param motorcadeId
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public MotorcadeCollection selectByUserAndMotor(Long motorcadeId, Long userId) {
|
||||
LambdaQueryWrapper<MotorcadeCollection> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MotorcadeCollection::getMotorcadeId,motorcadeId);
|
||||
queryWrapper.eq(MotorcadeCollection::getUserId,userId);
|
||||
queryWrapper.eq(MotorcadeCollection::getDelFlag,1);
|
||||
return motorcadeCollectionService.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
public boolean saveOrUpdate(MotorcadeCollection motorcadeCollection) {
|
||||
return motorcadeCollectionService.saveOrUpdate(motorcadeCollection);
|
||||
}
|
||||
|
||||
public MotorcadeCollection selectByFlowId(String flowId) {
|
||||
LambdaQueryWrapper<MotorcadeCollection> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MotorcadeCollection::getFlowId,flowId);
|
||||
return motorcadeCollectionService.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车队id和用户id查询代收款协议
|
||||
*/
|
||||
public MotorcadeCollectionPO getInfoByMoIdAndUserId(Long motorcadeId, Long userId) {
|
||||
MotorcadeCollectionPO motorcadeCollectionPO = new MotorcadeCollectionPO();
|
||||
LambdaQueryWrapper<MotorcadeCollection> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MotorcadeCollection::getMotorcadeId,motorcadeId);
|
||||
queryWrapper.eq(MotorcadeCollection::getUserId,userId);
|
||||
queryWrapper.eq(MotorcadeCollection::getDelFlag,1);
|
||||
List<MotorcadeCollection> motorcadeCollections = motorcadeCollectionService.list(queryWrapper);
|
||||
if(motorcadeCollections != null && motorcadeCollections.size()>0){
|
||||
motorcadeCollections.stream().findFirst().ifPresent(motorcadeCollection -> BeanUtils.copyProperties(motorcadeCollection, motorcadeCollectionPO));
|
||||
return motorcadeCollectionPO;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车队长userId和司机userId查询代收协议
|
||||
*/
|
||||
public MotorcadeCollectionPO getInfoByUserIds(Long motorcadeHeaderId, Long userId) {
|
||||
MotorcadeCollectionPO motorcadeCollectionPO = new MotorcadeCollectionPO();
|
||||
LambdaQueryWrapper<MotorcadeCollection> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MotorcadeCollection::getMotorcadeHeaderId,motorcadeHeaderId);
|
||||
queryWrapper.eq(MotorcadeCollection::getUserId,userId);
|
||||
queryWrapper.eq(MotorcadeCollection::getDelFlag,1);
|
||||
List<MotorcadeCollection> motorcadeCollections = motorcadeCollectionService.list(queryWrapper);
|
||||
if(motorcadeCollections != null && motorcadeCollections.size()>0){
|
||||
motorcadeCollections.stream().findFirst().ifPresent(motorcadeCollection -> BeanUtils.copyProperties(motorcadeCollection, motorcadeCollectionPO));
|
||||
return motorcadeCollectionPO;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.mhd.user.domain.projectUser.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
/**
|
||||
* 项目-用户关联对象 project_user
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-02
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ProjectUser extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("项目用户关联表ID")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long projectUserId;
|
||||
|
||||
@ApiModelProperty("项目表ID")
|
||||
@Excel(name = "项目表ID")
|
||||
private Long projectManagementId;
|
||||
|
||||
@ApiModelProperty("用户表ID")
|
||||
@Excel(name = "用户表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("用户表名称")
|
||||
@Excel(name = "用户表名称")
|
||||
private String userName;
|
||||
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.mhd.user.domain.projectUser.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.user.domain.projectUser.entity.ProjectUser;
|
||||
import com.mhd.common.core.domain.po.projectManagement.ProjectUserPO;
|
||||
import com.mhd.user.domain.projectUser.repository.todo.ProjectUserDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目-用户关联Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-02
|
||||
*/
|
||||
public interface IProjectUserService extends IService<ProjectUser>
|
||||
{
|
||||
/**
|
||||
* 分页查询项目-用户关联列表
|
||||
*/
|
||||
public List<ProjectUserPO> queryList(ProjectUserDO projectUserDO);
|
||||
|
||||
/**
|
||||
* 新增项目-用户关联
|
||||
*/
|
||||
public Boolean insert(ProjectUserDO projectUserDO);
|
||||
|
||||
/**
|
||||
* 修改项目-用户关联
|
||||
*/
|
||||
public Boolean update(ProjectUserDO projectUserDO);
|
||||
|
||||
/**
|
||||
* 批量删除项目-用户关联
|
||||
*/
|
||||
public Boolean delete(Long[] projectUserIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询项目-用户关联
|
||||
*/
|
||||
public ProjectUserPO getInfo(Long projectUserId);
|
||||
|
||||
void deleteByProjectAccount(ProjectUserDO projectUserDO);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.mhd.user.domain.projectUser.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.projectUser.entity.ProjectUser;
|
||||
import com.mhd.common.core.domain.po.projectManagement.ProjectUserPO;
|
||||
import com.mhd.user.domain.projectUser.repository.todo.ProjectUserDO;
|
||||
|
||||
/**
|
||||
* 项目-用户关联Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-02
|
||||
*/
|
||||
public interface ProjectUserMapper extends BaseMapper<ProjectUser>
|
||||
{
|
||||
/**
|
||||
* 查询项目-用户关联列表
|
||||
*/
|
||||
public List<ProjectUserPO> queryList(ProjectUserDO projectUserDO);
|
||||
|
||||
}
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
package com.mhd.user.domain.projectUser.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.user.domain.projectUser.entity.ProjectUser;
|
||||
import com.mhd.user.domain.projectUser.repository.facade.IProjectUserService;
|
||||
import com.mhd.user.domain.projectUser.repository.mapper.ProjectUserMapper;
|
||||
import com.mhd.common.core.domain.po.projectManagement.ProjectUserPO;
|
||||
import com.mhd.user.domain.projectUser.repository.todo.ProjectUserDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目-用户关联Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-02
|
||||
*/
|
||||
@Service
|
||||
public class ProjectUserImpl extends ServiceImpl<ProjectUserMapper, ProjectUser> implements IProjectUserService{
|
||||
@Autowired
|
||||
private ProjectUserMapper projectUserMapper;
|
||||
|
||||
/**
|
||||
* 查询项目-用户关联列表
|
||||
*/
|
||||
@Override
|
||||
public List<ProjectUserPO> queryList(ProjectUserDO projectUserDO)
|
||||
{
|
||||
return projectUserMapper.queryList(projectUserDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目-用户关联
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(ProjectUserDO projectUserDO) {
|
||||
ProjectUser projectUser = new ProjectUser();
|
||||
BeanUtils.copyProperties(projectUserDO,projectUser);
|
||||
return this.save(projectUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目-用户关联
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(ProjectUserDO projectUserDO) {
|
||||
ProjectUser projectUser = new ProjectUser();
|
||||
BeanUtils.copyProperties(projectUserDO,projectUser);
|
||||
return this.updateById(projectUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目-用户关联
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] projectUserIds ) {
|
||||
List<ProjectUser> list = new ArrayList<>();
|
||||
for (Long id : projectUserIds) {
|
||||
ProjectUser projectUser = new ProjectUser();
|
||||
projectUser.setProjectUserId(id);
|
||||
projectUser.setDelFlag(2);
|
||||
list.add(projectUser);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目-用户关联
|
||||
*/
|
||||
@Override
|
||||
public ProjectUserPO getInfo(Long projectUserId) {
|
||||
ProjectUser projectUser = this.getById(projectUserId);
|
||||
ProjectUserPO projectUserPO = new ProjectUserPO();
|
||||
BeanUtils.copyProperties(projectUser,projectUserPO);
|
||||
return projectUserPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByProjectAccount(ProjectUserDO projectUserDO) {
|
||||
QueryWrapper<ProjectUser> wrapper = new QueryWrapper<>();
|
||||
if (projectUserDO.getProjectManagementId() != null){
|
||||
wrapper.eq("project_management_id", projectUserDO.getProjectManagementId());
|
||||
}
|
||||
if (projectUserDO.getUserId() != null){
|
||||
wrapper.eq("user_id", projectUserDO.getUserId());
|
||||
}
|
||||
if (projectUserDO.getProjectManagementIdList() != null && !projectUserDO.getProjectManagementIdList().isEmpty()){
|
||||
wrapper.in("project_management_id", projectUserDO.getProjectManagementIdList());
|
||||
}
|
||||
projectUserMapper.delete(wrapper);
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.mhd.user.domain.projectUser.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 项目-用户关联对象 project_user
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-02
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ProjectUserDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("项目用户关联表ID")
|
||||
private Long projectUserId;
|
||||
|
||||
@ApiModelProperty("项目表ID")
|
||||
@Excel(name = "项目表ID")
|
||||
private Long projectManagementId;
|
||||
|
||||
@ApiModelProperty("用户表ID")
|
||||
@Excel(name = "用户表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "项目ID集合")
|
||||
private List<Long> projectManagementIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
@ApiModelProperty("用户表名称")
|
||||
@Excel(name = "用户表名称")
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "用户表信息")
|
||||
private String userInfo;
|
||||
|
||||
@ApiModelProperty("是否绑定 1-是,2-否")
|
||||
private Integer isBand;
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.mhd.user.domain.projectUser.service;
|
||||
|
||||
import com.mhd.user.domain.projectUser.entity.ProjectUser;
|
||||
import com.mhd.user.domain.projectUser.repository.facade.IProjectUserService;
|
||||
import com.mhd.common.core.domain.po.projectManagement.ProjectUserPO;
|
||||
import com.mhd.user.domain.projectUser.repository.todo.ProjectUserDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 项目-用户关联
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-02
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ProjectUserDomainService {
|
||||
|
||||
@Autowired
|
||||
private IProjectUserService projectUserService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询项目-用户关联列表
|
||||
*/
|
||||
public List<ProjectUserPO> queryList(ProjectUserDO projectUserDO) {
|
||||
return projectUserService.queryList(projectUserDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增项目-用户关联
|
||||
*/
|
||||
public Boolean insert(ProjectUserDO projectUserDO) {
|
||||
|
||||
return projectUserService.insert(projectUserDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目-用户关联
|
||||
*/
|
||||
public Boolean update(ProjectUserDO projectUserDO) {
|
||||
return projectUserService.update(projectUserDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目-用户关联
|
||||
*/
|
||||
public Boolean delete(Long[] projectUserIds) {
|
||||
return projectUserService.delete(projectUserIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目-用户关联详细信息
|
||||
*/
|
||||
public ProjectUserPO getInfo(Long projectUserId)
|
||||
{
|
||||
return projectUserService.getInfo(projectUserId);
|
||||
}
|
||||
|
||||
|
||||
public void deleteByProjectAccount(ProjectUserDO projectUserDO) {
|
||||
projectUserService.deleteByProjectAccount(projectUserDO);
|
||||
}
|
||||
|
||||
public void saveBatchList(List<ProjectUser> projectUserList) {
|
||||
projectUserService.saveBatch(projectUserList);
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.mhd.user.domain.roleAggregate.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@TableName("custom_auth_role")
|
||||
@Data
|
||||
public class CustomAuthRoleEntity extends BaseVOEntity implements Serializable {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "用户自定义权限表id")
|
||||
private Long customAuthRoleId;
|
||||
@ApiModelProperty(name = "角色id")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "菜单id")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "表格json")
|
||||
private String tableJson;
|
||||
@ApiModelProperty(name = "表单json")
|
||||
private String formJson;
|
||||
@ApiModelProperty(name = "按钮json")
|
||||
private String buttonJson;
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.mhd.user.domain.roleAggregate.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@TableName("custom_auth_user")
|
||||
@Data
|
||||
public class CustomAuthUserEntity extends BaseVOEntity implements Serializable {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "角色自定义权限表id")
|
||||
private Long customAuthUserId;
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
@ApiModelProperty(name = "菜单id")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "表格json")
|
||||
private String tableJson;
|
||||
@ApiModelProperty(name = "表单json")
|
||||
private String formJson;
|
||||
@ApiModelProperty(name = "按钮json")
|
||||
private String buttonJson;
|
||||
}
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.mhd.user.domain.roleAggregate.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("role")
|
||||
public class RoleEntity extends BaseVOEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty(name = "角色表ID")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "上级角色ID(预留字段)")
|
||||
private Long parentRoleId;
|
||||
@ApiModelProperty(name = "角色业务场景数据字典ID")
|
||||
private Long roleBusinessExampleId;
|
||||
@ApiModelProperty(name = "角色业务场景名称")
|
||||
private String roleBusinessExampleName;
|
||||
@ApiModelProperty(name = "角色分类:0-无状态,1-托运人,2-承运人")
|
||||
private Integer roleType;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
@ApiModelProperty(name = "职务/角色权限字符,控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)")
|
||||
private String roleCode;
|
||||
@ApiModelProperty(name = "职务/角色名称")
|
||||
private String roleName;
|
||||
@ApiModelProperty(name = "职务/角色描述")
|
||||
private String roleRemark;
|
||||
@ApiModelProperty(name = "数据权限范围:0-无状态,1-全公司,2-本部门,3-本部门及以下,4-自定义权限")
|
||||
private Integer roleDataScope;
|
||||
@ApiModelProperty(name = "职务/角色状态:0-无状态,1-开启,2-关闭")
|
||||
private Integer roleStatus;
|
||||
@ApiModelProperty(name = "角色等级:0-无状态,1-内置角色,2-组织角色,3-货主自建角色")
|
||||
private Integer roleGrade;
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.mhd.user.domain.roleAggregate.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
@TableName("role_menu")
|
||||
public class RoleMenuEntity extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "职务/角色权限表ID")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long roleMenuId;
|
||||
@ApiModelProperty(name = "职务/角色表ID")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "权限表ID")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "角色权限客户端:0-无状态,1-PC端,2-手机端")
|
||||
private Integer roleMenuClient;
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.mhd.user.domain.roleAggregate.factory;
|
||||
|
||||
import com.mhd.user.domain.roleAggregate.entity.CustomAuthRoleEntity;
|
||||
import com.mhd.user.domain.roleAggregate.entity.CustomAuthUserEntity;
|
||||
import com.mhd.user.domain.roleAggregate.entity.RoleEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleDo;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class RoleFactory {
|
||||
|
||||
public RoleEntity getRoleEntity(RoleDo roleDo) {
|
||||
RoleEntity roleEntity = new RoleEntity();
|
||||
BeanUtils.copyProperties(roleDo, roleEntity, IgnoreNullUtil.getNullPropertyNames(roleDo));
|
||||
return roleEntity;
|
||||
}
|
||||
public CustomAuthRoleEntity getCustomAuthRoleEntity(CustomAuthDO customAuthDO) {
|
||||
CustomAuthRoleEntity customAuthRoleEntity = new CustomAuthRoleEntity();
|
||||
BeanUtils.copyProperties(customAuthDO, customAuthRoleEntity, IgnoreNullUtil.getNullPropertyNames(customAuthDO));
|
||||
return customAuthRoleEntity;
|
||||
}
|
||||
|
||||
|
||||
public CustomAuthUserEntity getCustomAuthUserEntity(CustomAuthDO customAuthDO) {
|
||||
CustomAuthUserEntity customAuthUserEntity = new CustomAuthUserEntity();
|
||||
BeanUtils.copyProperties(customAuthDO, customAuthUserEntity, IgnoreNullUtil.getNullPropertyNames(customAuthDO));
|
||||
return customAuthUserEntity;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.mhd.user.domain.roleAggregate.factory;
|
||||
|
||||
import com.mhd.user.domain.roleAggregate.entity.RoleMenuEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleMenuDo;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class RoleMenuFactory {
|
||||
|
||||
public RoleMenuEntity getRoleMenuEntity(RoleMenuDo roleMenuDo) {
|
||||
RoleMenuEntity roleMenuEntity = new RoleMenuEntity();
|
||||
BeanUtils.copyProperties(roleMenuDo, roleMenuEntity, IgnoreNullUtil.getNullPropertyNames(roleMenuDo));
|
||||
return roleMenuEntity;
|
||||
}
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.user.domain.roleAggregate.entity.CustomAuthRoleEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.po.CustomAuthRoleOrUserPO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CustomAuthRoleRepositoryInterface extends IService<CustomAuthRoleEntity> {
|
||||
|
||||
List<CustomAuthRoleOrUserPO> getCustomAuthByRoleOrUserId(CustomAuthDO customAuthDO);
|
||||
|
||||
CustomAuthRoleOrUserPO getCustomAuthMenuByRoleOrUserId(CustomAuthDO customAuthDO);
|
||||
|
||||
int insertCustomAuthRole(CustomAuthRoleEntity customAuthRoleEntity);
|
||||
|
||||
void deleteCustomAuthRoleByRoleId(CustomAuthDO customAuthDO);
|
||||
|
||||
List<CustomAuthRoleEntity> selectByRoleIdList(List<Long> codeList);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.facade;
|
||||
|
||||
import com.mhd.user.domain.roleAggregate.entity.CustomAuthUserEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.po.CustomAuthRoleOrUserPO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CustomAuthUserRepositoryInterface {
|
||||
|
||||
List<CustomAuthRoleOrUserPO> getCustomAuthByRoleOrUserId(CustomAuthDO customAuthDO);
|
||||
List<CustomAuthRoleOrUserPO> getCustomAuthByRole(CustomAuthDO customAuthDO);
|
||||
|
||||
int insertCustomAuthUser(CustomAuthUserEntity customAuthUserEntity);
|
||||
|
||||
void deleteCustomAuthUserByUserId(CustomAuthDO customAuthDO);
|
||||
|
||||
CustomAuthRoleOrUserPO getCustomAuthMenuByRoleOrUserId(CustomAuthDO customAuthDO);
|
||||
|
||||
CustomAuthRoleOrUserPO getCustomAuthByRoleId(CustomAuthDO customAuthDO);
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.user.domain.roleAggregate.entity.RoleMenuEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleMenuDo;
|
||||
import com.mhd.common.core.domain.po.UserRoleMenuPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RoleMenuRepositoryInterface extends IService<RoleMenuEntity> {
|
||||
|
||||
int addRoleMenu(RoleMenuEntity roleMenuEntity);
|
||||
|
||||
int updateRoleMenu(RoleMenuEntity roleMenuEntity);
|
||||
|
||||
void removeByRoleId(RoleMenuDo roleMenuDo);
|
||||
|
||||
List<RoleMenuEntity> selectList(RoleMenuDo roleMenuDo);
|
||||
|
||||
List<UserRoleMenuPO> selectRoleMenuList(RoleMenuDo roleMenuDo);
|
||||
|
||||
RoleMenuEntity findByRoleMenuId(RoleMenuDo roleMenuDo);
|
||||
|
||||
List<RoleMenuEntity> selectByRoleList(List<Long> roleList);
|
||||
}
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.user.domain.roleAggregate.entity.RoleEntity;
|
||||
import com.mhd.common.core.domain.po.RolePO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleDo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RoleRepositoryInterface extends IService<RoleEntity> {
|
||||
|
||||
int addRole(RoleEntity roleEntity);
|
||||
|
||||
void saveBatchList(List<RoleEntity> list);
|
||||
|
||||
int updateRole(RoleEntity roleEntity);
|
||||
|
||||
RoleEntity selectByOrganizationIdAndRoleCode(RoleDo roleDo);
|
||||
|
||||
List<RolePO> selecRolePoList(RoleDo roleDo);
|
||||
|
||||
RolePO findDelByRoleId(Long roleId);
|
||||
|
||||
RolePO findByRoleId(Long roleId);
|
||||
|
||||
RolePO selectByRoleCodeAndOrganizationId(String roleCode, Long organizationId);
|
||||
|
||||
|
||||
RolePO selectRoleByOrganizationAndCode(RoleDo roleDo);
|
||||
|
||||
void deleteByOrganizationId(Long organizationId);
|
||||
|
||||
String findRoleNameByRoleIds(List<Long> roleIds);
|
||||
|
||||
List<RoleEntity> selectByRoleIds(List<Long> roleIds);
|
||||
|
||||
List<RoleEntity> queryList(RoleDo roleDo);
|
||||
|
||||
List<RoleEntity> selectByCodesAndOrganizationIds(List<String> delCodes, List<Long> longs);
|
||||
|
||||
List<RoleEntity> selectByOrganizations(String roleCode , List<Long> organizationIds);
|
||||
|
||||
List<RolePO> getRoleListByUserId(Long userId);
|
||||
}
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.roleAggregate.entity.CustomAuthRoleEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.po.CustomAuthRoleOrUserPO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CustomAuthRoleMapper extends BaseMapper<CustomAuthRoleEntity>{
|
||||
|
||||
List<CustomAuthRoleOrUserPO> getCustomAuthByRoleOrUserId(CustomAuthDO customAuthDO);
|
||||
|
||||
CustomAuthRoleOrUserPO getCustomAuthMenuByRoleOrUserId(CustomAuthDO customAuthDO);
|
||||
|
||||
void deleteCustomAuthRoleByRoleId(CustomAuthDO customAuthDO);
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.roleAggregate.entity.CustomAuthUserEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.po.CustomAuthRoleOrUserPO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CustomAuthUserMapper extends BaseMapper<CustomAuthUserEntity> {
|
||||
|
||||
List<CustomAuthRoleOrUserPO> getCustomAuthByRoleOrUserId(CustomAuthDO customAuthDO);
|
||||
@Select("SELECT * FROM `custom_auth_role` WHERE role_id IN (SELECT role_id FROM user_role WHERE user_id = #{userId})")
|
||||
List<CustomAuthRoleOrUserPO> getCustomAuthByRole(@Param("userId") Long userId);
|
||||
|
||||
void deleteCustomAuthUserByUserId(CustomAuthDO customAuthDO);
|
||||
|
||||
CustomAuthRoleOrUserPO getCustomAuthMenuByRoleOrUserId(CustomAuthDO customAuthDO);
|
||||
|
||||
CustomAuthRoleOrUserPO getCustomAuthByRoleId(CustomAuthDO customAuthDO);
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.roleAggregate.entity.RoleEntity;
|
||||
import com.mhd.common.core.domain.po.RolePO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleDo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RoleMapper extends BaseMapper<RoleEntity> {
|
||||
|
||||
List<RolePO> queryList(RoleDo roleDo);
|
||||
|
||||
RoleEntity selectByOrganizationIdAndRoleCode(RoleDo roleDo);
|
||||
|
||||
RolePO findDelByRoleId(Long roleId);
|
||||
|
||||
RolePO selectByRoleId(Long roleId);
|
||||
|
||||
/**
|
||||
* @description 根据角色code加组织id查询角色
|
||||
* @author ZhouGY
|
||||
* @date 2023/10/10 11:18
|
||||
* @param roleCode
|
||||
* @param organizationId
|
||||
* @return RolePO
|
||||
*/
|
||||
RolePO selectByRoleCodeAndOrganizationId(@Param("roleCode") String roleCode, @Param("organizationId") Long organizationId);
|
||||
|
||||
void deleteByOrganizationId(Long organizationId);
|
||||
|
||||
RolePO selectRoleByOrganizationAndCode(RoleDo roleDo);
|
||||
|
||||
String findRoleNameByRoleIds(List<Long> roleIds);
|
||||
|
||||
RolePO selectByRoleCode(RoleDo query);
|
||||
|
||||
List<RolePO> getRoleListByUserId(@Param("userId") Long userId);
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.user.domain.roleAggregate.entity.RoleMenuEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleMenuDo;
|
||||
import com.mhd.common.core.domain.po.UserRoleMenuPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RoleMenuMapper extends BaseMapper<RoleMenuEntity> {
|
||||
|
||||
List<RoleMenuEntity> queryList(RoleMenuDo roleMenuDo);
|
||||
|
||||
List<UserRoleMenuPO> selectRoleMenuList(RoleMenuDo roleMenuDo);
|
||||
|
||||
void removeByRoleId(RoleMenuDo roleMenuDo);
|
||||
|
||||
RoleMenuEntity selectByRoleMenuId(RoleMenuDo roleMenuDo);
|
||||
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.user.domain.roleAggregate.entity.CustomAuthRoleEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.facade.CustomAuthRoleRepositoryInterface;
|
||||
import com.mhd.user.domain.roleAggregate.repository.mapper.CustomAuthRoleMapper;
|
||||
import com.mhd.user.domain.roleAggregate.repository.po.CustomAuthRoleOrUserPO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service
|
||||
public class CustomAuthRoleRepositoryImpl extends ServiceImpl<CustomAuthRoleMapper, CustomAuthRoleEntity> implements CustomAuthRoleRepositoryInterface {
|
||||
|
||||
@Resource
|
||||
private CustomAuthRoleMapper customAuthRoleMapper;
|
||||
|
||||
@Override
|
||||
public List<CustomAuthRoleOrUserPO> getCustomAuthByRoleOrUserId(CustomAuthDO customAuthDO) {
|
||||
return customAuthRoleMapper.getCustomAuthByRoleOrUserId(customAuthDO);
|
||||
}
|
||||
@Override
|
||||
public CustomAuthRoleOrUserPO getCustomAuthMenuByRoleOrUserId(CustomAuthDO customAuthDO) {
|
||||
return customAuthRoleMapper.getCustomAuthMenuByRoleOrUserId(customAuthDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertCustomAuthRole(CustomAuthRoleEntity customAuthRoleEntity) {
|
||||
return customAuthRoleMapper.insert(customAuthRoleEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteCustomAuthRoleByRoleId(CustomAuthDO customAuthDO) {
|
||||
customAuthRoleMapper.deleteCustomAuthRoleByRoleId(customAuthDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CustomAuthRoleEntity> selectByRoleIdList(List<Long> codeList) {
|
||||
return customAuthRoleMapper.selectList(new LambdaQueryWrapper<CustomAuthRoleEntity>().eq(CustomAuthRoleEntity::getDelFlag, 1)
|
||||
.in(CustomAuthRoleEntity::getRoleId, codeList));
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.persistence;
|
||||
|
||||
import com.mhd.user.domain.roleAggregate.entity.CustomAuthUserEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.facade.CustomAuthUserRepositoryInterface;
|
||||
import com.mhd.user.domain.roleAggregate.repository.mapper.CustomAuthUserMapper;
|
||||
import com.mhd.user.domain.roleAggregate.repository.po.CustomAuthRoleOrUserPO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CustomAuthUserRepositoryImpl implements CustomAuthUserRepositoryInterface {
|
||||
|
||||
@Resource
|
||||
private CustomAuthUserMapper customAuthUserMapper;
|
||||
|
||||
@Override
|
||||
public List<CustomAuthRoleOrUserPO> getCustomAuthByRoleOrUserId(CustomAuthDO customAuthDO) {
|
||||
return customAuthUserMapper.getCustomAuthByRoleOrUserId(customAuthDO);
|
||||
}
|
||||
@Override
|
||||
public List<CustomAuthRoleOrUserPO> getCustomAuthByRole(CustomAuthDO customAuthDO) {
|
||||
return customAuthUserMapper.getCustomAuthByRole(customAuthDO.getUserId());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int insertCustomAuthUser(CustomAuthUserEntity customAuthUserEntity) {
|
||||
return customAuthUserMapper.insert(customAuthUserEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteCustomAuthUserByUserId(CustomAuthDO customAuthDO) {
|
||||
customAuthUserMapper.deleteCustomAuthUserByUserId(customAuthDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomAuthRoleOrUserPO getCustomAuthMenuByRoleOrUserId(CustomAuthDO customAuthDO) {
|
||||
return customAuthUserMapper.getCustomAuthMenuByRoleOrUserId(customAuthDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomAuthRoleOrUserPO getCustomAuthByRoleId(CustomAuthDO customAuthDO) {
|
||||
return customAuthUserMapper.getCustomAuthByRoleId(customAuthDO);
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.user.domain.roleAggregate.repository.facade.RoleMenuRepositoryInterface;
|
||||
import com.mhd.user.domain.roleAggregate.repository.mapper.RoleMenuMapper;
|
||||
import com.mhd.user.domain.roleAggregate.entity.RoleMenuEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleMenuDo;
|
||||
import com.mhd.common.core.domain.po.UserRoleMenuPO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class RoleMenuRepositoryImpl extends ServiceImpl<RoleMenuMapper,RoleMenuEntity> implements RoleMenuRepositoryInterface {
|
||||
|
||||
@Resource
|
||||
private RoleMenuMapper roleMenuMapper;
|
||||
|
||||
@Override
|
||||
public int addRoleMenu(RoleMenuEntity roleMenuEntity) {
|
||||
return roleMenuMapper.insert(roleMenuEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateRoleMenu(RoleMenuEntity RoleMenuEntity) {
|
||||
return roleMenuMapper.updateById(RoleMenuEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeByRoleId(RoleMenuDo roleMenuDo) {
|
||||
roleMenuMapper.removeByRoleId(roleMenuDo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleMenuEntity> selectList(RoleMenuDo roleMenuDo) {
|
||||
return roleMenuMapper.queryList(roleMenuDo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserRoleMenuPO> selectRoleMenuList(RoleMenuDo roleMenuDo) {
|
||||
return roleMenuMapper.selectRoleMenuList(roleMenuDo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RoleMenuEntity findByRoleMenuId(RoleMenuDo roleMenuDo) {
|
||||
return roleMenuMapper.selectByRoleMenuId(roleMenuDo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleMenuEntity> selectByRoleList(List<Long> roleList) {
|
||||
return roleMenuMapper.selectList(new LambdaQueryWrapper<RoleMenuEntity>().in(RoleMenuEntity::getRoleId , roleList));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.persistence;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.user.domain.roleAggregate.entity.RoleEntity;
|
||||
import com.mhd.user.domain.roleAggregate.repository.facade.RoleRepositoryInterface;
|
||||
import com.mhd.user.domain.roleAggregate.repository.mapper.RoleMapper;
|
||||
import com.mhd.common.core.domain.po.RolePO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleDo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class RoleRepositoryImpl extends ServiceImpl<RoleMapper,RoleEntity> implements RoleRepositoryInterface {
|
||||
|
||||
@Resource
|
||||
private RoleMapper roleMapper;
|
||||
|
||||
@Override
|
||||
public int addRole(RoleEntity roleEntity) {
|
||||
return roleMapper.insert(roleEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveBatchList(List<RoleEntity> list) {
|
||||
this.saveBatch(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateRole(RoleEntity roleEntity) {
|
||||
return roleMapper.updateById(roleEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RoleEntity selectByOrganizationIdAndRoleCode(RoleDo roleDo) {
|
||||
RoleEntity roleEntity = roleMapper.selectByOrganizationIdAndRoleCode(roleDo);
|
||||
return roleEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByOrganizationId(Long organizationId) {
|
||||
roleMapper.deleteByOrganizationId(organizationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author Alex
|
||||
* @Date 2022/12/9 01:21
|
||||
*/
|
||||
@Override
|
||||
public List<RolePO> selecRolePoList(RoleDo roleDo) {
|
||||
List<RolePO> rolePoList = roleMapper.queryList(roleDo);
|
||||
return rolePoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 根据角色ID查询历史角色信息,可查询出已逻辑删除角色信息
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:02
|
||||
*/
|
||||
@Override
|
||||
public RolePO findDelByRoleId(Long roleId) {
|
||||
return roleMapper.findDelByRoleId(roleId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RolePO findByRoleId(Long roleId) {
|
||||
return roleMapper.selectByRoleId(roleId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 根据角色code加组织id查询角色
|
||||
* @author ZhouGY
|
||||
* @date 2023/10/10 11:18
|
||||
* @param roleCode
|
||||
* @param organizationId
|
||||
* @return RolePO
|
||||
*/
|
||||
@Override
|
||||
public RolePO selectByRoleCodeAndOrganizationId(String roleCode, Long organizationId) {
|
||||
return roleMapper.selectByRoleCodeAndOrganizationId(roleCode, organizationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 根据组织ID和角色编码查询角色ID
|
||||
* @Author Alex
|
||||
* @Date 2022/12/7 00:46
|
||||
*/
|
||||
@Override
|
||||
public RolePO selectRoleByOrganizationAndCode(RoleDo roleDo) {
|
||||
return roleMapper.selectRoleByOrganizationAndCode(roleDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 根据角色IDs获取角色名称
|
||||
* @Author Alex
|
||||
* @Date 2022/12/20 17:27
|
||||
*/
|
||||
@Override
|
||||
public String findRoleNameByRoleIds(List<Long> roleIds) {
|
||||
return roleMapper.findRoleNameByRoleIds(roleIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleEntity> selectByRoleIds(List<Long> roleIds) {
|
||||
List<RoleEntity> roleEntities = roleMapper.selectBatchIds(roleIds);
|
||||
return roleEntities;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleEntity> queryList(RoleDo roleDo) {
|
||||
QueryWrapper<RoleEntity> qw = new QueryWrapper<>();
|
||||
if (roleDo.getOrganizationId() != null){
|
||||
qw.eq("organization_id" ,roleDo.getOrganizationId());
|
||||
}
|
||||
if (roleDo.getRoleGrade() != null){
|
||||
qw.eq("role_grade" ,roleDo.getRoleGrade());
|
||||
}
|
||||
if (roleDo.getDelFlag() != null){
|
||||
qw.eq("del_flag" ,roleDo.getDelFlag());
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(roleDo.getRoleCodes())){
|
||||
qw.in("role_code",roleDo.getRoleCodes());
|
||||
}
|
||||
return roleMapper.selectList(qw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleEntity> selectByCodesAndOrganizationIds(List<String> delCodes, List<Long> longs) {
|
||||
|
||||
return roleMapper.selectList(new LambdaQueryWrapper<RoleEntity>()
|
||||
.in(RoleEntity::getRoleCode ,delCodes)
|
||||
.in(RoleEntity::getOrganizationId ,longs));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleEntity> selectByOrganizations(String roleCode , List<Long> organizationIds) {
|
||||
return roleMapper.selectList(new LambdaQueryWrapper<RoleEntity>()
|
||||
.in(RoleEntity::getOrganizationId ,organizationIds)
|
||||
.eq(RoleEntity::getRoleCode , roleCode));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RolePO> getRoleListByUserId(Long userId) {
|
||||
return roleMapper.getRoleListByUserId(userId);
|
||||
}
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.po;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class CustomAuthRoleOrUserPO extends BaseVOEntity implements Serializable {
|
||||
|
||||
@ApiModelProperty(name = "角色自定义id")
|
||||
private Long customAuthRoleId = 0L;
|
||||
@ApiModelProperty(name = "用户自定义id")
|
||||
private Long customAuthUserId = 0L;
|
||||
@ApiModelProperty(name = "菜单id")
|
||||
private Long menuId = 0L;
|
||||
@ApiModelProperty(name = "表格json")
|
||||
private String tableJson = "";
|
||||
@ApiModelProperty(name = "表单json")
|
||||
private String formJson = "";
|
||||
@ApiModelProperty(name = "按钮json")
|
||||
private String buttonJson = "";
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.todo;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class CustomAuthDO extends BaseVOEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty(name = "菜单表ID")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "角色表ID")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "用户表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(name = "表格json")
|
||||
private String tableJson;
|
||||
@ApiModelProperty(name = "表单json")
|
||||
private String formJson;
|
||||
@ApiModelProperty(name = "按钮json")
|
||||
private String buttonJson;
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.todo;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class CustomAuthRoleDO extends BaseVOEntity implements Serializable {
|
||||
|
||||
@ApiModelProperty(name = "角色自定义权限表id")
|
||||
private Long customAuthRoleId;
|
||||
@ApiModelProperty(name = "角色id")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "菜单id")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "表格json")
|
||||
private String tableJson;
|
||||
@ApiModelProperty(name = "表单json")
|
||||
private String formJson;
|
||||
@ApiModelProperty(name = "按钮json")
|
||||
private String buttonJson;
|
||||
}
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.todo;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class CustomAuthUserDO extends BaseVOEntity implements Serializable {
|
||||
|
||||
@ApiModelProperty(name = "用户自定义权限表id")
|
||||
private Long customAuthUserId;
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
@ApiModelProperty(name = "菜单id")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "表格json")
|
||||
private String tableJson;
|
||||
@ApiModelProperty(name = "表单json")
|
||||
private String formJson;
|
||||
@ApiModelProperty(name = "按钮json")
|
||||
private String buttonJson;
|
||||
}
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.todo;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class RoleDo extends BaseVOEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty(name = "角色表ID")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "上级角色ID(预留字段)")
|
||||
private Long parentRoleId;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
@ApiModelProperty(name = "角色业务场景数据字典ID")
|
||||
private Long roleBusinessExampleId;
|
||||
@ApiModelProperty(name = "角色业务场景名称")
|
||||
private String roleBusinessExampleName;
|
||||
@ApiModelProperty(name = "角色分类:0-无状态,1-托运人,2-承运人")
|
||||
private Integer roleType;
|
||||
@ApiModelProperty(name = "角色分类名称")
|
||||
private String roleTypeName;
|
||||
@ApiModelProperty(name = "职务/角色权限字符,控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)")
|
||||
private String roleCode;
|
||||
@ApiModelProperty(name = "职务/角色名称")
|
||||
private String roleName;
|
||||
@ApiModelProperty(name = "职务/角色描述")
|
||||
private String roleRemark;
|
||||
@ApiModelProperty(name = "数据权限范围:0-无状态,1-全公司,2-本部门,3-本部门及以下,4-自定义权限")
|
||||
private Integer roleDataScope;
|
||||
@ApiModelProperty(name = "职务/角色状态:0-无状态,1-开启,2-关闭")
|
||||
private Integer roleStatus;
|
||||
@ApiModelProperty(name = "职务/角色表ID集合")
|
||||
private List<Long> roleIds;
|
||||
@ApiModelProperty(name = "职务/角色表code集合")
|
||||
private List<String> roleCodes;
|
||||
private List<String> roleCodeList;
|
||||
@ApiModelProperty(name = "组织表ID集合")
|
||||
private List<Long> organizationIds;
|
||||
|
||||
@ApiModelProperty(name = "角色等级:0-无状态,1-内置角色,2-组织角色,3-货主自建角色")
|
||||
private Integer roleGrade;
|
||||
|
||||
@ApiModelProperty(name = "菜单表ID")
|
||||
public Long permissionMenuId;
|
||||
@ApiModelProperty(name = "组织表ID集合")
|
||||
public List<Long> permissionOrganizationIds = null;
|
||||
@ApiModelProperty("原角色id(用来复制之前的菜单使用)")
|
||||
private Long copyRoleId;
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.mhd.user.domain.roleAggregate.repository.todo;
|
||||
|
||||
import com.mhd.common.core.domain.po.MenuVo;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class RoleMenuDo extends BaseVOEntity implements Serializable {
|
||||
|
||||
@ApiModelProperty(name = "职务/角色权限表ID")
|
||||
private Long roleMenuId;
|
||||
@ApiModelProperty(name = "职务/角色表ID")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "权限表ID")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "菜单表ID集合")
|
||||
private List<Long> menuIds;
|
||||
@ApiModelProperty(name = "角色表ID集合")
|
||||
private List<Long> roleIds;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "角色权限客户端:0-无状态,1-PC端,2-手机端")
|
||||
private Integer roleMenuClient;
|
||||
|
||||
@ApiModelProperty(name = "唯一key集合")
|
||||
private List<String> idKeyList;
|
||||
@ApiModelProperty(name = "菜单权限集合")
|
||||
private List<MenuVo> menuVoList;
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.user.domain.roleAggregate.service;
|
||||
|
||||
import com.mhd.user.domain.roleAggregate.entity.CustomAuthRoleEntity;
|
||||
import com.mhd.user.domain.roleAggregate.factory.RoleFactory;
|
||||
import com.mhd.user.domain.roleAggregate.repository.facade.CustomAuthRoleRepositoryInterface;
|
||||
import com.mhd.user.domain.roleAggregate.repository.po.CustomAuthRoleOrUserPO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CustomAuthRoleDomainService {
|
||||
|
||||
@Resource
|
||||
private RoleFactory roleFactory;
|
||||
@Resource
|
||||
private CustomAuthRoleRepositoryInterface customAuthRoleRepository;
|
||||
|
||||
/**
|
||||
* @Description 获取角色自定义权限
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:25
|
||||
*/
|
||||
public List<CustomAuthRoleOrUserPO> getCustomAuthByRoleOrUserId(CustomAuthDO customAuthDO) {
|
||||
return customAuthRoleRepository.getCustomAuthByRoleOrUserId(customAuthDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 查询角色自定义权限表
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:24
|
||||
*/
|
||||
public CustomAuthRoleOrUserPO getCustomAuthMenuByRoleOrUserId(CustomAuthDO customAuthDO) {
|
||||
return customAuthRoleRepository.getCustomAuthMenuByRoleOrUserId(customAuthDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 分配角色自定义权限
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:24
|
||||
*/
|
||||
public int assignCustomAuthByRoleId(CustomAuthDO customAuthDO) {
|
||||
CustomAuthRoleEntity customAuthRoleEntity = roleFactory.getCustomAuthRoleEntity(customAuthDO);
|
||||
return customAuthRoleRepository.insertCustomAuthRole(customAuthRoleEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除角色自定义权限
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:25
|
||||
*/
|
||||
public void deleteCustomAuthRoleByRoleId(CustomAuthDO customAuthDO) {
|
||||
customAuthRoleRepository.deleteCustomAuthRoleByRoleId(customAuthDO);
|
||||
}
|
||||
|
||||
public List<CustomAuthRoleEntity> selectByRoleIdList(List<Long> codeList) {
|
||||
return customAuthRoleRepository.selectByRoleIdList(codeList);
|
||||
}
|
||||
|
||||
public void saveBatch(List<CustomAuthRoleEntity> customAuthRoleEntityList) {
|
||||
customAuthRoleRepository.saveBatch(customAuthRoleEntityList);
|
||||
}
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.mhd.user.domain.roleAggregate.service;
|
||||
|
||||
import com.mhd.user.domain.roleAggregate.entity.CustomAuthUserEntity;
|
||||
import com.mhd.user.domain.roleAggregate.factory.RoleFactory;
|
||||
import com.mhd.user.domain.roleAggregate.repository.facade.CustomAuthRoleRepositoryInterface;
|
||||
import com.mhd.user.domain.roleAggregate.repository.facade.CustomAuthUserRepositoryInterface;
|
||||
import com.mhd.user.domain.roleAggregate.repository.po.CustomAuthRoleOrUserPO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CustomAuthUserDomainService {
|
||||
|
||||
@Resource
|
||||
private RoleFactory roleFactory;
|
||||
@Resource
|
||||
private CustomAuthRoleRepositoryInterface customAuthRoleRepository;
|
||||
@Resource
|
||||
private CustomAuthUserRepositoryInterface customAuthUserRepositoryInterface;
|
||||
|
||||
/**
|
||||
* @Description 获取用户自定义权限
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:25
|
||||
*/
|
||||
public List<CustomAuthRoleOrUserPO> getCustomAuthByRoleOrUserId(CustomAuthDO customAuthDO) {
|
||||
return customAuthUserRepositoryInterface.getCustomAuthByRoleOrUserId(customAuthDO);
|
||||
}
|
||||
public List<CustomAuthRoleOrUserPO> getCustomAuthByRole(CustomAuthDO customAuthDO) {
|
||||
return customAuthUserRepositoryInterface.getCustomAuthByRole(customAuthDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除用户自定义权限
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:25
|
||||
*/
|
||||
public void deleteCustomAuthUserByUserId(CustomAuthDO customAuthDO) {
|
||||
customAuthUserRepositoryInterface.deleteCustomAuthUserByUserId(customAuthDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 查询用户自定义权限表
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:24
|
||||
*/
|
||||
public CustomAuthRoleOrUserPO getCustomAuthMenuByRoleOrUserId(CustomAuthDO customAuthDO) {
|
||||
return customAuthUserRepositoryInterface.getCustomAuthMenuByRoleOrUserId(customAuthDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 分配用户自定义权限
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:24
|
||||
*/
|
||||
public int assignCustomAuthByUserId(CustomAuthDO customAuthDO) {
|
||||
CustomAuthUserEntity customAuthUserEntity = roleFactory.getCustomAuthUserEntity(customAuthDO);
|
||||
return customAuthUserRepositoryInterface.insertCustomAuthUser(customAuthUserEntity);
|
||||
}
|
||||
|
||||
public CustomAuthRoleOrUserPO getCustomAuthByRoleId(CustomAuthDO customAuthDO) {
|
||||
return customAuthUserRepositoryInterface.getCustomAuthByRoleId(customAuthDO);
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.mhd.user.domain.roleAggregate.service;
|
||||
|
||||
import com.mhd.user.domain.roleAggregate.entity.RoleMenuEntity;
|
||||
import com.mhd.user.domain.roleAggregate.factory.RoleMenuFactory;
|
||||
import com.mhd.user.domain.roleAggregate.repository.facade.RoleMenuRepositoryInterface;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleMenuDo;
|
||||
import com.mhd.common.core.domain.po.UserRoleMenuPO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class RoleAuthDomainService {
|
||||
|
||||
@Autowired
|
||||
private RoleMenuFactory roleMenuFactory;
|
||||
@Resource
|
||||
private RoleMenuRepositoryInterface roleMenuRepositoryInterface;
|
||||
|
||||
public List<RoleMenuEntity> selectList(RoleMenuDo roleMenuDo) {
|
||||
return roleMenuRepositoryInterface.selectList(roleMenuDo);
|
||||
}
|
||||
|
||||
public List<UserRoleMenuPO> selectRoleMenuList(RoleMenuDo roleMenuDo) {
|
||||
return roleMenuRepositoryInterface.selectRoleMenuList(roleMenuDo);
|
||||
}
|
||||
|
||||
}
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
package com.mhd.user.domain.roleAggregate.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.user.domain.roleAggregate.entity.RoleEntity;
|
||||
import com.mhd.user.domain.roleAggregate.factory.RoleFactory;
|
||||
import com.mhd.user.domain.roleAggregate.repository.facade.RoleRepositoryInterface;
|
||||
import com.mhd.user.domain.roleAggregate.repository.mapper.RoleMapper;
|
||||
import com.mhd.common.core.domain.po.RolePO;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleDo;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.RoleError;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class RoleDomainService {
|
||||
|
||||
@Autowired
|
||||
private RoleFactory roleFactory;
|
||||
@Resource
|
||||
private RoleRepositoryInterface roleRepositoryInterface;
|
||||
@Resource
|
||||
private RoleMapper roleMapper;
|
||||
|
||||
/**
|
||||
* @Description 新增角色信息
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:35
|
||||
*/
|
||||
public int addRole(RoleDo roleDo) {
|
||||
RoleEntity roleEntity = roleFactory.getRoleEntity(roleDo);
|
||||
int i = roleRepositoryInterface.addRole(roleEntity);
|
||||
roleDo.setRoleId(roleEntity.getRoleId());
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 批量新增角色信息
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:35
|
||||
*/
|
||||
public void saveBatchList(List<RoleEntity> list) {
|
||||
roleRepositoryInterface.saveBatchList(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 新增/修改角色信息
|
||||
* @Author Alex
|
||||
* @Date 2023/1/9 23:35
|
||||
*/
|
||||
public int updateRole(RoleDo roleDo) {
|
||||
//校验角色编码是否重复
|
||||
Long topOrganizationId = SecurityUtils.getLoginUser().getUserPo().getTopOrganizationId();
|
||||
RoleEntity roleEntity = roleFactory.getRoleEntity(roleDo);
|
||||
RoleDo query = new RoleDo();
|
||||
if (roleDo.getOrganizationId() != null){
|
||||
query.setOrganizationId(roleDo.getOrganizationId());
|
||||
}else {
|
||||
query.setOrganizationId(topOrganizationId);
|
||||
}
|
||||
query.setRoleCode(roleDo.getRoleCode());
|
||||
|
||||
if (roleDo.getRoleId() != null){
|
||||
query.setRoleId(roleDo.getRoleId());
|
||||
}
|
||||
RolePO rolePO = roleMapper.selectByRoleCode(query);
|
||||
if (rolePO != null){
|
||||
throw new DigitalLogisticsException(RoleError.ROLE_CODE_EXIST);
|
||||
}
|
||||
if (ObjectUtil.isNull(roleDo.getRoleId())) {
|
||||
return roleRepositoryInterface.addRole(roleEntity);
|
||||
} else {
|
||||
return roleRepositoryInterface.updateRole(roleEntity);
|
||||
}
|
||||
}
|
||||
|
||||
public List<RolePO> selecRolePoList(RoleDo roleDo) {
|
||||
return roleRepositoryInterface.selecRolePoList(roleDo);
|
||||
}
|
||||
|
||||
public List<RolePO> selectList(RoleDo roleDo) {
|
||||
return roleRepositoryInterface.selecRolePoList(roleDo);
|
||||
}
|
||||
|
||||
public RoleEntity selectByOrganizationIdAndRoleCode(RoleDo roleDo) {
|
||||
return roleRepositoryInterface.selectByOrganizationIdAndRoleCode(roleDo);
|
||||
}
|
||||
|
||||
public RolePO findDelByRoleId(Long roleId) {
|
||||
return roleRepositoryInterface.findDelByRoleId(roleId);
|
||||
}
|
||||
|
||||
public RolePO selectByRoleId(Long roleId) {
|
||||
return roleRepositoryInterface.findByRoleId(roleId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 根据角色code加组织id查询角色
|
||||
* @author ZhouGY
|
||||
* @date 2023/10/10 11:18
|
||||
* @param roleCode
|
||||
* @param organizationId
|
||||
* @return RolePO
|
||||
*/
|
||||
public RolePO selectByRoleCodeAndOrganizationId(String roleCode, Long organizationId) {
|
||||
return roleRepositoryInterface.selectByRoleCodeAndOrganizationId(roleCode, organizationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 根据组织ID和角色编码查询角色ID
|
||||
* @Author Alex
|
||||
* @Date 2022/12/7 00:46
|
||||
*/
|
||||
public RolePO selectRoleByOrganizationAndCode(RoleDo roleDo) {
|
||||
return roleRepositoryInterface.selectRoleByOrganizationAndCode(roleDo);
|
||||
}
|
||||
|
||||
|
||||
public void deleteByOrganizationId(Long organizationId) {
|
||||
roleRepositoryInterface.deleteByOrganizationId(organizationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 根据角色IDs获取角色名称
|
||||
* @Author Alex
|
||||
* @Date 2022/12/20 17:27
|
||||
*/
|
||||
public String findRoleNameByRoleIds(List<Long> roleIds) {
|
||||
return roleRepositoryInterface.findRoleNameByRoleIds(roleIds);
|
||||
}
|
||||
|
||||
public List<RoleEntity> selectByRoleIds(List<Long> roleIds) {
|
||||
List<RoleEntity> roleEntities = roleRepositoryInterface.selectByRoleIds(roleIds);
|
||||
return roleEntities;
|
||||
}
|
||||
|
||||
public void updateBatchListById(List<RoleEntity> list) {
|
||||
roleRepositoryInterface.updateBatchById(list);
|
||||
}
|
||||
|
||||
public List<RoleEntity> queryList(RoleDo roleDo) {
|
||||
return roleRepositoryInterface.queryList(roleDo);
|
||||
}
|
||||
|
||||
public List<RoleEntity> selectByCodesAndOrganizationIds(List<String> delCodes, List<Long> longs) {
|
||||
return roleRepositoryInterface.selectByCodesAndOrganizationIds(delCodes , longs);
|
||||
}
|
||||
|
||||
public List<RoleEntity> selectByOrganizations(String roleCode , List<Long> organizationIds) {
|
||||
return roleRepositoryInterface.selectByOrganizations(roleCode ,organizationIds);
|
||||
}
|
||||
|
||||
public List<RolePO> getRoleListByUserId(Long userId) {
|
||||
return roleRepositoryInterface.getRoleListByUserId(userId);
|
||||
}
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.mhd.user.domain.roleAggregate.service;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.mhd.user.domain.roleAggregate.entity.RoleMenuEntity;
|
||||
import com.mhd.user.domain.roleAggregate.factory.RoleMenuFactory;
|
||||
import com.mhd.user.domain.roleAggregate.repository.facade.RoleMenuRepositoryInterface;
|
||||
import com.mhd.user.domain.roleAggregate.repository.todo.RoleMenuDo;
|
||||
import com.mhd.common.core.domain.po.UserRoleMenuPO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class RoleMenuDomainService {
|
||||
|
||||
@Autowired
|
||||
private RoleMenuFactory roleMenuFactory;
|
||||
@Resource
|
||||
private RoleMenuRepositoryInterface roleMenuRepositoryInterface;
|
||||
|
||||
@Resource
|
||||
private CustomAuthRoleDomainService customAuthRoleDomainService;
|
||||
|
||||
@Resource
|
||||
private CustomAuthRoleDomainService customAuthUserRepositoryInterface;
|
||||
|
||||
public int addRoleMenu(RoleMenuDo roleMenuDo) {
|
||||
RoleMenuEntity roleMenuEntity = roleMenuFactory.getRoleMenuEntity(roleMenuDo);
|
||||
return roleMenuRepositoryInterface.addRoleMenu(roleMenuEntity);
|
||||
}
|
||||
|
||||
public List<RoleMenuEntity> selectList(RoleMenuDo roleMenuDo) {
|
||||
return roleMenuRepositoryInterface.selectList(roleMenuDo);
|
||||
}
|
||||
|
||||
public List<UserRoleMenuPO> selectRoleMenuList(RoleMenuDo roleMenuDo) {
|
||||
return roleMenuRepositoryInterface.selectRoleMenuList(roleMenuDo);
|
||||
}
|
||||
|
||||
public void removeByRoleId(RoleMenuDo roleMenuDo) {
|
||||
roleMenuRepositoryInterface.removeByRoleId(roleMenuDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有的内置角色对应的菜单
|
||||
* @param roleList
|
||||
* @return
|
||||
*/
|
||||
public List<RoleMenuDo> selectByRoleList(List<Long> roleList) {
|
||||
//查询所有的角色菜单配置表
|
||||
if (CollectionUtil.isEmpty(roleList)){
|
||||
return null;
|
||||
}
|
||||
List<RoleMenuEntity> list = roleMenuRepositoryInterface.selectByRoleList(roleList);
|
||||
List<RoleMenuDo> roleMenuList = new ArrayList<>();
|
||||
Map<Long, List<RoleMenuEntity>> collect = list.stream().collect(Collectors.groupingBy(RoleMenuEntity::getRoleId));
|
||||
for (Long aLong : collect.keySet()) {
|
||||
RoleMenuDo roleMenuDo = new RoleMenuDo();
|
||||
roleMenuDo.setRoleId(aLong);
|
||||
List<RoleMenuEntity> list1 = collect.get(aLong);
|
||||
if (CollectionUtil.isNotEmpty(list1)){
|
||||
List<Long> collect1 = list1.stream().map(RoleMenuEntity::getMenuId).collect(Collectors.toList());
|
||||
roleMenuDo.setMenuIds(collect1);
|
||||
}
|
||||
roleMenuList.add(roleMenuDo);
|
||||
}
|
||||
|
||||
return roleMenuList;
|
||||
}
|
||||
|
||||
public void saveBatchList(List<RoleMenuEntity> roleMenuEntityList) {
|
||||
roleMenuRepositoryInterface.saveBatch(roleMenuEntityList);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.mhd.user.domain.security.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title Encrypt
|
||||
* @description: 加密注解
|
||||
* @date 2024/1/25 15:37
|
||||
**/
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface Encrypt {
|
||||
/**
|
||||
* 入参是否解密,默认解密
|
||||
*/
|
||||
boolean in() default true;
|
||||
|
||||
/**
|
||||
* 返回是否加密,默认加密
|
||||
*/
|
||||
boolean out() default true;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.mhd.user.domain.security.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 自定义操作日志记录注解
|
||||
*
|
||||
* @author mhd
|
||||
*/
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface OpenApiLog {
|
||||
|
||||
/**
|
||||
* 模块
|
||||
*/
|
||||
public String title() default "";
|
||||
|
||||
/**
|
||||
* 是否保存请求的参数
|
||||
*/
|
||||
public boolean isSaveRequestData() default true;
|
||||
|
||||
/**
|
||||
* 是否保存响应的参数
|
||||
*/
|
||||
public boolean isSaveResponseData() default true;
|
||||
}
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
package com.mhd.user.domain.security.aspect;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.mhd.common.core.domain.entity.DecryptRequestDO;
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.domain.po.SysTenantsPo;
|
||||
import com.mhd.common.core.domain.po.thirdparty.SysDepartInterfaceInfoPo;
|
||||
import com.mhd.common.core.domain.thirdparty.SysDepartInterfaceInfoDTO;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.feign.ThirdPartyServiceFeign;
|
||||
import com.mhd.common.core.utils.AESUtil;
|
||||
import com.mhd.common.core.utils.SignatureUtil;
|
||||
import com.mhd.user.domain.security.annotation.Encrypt;
|
||||
import com.mhd.user.infrastructure.feign.ProductServiceFeign;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpInputMessage;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdvice;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Type;
|
||||
import java.rmi.ServerException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title DecryptRequestBodyAdvice
|
||||
* @description post请求的加密参数进行解密,返回一个JSONObject对象
|
||||
* @date 2023/8/17
|
||||
**/
|
||||
@ControllerAdvice(basePackages = "com.mhd.user.interfaces.facade.openApi")
|
||||
@Slf4j
|
||||
public class DecryptRequestBodyAdvice implements RequestBodyAdvice {
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyServiceFeign thirdPartyServiceFeign;
|
||||
@Autowired
|
||||
private ProductServiceFeign productServiceFeign;
|
||||
|
||||
/**
|
||||
* 该方法用于判断当前请求,是否要执行beforeBodyRead方法
|
||||
* methodParameter: 方法的参数对象
|
||||
* type: 方法的参数类型
|
||||
* aClass: 将会使用到的Http消息转换器类类型
|
||||
* 注意:此判断方法,会在beforeBodyRead 和 afterBodyRead方法前都触发一次。
|
||||
*
|
||||
* @return 返回true则会执行beforeBodyRead
|
||||
*/
|
||||
@Override
|
||||
public boolean supports(MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
|
||||
//获取配置的组织ID
|
||||
R<SysTenantsPo> sysTenantsPoR = productServiceFeign.getTenantsInfoByOpen();
|
||||
if (R.SUCCESS != sysTenantsPoR.getCode()) {
|
||||
throw new ServiceException("未获取到组织配置信息");
|
||||
}
|
||||
SysTenantsPo sysTenantsPo = sysTenantsPoR.getData();
|
||||
//从三方配置表中取值
|
||||
SysDepartInterfaceInfoDTO sysDepartInterfaceInfoDTO = new SysDepartInterfaceInfoDTO();
|
||||
sysDepartInterfaceInfoDTO.setTopOrganizationId(sysTenantsPo.getTopOrganizationId());
|
||||
sysDepartInterfaceInfoDTO.setInterfaceType("openApi");
|
||||
sysDepartInterfaceInfoDTO.setInterfaceTypeKey("encrypt");
|
||||
List<SysDepartInterfaceInfoPo> sysDepartInterfaceInfoPos = thirdPartyServiceFeign.queryListByFeign(sysDepartInterfaceInfoDTO);
|
||||
if (sysDepartInterfaceInfoPos.isEmpty()){
|
||||
return false;
|
||||
}
|
||||
SysDepartInterfaceInfoPo sysDepartInterfaceInfoPo = sysDepartInterfaceInfoPos.get(0);
|
||||
//是否开启加密
|
||||
if(!"true".equals(sysDepartInterfaceInfoPo.getInterfaceTypeValue())) {
|
||||
return false;
|
||||
}
|
||||
log.info("【进入-RequestBody-supports】");
|
||||
boolean encode = false;
|
||||
// 判断该方法是否含有@Encrypt注解
|
||||
if (Objects.requireNonNull(methodParameter.getMethod()).isAnnotationPresent(Encrypt.class)) {
|
||||
//获取注解配置的包含和去除字段
|
||||
Encrypt serializedField = methodParameter.getMethodAnnotation(Encrypt.class);
|
||||
if (serializedField != null && serializedField.in()) {
|
||||
//入参是否需要解密
|
||||
encode = true;
|
||||
}
|
||||
}
|
||||
return encode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在Http消息转换器执转换,之前执行
|
||||
* inputMessage: 客户端的请求数据
|
||||
* methodParameter: 方法的参数对象
|
||||
* type: 方法的参数类型
|
||||
* aClass: 将会使用到的Http消息转换器类类型
|
||||
*
|
||||
* @return 返回 一个自定义的HttpInputMessage
|
||||
*/
|
||||
@Override
|
||||
public HttpInputMessage beforeBodyRead(HttpInputMessage inputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) throws IOException {
|
||||
log.info("【进入-RequestBody-beforeBodyRead】");
|
||||
// 解密-使用解密后的数据,构造新的读取流
|
||||
return new DecryptHttpInputMessage(inputMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 在Http消息转换器执转换,之后执行
|
||||
* o: 转换后的对象
|
||||
* httpInputMessage: 客户端的请求数据
|
||||
* methodParameter: handler方法的参数类型
|
||||
* type: handler方法的参数类型
|
||||
* aClass: 使用的Http消息转换器类类型
|
||||
*
|
||||
* @return 返回一个新的对象
|
||||
*/
|
||||
@Override
|
||||
public Object afterBodyRead(Object o, HttpInputMessage httpInputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
|
||||
log.info("【进入-RequestBody-afterBodyRead】");
|
||||
return o;
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数与afterBodyRead相同,不过这个方法处理的是,body为空的情况
|
||||
*/
|
||||
@Override
|
||||
public Object handleEmptyBody(Object o, HttpInputMessage httpInputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
|
||||
log.info("【进入-RequestBody-handleEmptyBody】");
|
||||
return o;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密-使用解密后的数据,构造新的读取流
|
||||
*/
|
||||
class DecryptHttpInputMessage implements HttpInputMessage {
|
||||
private HttpInputMessage inputMessage;
|
||||
|
||||
public DecryptHttpInputMessage(HttpInputMessage inputMessage) {
|
||||
this.inputMessage = inputMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getBody() throws IOException {
|
||||
//获取配置的组织ID
|
||||
R<SysTenantsPo> sysTenantsPoR = productServiceFeign.getTenantsInfoByOpen();
|
||||
if (R.SUCCESS != sysTenantsPoR.getCode()) {
|
||||
throw new RuntimeException("未获取到组织配置信息");
|
||||
}
|
||||
SysTenantsPo sysTenantsPo = sysTenantsPoR.getData();
|
||||
//从三方配置表中取值
|
||||
SysDepartInterfaceInfoDTO sysDepartInterfaceInfoDTO = new SysDepartInterfaceInfoDTO();
|
||||
sysDepartInterfaceInfoDTO.setTopOrganizationId(sysTenantsPo.getTopOrganizationId());
|
||||
sysDepartInterfaceInfoDTO.setInterfaceType("openApi");
|
||||
List<SysDepartInterfaceInfoPo> sysDepartInterfaceInfoPos = thirdPartyServiceFeign.queryListByFeign(sysDepartInterfaceInfoDTO);
|
||||
Map<String, SysDepartInterfaceInfoPo> stringSysDepartInterfaceInfoPoMap = sysDepartInterfaceInfoPos.stream().collect(Collectors.toMap(SysDepartInterfaceInfoPo::getInterfaceTypeKey, Function.identity()));
|
||||
// 1.参数解密处理
|
||||
String body = StringUtils.defaultString(IOUtils.toString(inputMessage.getBody(), "UTF-8"));
|
||||
log.info("解密前 请求参数:" + body);
|
||||
DecryptRequestDO decryptRequestDO = JSONUtil.toBean(JSONUtil.parseObj(body), DecryptRequestDO.class);
|
||||
//2.验证参数
|
||||
String secret = stringSysDepartInterfaceInfoPoMap.get(SignatureUtil.SECRET_KEY).getInterfaceTypeValue();
|
||||
boolean flag = SignatureUtil.validateSign(decryptRequestDO, secret);
|
||||
if (!flag){
|
||||
throw new RuntimeException("未通过签名验证,请检查签名信息是否有误");
|
||||
}
|
||||
// 4.用服务端私钥进行解密
|
||||
String iv = stringSysDepartInterfaceInfoPoMap.get(SignatureUtil.IV_KEY).getInterfaceTypeValue();
|
||||
String result = AESUtil.decrypt(decryptRequestDO.getEncryptContent(),secret,iv);
|
||||
log.info("解密后 请求参数:{}", result);
|
||||
|
||||
return IOUtils.toInputStream(result, "UTF-8");
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpHeaders getHeaders() {
|
||||
return inputMessage.getHeaders();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
package com.mhd.user.domain.security.aspect;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.mhd.common.core.domain.dto.open.SystemOpenApiLogDTO;
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.domain.po.SysTenantsPo;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.ServletUtils;
|
||||
import com.mhd.common.core.utils.StringUtils;
|
||||
import com.mhd.common.core.utils.ip.IpUtils;
|
||||
import com.mhd.user.application.service.OpenApiLogApplicationService;
|
||||
import com.mhd.user.domain.security.annotation.OpenApiLog;
|
||||
import com.mhd.user.infrastructure.feign.ProductServiceFeign;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.AfterReturning;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 操作日志记录处理
|
||||
*
|
||||
* @author mhd
|
||||
*/
|
||||
@Slf4j
|
||||
@Aspect
|
||||
@Component
|
||||
public class OpenApiLogAspect {
|
||||
|
||||
@Autowired
|
||||
private ProductServiceFeign productServiceFeign;
|
||||
|
||||
@Autowired
|
||||
private OpenApiLogApplicationService openApiLogApplicationService;
|
||||
|
||||
/**
|
||||
* 处理完请求后执行
|
||||
*
|
||||
* @param joinPoint 切点
|
||||
*/
|
||||
@AfterReturning(pointcut = "@annotation(controllerLog)", returning = "jsonResult")
|
||||
public void doAfterReturning(JoinPoint joinPoint, OpenApiLog controllerLog, Object jsonResult) {
|
||||
handleLog(joinPoint, controllerLog, jsonResult);
|
||||
}
|
||||
|
||||
protected void handleLog(final JoinPoint joinPoint, OpenApiLog controllerLog, Object jsonResult) {
|
||||
try {
|
||||
// *========数据库日志=========*//
|
||||
SystemOpenApiLogDTO systemOpenApiLogDTO = new SystemOpenApiLogDTO();
|
||||
systemOpenApiLogDTO.setServiceCode("userApi");
|
||||
systemOpenApiLogDTO.setServiceName("用户服务");
|
||||
// 请求的地址
|
||||
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
|
||||
systemOpenApiLogDTO.setOperIp(ip);
|
||||
systemOpenApiLogDTO.setOperUrl(ServletUtils.getRequest().getRequestURI());
|
||||
//根据当前登录获取客户信息 TODO
|
||||
//获取配置的组织ID
|
||||
R<SysTenantsPo> sysTenantsPoR = productServiceFeign.getTenantsInfoByOpen();
|
||||
if (R.SUCCESS != sysTenantsPoR.getCode()) {
|
||||
throw new ServiceException("未获取到组织配置信息");
|
||||
}
|
||||
SysTenantsPo sysTenantsPo = sysTenantsPoR.getData();
|
||||
systemOpenApiLogDTO.setTopOrganizationId(sysTenantsPo.getTopOrganizationId());
|
||||
systemOpenApiLogDTO.setOrganizationId(sysTenantsPo.getOrganizationId());
|
||||
systemOpenApiLogDTO.setOrganizationName(sysTenantsPo.getOrganizationName());
|
||||
systemOpenApiLogDTO.setCreateTime(new Date());
|
||||
|
||||
// 设置方法名称
|
||||
String className = joinPoint.getTarget().getClass().getName();
|
||||
String methodName = joinPoint.getSignature().getName();
|
||||
systemOpenApiLogDTO.setMethod(className + "." + methodName + "()");
|
||||
// 设置请求方式
|
||||
systemOpenApiLogDTO.setRequestMethod(ServletUtils.getRequest().getMethod());
|
||||
// 处理设置注解上的参数
|
||||
getControllerMethodDescription(joinPoint, controllerLog, systemOpenApiLogDTO, jsonResult);
|
||||
// 保存数据库
|
||||
openApiLogApplicationService.saveLog(systemOpenApiLogDTO);
|
||||
} catch (Exception exp) {
|
||||
// 记录本地异常日志
|
||||
log.error("==前置通知异常==");
|
||||
log.error("异常信息:{}", exp.getMessage());
|
||||
exp.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取注解中对方法的描述信息 用于Controller层注解
|
||||
*
|
||||
* @param log 日志
|
||||
* @param systemOpenApiLogDTO 操作日志
|
||||
* @throws Exception
|
||||
*/
|
||||
public void getControllerMethodDescription(JoinPoint joinPoint, OpenApiLog log, SystemOpenApiLogDTO systemOpenApiLogDTO, Object jsonResult) throws Exception {
|
||||
// 设置标题
|
||||
systemOpenApiLogDTO.setTitle(log.title());
|
||||
// 是否需要保存request,参数和值
|
||||
if (log.isSaveRequestData()) {
|
||||
// 获取参数的信息,传入到数据库中。
|
||||
setRequestValue(joinPoint, systemOpenApiLogDTO);
|
||||
}
|
||||
// 是否需要保存response,参数和值
|
||||
if (log.isSaveResponseData() && StringUtils.isNotNull(jsonResult)) {
|
||||
systemOpenApiLogDTO.setJsonResult(JSON.toJSONString(jsonResult));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取请求的参数,放到log中
|
||||
*
|
||||
* @param openApiLogDO 操作日志
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
private void setRequestValue(JoinPoint joinPoint, SystemOpenApiLogDTO openApiLogDO) throws Exception {
|
||||
String requestMethod = openApiLogDO.getRequestMethod();
|
||||
if (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod)) {
|
||||
String params = argsArrayToString(joinPoint.getArgs());
|
||||
openApiLogDO.setOperParam(params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数拼装
|
||||
*/
|
||||
private String argsArrayToString(Object[] paramsArray) {
|
||||
String params = "";
|
||||
if (paramsArray != null && paramsArray.length > 0) {
|
||||
for (Object o : paramsArray) {
|
||||
if (StringUtils.isNotNull(o) && !isFilterObject(o)) {
|
||||
try {
|
||||
Object jsonObj = JSON.toJSON(o);
|
||||
params += jsonObj.toString() + " ";
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return params.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否需要过滤的对象。
|
||||
*
|
||||
* @param o 对象信息。
|
||||
* @return 如果是需要过滤的对象,则返回true;否则返回false。
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public boolean isFilterObject(final Object o) {
|
||||
Class<?> clazz = o.getClass();
|
||||
if (clazz.isArray()) {
|
||||
return clazz.getComponentType().isAssignableFrom(MultipartFile.class);
|
||||
} else if (Collection.class.isAssignableFrom(clazz)) {
|
||||
Collection collection = (Collection) o;
|
||||
for (Object value : collection) {
|
||||
return value instanceof MultipartFile;
|
||||
}
|
||||
} else if (Map.class.isAssignableFrom(clazz)) {
|
||||
Map map = (Map) o;
|
||||
for (Object value : map.entrySet()) {
|
||||
Map.Entry entry = (Map.Entry) value;
|
||||
return entry.getValue() instanceof MultipartFile;
|
||||
}
|
||||
}
|
||||
return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse
|
||||
|| o instanceof BindingResult;
|
||||
}
|
||||
}
|
||||
+262
@@ -0,0 +1,262 @@
|
||||
package com.mhd.user.domain.userAggregate.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 司机信息 excel
|
||||
*/
|
||||
@Data
|
||||
public class DriverExcel {
|
||||
|
||||
//===========================承运司机、车队长信息==========================
|
||||
|
||||
@ExcelProperty(index = 0)
|
||||
@ApiModelProperty("认证类型 1-承运人 2-车队长 3-承运企业")
|
||||
private String authType;
|
||||
|
||||
@ExcelProperty(index = 1)
|
||||
@ApiModelProperty("用户头像")
|
||||
private String avatar;
|
||||
|
||||
@ExcelProperty(index = 2)
|
||||
@ApiModelProperty("用户账号")
|
||||
private String userAccount;
|
||||
|
||||
@ExcelProperty(index = 3)
|
||||
@ApiModelProperty("用户姓名")
|
||||
private String userName;
|
||||
|
||||
@ExcelProperty(index = 4)
|
||||
@ApiModelProperty("身份证人像面")
|
||||
private String userIdcardFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 5)
|
||||
@ApiModelProperty("身份证国徽面")
|
||||
private String userIdcardBackUrl;
|
||||
|
||||
@ExcelProperty(index = 6)
|
||||
@ApiModelProperty("手持身份证正面")
|
||||
private String userIdcardInhandUrl;
|
||||
|
||||
@ExcelProperty(index = 7)
|
||||
@ApiModelProperty("身份证号")
|
||||
private String userIdcardNumber;
|
||||
|
||||
@ExcelProperty(index = 8)
|
||||
@ApiModelProperty("身份证有效期(开始时间)")
|
||||
private String userIdcardDateFrom;
|
||||
|
||||
@ExcelProperty(index = 9)
|
||||
@ApiModelProperty("身份证有效期(结束时间)")
|
||||
private String userIdcardDateTo;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(name = "身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer userIdcardLong;
|
||||
|
||||
@ExcelProperty(index = 10)
|
||||
@ApiModelProperty("出生日期")
|
||||
private String userBirthday;
|
||||
|
||||
@ExcelProperty(index = 11)
|
||||
@ApiModelProperty("地区编码")
|
||||
private Long userAreaCountyId;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(name = "县区名称")
|
||||
private String userAreaName;
|
||||
|
||||
@ExcelProperty(index = 12)
|
||||
@ApiModelProperty("详细地址")
|
||||
private String userAreaAddress;
|
||||
|
||||
@ExcelProperty(index = 13)
|
||||
@ApiModelProperty("身份证发证机关")
|
||||
private String certificationAuthority;
|
||||
|
||||
@ExcelProperty(index = 14)
|
||||
@ApiModelProperty("性别(0-默认未知,1-男,2-女)")
|
||||
private String sex;
|
||||
|
||||
@ExcelProperty(index = 15)
|
||||
@ApiModelProperty("驾驶证主页")
|
||||
private String driverLicenseFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 16)
|
||||
@ApiModelProperty("驾驶证副页")
|
||||
private String driverLicenseBackUrl;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("准驾车型id")
|
||||
private String driverAllowDrivingTypeId;
|
||||
|
||||
@ExcelProperty(index = 17)
|
||||
@ApiModelProperty("准驾车型名称")
|
||||
private String driverAllowDrivingTypeName;
|
||||
|
||||
@ExcelProperty(index = 18)
|
||||
@ApiModelProperty("驾驶证发证机关")
|
||||
private String driverCertificationAuthority;
|
||||
|
||||
@ExcelProperty(index = 19)
|
||||
@ApiModelProperty("驾驶证初次领证日期")
|
||||
private String driverLicenseFirstDate;
|
||||
|
||||
@ExcelProperty(index = 20)
|
||||
@ApiModelProperty("驾驶证有效期(开始时间)")
|
||||
private String driverLicenseDateFrom;
|
||||
|
||||
@ExcelProperty(index = 21)
|
||||
@ApiModelProperty("驾驶证有效期(结束时间)")
|
||||
private String driverLicenseDateTo;
|
||||
|
||||
@ExcelProperty(index = 22)
|
||||
@ApiModelProperty("驾驶证档案编号")
|
||||
private String driverLicenseNumber;
|
||||
|
||||
@ExcelProperty(index = 23)
|
||||
@ApiModelProperty("从业资格证照片")
|
||||
private String driverWorkLicenseFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 24)
|
||||
@ApiModelProperty("从业资格证反面照片")
|
||||
private String workCertificateBackImgUrl;
|
||||
|
||||
@ExcelProperty(index = 25)
|
||||
@ApiModelProperty("诚信考核页照片")
|
||||
private String driverIntegrityAssessmentUrl;
|
||||
|
||||
@ExcelProperty(index = 26)
|
||||
@ApiModelProperty("从业资格证发证省份编码")
|
||||
private String driverWorkLicenseAuthorityCode;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("从业资格证发证省份名称")
|
||||
private String driverWorkLicenseAuthorityName;
|
||||
|
||||
@ExcelProperty(index = 27)
|
||||
@ApiModelProperty("从业资格证号")
|
||||
private String driverWorkLicenseNumber;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(name = "从业资格证类别ID")
|
||||
private String driverWorkLicenseTypeId;
|
||||
|
||||
@ExcelProperty(index = 28)
|
||||
@ApiModelProperty(name = "从业资格证类别名称")
|
||||
private String driverWorkLicenseTypeName;
|
||||
|
||||
@ExcelProperty(index = 29)
|
||||
@ApiModelProperty("从业资格证初次领证日期")
|
||||
private String driverWorkLicenseFirstDate;
|
||||
|
||||
@ExcelProperty(index = 30)
|
||||
@ApiModelProperty("从业资格证有效期(开始时间)")
|
||||
private String driverWorkLicenseDateFrom;
|
||||
|
||||
@ExcelProperty(index = 31)
|
||||
@ApiModelProperty("从业资格证有效期(结束时间)")
|
||||
private String driverWorkLicenseDateTo;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(name = "从业资格证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverWorkLicenseLong;
|
||||
|
||||
//===========================承运企业信息==========================
|
||||
|
||||
@ExcelProperty(index = 32)
|
||||
@ApiModelProperty("营业执照照片")
|
||||
private String driverEnterpriseLicenseFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 33)
|
||||
@ApiModelProperty("企业名称")
|
||||
private String driverEnterpriseName;
|
||||
|
||||
@ExcelProperty(index = 34)
|
||||
@ApiModelProperty("信用代码")
|
||||
private String driverEnterpriseSocialCreditCode;
|
||||
|
||||
@ExcelProperty(index = 35)
|
||||
@ApiModelProperty("法人姓名")
|
||||
private String driverCorpName;
|
||||
|
||||
@ExcelProperty(index = 36)
|
||||
@ApiModelProperty("注册地址")
|
||||
private String driverEnterpriseAddress;
|
||||
|
||||
@ExcelProperty(index = 37)
|
||||
@ApiModelProperty("营业期限(开始时间)")
|
||||
private String driverEnterpriseLicenseDateFrom;
|
||||
|
||||
@ExcelProperty(index = 38)
|
||||
@ApiModelProperty("营业期限(结束时间)")
|
||||
private String driverEnterpriseLicenseDateTo;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("企业营业执照是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverEnterpriseLicenseLong;
|
||||
|
||||
@ExcelProperty(index = 39)
|
||||
@ApiModelProperty("法人身份证人像面")
|
||||
private String driverCorpIdcardFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 40)
|
||||
@ApiModelProperty("法人身份证国徽面")
|
||||
private String driverCorpIdcardBackUrl;
|
||||
|
||||
@ExcelProperty(index = 41)
|
||||
@ApiModelProperty("法人手持身份证正面")
|
||||
private String driverCorpIdcardInhandUrl;
|
||||
|
||||
@ExcelProperty(index = 42)
|
||||
@ApiModelProperty("法人身份证号")
|
||||
private String driverCorpIdcardNumber;
|
||||
|
||||
@ExcelProperty(index = 43)
|
||||
@ApiModelProperty("法人身份证有效期(开始时间)")
|
||||
private String driverCorpIdcardDateFrom;
|
||||
|
||||
@ExcelProperty(index = 44)
|
||||
@ApiModelProperty("法人身份证有效期(结束时间)")
|
||||
private String driverCorpIdcardDateTo;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(name = "法人身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverCorpIdcardLong;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("法人证件类型id")
|
||||
private String legalPersonIdType;
|
||||
|
||||
@ExcelProperty(index = 45)
|
||||
@ApiModelProperty("法人证件类型name")
|
||||
private String legalPersonIdName;
|
||||
|
||||
@ExcelProperty(index = 46)
|
||||
@ApiModelProperty("道路运输经营许可证照片")
|
||||
private String driverBusinessLicenseFrontUrl;
|
||||
|
||||
@ExcelProperty(index = 47)
|
||||
@ApiModelProperty("经营许可证证号")
|
||||
private String driverBusinessLicenseNumber;
|
||||
|
||||
@ExcelProperty(index = 48)
|
||||
@ApiModelProperty("业务名称")
|
||||
private String driverBusinessLicenseOwner;
|
||||
|
||||
@ExcelProperty(index = 49)
|
||||
@ApiModelProperty("经营许可证证件有效期(开始时间)")
|
||||
private String driverBusinessLicenseDateFrom;
|
||||
|
||||
@ExcelProperty(index = 50)
|
||||
@ApiModelProperty("经营许可证证件有效期(结束时间)")
|
||||
private String driverBusinessLicenseDateTo;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("经营许可证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverBusinessLicenseLong;
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package com.mhd.user.domain.userAggregate.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 司机车辆绑定关系对象 driver_vehicle_bind
|
||||
*
|
||||
* @author ???
|
||||
* @date 2023-05-18
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DriverVehicleBind extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 司机车辆绑定表id */
|
||||
@ApiModelProperty("司机车辆绑定表id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long driverVehicleBindId;
|
||||
/** 用户主表ID */
|
||||
@ApiModelProperty("用户主表ID")
|
||||
@Excel(name = "用户主表ID")
|
||||
private Long userId;
|
||||
/** 车辆id */
|
||||
@ApiModelProperty("车辆id")
|
||||
@Excel(name = "车辆id")
|
||||
private Long vehicleId;
|
||||
/** 车辆当前绑定司机Userid */
|
||||
@ApiModelProperty("车辆关联司机userid")
|
||||
@Excel(name = "车辆关联司机userid")
|
||||
private Long driverBindId;
|
||||
/** 绑定司机姓名 */
|
||||
@ApiModelProperty("绑定司机姓名")
|
||||
@Excel(name = "绑定司机姓名")
|
||||
private String bindDriverName;
|
||||
/** 绑定司机手机号 */
|
||||
@ApiModelProperty("绑定司机手机号")
|
||||
@Excel(name = "绑定司机手机号")
|
||||
private String bindDriverPhone;
|
||||
/** 一级组织表ID */
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
/** 归属组织id */
|
||||
@ApiModelProperty("归属组织id")
|
||||
@Excel(name = "归属组织id")
|
||||
private Long organizationId;
|
||||
/** 默认状态(1-是,2-否) */
|
||||
@ApiModelProperty("默认状态(1-是,2-否)")
|
||||
@Excel(name = "默认状态", readConverterExp = "1=-是,2-否")
|
||||
private Integer defaultFlag;
|
||||
/** 车牌号*/
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber;
|
||||
|
||||
@ApiModelProperty(name = "车辆类型(数据字典id)")
|
||||
private String vehicleTypeId;
|
||||
|
||||
@ApiModelProperty(name = "车辆类型(数据字典name)")
|
||||
private String vehicleTypeName;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "行驶证检验有效期")
|
||||
private Date vehicleCheckoutPeriodValidity;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "经营许可证件有效期(结束)")
|
||||
private Date businessLicenseExpireEndDate;
|
||||
|
||||
@ApiModelProperty(name = "经营许可证件是否长期(0-无状态,1-长期,2-不长期)")
|
||||
private Integer businessLicenseLongStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "道路运输证有效期")
|
||||
private Date roadTransportCertificateExpireDate;
|
||||
|
||||
@ApiModelProperty(name = "道路运输证是否长期(0-无状态,1-长期,2-不长期)")
|
||||
private Integer roadTransportCertificateLongStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.mhd.user.domain.userAggregate.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description 意见反馈表
|
||||
* @author BEJSON
|
||||
* @date 2023-11-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("feedback")
|
||||
public class Feedback extends BaseVOEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@ApiModelProperty("意见反馈表ID")
|
||||
private Long feedbackId;
|
||||
|
||||
@ApiModelProperty("意见反馈关于CODE")
|
||||
private String commentAboutCode;
|
||||
|
||||
@ApiModelProperty("意见反馈关于NAME")
|
||||
private String commentAboutName;
|
||||
|
||||
@ApiModelProperty("意见")
|
||||
private String comment;
|
||||
|
||||
@ApiModelProperty("意见反馈相关图片")
|
||||
private String commentUrl;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package com.mhd.user.domain.userAggregate.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户地址实体
|
||||
*
|
||||
* @author gen
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_address")
|
||||
public class UserAddress {
|
||||
|
||||
/**
|
||||
* 主键Id
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 地区名称
|
||||
*/
|
||||
private String areaName;
|
||||
|
||||
/**
|
||||
* 地区编码
|
||||
*/
|
||||
private String areaCode;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
private String detailedAddress;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contactPerson;
|
||||
|
||||
/**
|
||||
* 联系人方式
|
||||
*/
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 是否默认地址
|
||||
*/
|
||||
private Boolean isDefault;
|
||||
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Boolean delFlag;
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.mhd.user.domain.userAggregate.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("user_data_permission")
|
||||
public class UserDataPermissionEntity extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户数据权限表ID")
|
||||
private Long userDataPermissionId;
|
||||
@ApiModelProperty(name = "用户表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(name = "菜单表ID")
|
||||
private Long menuId;
|
||||
@ApiModelProperty(name = "产品表ID")
|
||||
private Long productId;
|
||||
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
@ApiModelProperty(name = "操作个人创建数据:0-无状态,1-允许,2-不允许")
|
||||
private Integer userDataPersonalStatus;
|
||||
@ApiModelProperty(name = "操作组织所有数据:0-无状态,1-允许,2-不允许")
|
||||
private Integer userDataOrganizationStatus;
|
||||
}
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
package com.mhd.user.domain.userAggregate.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 运输企业对象 user_driver_enterprise
|
||||
*
|
||||
* @author ???
|
||||
* @date 2023-05-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class UserDriverEnterprise extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 运输企业id */
|
||||
@ApiModelProperty("运输企业id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long userDriverEnterpriseId;
|
||||
/** 用户主表ID */
|
||||
@ApiModelProperty("用户主表ID")
|
||||
@Excel(name = "用户主表ID")
|
||||
private Long userId;
|
||||
/** 司机表ID */
|
||||
@ApiModelProperty("司机表ID")
|
||||
@Excel(name = "司机表ID")
|
||||
private Long driverId;
|
||||
/** 经营许可证号 */
|
||||
@ApiModelProperty("经营许可证号")
|
||||
@Excel(name = "经营许可证号")
|
||||
private String driverBusinessLicenseNumber;
|
||||
/** 经营许可证业户名称 */
|
||||
@ApiModelProperty("经营许可证业户名称")
|
||||
@Excel(name = "经营许可证业户名称")
|
||||
private String driverBusinessLicenseOwner;
|
||||
/** 经营许可证有效期开始日期 */
|
||||
@ApiModelProperty("经营许可证有效期开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "经营许可证有效期开始日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverBusinessLicenseDateFrom;
|
||||
/** 经营许可证有效期到期日期 */
|
||||
@ApiModelProperty("经营许可证有效期到期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "经营许可证有效期到期日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverBusinessLicenseDateTo;
|
||||
/** 经营许可证是否长期:0-无状态,1-是,2-否 */
|
||||
@ApiModelProperty("经营许可证是否长期:0-无状态,1-是,2-否")
|
||||
@Excel(name = "经营许可证是否长期:0-无状态,1-是,2-否")
|
||||
private Long driverBusinessLicenseLong;
|
||||
/** 经营许可证主页图片地址 */
|
||||
@ApiModelProperty("经营许可证主页图片地址")
|
||||
@Excel(name = "经营许可证主页图片地址")
|
||||
private String driverBusinessLicenseFrontUrl;
|
||||
/** 企业名称 */
|
||||
@ApiModelProperty("企业名称")
|
||||
@Excel(name = "企业名称")
|
||||
private String driverEnterpriseName;
|
||||
/** 企业统一社会信用代码 */
|
||||
@ApiModelProperty("企业统一社会信用代码")
|
||||
@Excel(name = "企业统一社会信用代码")
|
||||
private String driverEnterpriseSocialCreditCode;
|
||||
/** 企业注册电话 */
|
||||
@ApiModelProperty("企业注册电话")
|
||||
@Excel(name = "企业注册电话")
|
||||
private String driverEnterprisePhone;
|
||||
/** 企业注册地址 */
|
||||
@ApiModelProperty("企业注册地址")
|
||||
@Excel(name = "企业注册地址")
|
||||
private String driverEnterpriseAddress;
|
||||
/** 企业营业执照有效期开始日期 */
|
||||
@ApiModelProperty("企业营业执照有效期开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "企业营业执照有效期开始日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverEnterpriseLicenseDateFrom;
|
||||
/** 企业营业执照有效期到期日期 */
|
||||
@ApiModelProperty("企业营业执照有效期到期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "企业营业执照有效期到期日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverEnterpriseLicenseDateTo;
|
||||
/** 企业营业执照是否长期:0-无状态,1-是,2-否 */
|
||||
@ApiModelProperty("企业营业执照是否长期:0-无状态,1-是,2-否")
|
||||
@Excel(name = "企业营业执照是否长期:0-无状态,1-是,2-否")
|
||||
private Long driverEnterpriseLicenseLong;
|
||||
/** 企业纳税人资质 */
|
||||
@ApiModelProperty("企业纳税人资质")
|
||||
@Excel(name = "企业纳税人资质")
|
||||
private String driverEnterpriseTaxpayer;
|
||||
/** 是否企业法人:0-无状态,1-是,2-否 */
|
||||
@ApiModelProperty("是否企业法人:0-无状态,1-是,2-否")
|
||||
@Excel(name = "是否企业法人:0-无状态,1-是,2-否")
|
||||
private Long driverCorp;
|
||||
/** 企业营业执照主页图片地址 */
|
||||
@ApiModelProperty("企业营业执照主页图片地址")
|
||||
@Excel(name = "企业营业执照主页图片地址")
|
||||
private String driverEnterpriseLicenseFrontUrl;
|
||||
/** 法人姓名 */
|
||||
@ApiModelProperty("法人姓名")
|
||||
@Excel(name = "法人姓名")
|
||||
private String driverCorpName;
|
||||
/** 企业法人姓名 */
|
||||
@ApiModelProperty("企业法人姓名")
|
||||
@Excel(name = "企业法人姓名")
|
||||
private String driverCorpLegalName;
|
||||
/** 法人身份证号 */
|
||||
@ApiModelProperty("法人身份证号")
|
||||
@Excel(name = "法人身份证号")
|
||||
private String driverCorpIdcardNumber;
|
||||
/** 法人身份证有效期开始日期 */
|
||||
@ApiModelProperty("法人身份证有效期开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "法人身份证有效期开始日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverCorpIdcardDateFrom;
|
||||
/** 法人身份证有效期结束日期 */
|
||||
@ApiModelProperty("法人身份证有效期结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "法人身份证有效期结束日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverCorpIdcardDateTo;
|
||||
/** 法人身份证是否长期:0-无状态,1-是,2-否 */
|
||||
@ApiModelProperty("法人身份证是否长期:0-无状态,1-是,2-否")
|
||||
@Excel(name = "法人身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverCorpIdcardLong;
|
||||
/** 法人身份证正面照片 */
|
||||
@ApiModelProperty("法人身份证正面照片")
|
||||
@Excel(name = "法人身份证正面照片")
|
||||
private String driverCorpIdcardFrontUrl;
|
||||
/** 法人身份证反面照片 */
|
||||
@ApiModelProperty("法人身份证反面照片")
|
||||
@Excel(name = "法人身份证反面照片")
|
||||
private String driverCorpIdcardBackUrl;
|
||||
/** 法人身份证手持照片 */
|
||||
@ApiModelProperty("法人身份证手持照片")
|
||||
@Excel(name = "法人身份证手持照片")
|
||||
private String driverCorpIdcardInhandUrl;
|
||||
/** 承运人企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效 */
|
||||
@ApiModelProperty("承运人企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
@Excel(name = "承运人企业认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer driverEnterpriseFill;
|
||||
/** 承运人企业认证时间 */
|
||||
@ApiModelProperty("承运人企业认证时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "承运人企业认证时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date driverEnterpriseFillTime;
|
||||
|
||||
@ApiModelProperty("承运人企业认证审核人id")
|
||||
private Long driverEnterpriseFillAuthId;
|
||||
|
||||
@ApiModelProperty("承运人企业认证审核人名称")
|
||||
private String driverEnterpriseFillAuthName;
|
||||
@ApiModelProperty("承运人企业认证审核人名称")
|
||||
private String driverEnterpriseFillAuthRemark;
|
||||
|
||||
/** 承运人类型:0-无状态 , 1-承运企业 , 2-承运车队长 */
|
||||
@ApiModelProperty("承运人类型")
|
||||
@Excel(name = "承运人类型")
|
||||
private Integer driverType;
|
||||
|
||||
/** 承运人车队长认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效 */
|
||||
@ApiModelProperty("承运人车队长认证状态")
|
||||
@Excel(name = "承运人车队长认证状态")
|
||||
private Integer driverCaptainFill;
|
||||
|
||||
@ApiModelProperty("法人证件类型代码")
|
||||
@Excel(name = "法人证件类型代码")
|
||||
private String legalPersonIdType;
|
||||
|
||||
/**法人证件类型名称*/
|
||||
@ApiModelProperty(value = "法人证件类型名称")
|
||||
private String legalPersonIdName;
|
||||
|
||||
@ApiModelProperty(name = "承运商编码")
|
||||
private String driverEnterpriseCode;
|
||||
|
||||
@ApiModelProperty(value = "数据来源(1-数字物流 2-TMS)")
|
||||
private Integer dataSources;
|
||||
|
||||
@ApiModelProperty(name = "tms推送状态: 1-未推送 2- 已推送")
|
||||
private Integer tmsPushStatus;
|
||||
}
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
package com.mhd.user.domain.userAggregate.entity;
|
||||
|
||||
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 com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("user_driver")
|
||||
public class UserDriverEntity extends BaseVOEntity {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "司机表ID")
|
||||
private Long driverId;
|
||||
|
||||
@ApiModelProperty(name = "用户主表ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(name = "运输企业id")
|
||||
private Long userDriverEnterpriseId;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
* 自有司机(值为1)
|
||||
* 社会司机(值为2)
|
||||
*/
|
||||
private Integer userDriverType;
|
||||
|
||||
@ApiModelProperty(name = "准驾车型id")
|
||||
private String driverAllowDrivingTypeId;
|
||||
|
||||
@ApiModelProperty(name = "准驾车型名称")
|
||||
private String driverAllowDrivingTypeName;
|
||||
|
||||
@ApiModelProperty(name = "驾驶证发证机关")
|
||||
private String driverCertificationAuthority;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "初次领证日期")
|
||||
private Date driverLicenseFirstDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "驾驶证有效期开始日期")
|
||||
private Date driverLicenseDateFrom;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "驾驶证有效期到期日期")
|
||||
private Date driverLicenseDateTo;
|
||||
|
||||
@ApiModelProperty(name = "驾驶证主页图片地址")
|
||||
private String driverLicenseFrontUrl;
|
||||
|
||||
@ApiModelProperty(name = "驾驶证副页图片地址")
|
||||
private String driverLicenseBackUrl;
|
||||
|
||||
@ApiModelProperty(name = "驾驶证档案编号")
|
||||
private String driverLicenseNumber;
|
||||
|
||||
@ApiModelProperty(name = "驾驶证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverLicenseLong;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证发证省份编码")
|
||||
private Long driverWorkLicenseAuthorityCode;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证发证省份名称")
|
||||
private String driverWorkLicenseAuthorityName;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证号")
|
||||
private String driverWorkLicenseNumber;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证类别数据字典ID")
|
||||
private String driverWorkLicenseTypeId;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证类别名称")
|
||||
private String driverWorkLicenseTypeName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "从业资格证初次领证日期")
|
||||
private Date driverWorkLicenseFirstDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "从业资格证有效期开始日期")
|
||||
private Date driverWorkLicenseDateFrom;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "从业资格证有效期到期日期")
|
||||
private Date driverWorkLicenseDateTo;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer driverWorkLicenseLong;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证主页图片地址")
|
||||
private String driverWorkLicenseFrontUrl;
|
||||
|
||||
@ApiModelProperty(name = "诚信考核页图片地址")
|
||||
private String driverIntegrityAssessmentUrl;
|
||||
|
||||
@ApiModelProperty(name = "承运人个体司机认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer driverFill;
|
||||
@ApiModelProperty(name = "承运人个人认证时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date driverFillTime;
|
||||
@ApiModelProperty(name = "承运人个人审核原因")
|
||||
private String driverFillAuthRemark;
|
||||
@ApiModelProperty(name = "承运人个人认证审核人")
|
||||
private String driverFillAuthName;
|
||||
@ApiModelProperty(name = "承运人个人认证审核人id")
|
||||
private Long driverFillAuthId;
|
||||
|
||||
@ApiModelProperty(name = "从业资格证反面照片")
|
||||
private String workCertificateBackImgUrl;
|
||||
|
||||
@ApiModelProperty(name = "承运商编码")
|
||||
private String driverEnterpriseCode;
|
||||
|
||||
@ApiModelProperty(value = "数据来源(1-数字物流 2-TMS)")
|
||||
private Integer dataSources;
|
||||
@ApiModelProperty(value = "推广码")
|
||||
private String promoCode;
|
||||
|
||||
@ApiModelProperty(name = "tms推送状态: 1-未推送 2- 已推送")
|
||||
private Integer tmsPushStatus;
|
||||
}
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
package com.mhd.user.domain.userAggregate.entity;
|
||||
|
||||
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 com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("user")
|
||||
public class UserEntity extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户ID")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long userId;
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "司机用户类型 自有车辆(值为1) 社会车辆(值为2)")
|
||||
private Integer userDriverType;
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
@ApiModelProperty(name = "职务/角色表ID")
|
||||
private Long roleId;
|
||||
@ApiModelProperty(name = "职务/角色权限字符")
|
||||
private String roleCode;
|
||||
@ApiModelProperty(name = "职务/角色权限名称")
|
||||
private String roleName;
|
||||
@ApiModelProperty(name = "手机号码")
|
||||
private String userPhone;
|
||||
@ApiModelProperty(name = "用户姓名(真实姓名)")
|
||||
private String userName;
|
||||
@ApiModelProperty(name = "登录账号(2-20位)")
|
||||
private String userAccount;
|
||||
@ApiModelProperty(name = "会员编号")
|
||||
private String userMemberCode;
|
||||
@ApiModelProperty(name = "登录密码")
|
||||
private String userPassword;
|
||||
@ApiModelProperty(name = "盐")
|
||||
private String userSalt;
|
||||
@ApiModelProperty(name = "支付密码")
|
||||
private String userPayPassword;
|
||||
@ApiModelProperty(name = "身份证号")
|
||||
private String userIdcardNumber;
|
||||
@ApiModelProperty(name = "身份证号加密")
|
||||
private String userIdcardNumberDes;
|
||||
@ApiModelProperty(name = "身份证有效期自")
|
||||
private Date userIdcardDateFrom;
|
||||
@ApiModelProperty(name = "身份证有效期至")
|
||||
private Date userIdcardDateTo;
|
||||
@ApiModelProperty(name = "身份证是否长期:0-无状态,1-是,2-否")
|
||||
private Integer userIdcardLong;
|
||||
@ApiModelProperty(name = "身份证正面照片")
|
||||
private String userIdcardFrontUrl;
|
||||
@ApiModelProperty(name = "身份证反面照片")
|
||||
private String userIdcardBackUrl;
|
||||
@ApiModelProperty(name = "手持身份证")
|
||||
private String userIdcardInhandUrl;
|
||||
@ApiModelProperty(name = "用户头像")
|
||||
private String avatar;
|
||||
@ApiModelProperty(name = "用户状态:0-无状态,1-正常,2-锁定")
|
||||
private Integer userStatus;
|
||||
@ApiModelProperty(name = "邮箱")
|
||||
private String userEmail;
|
||||
@ApiModelProperty(name = "县区编码,6位")
|
||||
private Long userAreaCountyId;
|
||||
@ApiModelProperty(name = "县区名称")
|
||||
private String userAreaName;
|
||||
@ApiModelProperty(name = "详细地址")
|
||||
private String userAreaAddress;
|
||||
@ApiModelProperty(name = "微信账号")
|
||||
private String userWechatAccount;
|
||||
@ApiModelProperty(name = "微信登录openid")
|
||||
private String userWechatOpenid;
|
||||
@ApiModelProperty(name = "微信登录会话KEY")
|
||||
private String userWechatSessionKey;
|
||||
@ApiModelProperty(name = "密码登录错误次数")
|
||||
private Integer passwordWrongTimes;
|
||||
@ApiModelProperty(name = "最近一次登录时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastLoginTime;
|
||||
@ApiModelProperty(name = "最近一次登录IP")
|
||||
private String lastLoginIp;
|
||||
@ApiModelProperty(name = "app_openid")
|
||||
private String appOpenid;
|
||||
@ApiModelProperty(name = "用户备注")
|
||||
private String userRemark;
|
||||
@ApiModelProperty(name = "加入黑名单备注(解除时需要清空)")
|
||||
private String userStatusRemark;
|
||||
@ApiModelProperty(name = "用户状态更新时间")
|
||||
private Date userStatusTime;
|
||||
@ApiModelProperty(name = "用户生日")
|
||||
private Date userBirthday;
|
||||
@ApiModelProperty(name = "用户实名认证状态:0-无状态,1-未认证,2-正在审核,3-认证通过,4-认证失败,5-认证失效")
|
||||
private Integer userAuthStatus;
|
||||
@ApiModelProperty(name = "账号标识,创建后账号在e签宝平台中的唯一标识")
|
||||
private String accountId ;
|
||||
@ApiModelProperty(name = "用户账号类型:0.无状态1.普通账号2.组织账号3.一级账号4.平台员工5.企业员工,6.合作商")
|
||||
private Integer userAccountType;
|
||||
@ApiModelProperty(name = "停用人时间")
|
||||
private Date stopTime;
|
||||
@ApiModelProperty(name = "停用人姓名")
|
||||
private String stopperName;
|
||||
|
||||
@ApiModelProperty("性别(0-默认未知,1-男,2-女)")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty(value = "是否允许竞价(0-不允许竞价,1-允许参与竞价,2-允许查看竞价)")
|
||||
private Integer isDriverBidding;
|
||||
|
||||
@ApiModelProperty("身份证发证机关")
|
||||
private String certificationAuthority;
|
||||
@ApiModelProperty(name = "用户电子签章")
|
||||
private String userTemplateSeal;
|
||||
@ApiModelProperty(name = "用户电子签章状态:1-已创建,2-未创建")
|
||||
private Integer userTemplateSealStatus;
|
||||
|
||||
@ApiModelProperty(name = "承运商编码")
|
||||
private String driverEnterpriseCode;
|
||||
|
||||
@ApiModelProperty(value = "数据来源(1-数字物流 2-TMS)")
|
||||
private Integer dataSources;
|
||||
|
||||
@ApiModelProperty(value = "推广码")
|
||||
private String promoCode;
|
||||
@ApiModelProperty(name = "业务类型:0.无状态,1.托运业务,2.承运业务,3.托运、承运业务,4.无业务,5.不确定业务默认为托运业务")
|
||||
private Integer businessType;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系人姓名")
|
||||
private String emergencyContactName;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyContactPhone;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty(name = "部门ID")
|
||||
private Integer departmentId;
|
||||
|
||||
@ApiModelProperty
|
||||
private Boolean hasDefaultAddress;
|
||||
|
||||
@ApiModelProperty(name = "钉钉user_id")
|
||||
private String dingUserId;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "钉钉部门id")
|
||||
private String dingDeptId;
|
||||
|
||||
@ApiModelProperty(name = "有效期管理 0-否 1-是")
|
||||
private Integer validityPeriodManagement;
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.mhd.user.domain.userAggregate.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
@TableName("user_menu")
|
||||
public class UserMenuEntity extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户菜单表ID")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long userMenuId;
|
||||
@ApiModelProperty(name = "用户表ID")
|
||||
private Long userId;
|
||||
@ApiModelProperty(name = "菜单表ID")
|
||||
private Long menuId;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user