|
@@ -1,98 +1,98 @@
|
|
|
-package com.pj.project.tb_driver;
|
|
|
-
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-
|
|
|
-import com.pj.utils.sg.*;
|
|
|
-import java.util.*;
|
|
|
-
|
|
|
-/**
|
|
|
- * 工具类:tb_driver -- 司机
|
|
|
- * @author qzy
|
|
|
- *
|
|
|
- */
|
|
|
-@Component
|
|
|
-public class TbDriverUtil {
|
|
|
-
|
|
|
-
|
|
|
- /** 底层 Mapper 对象 */
|
|
|
- public static TbDriverMapper tbDriverMapper;
|
|
|
- @Autowired
|
|
|
- private void setTbDriverMapper(TbDriverMapper tbDriverMapper) {
|
|
|
- TbDriverUtil.tbDriverMapper = tbDriverMapper;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 将一个 TbDriver 对象进行进行数据完整性校验 (方便add/update等接口数据校验) [G]
|
|
|
- */
|
|
|
- static void check(TbDriver t) {
|
|
|
- AjaxError.throwByIsNull(t.getId(), "[主键] 不能为空"); // 验证: 主键
|
|
|
- AjaxError.throwByIsNull(t.getName(), "[姓名] 不能为空"); // 验证: 姓名
|
|
|
- AjaxError.throwByIsNull(t.getAge(), "[年龄] 不能为空"); // 验证: 年龄
|
|
|
- AjaxError.throwByIsNull(t.getSex(), "[性别性别] 不能为空"); // 验证: 性别性别(1=男,2=女)
|
|
|
- AjaxError.throwByIsNull(t.getPhone(), "[手机号] 不能为空"); // 验证: 手机号
|
|
|
- AjaxError.throwByIsNull(t.getAddress(), "[联系地址] 不能为空"); // 验证: 联系地址
|
|
|
- AjaxError.throwByIsNull(t.getBankCode(), "[银行卡号] 不能为空"); // 验证: 银行卡号
|
|
|
- AjaxError.throwByIsNull(t.getBankName(), "[银行名称] 不能为空"); // 验证: 银行名称
|
|
|
- AjaxError.throwByIsNull(t.getIdCard(), "[身份证号] 不能为空"); // 验证: 身份证号
|
|
|
- AjaxError.throwByIsNull(t.getIdCardImg(), "[身份证照片] 不能为空"); // 验证: 身份证照片
|
|
|
- AjaxError.throwByIsNull(t.getDrivingLicenseId(), "[驾驶证号] 不能为空"); // 验证: 驾驶证号
|
|
|
- AjaxError.throwByIsNull(t.getDrivingLicenseImg(), "[驾驶证照片] 不能为空"); // 验证: 驾驶证照片
|
|
|
- AjaxError.throwByIsNull(t.getVehicleDrivingId(), "[车辆行驶证号] 不能为空"); // 验证: 车辆行驶证号
|
|
|
- AjaxError.throwByIsNull(t.getVehicleDrivingImg(), "[车辆行驶证照片] 不能为空"); // 验证: 车辆行驶证照片
|
|
|
- AjaxError.throwByIsNull(t.getVehicleImg(), "[车辆前脸照] 不能为空"); // 验证: 车辆前脸照
|
|
|
- AjaxError.throwByIsNull(t.getRegisterTime(), "[注册时间] 不能为空"); // 验证: 注册时间
|
|
|
- AjaxError.throwByIsNull(t.getIsLock(), "[是否被锁定] 不能为空"); // 验证: 是否被锁定
|
|
|
- AjaxError.throwByIsNull(t.getCreateBy(), "[创建者id] 不能为空"); // 验证: 创建者id
|
|
|
- AjaxError.throwByIsNull(t.getCreateName(), "[创建者名称] 不能为空"); // 验证: 创建者名称
|
|
|
- AjaxError.throwByIsNull(t.getCreateTime(), "[创建时间] 不能为空"); // 验证: 创建时间
|
|
|
- AjaxError.throwByIsNull(t.getUpdateBy(), "[更新者id] 不能为空"); // 验证: 更新者id
|
|
|
- AjaxError.throwByIsNull(t.getUpdateName(), "[更新者名称] 不能为空"); // 验证: 更新者名称
|
|
|
- AjaxError.throwByIsNull(t.getUpdateTime(), "[更新时间] 不能为空"); // 验证: 更新时间
|
|
|
- AjaxError.throwByIsNull(t.getAuditStatus(), "[审核状态] 不能为空"); // 验证: 审核状态(0=待审核,1=已通过,2=不通过)
|
|
|
- AjaxError.throwByIsNull(t.getAuditBy(), "[审核人] 不能为空"); // 验证: 审核人
|
|
|
- AjaxError.throwByIsNull(t.getAuditTime(), "[审核时间] 不能为空"); // 验证: 审核时间
|
|
|
- AjaxError.throwByIsNull(t.getNopassReason(), "[审核不通过原因] 不能为空"); // 验证: 审核不通过原因
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取一个TbDriver (方便复制代码用) [G]
|
|
|
- */
|
|
|
- static TbDriver getTbDriver() {
|
|
|
- TbDriver t = new TbDriver(); // 声明对象
|
|
|
- t.setId(0L); // 主键
|
|
|
- t.setName(""); // 姓名
|
|
|
- t.setAge(0); // 年龄
|
|
|
- t.setSex(""); // 性别性别(1=男,2=女)
|
|
|
- t.setPhone(""); // 手机号
|
|
|
- t.setAddress(""); // 联系地址
|
|
|
- t.setBankCode(""); // 银行卡号
|
|
|
- t.setBankName(""); // 银行名称
|
|
|
- t.setIdCard(""); // 身份证号
|
|
|
- t.setIdCardImg(""); // 身份证照片
|
|
|
- t.setDrivingLicenseId(""); // 驾驶证号
|
|
|
- t.setDrivingLicenseImg(""); // 驾驶证照片
|
|
|
- t.setVehicleDrivingId(""); // 车辆行驶证号
|
|
|
- t.setVehicleDrivingImg(""); // 车辆行驶证照片
|
|
|
- t.setVehicleImg(""); // 车辆前脸照
|
|
|
- t.setRegisterTime(""); // 注册时间
|
|
|
- t.setIsLock(""); // 是否被锁定
|
|
|
- t.setCreateBy(""); // 创建者id
|
|
|
- t.setCreateName(""); // 创建者名称
|
|
|
- t.setCreateTime(new Date()); // 创建时间
|
|
|
- t.setUpdateBy(""); // 更新者id
|
|
|
- t.setUpdateName(""); // 更新者名称
|
|
|
- t.setUpdateTime(new Date()); // 更新时间
|
|
|
- t.setAuditStatus(0); // 审核状态(0=待审核,1=已通过,2=不通过)
|
|
|
- t.setAuditBy(""); // 审核人
|
|
|
- t.setAuditTime(""); // 审核时间
|
|
|
- t.setNopassReason(""); // 审核不通过原因
|
|
|
- return t;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
+//package com.pj.project.tb_driver;
|
|
|
+//
|
|
|
+//import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+//import org.springframework.stereotype.Component;
|
|
|
+//
|
|
|
+//import com.pj.utils.sg.*;
|
|
|
+//import java.util.*;
|
|
|
+//
|
|
|
+///**
|
|
|
+// * 工具类:tb_driver -- 司机
|
|
|
+// * @author qzy
|
|
|
+// *
|
|
|
+// */
|
|
|
+//@Component
|
|
|
+//public class TbDriverUtil {
|
|
|
+//
|
|
|
+//
|
|
|
+// /** 底层 Mapper 对象 */
|
|
|
+// public static TbDriverMapper tbDriverMapper;
|
|
|
+// @Autowired
|
|
|
+// private void setTbDriverMapper(TbDriverMapper tbDriverMapper) {
|
|
|
+// TbDriverUtil.tbDriverMapper = tbDriverMapper;
|
|
|
+// }
|
|
|
+//
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 将一个 TbDriver 对象进行进行数据完整性校验 (方便add/update等接口数据校验) [G]
|
|
|
+// */
|
|
|
+// static void check(TbDriver t) {
|
|
|
+// AjaxError.throwByIsNull(t.getId(), "[主键] 不能为空"); // 验证: 主键
|
|
|
+// AjaxError.throwByIsNull(t.getName(), "[姓名] 不能为空"); // 验证: 姓名
|
|
|
+// AjaxError.throwByIsNull(t.getAge(), "[年龄] 不能为空"); // 验证: 年龄
|
|
|
+// AjaxError.throwByIsNull(t.getSex(), "[性别性别] 不能为空"); // 验证: 性别性别(1=男,2=女)
|
|
|
+// AjaxError.throwByIsNull(t.getPhone(), "[手机号] 不能为空"); // 验证: 手机号
|
|
|
+// AjaxError.throwByIsNull(t.getAddress(), "[联系地址] 不能为空"); // 验证: 联系地址
|
|
|
+// AjaxError.throwByIsNull(t.getBankCode(), "[银行卡号] 不能为空"); // 验证: 银行卡号
|
|
|
+// AjaxError.throwByIsNull(t.getBankName(), "[银行名称] 不能为空"); // 验证: 银行名称
|
|
|
+// AjaxError.throwByIsNull(t.getIdCard(), "[身份证号] 不能为空"); // 验证: 身份证号
|
|
|
+// AjaxError.throwByIsNull(t.getIdCardImg(), "[身份证照片] 不能为空"); // 验证: 身份证照片
|
|
|
+// AjaxError.throwByIsNull(t.getDrivingLicenseId(), "[驾驶证号] 不能为空"); // 验证: 驾驶证号
|
|
|
+// AjaxError.throwByIsNull(t.getDrivingLicenseImg(), "[驾驶证照片] 不能为空"); // 验证: 驾驶证照片
|
|
|
+// AjaxError.throwByIsNull(t.getVehicleDrivingId(), "[车辆行驶证号] 不能为空"); // 验证: 车辆行驶证号
|
|
|
+// AjaxError.throwByIsNull(t.getVehicleDrivingImg(), "[车辆行驶证照片] 不能为空"); // 验证: 车辆行驶证照片
|
|
|
+// AjaxError.throwByIsNull(t.getVehicleImg(), "[车辆前脸照] 不能为空"); // 验证: 车辆前脸照
|
|
|
+// AjaxError.throwByIsNull(t.getRegisterTime(), "[注册时间] 不能为空"); // 验证: 注册时间
|
|
|
+// AjaxError.throwByIsNull(t.getIsLock(), "[是否被锁定] 不能为空"); // 验证: 是否被锁定
|
|
|
+// AjaxError.throwByIsNull(t.getCreateBy(), "[创建者id] 不能为空"); // 验证: 创建者id
|
|
|
+// AjaxError.throwByIsNull(t.getCreateName(), "[创建者名称] 不能为空"); // 验证: 创建者名称
|
|
|
+// AjaxError.throwByIsNull(t.getCreateTime(), "[创建时间] 不能为空"); // 验证: 创建时间
|
|
|
+// AjaxError.throwByIsNull(t.getUpdateBy(), "[更新者id] 不能为空"); // 验证: 更新者id
|
|
|
+// AjaxError.throwByIsNull(t.getUpdateName(), "[更新者名称] 不能为空"); // 验证: 更新者名称
|
|
|
+// AjaxError.throwByIsNull(t.getUpdateTime(), "[更新时间] 不能为空"); // 验证: 更新时间
|
|
|
+// AjaxError.throwByIsNull(t.getAuditStatus(), "[审核状态] 不能为空"); // 验证: 审核状态(0=待审核,1=已通过,2=不通过)
|
|
|
+// AjaxError.throwByIsNull(t.getAuditBy(), "[审核人] 不能为空"); // 验证: 审核人
|
|
|
+// AjaxError.throwByIsNull(t.getAuditTime(), "[审核时间] 不能为空"); // 验证: 审核时间
|
|
|
+// AjaxError.throwByIsNull(t.getNopassReason(), "[审核不通过原因] 不能为空"); // 验证: 审核不通过原因
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 获取一个TbDriver (方便复制代码用) [G]
|
|
|
+// */
|
|
|
+// static TbDriver getTbDriver() {
|
|
|
+// TbDriver t = new TbDriver(); // 声明对象
|
|
|
+// t.setId(0L); // 主键
|
|
|
+// t.setName(""); // 姓名
|
|
|
+// t.setAge(0); // 年龄
|
|
|
+// t.setSex(""); // 性别性别(1=男,2=女)
|
|
|
+// t.setPhone(""); // 手机号
|
|
|
+// t.setAddress(""); // 联系地址
|
|
|
+// t.setBankCode(""); // 银行卡号
|
|
|
+// t.setBankName(""); // 银行名称
|
|
|
+// t.setIdCard(""); // 身份证号
|
|
|
+// t.setIdCardImg(""); // 身份证照片
|
|
|
+// t.setDrivingLicenseId(""); // 驾驶证号
|
|
|
+// t.setDrivingLicenseImg(""); // 驾驶证照片
|
|
|
+// t.setVehicleDrivingId(""); // 车辆行驶证号
|
|
|
+// t.setVehicleDrivingImg(""); // 车辆行驶证照片
|
|
|
+// t.setVehicleImg(""); // 车辆前脸照
|
|
|
+// t.setRegisterTime(""); // 注册时间
|
|
|
+// t.setIsLock(""); // 是否被锁定
|
|
|
+// t.setCreateBy(""); // 创建者id
|
|
|
+// t.setCreateName(""); // 创建者名称
|
|
|
+// t.setCreateTime(new Date()); // 创建时间
|
|
|
+// t.setUpdateBy(""); // 更新者id
|
|
|
+// t.setUpdateName(""); // 更新者名称
|
|
|
+// t.setUpdateTime(new Date()); // 更新时间
|
|
|
+// t.setAuditStatus(0); // 审核状态(0=待审核,1=已通过,2=不通过)
|
|
|
+// t.setAuditBy(""); // 审核人
|
|
|
+// t.setAuditTime(""); // 审核时间
|
|
|
+// t.setNopassReason(""); // 审核不通过原因
|
|
|
+// return t;
|
|
|
+// }
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//}
|