|
@@ -1,91 +1,91 @@
|
|
|
-package com.pj.project.tb_orders;
|
|
|
-
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-
|
|
|
-import com.pj.utils.sg.*;
|
|
|
-
|
|
|
-
|
|
|
- * 工具类:tb_orders -- 订单表
|
|
|
- * @author loovi
|
|
|
- *
|
|
|
- */
|
|
|
-@Component
|
|
|
-public class TbOrdersUtil {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- public static TbOrdersMapper tbOrdersMapper;
|
|
|
- @Autowired
|
|
|
- private void setTbOrdersMapper(TbOrdersMapper tbOrdersMapper) {
|
|
|
- TbOrdersUtil.tbOrdersMapper = tbOrdersMapper;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- * 将一个 TbOrders 对象进行进行数据完整性校验 (方便add/update等接口数据校验) [G]
|
|
|
- */
|
|
|
- static void check(TbOrders t) {
|
|
|
- AjaxError.throwByIsNull(t.getId(), "[货运订单管理表主键] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getLevelOneOrderId(), "[一级市场订单ID] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getOrderNo(), "[订单编号] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getGoodsId(), "[商品id] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getGoodsName(), "[商品名称] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getGoodsFrom(), "[商品来源] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getShipperPhone(), "[发货商电话] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getShipperName(), "[发货商名称] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getDriverId(), "[司机ID] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getDriverName(), "[司机名称] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getDriverPhone(), "[司机电话] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getCarId(), "[车型ID] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getCarType(), "[车型名称] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getConsigneeName(), "[收货人名称] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getConsigneePhone(), "[收货人电话号码] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getDeclarationNumber(), "[申报订单号] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getOrderFinish(), "[订单状态已完成] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getCreateTime(), "[创建时间] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getCreateBy(), "[创建人编号] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getCreateName(), "[创建人名称] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getUpdateTime(), "[更新时间] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getUpdateBy(), "[更新人编号] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getUpdateName(), "[更新人名称] 不能为空");
|
|
|
- AjaxError.throwByIsNull(t.getDeleteStatus(), "[删除状态] 不能为空");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- * 获取一个TbOrders (方便复制代码用) [G]
|
|
|
- */
|
|
|
- static TbOrders getTbOrders() {
|
|
|
- TbOrders t = new TbOrders();
|
|
|
- t.setId(0L);
|
|
|
- t.setLevelOneOrderId(0L);
|
|
|
- t.setOrderNo("");
|
|
|
- t.setGoodsId(0L);
|
|
|
- t.setGoodsName("");
|
|
|
- t.setGoodsFrom("");
|
|
|
- t.setShipperPhone("");
|
|
|
- t.setShipperName("");
|
|
|
- t.setDriverId(0L);
|
|
|
- t.setDriverName("");
|
|
|
- t.setDriverPhone("");
|
|
|
- t.setCarId(0L);
|
|
|
- t.setCarType("");
|
|
|
- t.setConsigneeName("");
|
|
|
- t.setConsigneePhone("");
|
|
|
- t.setDeclarationNumber("");
|
|
|
- t.setOrderFinish(0);
|
|
|
- t.setCreateTime("");
|
|
|
- t.setCreateBy("");
|
|
|
- t.setCreateName("");
|
|
|
- t.setUpdateTime("");
|
|
|
- t.setUpdateBy("");
|
|
|
- t.setUpdateName("");
|
|
|
- t.setDeleteStatus(0);
|
|
|
- return t;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|