Browse Source

Merge remote-tracking branch 'origin/dev' into dev

loovi 1 year ago
parent
commit
d15c010f70
35 changed files with 1912 additions and 33 deletions
  1. 52 0
      sp-service/level-one-server/src/main/java/com/pj/tb_enterprise/TbEnterpriseAppController.java
  2. 34 4
      sp-service/level-one-server/src/main/java/com/pj/tb_enterprise/TbEnterpriseService.java
  3. 9 2
      sp-service/level-one-server/src/main/java/com/pj/tb_goods_cart/TbGoodsCart.java
  4. 25 1
      sp-service/level-one-server/src/main/java/com/pj/tb_goods_cart/TbGoodsCartService.java
  5. 9 9
      sp-service/level-one-server/src/main/java/com/pj/tb_goods_cart/dto/GoodsCartInfoDto.java
  6. 14 1
      sp-service/level-one-server/src/main/java/com/pj/tb_people/TbPeopleAppController.java
  7. 56 0
      sp-service/level-two-server/src/main/java/com/pj/tb_purchaser/TbPurchaserAppController.java
  8. 32 4
      sp-service/level-two-server/src/main/java/com/pj/tb_purchaser/TbPurchaserService.java
  9. 115 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenu.java
  10. 103 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuController.java
  11. 30 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuMapper.java
  12. 67 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuMapper.xml
  13. 50 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuService.java
  14. 27 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuUtil.java
  15. 70 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRole.java
  16. 87 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleController.java
  17. 30 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleMapper.java
  18. 49 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleMapper.xml
  19. 51 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleService.java
  20. 27 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleUtil.java
  21. 22 12
      sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserController.java
  22. 18 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserService.java
  23. 47 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_driver/TbDriverAppController.java
  24. 111 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_favorite_contacts/TbFavoriteContacts.java
  25. 88 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_favorite_contacts/TbFavoriteContactsController.java
  26. 30 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_favorite_contacts/TbFavoriteContactsMapper.java
  27. 62 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_favorite_contacts/TbFavoriteContactsMapper.xml
  28. 51 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_favorite_contacts/TbFavoriteContactsService.java
  29. 30 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_favorite_contacts/TbFavoriteContactsUtil.java
  30. 170 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogistics.java
  31. 149 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsController.java
  32. 30 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsMapper.java
  33. 89 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsMapper.xml
  34. 51 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsService.java
  35. 27 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsUtil.java

+ 52 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_enterprise/TbEnterpriseAppController.java

