Selaa lähdekoodia

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

linbl 1 vuosi sitten
vanhempi
commit
27fa7b6b35
18 muutettua tiedostoa jossa 1222 lisäystä ja 0 poistoa
  1. 115 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenu.java
  2. 103 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuController.java
  3. 30 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuMapper.java
  4. 67 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuMapper.xml
  5. 50 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuService.java
  6. 27 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_menu/AppMenuUtil.java
  7. 70 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRole.java
  8. 87 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleController.java
  9. 30 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleMapper.java
  10. 49 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleMapper.xml
  11. 51 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleService.java
  12. 27 0
      sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleUtil.java
  13. 170 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogistics.java
  14. 149 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsController.java
  15. 30 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsMapper.java
  16. 89 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsMapper.xml
  17. 51 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsService.java
  18. 27 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_logistics/TbLogisticsUtil.java

+ 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;
+	}
+	
+
+
+	
+	
+	
+}

+ 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;
+	}
+	
+
+
+	
+	
+	
+}