6 Commits 50c42d8fa8 ... 163215877a

Author SHA1 Message Date
  loovi 163215877a 条件商户禁用App登录功能 1 year ago
  loovi 9a90d678f0 Merge remote-tracking branch 'origin/dev' into dev 1 year ago
  loovi 0325a6ecd8 Merge remote-tracking branch 'origin/dev' into dev 1 year ago
  loovi ccda3fe0da 添加商品物流信息增删查 1 year ago
  loovi 97de5bbcf6 添加设置互助组组长,互助组是够锁定,管理互助组内边民功能 1 year ago
  loovi 93f6b59157 添加商铺验证,是否锁住功能 1 year ago

+ 1 - 1
sp-core/sp-api/src/main/java/com/pj/api/client/admin/AdminInterface.java

@@ -21,7 +21,7 @@ public interface AdminInterface {
 	/** 启/停边民的app账号登陆限制 */
 	@RequestMapping("rpc/isLock")
 	int isLock(@RequestParam("id") String id,
-			   @RequestParam("type") Integer tupe,
+			   @RequestParam("type") Integer type,
 			   @RequestParam("status") Integer status);
 
 }

+ 5 - 11
sp-core/sp-api/src/main/java/com/pj/api/consts/FeignFactory.java

@@ -1,6 +1,5 @@
 package com.pj.api.consts;
 
-import com.pj.api.client.admin.AdminInterface;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -22,14 +21,9 @@ public class FeignFactory {
 	public void setSpCfgInterface(SpCfgInterface spCfgInterface) {
 		FeignFactory.spCfgInterface = spCfgInterface;
 	}
-
-
-	/**
-	 *  用户基本配置
-	 */
-	public static AdminInterface adminInterface;
-	@Autowired
-	public static void setAdminInterface(AdminInterface adminInterface) {
-		FeignFactory.adminInterface = adminInterface;
-	}
+	
+	
+	
+	
+	
 }

+ 5 - 6
sp-service/level-one-server/src/main/java/com/pj/tb_enterprise/TbEnterprise.java

@@ -41,7 +41,6 @@ public class TbEnterprise extends Model<TbEnterprise> implements Serializable {
 
 
 
-
 	// ---------- 表中字段 ----------
 	/**
 	 *  
@@ -191,13 +190,13 @@ public class TbEnterprise extends Model<TbEnterprise> implements Serializable {
 	/**
 	 * 删除状态(0=禁用,1=启用) 
 	 */
-	private Integer deleteStatus;	
-
-
+	private Integer deleteStatus;
 
 
-
-	
+	/**
+	 * 是否锁定
+	 */
+	private Integer isLock;
 
 
 }

+ 45 - 4
sp-service/level-one-server/src/main/java/com/pj/tb_enterprise/TbEnterpriseController.java

@@ -1,8 +1,15 @@
 package com.pj.tb_enterprise;
 
 import java.io.IOException;
+import java.util.Date;
 import java.util.List;
+import java.util.Objects;
+
+import cn.dev33.satoken.stp.StpUtil;
+import cn.hutool.core.date.DateUtil;
+import com.pj.common.core.utils.DateUtils;
 import com.pj.utils.so.SoMap;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
@@ -25,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
 @RequestMapping("/TbEnterprise/")
 public class TbEnterpriseController {
 
+
 	/** 底层 Service 对象 */
 	@Autowired
 	TbEnterpriseService tbEnterpriseService;
@@ -123,10 +131,43 @@ public class TbEnterpriseController {
 		}
 		return AjaxJson.getError();
 	}
-	
 