@@ -0,0 +1,52 @@
+package com.pj.tb_enterprise;
+
+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.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.util.List;
+
+
+/**
+ * @author lbl
+ */
+@RestController
+@RequestMapping("/app/TbEnterprise/")
+public class TbEnterpriseAppController {
+
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbEnterpriseService tbEnterpriseService;
+
+
+	/** 查个人信息 - 根据id */
+	@RequestMapping("getById")
+	public AjaxJson getById(Long id){
+		TbEnterprise t = tbEnterpriseService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 改个人信息 */
+	@RequestMapping("update")
+	public AjaxJson update(TbEnterprise t){
+		tbEnterpriseService.update(t);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 商家认证 */
+	@RequestMapping("identification")
+	public AjaxJson identification(TbEnterprise t){
+		boolean identification = tbEnterpriseService.identification(t);
+		if(!identification) return AjaxJson.getError("商家认证信息提交失败!!!");
+
+		return AjaxJson.getSuccess("商家认证信息已提交,管理员审核中,请耐心等待!");
+	}
+
+
+}

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

@@ -4,6 +4,7 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
+import java.util.Date;
 import java.util.List;
 import java.util.Objects;
 
@@ -32,7 +33,7 @@ import javax.swing.filechooser.FileSystemView;
 
 /**
  * Service: tb_enterprise -- 商家
- * @author qzy 
+ * @author qzy
  */
 @Service
 @Transactional(rollbackFor = Exception.class)
@@ -69,9 +70,9 @@ public class TbEnterpriseService extends ServiceImpl<TbEnterpriseMapper, TbEnter
 		return super.getById(id);
 	}
 
-	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
-	List<TbEnterprise> getList(SoMap so) { 
-		return tbEnterpriseMapper.getList(so);	
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
+	List<TbEnterprise> getList(SoMap so) {
+		return tbEnterpriseMapper.getList(so);
 	}
 
 	public int audit(TbEnterpriseDto tbEnterpriseDto){
@@ -115,6 +116,35 @@ public class TbEnterpriseService extends ServiceImpl<TbEnterpriseMapper, TbEnter
 		return line;
 	}
 
+	/** 商家认证 */
+	boolean identification(TbEnterprise enterprise){
+		if(null == enterprise) return false;
+
+		//手机号去重
+		String idCard = enterprise.getIdCard();
+		if(tbEnterpriseMapper.selectList(new LambdaQueryWrapper<TbEnterprise>().eq(TbEnterprise::getIdCard,idCard).eq(TbEnterprise::getDeleteStatus,1)).size() != 0)
+			throw new RuntimeException("当前手机号已被认证!");
+		//身份证号去重
+		String contact = enterprise.getContact();
+		if(tbEnterpriseMapper.selectList(new LambdaQueryWrapper<TbEnterprise>().eq(TbEnterprise::getContact,contact).eq(TbEnterprise::getDeleteStatus,1)).size() != 0)
+			throw new RuntimeException("当前身份证号已被认证!");
+
+		//是否需要手机发送验证码认证?
+
+		//开始保存商家信息
+		//注册/认证时间
+		enterprise.setRegisterTime(new Date());
+		//创建时间
+		enterprise.setCreateTime(new Date());
+		//删除状态:启用
+		enterprise.setDeleteStatus(1);
+
+		// 保存商家信息
+		int insert = tbEnterpriseMapper.insert(enterprise);
+		return insert == 1;
+	}
+
+
 	/**
 	 * 导入
 	 * @param file excel文件

+ 9 - 2
sp-service/level-one-server/src/main/java/com/pj/tb_goods_cart/TbGoodsCart.java

@@ -67,6 +67,8 @@ public class TbGoodsCart extends Model<TbGoodsCart> implements Serializable {
 
 	private String goodsName;
 
+	private Integer buyNum;
+
 	/**
 	 *  
 	 */
@@ -83,7 +85,7 @@ public class TbGoodsCart extends Model<TbGoodsCart> implements Serializable {
 	private Long saleGoodsInfoId;	
 
 	/**
-	 * 购买数量 
+	 * 商品重量
 	 */
 	private Double buyWeight;	
 
@@ -105,7 +107,12 @@ public class TbGoodsCart extends Model<TbGoodsCart> implements Serializable {
 	/**
 	 *  
 	 */
-	private Long publishGoodsId;	
+	private Long publishGoodsId;
+
+	/**
+	 * 商品重量单位
+	 */
+	private String goodsUnit;
 
 	/**
 	 * 创建时间 

+ 25 - 1
sp-service/level-one-server/src/main/java/com/pj/tb_goods_cart/TbGoodsCartService.java

@@ -8,6 +8,8 @@ import com.pj.api.dto.AppUserDto;
 import com.pj.current.satoken.StpUserUtil;
 import com.pj.enummj.DeleteStatus;
 import com.pj.tb_goods_cart.dto.GoodsCartInfoDto;
+import com.pj.tb_goods_transit.TbGoodsTransit;
+import com.pj.tb_goods_transit.TbGoodsTransitMapper;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,7 +33,9 @@ public class TbGoodsCartService extends ServiceImpl<TbGoodsCartMapper, TbGoodsCa
 
 	@Autowired
 	private AdminInterface adminInterface;
-
+	/** 已过审的商品 */
+	@Autowired
+	private TbGoodsTransitMapper tbGoodsTransitMapper;
 	/** 增 */
 	void add(TbGoodsCart t){
 		save(t);
@@ -64,11 +68,28 @@ public class TbGoodsCartService extends ServiceImpl<TbGoodsCartMapper, TbGoodsCa
 //		StpUserUtil.checkLogin();
 		//验证购买者
 		Long id = goodsCartInfoDto.getBuyUserId();
+		//获取购买者对象
 		AppUserDto appUser = adminInterface.getAppUserById(id);
 		if(appUser == null)return AjaxJson.getError("购买者账号异常");
+		//获取商品对象
+		Long infoId = goodsCartInfoDto.getSaleGoodsInfoId();
+		TbGoodsTransit tbGoodsTransit = tbGoodsTransitMapper.selectById(infoId);
+		if(tbGoodsTransit == null)return AjaxJson.getError("当前商品信息存在异常");
 		//创建保存对象
 		TbGoodsCart tbGoodsCart = new TbGoodsCart();
 		BeanUtils.copyProperties(goodsCartInfoDto,tbGoodsCart);
+		//购买的用户类型
+		tbGoodsCart.setBuyType(appUser.getUserType());
+		//购买方式,默认都是互助组进行购买
+		tbGoodsCart.setBuyType(2 + "");
+		//购买商品的重量
+		tbGoodsCart.setBuyWeight(Double.valueOf(goodsCartInfoDto.getBuyNum()));
+		//当前商品的单位
+		tbGoodsCart.setGoodsUnit(tbGoodsTransit.getGoodsUnits());
+		//商品价格
+		tbGoodsCart.setTotalPrice((goodsCartInfoDto.getBuyNum() == null? 0 : goodsCartInfoDto.getBuyNum())
+				*
+				(tbGoodsTransit.getPrice() == null? 0 : tbGoodsTransit.getPrice()));
 		//设置基本属性
 		tbGoodsCart.setCreateTime(new Date());
 		tbGoodsCart.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode());
@@ -81,6 +102,9 @@ public class TbGoodsCartService extends ServiceImpl<TbGoodsCartMapper, TbGoodsCa
 		return AjaxJson.getSuccess("添加购物车成功!");
 	}
 
+	/**
+	 * todo:采购支付,暂时预留
+	 */
 
 
 }

+ 9 - 9
sp-service/level-one-server/src/main/java/com/pj/tb_goods_cart/dto/GoodsCartInfoDto.java

@@ -21,20 +21,20 @@ public class GoodsCartInfoDto {
     private Long buyUserId;
     /** 商家ID */
     @NotNull(message = "商家ID必填")
-    private String merchantId;
+    private Long enterpriseId;
     /** 店铺ID */
     @NotNull(message = "店铺ID必填")
-    private String shopId;
+    private Long shopId;
     /** 购买地点ID */
     @NotNull(message = "区域ID必填")
-    private String tradeAreaId;
-    /** 购买总价 */
-    @NotNull(message = "必填")
-    @DecimalMin("0.0")
-    private Double totalPrice;
+    private Long tradeAreaId;
+//    /** 购买总价 */
+//    @NotNull(message = "必填")
+//    @DecimalMin("0.0")
+//    private Double totalPrice;
     /** 商品ID */
     @NotNull(message = "商品ID必填")
-    private Long goodsId;
+    private Long saleGoodsInfoId;
     /** 购买者类型(边民/...) */
     @NotNull(message = "购买者ID必填")
     private Integer buyUserType;
@@ -49,6 +49,6 @@ public class GoodsCartInfoDto {
     private String goodsName;
     /** 购买个数 */
     @NotNull(message = "购买个数必填")
-    private Integer buyWeight;
+    private Integer buyNum;
 
 }

+ 14 - 1
sp-service/level-one-server/src/main/java/com/pj/tb_people/TbPeopleAppController.java

@@ -1,5 +1,7 @@
 package com.pj.tb_people;
 
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.pj.utils.sg.AjaxJson;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -15,7 +17,18 @@ public class TbPeopleAppController {
     @Autowired
     private TbPeopleService tbPeopleService;
 
+    /** 查个人信息 - 根据id */
+    @RequestMapping("getById")
+    public AjaxJson getById(String id){
+        TbPeople t = tbPeopleService.getById(id);
+        return AjaxJson.getSuccessData(t);
+    }
 
-
+    /** 改个人信息 */
+    @RequestMapping("update")
+    public AjaxJson update(TbPeople t){
+        tbPeopleService.update(t);
+        return AjaxJson.getSuccess();
+    }
 
 }

+ 56 - 0
sp-service/level-two-server/src/main/java/com/pj/tb_purchaser/TbPurchaserAppController.java

@@ -0,0 +1,56 @@
+package com.pj.tb_purchaser;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.pj.common.core.utils.poi.ExcelUtil;
+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.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+
+
+/**
+ * @author lbl
+ */
+@RestController
+@RequestMapping("/app/TbPurchaser/")
+public class TbPurchaserAppController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbPurchaserService tbPurchaserService;
+
+	/** 查个人信息 - 根据id */
+	@RequestMapping("getById")
+	public AjaxJson getById(Long id){
+		TbPurchaser t = tbPurchaserService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 改个人信息 */
+	@RequestMapping("update")
+	public AjaxJson update(TbPurchaser t){
+		tbPurchaserService.update(t);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 收购商认证 */
+	@RequestMapping("identification")
+	public AjaxJson identification(TbPurchaser purchaser) {
+		boolean identification = tbPurchaserService.identification(purchaser);
+		if(!identification) return AjaxJson.getError("收购商认证信息提交失败!!!");
+
+		return AjaxJson.getSuccess("收购商认证信息已提交,管理员审核中,请耐心等待!");
+	}
+
+
+
+}

+ 32 - 4
sp-service/level-two-server/src/main/java/com/pj/tb_purchaser/TbPurchaserService.java

@@ -4,6 +4,7 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
+import java.util.Date;
 import java.util.List;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -23,7 +24,7 @@ import javax.swing.filechooser.FileSystemView;
 
 /**
  * Service: tb_purchaser -- 收购商
- * @author qzy 
+ * @author qzy
  */
 @Service
 @Transactional(rollbackFor = Exception.class)
@@ -57,11 +58,38 @@ public class TbPurchaserService extends ServiceImpl<TbPurchaserMapper, TbPurchas
 		return super.getById(id);
 	}
 
-	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
-	List<TbPurchaser> getList(SoMap so) { 
-		return tbPurchaserMapper.getList(so);	
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
+	List<TbPurchaser> getList(SoMap so) {
+		return tbPurchaserMapper.getList(so);
 	}
 
+	/** 收购商认证 */
+	boolean identification(TbPurchaser purchaser){
+		if(null == purchaser) return false;
+
+		//手机号去重
+		String idCard = purchaser.getIdCard();
+		if(tbPurchaserMapper.selectList(new LambdaQueryWrapper<TbPurchaser>().eq(TbPurchaser::getIdCard,idCard).eq(TbPurchaser::getDeleteStatus,1)).size() != 0)
+			throw new RuntimeException("当前手机号已被认证!");
+		//身份证号去重
+		String contact = purchaser.getContact();
+		if(tbPurchaserMapper.selectList(new LambdaQueryWrapper<TbPurchaser>().eq(TbPurchaser::getContact,contact).eq(TbPurchaser::getDeleteStatus,1)).size() != 0)
+			throw new RuntimeException("当前身份证号已被认证!");
+
+		//是否需要手机发送验证码认证?
+
+		//开始保存收购商信息
+		//注册/认证时间
+		purchaser.setRegisterTime(new Date());
+		//创建时间
+		purchaser.setCreateTime(new Date());
+		//删除状态:启用
+		purchaser.setDeleteStatus(1);
+
+		// 保存收购商信息
+		int insert = tbPurchaserMapper.insert(purchaser);
+		return insert == 1;
+	}
 
 	/**
 	 * 导入

+ 115 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenu.java

@@ -0,0 +1,115 @@
+package com.pj.project.app_menu;
+
+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: app_menu -- app菜单管理
+ * @author qzy 
+ */
+@Data
+@Accessors(chain = true)
+@TableName(AppMenu.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class AppMenu extends Model<AppMenu> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id 
+	 */
+	private static final long serialVersionUID = 1L;	
+	/**
+	 * 此模块对应的表名 
+	 */
+	public static final String TABLE_NAME = "app_menu";	
+	/**
+	 * 此模块对应的权限码 
+	 */
+	public static final String PERMISSION_CODE = "app-menu";
+	public static final String PERMISSION_CODE_ADD = "app-menu-add";
+	public static final String PERMISSION_CODE_EDIT = "app-menu-edit";
+	public static final String PERMISSION_CODE_DEL = "app-menu-del";
+
+
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 * 主键 
+	 */
+	@TableId(type = IdType.AUTO)
+	private Long id;	
+
+	/**
+	 * 前端路径 
+	 */
+	private String path;	
+
+	/**
+	 * 菜单名称 
+	 */
+	private String menuName;	
+
+	/**
+	 * 图标 
+	 */
+	private String icon;	
+
+	/**
+	 * 排序 
+	 */
+	private Integer sort;	
+
+	/**
+	 * 状态(0=禁用,1=启用) 
+	 */
+	private String enable;	
+
+	/**
+	 * 是否认证后访问(0=否,1=是) 
+	 */
+	private String auth;	
+
+	/**
+	 * 创建时间 
+	 */
+	private String createTime;	
+
+	/**
+	 * 创建人编号 
+	 */
+	private String createBy;	
+
+	/**
+	 * 创建人名称 
+	 */
+	private String createName;	
+
+	/**
+	 * 更新时间 
+	 */
+	private String updateTime;	
+
+	/**
+	 * 更新人编号 
+	 */
+	private String updateBy;	
+
+	/**
+	 * 更新人名称 
+	 */
+	private String updateName;	
+
+
+
+
+
+	
+
+
+}

+ 103 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuController.java

@@ -0,0 +1,103 @@
+package com.pj.project.app_menu;
+
+import java.util.List;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import com.pj.utils.sg.*;
+import com.pj.project4sp.SP;
+
+import com.pj.current.satoken.StpUserUtil;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+
+
+/**
+ * Controller: app_menu -- app菜单管理
+ * @author qzy 
+ */
+@RestController
+@RequestMapping("/AppMenu/")
+public class AppMenuController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	AppMenuService appMenuService;
+
+	/** 增 */  
+	@RequestMapping("add")
+	@SaCheckPermission(AppMenu.PERMISSION_CODE_ADD)
+	public AjaxJson add(AppMenu a){
+		appMenuService.add(a);
+		a = appMenuService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(a);
+	}
+
+	/** 删 */  
+	@RequestMapping("delete")
+	@SaCheckPermission(AppMenu.PERMISSION_CODE_DEL)
+	public AjaxJson delete(Long id){
+		 appMenuService.delete(id);
+		return AjaxJson.getSuccess();
+	}
+	
+	/** 删 - 根据id列表 */  
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(AppMenu.PERMISSION_CODE_DEL)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class); 
+		int line = SP.publicMapper.deleteByIds(AppMenu.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 */  
+	@RequestMapping("update")
+	@SaCheckPermission(AppMenu.PERMISSION_CODE_EDIT)
+	public AjaxJson update(AppMenu a){
+		appMenuService.update(a);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 查 - 根据id */  
+	@RequestMapping("getById")
+		@SaCheckPermission(AppMenu.PERMISSION_CODE)
+	public AjaxJson getById(Long id){
+		AppMenu a = appMenuService.getById(id);
+		return AjaxJson.getSuccessData(a);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	@RequestMapping("getList")
+		@SaCheckPermission(AppMenu.PERMISSION_CODE)
+	public AjaxJson getList() { 
+		SoMap so = SoMap.getRequestSoMap();
+		List<AppMenu> list = appMenuService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+	
+	
+	
+	/** 改 - 状态(0=禁用,1=启用) */  
+	@RequestMapping("updateEnable")
+	@SaCheckPermission(AppMenu.PERMISSION_CODE_EDIT)
+	public AjaxJson updateEnable(Long id, String value){
+		int line = SP.publicMapper.updateColumnById(AppMenu.TABLE_NAME, "enable", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 - 是否认证后访问(0=否,1=是) */  
+	@RequestMapping("updateAuth")
+	@SaCheckPermission(AppMenu.PERMISSION_CODE_EDIT)
+	public AjaxJson updateAuth(Long id, String value){
+		int line = SP.publicMapper.updateColumnById(AppMenu.TABLE_NAME, "auth", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	
+
+	
+	
+	
+
+}

+ 30 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuMapper.java

@@ -0,0 +1,30 @@
+package com.pj.project.app_menu;
+
+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: app_menu -- app菜单管理
+ * @author qzy 
+ */
+
+@Mapper
+@Repository
+public interface AppMenuMapper extends BaseMapper <AppMenu> {
+
+
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合 
+	 * @return 数据列表 
+	 */
+	List<AppMenu> getList(SoMap so);
+
+
+}

+ 67 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuMapper.xml

@@ -0,0 +1,67 @@
+<?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.app_menu.AppMenuMapper">
+
+
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, path, menu_name, icon, sort, enable, auth, create_time, create_by, create_name, update_time, update_by, update_name from app_menu  -->
+	
+	<!-- 通用映射:自动模式 -->
+	<resultMap id="model" autoMapping="true" type="com.pj.project.app_menu.AppMenu"></resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from app_menu 
+	</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("path") '> and path = #{path} </if>
+			<if test=' this.has("menuName") '> and menu_name = #{menuName} </if>
+			<if test=' this.has("icon") '> and icon = #{icon} </if>
+			<if test=' this.has("sort") '> and sort = #{sort} </if>
+			<if test=' this.has("enable") '> and enable = #{enable} </if>
+			<if test=' this.has("auth") '> and auth = #{auth} </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>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> path desc </when>
+			<when test='sortType == 3'> menu_name desc </when>
+			<when test='sortType == 4'> icon desc </when>
+			<when test='sortType == 5'> sort desc </when>
+			<when test='sortType == 6'> enable desc </when>
+			<when test='sortType == 7'> auth desc </when>
+			<when test='sortType == 8'> create_time desc </when>
+			<when test='sortType == 9'> create_by desc </when>
+			<when test='sortType == 10'> create_name desc </when>
+			<when test='sortType == 11'> update_time desc </when>
+			<when test='sortType == 12'> update_by desc </when>
+			<when test='sortType == 13'> update_name desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+</mapper>

+ 50 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuService.java

@@ -0,0 +1,50 @@
+package com.pj.project.app_menu;
+
+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;
+
+/**
+ * Service: app_menu -- app菜单管理
+ * @author qzy 
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class AppMenuService extends ServiceImpl<AppMenuMapper, AppMenu> implements IService<AppMenu>{
+
+	/** 底层 Mapper 对象 */
+	@Autowired
+	AppMenuMapper appMenuMapper;
+
+	/** 增 */
+	void add(AppMenu a){
+		save(a);
+	}
+
+	/** 删 */
+	void delete(Long id){
+		removeById(id);
+	}
+
+	/** 改 */
+	void update(AppMenu a){
+		updateById(a);
+
+	}
+
+	/** 查 */
+	AppMenu getById(Long id){
+		return super.getById(id);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	List<AppMenu> getList(SoMap so) { 
+		return appMenuMapper.getList(so);	
+	}
+	
+
+}

+ 27 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuUtil.java

@@ -0,0 +1,27 @@
+package com.pj.project.app_menu;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 工具类:app_menu -- app菜单管理
+ * @author qzy 
+ *
+ */
+@Component
+public class AppMenuUtil {
+
+	
+	/** 底层 Mapper 对象 */
+	public static AppMenuMapper appMenuMapper;
+	@Autowired
+	private void setAppMenuMapper(AppMenuMapper appMenuMapper) {
+		AppMenuUtil.appMenuMapper = appMenuMapper;
+	}
+	
+
+
+	
+	
+	
+}

+ 70 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRole.java

@@ -0,0 +1,70 @@
+package com.pj.project.app_role;
+
+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: app_role -- 
+ * @author qzy 
+ */
+@Data
+@Accessors(chain = true)
+@TableName(AppRole.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class AppRole extends Model<AppRole> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id 
+	 */
+	private static final long serialVersionUID = 1L;	
+	/**
+	 * 此模块对应的表名 
+	 */
+	public static final String TABLE_NAME = "app_role";	
+	/**
+	 * 此模块对应的权限码 
+	 */
+	public static final String PERMISSION_CODE = "app-role";
+	public static final String PERMISSION_CODE_ADD = "app-role-add";
+	public static final String PERMISSION_CODE_EDIT = "app-role-edit";
+	public static final String PERMISSION_CODE_DEL = "app-role-del";
+
+
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 * 主键 
+	 */
+	@TableId(type = IdType.AUTO)
+	private Long id;	
+
+	/**
+	 * 角色名称 
+	 */
+	private String roleName;	
+
+	/**
+	 * 创建时间 
+	 */
+	private String createTime;	
+
+	/**
+	 * 类型(1=边民,2=组长,3=商户,4=收购商,5=司机) 
+	 */
+	private String userType;	
+
+
+
+
+
+	
+
+
+}

+ 87 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleController.java

@@ -0,0 +1,87 @@
+package com.pj.project.app_role;
+
+import java.util.List;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import com.pj.utils.sg.*;
+import com.pj.project4sp.SP;
+
+import com.pj.current.satoken.StpUserUtil;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+
+
+/**
+ * Controller: app_role -- 
+ * @author qzy 
+ */
+@RestController
+@RequestMapping("/AppRole/")
+public class AppRoleController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	AppRoleService appRoleService;
+
+	/** 增 */  
+	@RequestMapping("add")
+	@SaCheckPermission(AppRole.PERMISSION_CODE_ADD)
+	public AjaxJson add(AppRole a){
+		appRoleService.add(a);
+		a = appRoleService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(a);
+	}
+
+	/** 删 */  
+	@RequestMapping("delete")
+	@SaCheckPermission(AppRole.PERMISSION_CODE_DEL)
+	public AjaxJson delete(Long id){
+		 appRoleService.delete(id);
+		return AjaxJson.getSuccess();
+	}
+	
+	/** 删 - 根据id列表 */  
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(AppRole.PERMISSION_CODE_DEL)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class); 
+		int line = SP.publicMapper.deleteByIds(AppRole.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 */  
+	@RequestMapping("update")
+	@SaCheckPermission(AppRole.PERMISSION_CODE_EDIT)
+	public AjaxJson update(AppRole a){
+		appRoleService.update(a);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 查 - 根据id */  
+	@RequestMapping("getById")
+		@SaCheckPermission(AppRole.PERMISSION_CODE)
+	public AjaxJson getById(Long id){
+		AppRole a = appRoleService.getById(id);
+		return AjaxJson.getSuccessData(a);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	@RequestMapping("getList")
+		@SaCheckPermission(AppRole.PERMISSION_CODE)
+	public AjaxJson getList() { 
+		SoMap so = SoMap.getRequestSoMap();
+		List<AppRole> list = appRoleService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+	
+	
+	
+	
+
+	
+	
+	
+
+}

+ 30 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleMapper.java

@@ -0,0 +1,30 @@
+package com.pj.project.app_role;
+
+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: app_role -- 
+ * @author qzy 
+ */
+
+@Mapper
+@Repository
+public interface AppRoleMapper extends BaseMapper <AppRole> {
+
+
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合 
+	 * @return 数据列表 
+	 */
+	List<AppRole> getList(SoMap so);
+
+
+}

+ 49 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleMapper.xml

@@ -0,0 +1,49 @@
+<?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.app_role.AppRoleMapper">
+
+
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, role_name, create_time, user_type from app_role  -->
+	
+	<!-- 通用映射:自动模式 -->
+	<resultMap id="model" autoMapping="true" type="com.pj.project.app_role.AppRole"></resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from app_role 
+	</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("roleName") '> and role_name = #{roleName} </if>
+			<if test=' this.has("createTime") '> and create_time = #{createTime} </if>
+			<if test=' this.has("userType") '> and user_type = #{userType} </if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> role_name desc </when>
+			<when test='sortType == 3'> create_time desc </when>
+			<when test='sortType == 4'> user_type desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+</mapper>

+ 51 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleService.java

@@ -0,0 +1,51 @@
+package com.pj.project.app_role;
+
+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: app_role -- 
+ * @author qzy 
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class AppRoleService extends ServiceImpl<AppRoleMapper, AppRole> implements IService<AppRole>{
+
+	/** 底层 Mapper 对象 */
+	@Autowired
+	AppRoleMapper appRoleMapper;
+
+	/** 增 */
+	void add(AppRole a){
+		save(a);
+	}
+
+	/** 删 */
+	void delete(Long id){
+		removeById(id);
+	}
+
+	/** 改 */
+	void update(AppRole a){
+		updateById(a);
+
+	}
+
+	/** 查 */
+	AppRole getById(Long id){
+		return super.getById(id);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	List<AppRole> getList(SoMap so) { 
+		return appRoleMapper.getList(so);	
+	}
+	
+
+}

+ 27 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleUtil.java

@@ -0,0 +1,27 @@
+package com.pj.project.app_role;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 工具类:app_role -- 
+ * @author qzy 
+ *
+ */
+@Component
+public class AppRoleUtil {
+
+	
+	/** 底层 Mapper 对象 */
+	public static AppRoleMapper appRoleMapper;
+	@Autowired
+	private void setAppRoleMapper(AppRoleMapper appRoleMapper) {
+		AppRoleUtil.appRoleMapper = appRoleMapper;
+	}
+	
+
+
+	
+	
+	
+}

+ 22 - 12
sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserController.java

@@ -20,7 +20,7 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
 
 /**
  * Controller: app_user -- 移动端账号
- * @author qzy 
+ * @author qzy
  */
 @RestController
 @RequestMapping("/AppUser/")
@@ -30,7 +30,7 @@ public class AppUserController {
 	@Autowired
 	AppUserService appUserService;
 
-	/** 增 */  
+	/** 增 */
 	@RequestMapping("add")
 	@SaCheckPermission(AppUser.PERMISSION_CODE_ADD)
 	public AjaxJson add(AppUser a){
@@ -39,24 +39,24 @@ public class AppUserController {
 		return AjaxJson.getSuccessData(a);
 	}
 
-	/** 删 */  
+	/** 删 */
 	@RequestMapping("delete")
 	@SaCheckPermission(AppUser.PERMISSION_CODE_DEL)
 	public AjaxJson delete(Long id){
 		 appUserService.delete(id);
 		return AjaxJson.getSuccess();
 	}
-	
-	/** 删 - 根据id列表 */  
+
+	/** 删 - 根据id列表 */
 	@RequestMapping("deleteByIds")
 	@SaCheckPermission(AppUser.PERMISSION_CODE_DEL)
 	public AjaxJson deleteByIds(){
-		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class); 
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
 		int line = SP.publicMapper.deleteByIds(AppUser.TABLE_NAME, ids);
 		return AjaxJson.getByLine(line);
 	}
-	
-	/** 改 */  
+
+	/** 改 */
 	@RequestMapping("update")
 	@SaCheckPermission(AppUser.PERMISSION_CODE_EDIT)
 	public AjaxJson update(AppUser a){
@@ -64,7 +64,7 @@ public class AppUserController {
 		return AjaxJson.getSuccess();
 	}
 
-	/** 查 - 根据id */  
+	/** 查 - 根据id */
 	@RequestMapping("getById")
 		@SaCheckPermission(AppUser.PERMISSION_CODE)
 	public AjaxJson getById(Long id){
@@ -72,16 +72,26 @@ public class AppUserController {
 		return AjaxJson.getSuccessData(a);
 	}
 
-	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
 	@RequestMapping("getList")
 		@SaCheckPermission(AppUser.PERMISSION_CODE)
-	public AjaxJson getList() { 
+	public AjaxJson getList() {
 		SoMap so = SoMap.getRequestSoMap();
 		List<AppUser> list = appUserService.getList(so.startPage());
 		return AjaxJson.getPageData(so.getDataCount(), list);
 	}
 
-
+	/**
+	 * 更换角色
+	 *
+	 * 当前用户已登录,app点击该按钮时,从缓存获取用户类型与选择要更换的角色id做对比,相同则进入此方法,故在此不做用户角色权限过滤
+	 * @param appRoleId
+	 * @return
+	 */
+	@RequestMapping("updateRole")
+	AjaxJson updateRole(@RequestParam("appRoleId")String appRoleId) {
+		return appUserService.updateRole(appRoleId);
+	}
 
 	/*-----               正常业务接口👆👆    不越界     rpc远程调用 👇👇                     -----*/
 

+ 18 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserService.java

@@ -255,4 +255,22 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
 
 		return true;
 	}
+
+
+	/** 更换角色 */
+	AjaxJson updateRole(String appRoleId){
+		// 获取当前用户角色权限字符
+		List<ReRoleMenu> reRoleMenus = reRoleMenuMapper.selectList(new LambdaQueryWrapper<ReRoleMenu>().eq(ReRoleMenu::getAppRoleId, appRoleId));
+		// 使用stream流对其reRoleMenus集合的权限字符进行过滤顺便转成String类型
+		List<String> per_list = reRoleMenus.stream().map(ReRoleMenu::getAppMenuId).collect(Collectors.toList()).stream().map(String::valueOf).collect(Collectors.toList());
+		if(reRoleMenus.size() == 0)return AjaxJson.getError("当前用户角色暂无权限!");
+
+		SoMap map = new SoMap();
+		map.put("per_list", per_list);
+		StpUserUtil.cachePerList(per_list);
+
+		return AjaxJson.getSuccessData(map);
+	}
+
+
 }

+ 47 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_driver/TbDriverAppController.java

@@ -0,0 +1,47 @@
+package com.pj.project.tb_driver;
+
+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.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.util.List;
+
+
+/**
+ * @author lbl
+ */
+@RestController
+@RequestMapping("/app/TbDriver/")
+public class TbDriverAppController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbDriverService tbDriverService;
+
+	/** 查个人信息 - 根据id */
+	@RequestMapping("getById")
+	public AjaxJson getById(Long id){
+		TbDriver t = tbDriverService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 改个人信息 */
+	@RequestMapping("update")
+	public AjaxJson update(TbDriver t){
+		tbDriverService.update(t);
+		return AjaxJson.getSuccess();
+	}
+
+
+
+
+
+}

+ 111 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_favorite_contacts/TbFavoriteContacts.java

@@ -0,0 +1,111 @@
+package com.pj.project.tb_favorite_contacts;
+
+import java.io.Serializable;
+import java.util.*;
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.EqualsAndHashCode;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * Model: tb_favorite_contacts -- 常用联系人
+ * @author lbl
+ */
+@Data
+@Accessors(chain = true)
+@TableName(TbFavoriteContacts.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class TbFavoriteContacts extends Model<TbFavoriteContacts> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id
+	 */
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 此模块对应的表名
+	 */
+	public static final String TABLE_NAME = "tb_favorite_contacts";
+	/**
+	 * 此模块对应的权限码
+	 */
+	public static final String PERMISSION_CODE = "tb-favorite-contacts";
+	public static final String PERMISSION_CODE_ADD = "tb-favorite-contacts-add";
+	public static final String PERMISSION_CODE_EDIT = "tb-favorite-contacts-edit";
+	public static final String PERMISSION_CODE_DEL = "tb-favorite-contacts-del";
+
+
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 * 主键
+	 */
+	@TableId(type = IdType.AUTO)
+	private Long id;
+
+	/**
+	 * 姓名
+	 */
+	private String name;
+
+	/**
+	 * 手机号
+	 */
+	private String phone;
+
+	/**
+	 * 联系地址
+	 */
+	private String address;
+
+	/**
+	 * 管理人(外联id,与app_user表的id相等)
+	 */
+	private Long fkAppUserId;
+
+	/**
+	 * 创建时间
+	 */
+	private Date createTime;
+
+	/**
+	 * 创建者id
+	 */
+	private String createBy;
+
+	/**
+	 * 创建者名称
+	 */
+	private String createName;
+
+	/**
+	 * 更新时间
+	 */
+	private Date updateTime;
+
+	/**
+	 * 更新者id
+	 */
+	private String updateBy;
+
+	/**
+	 * 更新者名称
+	 */
+	private String updateName;
+
+	/**
+	 * 删除状态
+	 */
+	private String deleteStatus;
+
+
+
+
+
+
+
+
+}

+ 88 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_favorite_contacts/TbFavoriteContactsController.java

@@ -0,0 +1,88 @@
+package com.pj.project.tb_favorite_contacts;
+
+import java.util.List;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import com.pj.utils.sg.*;
+import com.pj.project4sp.SP;
+
+import com.pj.current.satoken.StpUserUtil;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+
+
+/**
+ * Controller: tb_favorite_contacts -- 常用联系人
+ * @author lbl
+ */
+@RestController
+@RequestMapping("/TbFavoriteContacts/")
+public class TbFavoriteContactsController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbFavoriteContactsService tbFavoriteContactsService;
+
+	/** 增 */
+	@RequestMapping("add")
+	@SaCheckPermission(TbFavoriteContacts.PERMISSION_CODE_ADD)
+	public AjaxJson add(TbFavoriteContacts t){
+		tbFavoriteContactsService.add(t);
+		t = tbFavoriteContactsService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 删 */
+	@RequestMapping("delete")
+	@SaCheckPermission(TbFavoriteContacts.PERMISSION_CODE_DEL)
+	public AjaxJson delete(Long id){
+		 tbFavoriteContactsService.delete(id);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 删 - 根据id列表 */
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(TbFavoriteContacts.PERMISSION_CODE_DEL)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
+		int line = SP.publicMapper.deleteByIds(TbFavoriteContacts.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+
+	/** 改 */
+	@RequestMapping("update")
+	@SaCheckPermission(TbFavoriteContacts.PERMISSION_CODE_EDIT)
+	public AjaxJson update(TbFavoriteContacts t){
+		tbFavoriteContactsService.update(t);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 查 - 根据id */
+	@RequestMapping("getById")
+		@SaCheckPermission(TbFavoriteContacts.PERMISSION_CODE)
+	public AjaxJson getById(Long id){
+		TbFavoriteContacts t = tbFavoriteContactsService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
+	@RequestMapping("getList")
+		@SaCheckPermission(TbFavoriteContacts.PERMISSION_CODE)
+	public AjaxJson getList() {
+		SoMap so = SoMap.getRequestSoMap();
+		so.set("deleteStatus", 1);
+		List<TbFavoriteContacts> list = tbFavoriteContactsService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+
+
+
+
+
+
+
+
+
+}

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

@@ -0,0 +1,30 @@
+package com.pj.project.tb_favorite_contacts;
+
+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_favorite_contacts -- 常用联系人
+ * @author lbl
+ */
+
+@Mapper
+@Repository
+public interface TbFavoriteContactsMapper extends BaseMapper <TbFavoriteContacts> {
+
+
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合
+	 * @return 数据列表
+	 */
+	List<TbFavoriteContacts> getList(SoMap so);
+
+
+}

+ 62 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_favorite_contacts/TbFavoriteContactsMapper.xml

@@ -0,0 +1,62 @@
+<?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_favorite_contacts.TbFavoriteContactsMapper">
+
+
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, name, phone, address, fk_app_user_id, create_time, create_by, create_name, update_time, update_by, update_name, delete_status from tb_favorite_contacts  -->
+
+	<!-- 通用映射:自动模式 -->
+	<resultMap id="model" autoMapping="true" type="com.pj.project.tb_favorite_contacts.TbFavoriteContacts"></resultMap>
+
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select *
+		from tb_favorite_contacts
+	</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("name") '> and name = #{name} </if>
+			<if test=' this.has("phone") '> and phone = #{phone} </if>
+			<if test=' this.has("address") '> and address = #{address} </if>
+			<if test=' this.has("fkAppUserId") '> and fk_app_user_id = #{fkAppUserId} </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("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'> name desc </when>
+			<when test='sortType == 3'> phone desc </when>
+			<when test='sortType == 4'> address desc </when>
+			<when test='sortType == 5'> fk_app_user_id desc </when>
+			<when test='sortType == 6'> create_time desc </when>
+			<when test='sortType == 7'> create_by desc </when>
+			<when test='sortType == 8'> create_name desc </when>
+			<when test='sortType == 9'> update_time desc </when>
+			<when test='sortType == 10'> update_by desc </when>
+			<when test='sortType == 11'> update_name desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+
+
+
+
+
+
+
+
+
+
+</mapper>

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

@@ -0,0 +1,51 @@
+package com.pj.project.tb_favorite_contacts;
+
+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_favorite_contacts -- 常用联系人
+ * @author lbl
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class TbFavoriteContactsService extends ServiceImpl<TbFavoriteContactsMapper, TbFavoriteContacts> implements IService<TbFavoriteContacts>{
+
+	/** 底层 Mapper 对象 */
+	@Autowired
+	TbFavoriteContactsMapper tbFavoriteContactsMapper;
+
+	/** 增 */
+	void add(TbFavoriteContacts t){
+		save(t);
+	}
+
+	/** 删 */
+	void delete(Long id){
+		removeById(id);
+	}
+
+	/** 改 */
+	void update(TbFavoriteContacts t){
+		updateById(t);
+
+	}
+
+	/** 查 */
+	TbFavoriteContacts getById(Long id){
+		return super.getById(id);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
+	List<TbFavoriteContacts> getList(SoMap so) {
+		return tbFavoriteContactsMapper.getList(so);
+	}
+
+
+}

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

@@ -0,0 +1,30 @@
+package com.pj.project.tb_favorite_contacts;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.pj.utils.sg.*;
+import java.util.*;
+
+/**
+ * 工具类:tb_favorite_contacts -- 常用联系人
+ * @author lbl
+ *
+ */
+@Component
+public class TbFavoriteContactsUtil {
+
+
+	/** 底层 Mapper 对象 */
+	public static TbFavoriteContactsMapper tbFavoriteContactsMapper;
+	@Autowired
+	private void setTbFavoriteContactsMapper(TbFavoriteContactsMapper tbFavoriteContactsMapper) {
+		TbFavoriteContactsUtil.tbFavoriteContactsMapper = tbFavoriteContactsMapper;
+	}
+
+
+
+
+
+
+}

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

@@ -0,0 +1,170 @@
+package com.pj.project.tb_logistics;
+
+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_logistics -- 物流表
+ * @author qzy 
+ */
+@Data
+@Accessors(chain = true)
+@TableName(TbLogistics.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class TbLogistics extends Model<TbLogistics> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id 
+	 */
+	private static final long serialVersionUID = 1L;	
+	/**
+	 * 此模块对应的表名 
+	 */
+	public static final String TABLE_NAME = "tb_logistics";	
+	/**
+	 * 此模块对应的权限码 
+	 */
+	public static final String PERMISSION_CODE = "tb-logistics";
+	public static final String PERMISSION_CODE_ADD = "tb-logistics-add";
+	public static final String PERMISSION_CODE_EDIT = "tb-logistics-edit";
+	public static final String PERMISSION_CODE_DEL = "tb-logistics-del";
+
+
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 * 物流表主键 
+	 */
+	@TableId(type = IdType.AUTO)
+	private Long id;	
+
+	/**
+	 * 订单表ID 
+	 */
+	private Long ordersId;	
+
+	/**
+	 * (预留字段) 申报订单号 
+	 */
+	private String declarationNumber;	
+
+	/**
+	 * 订单待确认(0=待确认,1=订单已确认,2=订单确认失败) 
+	 */
+	private Integer prepare;	
+
+	/**
+	 * 订单确认时间 
+	 */
+	private String prepareTime;	
+
+	/**
+	 * 待装货(0=待装货,1=已装货) 
+	 */
+	private Integer loading;	
+
+	/**
+	 * 已装货时间 
+	 */
+	private String loadingTime;	
+
+	/**
+	 * 发货(0=未发,1=已发) 
+	 */
+	private Integer delivery;	
+
+	/**
+	 * 发货时间 
+	 */
+	private String deliveryTime;	
+
+	/**
+	 * 已出海关(0=禁用,1=启用) 
+	 */
+	private Integer clearedCustom;	
+
+	/**
+	 * 出海关时间 
+	 */
+	private String clearedCustomTime;	
+
+	/**
+	 * 接货人确定接货(0=禁用,1=启用) 
+	 */
+	private Integer makeCargo;	
+
+	/**
+	 * 接货完成时间 
+	 */
+	private String makeCargoTime;	
+
+	/**
+	 * 收购商确认(0=禁用,1=启用) 
+	 */
+	private Integer confirmReceipt;	
+
+	/**
+	 * 收货方确认时间(相当于订单完成时间) 
+	 */
+	private String confirmReceiptTime;	
+
+	/**
+	 * 订单状态已完成(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;	
+
+	/**
+	 * 一级市场订单ID 
+	 */
+	private Long levelOneOrderId;	
+
+
+
+
+
+	
+
+
+}

+ 149 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsController.java

@@ -0,0 +1,149 @@
+package com.pj.project.tb_logistics;
+
+import java.util.List;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import com.pj.utils.sg.*;
+import com.pj.project4sp.SP;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+
+
+/**
+ * Controller: tb_logistics -- 物流表
+ * @author qzy 
+ */
+@RestController
+@RequestMapping("/TbLogistics/")
+public class TbLogisticsController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbLogisticsService tbLogisticsService;
+
+	/** 增 */
+	@RequestMapping("add")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_ADD)
+	public AjaxJson add(TbLogistics t){
+		tbLogisticsService.add(t);
+		t = tbLogisticsService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 删 */  
+	@RequestMapping("delete")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_DEL)
+	public AjaxJson delete(Long id){
+		 tbLogisticsService.delete(id);
+		return AjaxJson.getSuccess();
+	}
+	
+	/** 删 - 根据id列表 */  
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_DEL)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class); 
+		int line = SP.publicMapper.deleteByIds(TbLogistics.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 */  
+	@RequestMapping("update")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_EDIT)
+	public AjaxJson update(TbLogistics t){
+		tbLogisticsService.update(t);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 查 - 根据id */  
+	@RequestMapping("getById")
+		@SaCheckPermission(TbLogistics.PERMISSION_CODE)
+	public AjaxJson getById(Long id){
+		TbLogistics t = tbLogisticsService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	@RequestMapping("getList")
+		@SaCheckPermission(TbLogistics.PERMISSION_CODE)
+	public AjaxJson getList() { 
+		SoMap so = SoMap.getRequestSoMap();
+		List<TbLogistics> list = tbLogisticsService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+	
+	
+	
+	/** 改 - 订单待确认(0=待确认,1=订单已确认,2=订单确认失败) */  
+	@RequestMapping("updatePrepare")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_EDIT)
+	public AjaxJson updatePrepare(Long id, Integer value){
+		int line = SP.publicMapper.updateColumnById(TbLogistics.TABLE_NAME, "prepare", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 - 待装货(0=待装货,1=已装货) */  
+	@RequestMapping("updateLoading")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_EDIT)
+	public AjaxJson updateLoading(Long id, Integer value){
+		int line = SP.publicMapper.updateColumnById(TbLogistics.TABLE_NAME, "loading", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 - 发货(0=未发,1=已发) */  
+	@RequestMapping("updateDelivery")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_EDIT)
+	public AjaxJson updateDelivery(Long id, Integer value){
+		int line = SP.publicMapper.updateColumnById(TbLogistics.TABLE_NAME, "delivery", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 - 已出海关(0=禁用,1=启用) */  
+	@RequestMapping("updateClearedCustom")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_EDIT)
+	public AjaxJson updateClearedCustom(Long id, Integer value){
+		int line = SP.publicMapper.updateColumnById(TbLogistics.TABLE_NAME, "cleared_custom", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 - 接货人确定接货(0=禁用,1=启用) */  
+	@RequestMapping("updateMakeCargo")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_EDIT)
+	public AjaxJson updateMakeCargo(Long id, Integer value){
+		int line = SP.publicMapper.updateColumnById(TbLogistics.TABLE_NAME, "make_cargo", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 - 收购商确认(0=禁用,1=启用) */  
+	@RequestMapping("updateConfirmReceipt")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_EDIT)
+	public AjaxJson updateConfirmReceipt(Long id, Integer value){
+		int line = SP.publicMapper.updateColumnById(TbLogistics.TABLE_NAME, "confirm_receipt", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 - 订单状态已完成(0=进行中,1=已完成) */  
+	@RequestMapping("updateOrderFinish")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_EDIT)
+	public AjaxJson updateOrderFinish(Long id, Integer value){
+		int line = SP.publicMapper.updateColumnById(TbLogistics.TABLE_NAME, "order_finish", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	/** 改 - 删除状态(0=禁用,1=启用) */  
+	@RequestMapping("updateDeleteStatus")
+	@SaCheckPermission(TbLogistics.PERMISSION_CODE_EDIT)
+	public AjaxJson updateDeleteStatus(Long id, Integer value){
+		int line = SP.publicMapper.updateColumnById(TbLogistics.TABLE_NAME, "delete_status", value, id);
+		return AjaxJson.getByLine(line);
+	}
+	
+	
+
+	
+	
+	
+
+}

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

@@ -0,0 +1,30 @@
+package com.pj.project.tb_logistics;
+
+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_logistics -- 物流表
+ * @author qzy 
+ */
+
+@Mapper
+@Repository
+public interface TbLogisticsMapper extends BaseMapper <TbLogistics> {
+
+
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合 
+	 * @return 数据列表 
+	 */
+	List<TbLogistics> getList(SoMap so);
+
+
+}

+ 89 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsMapper.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_logistics.TbLogisticsMapper">
+
+
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, orders_id, declaration_number, prepare, prepare_time, loading, loading_time, delivery, delivery_time, cleared_custom, cleared_custom_time, make_cargo, make_cargo_time, confirm_receipt, confirm_receipt_time, order_finish, create_time, create_by, create_name, update_time, update_by, update_name, delete_status, level_one_order_id from tb_logistics  -->
+	
+	<!-- 通用映射:自动模式 -->
+	<resultMap id="model" autoMapping="true" type="com.pj.project.tb_logistics.TbLogistics"></resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from tb_logistics 
+	</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("ordersId") '> and orders_id = #{ordersId} </if>
+			<if test=' this.has("declarationNumber") '> and declaration_number = #{declarationNumber} </if>
+			<if test=' this.has("prepare") '> and prepare = #{prepare} </if>
+			<if test=' this.has("prepareTime") '> and prepare_time = #{prepareTime} </if>
+			<if test=' this.has("loading") '> and loading = #{loading} </if>
+			<if test=' this.has("loadingTime") '> and loading_time = #{loadingTime} </if>
+			<if test=' this.has("delivery") '> and delivery = #{delivery} </if>
+			<if test=' this.has("deliveryTime") '> and delivery_time = #{deliveryTime} </if>
+			<if test=' this.has("clearedCustom") '> and cleared_custom = #{clearedCustom} </if>
+			<if test=' this.has("clearedCustomTime") '> and cleared_custom_time = #{clearedCustomTime} </if>
+			<if test=' this.has("makeCargo") '> and make_cargo = #{makeCargo} </if>
+			<if test=' this.has("makeCargoTime") '> and make_cargo_time = #{makeCargoTime} </if>
+			<if test=' this.has("confirmReceipt") '> and confirm_receipt = #{confirmReceipt} </if>
+			<if test=' this.has("confirmReceiptTime") '> and confirm_receipt_time = #{confirmReceiptTime} </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>
+			<if test=' this.has("levelOneOrderId") '> and level_one_order_id = #{levelOneOrderId} </if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> orders_id desc </when>
+			<when test='sortType == 3'> declaration_number desc </when>
+			<when test='sortType == 4'> prepare desc </when>
+			<when test='sortType == 5'> prepare_time desc </when>
+			<when test='sortType == 6'> loading desc </when>
+			<when test='sortType == 7'> loading_time desc </when>
+			<when test='sortType == 8'> delivery desc </when>
+			<when test='sortType == 9'> delivery_time desc </when>
+			<when test='sortType == 10'> cleared_custom desc </when>
+			<when test='sortType == 11'> cleared_custom_time desc </when>
+			<when test='sortType == 12'> make_cargo desc </when>
+			<when test='sortType == 13'> make_cargo_time desc </when>
+			<when test='sortType == 14'> confirm_receipt desc </when>
+			<when test='sortType == 15'> confirm_receipt_time desc </when>
+			<when test='sortType == 16'> order_finish desc </when>
+			<when test='sortType == 17'> create_time desc </when>
+			<when test='sortType == 18'> create_by desc </when>
+			<when test='sortType == 19'> create_name desc </when>
+			<when test='sortType == 20'> update_time desc </when>
+			<when test='sortType == 21'> update_by desc </when>
+			<when test='sortType == 22'> update_name desc </when>
+			<when test='sortType == 23'> delete_status desc </when>
+			<when test='sortType == 24'> level_one_order_id desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+</mapper>

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

@@ -0,0 +1,51 @@
+package com.pj.project.tb_logistics;
+
+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;
+
+/**
+ * Service: tb_logistics -- 物流表
+ * @author qzy 
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class TbLogisticsService extends ServiceImpl<TbLogisticsMapper, TbLogistics> implements IService<TbLogistics>{
+
+	/** 底层 Mapper 对象 */
+	@Autowired
+	TbLogisticsMapper tbLogisticsMapper;
+
+	/** 增 */
+	void add(TbLogistics t){
+		save(t);
+	}
+
+	/** 删 */
+	void delete(Long id){
+		removeById(id);
+	}
+
+	/** 改 */
+	void update(TbLogistics t){
+		updateById(t);
+
+	}
+
+	/** 查 */
+	TbLogistics getById(Long id){
+		return super.getById(id);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	List<TbLogistics> getList(SoMap so) { 
+		return tbLogisticsMapper.getList(so);	
+	}
+
+
+
+}

+ 27 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsUtil.java

@@ -0,0 +1,27 @@
+package com.pj.project.tb_logistics;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 工具类:tb_logistics -- 物流表
+ * @author qzy 
+ *
+ */
+@Component
+public class TbLogisticsUtil {
+
+	
+	/** 底层 Mapper 对象 */
+	public static TbLogisticsMapper tbLogisticsMapper;
+	@Autowired
+	private void setTbLogisticsMapper(TbLogisticsMapper tbLogisticsMapper) {
+		TbLogisticsUtil.tbLogisticsMapper = tbLogisticsMapper;
+	}
+	
+
+
+	
+	
+	
+}