-	
-	
-	
+	/**
+	*商户审核
+	*
+	* @author loovi
+	* @date
+	*/
+	@RequestMapping("audit")
+	@SaCheckPermission(TbEnterprise.PERMISSION_CODE_EDIT)
+	public AjaxJson audit(TbEnterprise t){
 
+		Long loginId = StpUtil.getLoginIdAsLong();
+		TbEnterprise tbEnterprise = tbEnterpriseService.getById(t.getId());
+		if(Objects.isNull(tbEnterprise)){
+			return AjaxJson.getSuccess("该商户不存在");
+		}
+		BeanUtils.copyProperties(t,tbEnterprise);
+		tbEnterprise.setUpdateBy(String.valueOf(loginId));
+		tbEnterpriseService.update(t);
+		return AjaxJson.getSuccess();
+	}
+	/**
+	*是否锁住商户
+	*
+	* @author loovi
+	* @date
+	*/
+	@RequestMapping("isLock")
+	@SaCheckPermission(TbEnterprise.PERMISSION_CODE_EDIT)
+	public AjaxJson isLock(Long id, Integer isLock) {
+		Long loginId = StpUtil.getLoginIdAsLong();
+		TbEnterprise tbEnterprise = tbEnterpriseService.getById(id);
+		if (Objects.isNull(tbEnterprise)) {
+			return AjaxJson.getSuccess("该商户不存在");
+		}
+		int line = SP.publicMapper.updateColumnById(TbEnterprise.TABLE_NAME, "is_lock", isLock, id);
+		tbEnterprise.setUpdateBy(String.valueOf(loginId));
+		return AjaxJson.getByLine(line);
+	}
 }

+ 5 - 2
sp-service/level-one-server/src/main/java/com/pj/tb_group/TbGroup.java

@@ -128,9 +128,12 @@ public class TbGroup extends Model<TbGroup> implements Serializable {
 	/**
 	 * 删除状态(0=禁用,1=启用) 
 	 */
-	private Integer deleteStatus;	
-
+	private Integer deleteStatus;
 
+	/**
+	 * 是否锁定
+	 */
+	private Integer isLock;
 
 
 

+ 123 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_group/TbGroupController.java

@@ -1,8 +1,17 @@
 package com.pj.tb_group;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
+import java.util.Objects;
+
+import cn.dev33.satoken.stp.StpUtil;
+import com.pj.tb_enterprise.TbEnterprise;
+import com.pj.tb_people.TbPeople;
+import com.pj.tb_people.TbPeopleService;
 import com.pj.utils.so.SoMap;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
@@ -26,6 +35,8 @@ public class TbGroupController {
 	/** 底层 Service 对象 */
 	@Autowired
 	TbGroupService tbGroupService;
+	@Autowired
+	TbPeopleService tbPeopleService;
 
 	/** 增 */  
 	@RequestMapping("add")
@@ -125,7 +136,119 @@ public class TbGroupController {
 		return AjaxJson.getError();
 	}
 
+	/**
+	 *设置互助组组长
+	 *
+	 * @author loovi
+	 * @date
+	 */
+	@RequestMapping("setLeader")
+	@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
+	public AjaxJson setLeader(Long groupId,Long leaderId){
+
+		Long loginId = StpUtil.getLoginIdAsLong();
+
+		TbGroup tbGroup = tbGroupService.getById(groupId);
+		TbPeople tbPeople = tbPeopleService.getById(leaderId);
+		if (Objects.isNull(tbGroup)){
+			return AjaxJson.getSuccess("该互助组不存在");
+		}
+		if (Objects.isNull(tbPeople)){
+			return AjaxJson.getSuccess("该用户不存在");
+		}
+		if(tbGroup.getIsLock()==1){
+			return AjaxJson.getSuccess("该互助组已被锁定");
+		}
+		if (tbPeople.getIsLock()==1){
+			return AjaxJson.getSuccess("该用户已被锁定");
+		}
+
+		tbGroup.setLeaderId(tbGroup.getLeaderId());
+		tbGroup.setLeaderName(tbPeople.getName());
+		tbGroup.setLeaderPhone(tbGroup.getLeaderPhone());
+
+		tbGroup.setUpdateBy(String.valueOf(loginId));
+		tbGroupService.update(tbGroup);
+		return AjaxJson.getSuccess();
+	}
+	/**
+	*向互助组添加边民
+	*
+	* @author loovi
+	* @date
+	*/
+	@RequestMapping("groupAddPeople")
+	@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
+	public AjaxJson GroupAddPeople(Long groupId,Long []peopleIds){
+
+		Long loginId = StpUtil.getLoginIdAsLong();
 
+		TbGroup tbGroup = tbGroupService.getById(groupId);
+		if (Objects.isNull(tbGroup)){
+			return AjaxJson.getSuccess("该互助组不存在");
+		}
+		if(tbGroup.getIsLock()==1){
+			return AjaxJson.getSuccess("该互助组已被锁定");
+		}
+		List<Long> list = Arrays.asList(peopleIds);
+
+		list.forEach(peopleId->{
+			TbPeople tbPeople = tbPeopleService.getById(peopleId);
+			tbPeople.setGroupId(tbGroup.getId());
+			tbPeople.setGroupName(tbGroup.getName());
+			tbGroup.setUpdateBy(String.valueOf(loginId));
+			tbPeopleService.updateById(tbPeople);
+		});
+		return AjaxJson.getSuccess();
+	}
+	/**
+	 *互助组删除边民
+	 *
+	 * @author loovi
+	 * @date
+	 */
+	@RequestMapping("groupDelPeople")
+	@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
+	public AjaxJson GroupDelPeople(Long groupId,Long []peopleIds){
+
+		Long loginId = StpUtil.getLoginIdAsLong();
+
+		TbGroup tbGroup = tbGroupService.getById(groupId);
+		if (Objects.isNull(tbGroup)){
+			return AjaxJson.getSuccess("该互助组不存在");
+		}
+		if(tbGroup.getIsLock()==1){
+			return AjaxJson.getSuccess("该互助组已被锁定");
+		}
+		List<Long> list = Arrays.asList(peopleIds);
+
+		list.forEach(peopleId->{
+			TbPeople tbPeople = tbPeopleService.getById(peopleId);
+			tbPeople.setGroupId(0L);
+			tbPeople.setGroupName("");
+			tbGroup.setUpdateBy(String.valueOf(loginId));
+			tbPeopleService.updateById(tbPeople);
+		});
+		return AjaxJson.getSuccess();
+	}
+	/**
+	 *是否锁住互助组
+	 *
+	 * @author loovi
+	 * @date
+	 */
+	@RequestMapping("isLock")
+	@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
+	public AjaxJson isLock(Long id, Integer isLock) {
+		Long loginId = StpUtil.getLoginIdAsLong();
+		TbGroup tbGroup = tbGroupService.getById(id);
+		if (Objects.isNull(tbGroup)) {
+			return AjaxJson.getSuccess("该互助组不存在");
+		}
+		int line = SP.publicMapper.updateColumnById(TbGroup.TABLE_NAME, "is_lock", isLock, id);
+		tbGroup.setUpdateBy(String.valueOf(loginId));
+		return AjaxJson.getByLine(line);
+	}
 
 
 

+ 1 - 1
sp-service/level-one-server/src/main/java/com/pj/tb_shop/TbShopController.java

@@ -16,7 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
 
 
 /**
- * Controller: tb_shop -- 铺
+ * Controller: tb_shop -- 
  * @author qzy 
  */
 @RestController

+ 170 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_orders/TbOrders.java

@@ -0,0 +1,170 @@
+package com.pj.project.tb_orders;
+
+import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.EqualsAndHashCode;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * Model: tb_orders -- 订单表
+ * @author loovi 
+ */
+@Data
+@Accessors(chain = true)
+@TableName(TbOrders.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class TbOrders extends Model<TbOrders> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id 
+	 */
+	private static final long serialVersionUID = 1L;	
+	/**
+	 * 此模块对应的表名 
+	 */
+	public static final String TABLE_NAME = "tb_orders";	
+	/**
+	 * 此模块对应的权限码 
+	 */
+	public static final String PERMISSION_CODE = "tb-orders";
+	public static final String PERMISSION_CODE_ADD = "tb-orders-add";
+	public static final String PERMISSION_CODE_EDIT = "tb-orders-edit";
+	public static final String PERMISSION_CODE_DEL = "tb-orders-del";
+
+
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 * 货运订单管理表主键 
+	 */
+	@TableId(type = IdType.AUTO)
+	private Long id;	
+
+	/**
+	 * 一级市场订单ID 
+	 */
+	private Long levelOneOrderId;	
+
+	/**
+	 * 订单编号 
+	 */
+	private String orderNo;	
+
+	/**
+	 * 商品id 
+	 */
+	private Long goodsId;	
+
+	/**
+	 * 商品名称 
+	 */
+	private String goodsName;	
+
+	/**
+	 * 商品来源(国家) 
+	 */
+	private String goodsFrom;	
+
+	/**
+	 * 发货商电话 
+	 */
+	private String shipperPhone;	
+
+	/**
+	 * 发货商名称 
+	 */
+	private String shipperName;	
+
+	/**
+	 * 司机ID 
+	 */
+	private Long driverId;	
+
+	/**
+	 * 司机名称 
+	 */
+	private String driverName;	
+
+	/**
+	 * 司机电话 
+	 */
+	private String driverPhone;	
+
+	/**
+	 * 车型ID 
+	 */
+	private Long carId;	
+
+	/**
+	 * 车型名称 
+	 */
+	private String carType;	
+
+	/**
+	 * 收货人名称 
+	 */
+	private String consigneeName;	
+
+	/**
+	 * 收货人电话号码 
+	 */
+	private String consigneePhone;	
+
+	/**
+	 * (预留字段) 申报订单号 
+	 */
+	private String declarationNumber;	
+
+	/**
+	 * 订单状态已完成 (0=禁用,1=启用) 
+	 */
+	private Integer orderFinish;	
+
+	/**
+	 * 创建时间 
+	 */
+	private String createTime;	
+
+	/**
+	 * 创建人编号 
+	 */
+	private String createBy;	
+
+	/**
+	 * 创建人名称 
+	 */
+	private String createName;	
+
+	/**
+	 * 更新时间 
+	 */
+	private String updateTime;	
+
+	/**
+	 * 更新人编号 
+	 */
+	private String updateBy;	
+
+	/**
+	 * 更新人名称 
+	 */
+	private String updateName;	
+
+	/**
+	 * 删除状态(0=禁用,1=启用) 
+	 */
+	private Integer deleteStatus;	
+
+
+
+
+
+	
+
+
+}

+ 101 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_orders/TbOrdersController.java

@@ -0,0 +1,101 @@
+package com.pj.project.tb_orders;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.pj.project4sp.SP;
+import com.pj.utils.sg.AjaxJson;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * Controller: tb_orders -- 物流订单表
+ * @author loovi 
+ */
+@RestController
+@RequestMapping("/TbOrders/")
+public class TbOrdersController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbOrdersService tbOrdersService;
+
+	/** 增 */  
+	@RequestMapping("add")
+	@SaCheckPermission(TbOrders.PERMISSION_CODE_ADD)
+	public AjaxJson add(TbOrders t){
+		tbOrdersService.add(t);
+		t = tbOrdersService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 删 */  
+	@RequestMapping("delete")
+	@SaCheckPermission(TbOrders.PERMISSION_CODE_DEL)
+	public AjaxJson delete(Long id){
+		 tbOrdersService.delete(id);
+		return AjaxJson.getSuccess();
+	}
+	
+	/** 删 - 根据id列表 */  
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(TbOrders.PERMISSION_CODE_DEL)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class); 
+		int line = SP.publicMapper.deleteByIds(TbOrders.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 */  
+	@RequestMapping("update")
+	@SaCheckPermission(TbOrders.PERMISSION_CODE_EDIT)
+	public AjaxJson update(TbOrders t){
+		tbOrdersService.update(t);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 查 - 根据id */  
+	@RequestMapping("getById")
+		@SaCheckPermission(TbOrders.PERMISSION_CODE)
+	public AjaxJson getById(Long id){
+		TbOrders t = tbOrdersService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	@RequestMapping("getList")
+		@SaCheckPermission(TbOrders.PERMISSION_CODE)
+	public AjaxJson getList() { 
+		SoMap so = SoMap.getRequestSoMap();
+		List<TbOrders> list = tbOrdersService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+	
+	
+	
+	/** 改 - 订单状态已完成 (0=禁用,1=启用) */  
+	@RequestMapping("updateOrderFinish")
+	@SaCheckPermission(TbOrders.PERMISSION_CODE_EDIT)
+	public AjaxJson updateOrderFinish(Long id, Integer value){
+		int line = SP.publicMapper.updateColumnById(TbOrders.TABLE_NAME, "order_finish", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 - 删除状态(0=禁用,1=启用) */  
+	@RequestMapping("updateDeleteStatus")
+	@SaCheckPermission(TbOrders.PERMISSION_CODE_EDIT)
+	public AjaxJson updateDeleteStatus(Long id, Integer value){
+		int line = SP.publicMapper.updateColumnById(TbOrders.TABLE_NAME, "delete_status", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	
+
+	
+	
+	
+
+}

+ 30 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_orders/TbOrdersMapper.java

@@ -0,0 +1,30 @@
+package com.pj.project.tb_orders;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.pj.utils.so.*;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * Mapper: tb_orders -- 订单表
+ * @author loovi 
+ */
+
+@Mapper
+@Repository
+public interface TbOrdersMapper extends BaseMapper <TbOrders> {
+
+
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合 
+	 * @return 数据列表 
+	 */
+	List<TbOrders> getList(SoMap so);
+
+
+}

+ 89 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_orders/TbOrdersMapper.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.pj.project.tb_orders.TbOrdersMapper">
+
+
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, level_one_order_id, order_no, goods_id, goods_name, goods_from, shipper_phone, shipper_name, driver_id, driver_name, driver_phone, car_id, car_type, consignee_name, consignee_phone, declaration_number, order_finish, create_time, create_by, create_name, update_time, update_by, update_name, delete_status from tb_orders  -->
+	
+	<!-- 通用映射:自动模式 -->
+	<resultMap id="model" autoMapping="true" type="com.pj.project.tb_orders.TbOrders"></resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from tb_orders 
+	</sql>
+
+	
+	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
+	<select id="getList" resultMap="model">
+		<include refid="select_sql"></include>
+		<where>
+			<if test=' this.has("id") '> and id = #{id} </if>
+			<if test=' this.has("levelOneOrderId") '> and level_one_order_id = #{levelOneOrderId} </if>
+			<if test=' this.has("orderNo") '> and order_no = #{orderNo} </if>
+			<if test=' this.has("goodsId") '> and goods_id = #{goodsId} </if>
+			<if test=' this.has("goodsName") '> and goods_name = #{goodsName} </if>
+			<if test=' this.has("goodsFrom") '> and goods_from = #{goodsFrom} </if>
+			<if test=' this.has("shipperPhone") '> and shipper_phone = #{shipperPhone} </if>
+			<if test=' this.has("shipperName") '> and shipper_name = #{shipperName} </if>
+			<if test=' this.has("driverId") '> and driver_id = #{driverId} </if>
+			<if test=' this.has("driverName") '> and driver_name = #{driverName} </if>
+			<if test=' this.has("driverPhone") '> and driver_phone = #{driverPhone} </if>
+			<if test=' this.has("carId") '> and car_id = #{carId} </if>
+			<if test=' this.has("carType") '> and car_type = #{carType} </if>
+			<if test=' this.has("consigneeName") '> and consignee_name = #{consigneeName} </if>
+			<if test=' this.has("consigneePhone") '> and consignee_phone = #{consigneePhone} </if>
+			<if test=' this.has("declarationNumber") '> and declaration_number = #{declarationNumber} </if>
+			<if test=' this.has("orderFinish") '> and order_finish = #{orderFinish} </if>
+			<if test=' this.has("createTime") '> and create_time = #{createTime} </if>
+			<if test=' this.has("createBy") '> and create_by = #{createBy} </if>
+			<if test=' this.has("createName") '> and create_name = #{createName} </if>
+			<if test=' this.has("updateTime") '> and update_time = #{updateTime} </if>
+			<if test=' this.has("updateBy") '> and update_by = #{updateBy} </if>
+			<if test=' this.has("updateName") '> and update_name = #{updateName} </if>
+			<if test=' this.has("deleteStatus") '> and delete_status = #{deleteStatus} </if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> level_one_order_id desc </when>
+			<when test='sortType == 3'> order_no desc </when>
+			<when test='sortType == 4'> goods_id desc </when>
+			<when test='sortType == 5'> goods_name desc </when>
+			<when test='sortType == 6'> goods_from desc </when>
+			<when test='sortType == 7'> shipper_phone desc </when>
+			<when test='sortType == 8'> shipper_name desc </when>
+			<when test='sortType == 9'> driver_id desc </when>
+			<when test='sortType == 10'> driver_name desc </when>
+			<when test='sortType == 11'> driver_phone desc </when>
+			<when test='sortType == 12'> car_id desc </when>
+			<when test='sortType == 13'> car_type desc </when>
+			<when test='sortType == 14'> consignee_name desc </when>
+			<when test='sortType == 15'> consignee_phone desc </when>
+			<when test='sortType == 16'> declaration_number desc </when>
+			<when test='sortType == 17'> order_finish desc </when>
+			<when test='sortType == 18'> create_time desc </when>
+			<when test='sortType == 19'> create_by desc </when>
+			<when test='sortType == 20'> create_name desc </when>
+			<when test='sortType == 21'> update_time desc </when>
+			<when test='sortType == 22'> update_by desc </when>
+			<when test='sortType == 23'> update_name desc </when>
+			<when test='sortType == 24'> delete_status desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+</mapper>

+ 51 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_orders/TbOrdersService.java

@@ -0,0 +1,51 @@
+package com.pj.project.tb_orders;
+
+import java.util.List;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.transaction.annotation.Transactional;
+import com.pj.utils.sg.*;
+
+/**
+ * Service: tb_orders -- 订单表
+ * @author loovi 
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class TbOrdersService extends ServiceImpl<TbOrdersMapper, TbOrders> implements IService<TbOrders>{
+
+	/** 底层 Mapper 对象 */
+	@Autowired
+	TbOrdersMapper tbOrdersMapper;
+
+	/** 增 */
+	void add(TbOrders t){
+		save(t);
+	}
+
+	/** 删 */
+	void delete(Long id){
+		removeById(id);
+	}
+
+	/** 改 */
+	void update(TbOrders t){
+		updateById(t);
+
+	}
+
+	/** 查 */
+	TbOrders getById(Long id){
+		return super.getById(id);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	List<TbOrders> getList(SoMap so) { 
+		return tbOrdersMapper.getList(so);	
+	}
+	
+
+}

+ 91 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_orders/TbOrdersUtil.java

@@ -0,0 +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 {
+
+	
+	/** 底层 Mapper 对象 */
+	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] 不能为空");		// 验证: 一级市场订单ID 
+		AjaxError.throwByIsNull(t.getOrderNo(), "[订单编号] 不能为空");		// 验证: 订单编号 
+		AjaxError.throwByIsNull(t.getGoodsId(), "[商品id] 不能为空");		// 验证: 商品id 
+		AjaxError.throwByIsNull(t.getGoodsName(), "[商品名称] 不能为空");		// 验证: 商品名称 
+		AjaxError.throwByIsNull(t.getGoodsFrom(), "[商品来源] 不能为空");		// 验证: 商品来源(国家) 
+		AjaxError.throwByIsNull(t.getShipperPhone(), "[发货商电话] 不能为空");		// 验证: 发货商电话 
+		AjaxError.throwByIsNull(t.getShipperName(), "[发货商名称] 不能为空");		// 验证: 发货商名称 
+		AjaxError.throwByIsNull(t.getDriverId(), "[司机ID] 不能为空");		// 验证: 司机ID 
+		AjaxError.throwByIsNull(t.getDriverName(), "[司机名称] 不能为空");		// 验证: 司机名称 
+		AjaxError.throwByIsNull(t.getDriverPhone(), "[司机电话] 不能为空");		// 验证: 司机电话 
+		AjaxError.throwByIsNull(t.getCarId(), "[车型ID] 不能为空");		// 验证: 车型ID 
+		AjaxError.throwByIsNull(t.getCarType(), "[车型名称] 不能为空");		// 验证: 车型名称 
+		AjaxError.throwByIsNull(t.getConsigneeName(), "[收货人名称] 不能为空");		// 验证: 收货人名称 
+		AjaxError.throwByIsNull(t.getConsigneePhone(), "[收货人电话号码] 不能为空");		// 验证: 收货人电话号码 
+		AjaxError.throwByIsNull(t.getDeclarationNumber(), "[申报订单号] 不能为空");		// 验证: (预留字段) 申报订单号 
+		AjaxError.throwByIsNull(t.getOrderFinish(), "[订单状态已完成] 不能为空");		// 验证: 订单状态已完成 (0=禁用,1=启用) 
+		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(), "[删除状态] 不能为空");		// 验证: 删除状态(0=禁用,1=启用) 
+	}
+
+	/** 
+	 * 获取一个TbOrders (方便复制代码用) [G] 
+	 */ 
+	static TbOrders getTbOrders() {
+		TbOrders t = new TbOrders();	// 声明对象 
+		t.setId(0L);		// 货运订单管理表主键 
+		t.setLevelOneOrderId(0L);		// 一级市场订单ID 
+		t.setOrderNo("");		// 订单编号 
+		t.setGoodsId(0L);		// 商品id 
+		t.setGoodsName("");		// 商品名称 
+		t.setGoodsFrom("");		// 商品来源(国家) 
+		t.setShipperPhone("");		// 发货商电话 
+		t.setShipperName("");		// 发货商名称 
+		t.setDriverId(0L);		// 司机ID 
+		t.setDriverName("");		// 司机名称 
+		t.setDriverPhone("");		// 司机电话 
+		t.setCarId(0L);		// 车型ID 
+		t.setCarType("");		// 车型名称 
+		t.setConsigneeName("");		// 收货人名称 
+		t.setConsigneePhone("");		// 收货人电话号码 
+		t.setDeclarationNumber("");		// (预留字段) 申报订单号 
+		t.setOrderFinish(0);		// 订单状态已完成 (0=禁用,1=启用) 
+		t.setCreateTime("");		// 创建时间 
+		t.setCreateBy("");		// 创建人编号 
+		t.setCreateName("");		// 创建人名称 
+		t.setUpdateTime("");		// 更新时间 
+		t.setUpdateBy("");		// 更新人编号 
+		t.setUpdateName("");		// 更新人名称 
+		t.setDeleteStatus(0);		// 删除状态(0=禁用,1=启用) 
+		return t;
+	}
+	
+	
+	
+	
+	
+}