Browse Source

Merge branch 'feature-bieao' of lift-manager/lift-server into develop

bieao 5 years ago
parent
commit
05590ed8bb
16 changed files with 117 additions and 1146 deletions
  1. 12 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/controller/ProjectController.java
  2. 4 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/entity/Project.java
  3. 36 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/entity/ProjectUser.java
  4. 3 5
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/mapper/ProjectHistoryMapper.java
  5. 0 15
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/mapper/ProjectMapper.java
  6. 13 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/mapper/ProjectUserMapper.java
  7. 22 5
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/service/ProjectService.java
  8. 1 80
      lift-business-service/src/main/resources/mapper/ProjectHistoryMapper.xml
  9. 0 331
      lift-business-service/src/main/resources/mapper/ProjectMapper.xml
  10. 16 0
      lift-business-service/src/main/resources/mapper/ProjectUserMapper.xml
  11. 3 0
      lift-manager-service/src/main/java/cn/com/ty/lift/manager/library/dao/entity/Lift.java
  12. 2 11
      lift-manager-service/src/main/java/cn/com/ty/lift/manager/library/dao/mapper/LiftExtensionMapper.java
  13. 0 10
      lift-manager-service/src/main/java/cn/com/ty/lift/manager/library/dao/mapper/LiftMapper.java
  14. 5 5
      lift-manager-service/src/main/java/cn/com/ty/lift/manager/library/service/LibraryService.java
  15. 0 193
      lift-manager-service/src/main/resources/mapper/LiftExtensionMapper.xml
  16. 0 491
      lift-manager-service/src/main/resources/mapper/LiftMapper.xml

+ 12 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/project/controller/ProjectController.java

@@ -2,6 +2,7 @@ package cn.com.ty.lift.business.project.controller;
 
 import cn.com.ty.lift.business.project.dao.entity.Project;
 import cn.com.ty.lift.business.project.dao.entity.ProjectHistory;
+import cn.com.ty.lift.business.project.dao.entity.ProjectUser;
 import cn.com.ty.lift.business.project.dao.entity.model.ProjectHistoryRequest;
 import cn.com.ty.lift.business.project.dao.entity.model.ProjectRequest;
 import cn.com.ty.lift.business.project.service.ProjectService;
@@ -70,6 +71,17 @@ public class ProjectController {
         return projectService.add(project);
     }
 
+    /**
+     * @param projectUser 新增维保工数据项
+     * @return 1.成功, 0.失败, 消息描述
+     * @description 新增维保工
+     * @date 2019/12/4 4:44 PM
+     */
+    @PostMapping("worker/add")
+    public RestResponse add(@RequestBody ProjectUser projectUser) {
+        return projectService.add(projectUser);
+    }
+
     /**
      * @param project 修改项目数据项
      * @return 1.成功, 0.失败, 消息描述

+ 4 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/entity/Project.java

@@ -2,6 +2,8 @@ package cn.com.ty.lift.business.project.dao.entity;
 
 import java.util.Date;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import lombok.Data;
 
 /**
@@ -11,6 +13,8 @@ import lombok.Data;
  */
 @Data
 public class Project {
+
+    @TableId(value = "id",type = IdType.ID_WORKER)
     private Long id;
 
     private Long mtCompanyId;

+ 36 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/entity/ProjectUser.java

@@ -0,0 +1,36 @@
+package cn.com.ty.lift.business.project.dao.entity;
+
+import lombok.Data;
+
+/**
+ * 实体类 - 表:project_user
+ *
+ * @since 2019-12-04 15:39:06
+ */
+@Data
+public class ProjectUser {
+    /**
+     * 项目ID
+     */
+    private Long projectId;
+
+    /**
+     * 用户ID
+     */
+    private Long userId;
+
+    /**
+     * 维保公司ID
+     */
+    private Long mtCompanyId;
+
+    /**
+     * 用户角色 10超管 11:超级查询 12管理员 13维保工 14省级经理 15市级经理 16文员 21物业评价 22物业查询
+     */
+    private Byte userRole;
+
+    /**
+     * 是否是维保班长  0否 1是
+     */
+    private Byte isMonitor;
+}

+ 3 - 5
lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/mapper/ProjectHistoryMapper.java

@@ -2,6 +2,7 @@ package cn.com.ty.lift.business.project.dao.mapper;
 
 import cn.com.ty.lift.business.project.dao.entity.ProjectHistory;
 import cn.com.ty.lift.business.project.dao.entity.model.ProjectHistoryRequest;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
 import java.util.List;
@@ -11,10 +12,7 @@ import java.util.List;
  *
  * @since 2019-12-02 11:03:25
  */
-public interface ProjectHistoryMapper {
-    int insert(ProjectHistory record);
+public interface ProjectHistoryMapper extends BaseMapper<ProjectHistory> {
 
-    int insertSelective(ProjectHistory record);
-
-    List<ProjectHistory> selectByPrimaryKey(IPage page, ProjectHistoryRequest request);
+    List<ProjectHistory> findByCondition(IPage page, ProjectHistoryRequest request);
 }

+ 0 - 15
lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/mapper/ProjectMapper.java

@@ -5,7 +5,6 @@ import cn.com.ty.lift.business.project.dao.entity.Project;
 import cn.com.ty.lift.business.project.dao.entity.model.ProjectRequest;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Constants;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -17,20 +16,6 @@ import java.util.List;
  */
 public interface ProjectMapper extends BaseMapper<Project> {
 
-    int deleteByPrimaryKey(Long id);
-
-    int insert(Project record);
-
-    int insertSelective(Project record);
-
-    Project selectByPrimaryKey(Long id);
-
     List<Project> findByCondition(IPage page, @Param("request") ProjectRequest request);
 
-    int updateByPrimaryKeySelective(Project record);
-
-    int updateByPrimaryKey(Project record);
-
-    List<Project> selectBatchIds(@Param(Constants.COLLECTION) List<String> ids);
-
 }

+ 13 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/mapper/ProjectUserMapper.java

@@ -0,0 +1,13 @@
+package cn.com.ty.lift.business.project.dao.mapper;
+
+import cn.com.ty.lift.business.project.dao.entity.ProjectUser;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * MyBatis Mapper 接口 - 表:project_user
+ *
+ * @since 2019-12-04 15:39:06
+ */
+public interface ProjectUserMapper extends BaseMapper<ProjectUser> {
+
+}

+ 22 - 5
lift-business-service/src/main/java/cn/com/ty/lift/business/project/service/ProjectService.java

@@ -3,10 +3,12 @@ package cn.com.ty.lift.business.project.service;
 import cn.com.ty.lift.business.framework.util.MessageUtils;
 import cn.com.ty.lift.business.project.dao.entity.Project;
 import cn.com.ty.lift.business.project.dao.entity.ProjectHistory;
+import cn.com.ty.lift.business.project.dao.entity.ProjectUser;
 import cn.com.ty.lift.business.project.dao.entity.model.ProjectHistoryRequest;
 import cn.com.ty.lift.business.project.dao.entity.model.ProjectRequest;
 import cn.com.ty.lift.business.project.dao.mapper.ProjectHistoryMapper;
 import cn.com.ty.lift.business.project.dao.mapper.ProjectMapper;
+import cn.com.ty.lift.business.project.dao.mapper.ProjectUserMapper;
 import cn.com.ty.lift.common.base.ExportRequest;
 import cn.com.ty.lift.common.constants.ApiConstants;
 import cn.com.ty.lift.common.constants.RedisConstants;
@@ -14,7 +16,6 @@ import cn.com.ty.lift.common.export.ExportUtils;
 import cn.com.ty.lift.common.model.AreaCode;
 import cn.com.xwy.boot.web.dto.RestResponse;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
@@ -33,6 +34,9 @@ public class ProjectService {
     @Resource
     private ProjectMapper projectMapper;
 
+    @Resource
+    private ProjectUserMapper projectUserMapper;
+
     @Resource
     private ProjectHistoryMapper projectHistoryMapper;
 
@@ -78,7 +82,7 @@ public class ProjectService {
      */
     public RestResponse<IPage<ProjectHistory>> list(ProjectHistoryRequest request) {
         IPage<ProjectHistory> page = new Page<>(request.getPageNum(), request.getPageSize());
-        List<ProjectHistory> historyList = projectHistoryMapper.selectByPrimaryKey(page, request);
+        List<ProjectHistory> historyList = projectHistoryMapper.findByCondition(page, request);
         if (historyList.isEmpty()) {
             page.setRecords(new ArrayList<>());
             return RestResponse.ok(null, ApiConstants.RESULT_NO_DATA, MessageUtils.get("msg.data.empty"));
@@ -104,8 +108,21 @@ public class ProjectService {
      * @date 2019/11/27 2:22 PM
      */
     public RestResponse add(Project project) {
-        project.setId(IdWorker.getId());
-        int result = projectMapper.insertSelective(project);
+        int result = projectMapper.insert(project);
+        if (result > 0) {
+            return RestResponse.ok(result, ApiConstants.RESULT_SUCCESS, MessageUtils.get("msg.add.success"));
+        }
+        return RestResponse.error(ApiConstants.RESULT_ERROR, MessageUtils.get("msg.add.fail"));
+    }
+
+    /**
+     * @param projectUser 新增维保工数据项
+     * @return RestResponse 状态码和返回消息
+     * @description 新增维保工
+     * @date 2019/12/4 4:41 PM
+     */
+    public RestResponse add(ProjectUser projectUser){
+        int result = projectUserMapper.insert(projectUser);
         if (result > 0) {
             return RestResponse.ok(result, ApiConstants.RESULT_SUCCESS, MessageUtils.get("msg.add.success"));
         }
@@ -119,7 +136,7 @@ public class ProjectService {
      * @date 2019/11/27 2:22 PM
      */
     public RestResponse modify(Project project) {
-        int result = projectMapper.updateByPrimaryKeySelective(project);
+        int result = projectMapper.updateById(project);
         if (result > 0) {
             return RestResponse.ok(result, ApiConstants.RESULT_SUCCESS, MessageUtils.get("msg.modify.success"));
         }

+ 1 - 80
lift-business-service/src/main/resources/mapper/ProjectHistoryMapper.xml

@@ -18,90 +18,11 @@
 		id, mt_company_id, project_id, code, name, description,before_content, after_content, operator_id, operate_date
 	</sql>
 
-    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
+    <select id="findByCondition" resultMap="BaseResultMap" parameterType="java.lang.Long">
         select
         <include refid="Base_Column_List"/>
         from project_history
         where id = #{id,jdbcType=BIGINT}
     </select>
 
-    <insert id="insert" parameterType="cn.com.ty.lift.business.project.dao.entity.ProjectHistory">
-		insert into project_history (id, mt_company_id, project_id,
-			code, name, description, 
-			operator_id, operate_date, before_content, 
-			after_content)
-		values (#{id,jdbcType=BIGINT}, #{mtCompanyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, 
-			#{code,jdbcType=CHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, 
-			#{operatorId,jdbcType=BIGINT}, #{operateDate,jdbcType=TIMESTAMP}, #{beforeContent,jdbcType=LONGVARCHAR}, 
-			#{afterContent,jdbcType=LONGVARCHAR})
-	</insert>
-
-    <insert id="insertSelective" parameterType="cn.com.ty.lift.business.project.dao.entity.ProjectHistory">
-        insert into project_history
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">
-                id,
-            </if>
-            <if test="mtCompanyId != null">
-                mt_company_id,
-            </if>
-            <if test="projectId != null">
-                project_id,
-            </if>
-            <if test="code != null">
-                code,
-            </if>
-            <if test="name != null">
-                name,
-            </if>
-            <if test="description != null">
-                description,
-            </if>
-            <if test="operatorId != null">
-                operator_id,
-            </if>
-            <if test="operateDate != null">
-                operate_date,
-            </if>
-            <if test="beforeContent != null">
-                before_content,
-            </if>
-            <if test="afterContent != null">
-                after_content,
-            </if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">
-                #{id,jdbcType=BIGINT},
-            </if>
-            <if test="mtCompanyId != null">
-                #{mtCompanyId,jdbcType=BIGINT},
-            </if>
-            <if test="projectId != null">
-                #{projectId,jdbcType=BIGINT},
-            </if>
-            <if test="code != null">
-                #{code,jdbcType=CHAR},
-            </if>
-            <if test="name != null">
-                #{name,jdbcType=VARCHAR},
-            </if>
-            <if test="description != null">
-                #{description,jdbcType=VARCHAR},
-            </if>
-            <if test="operatorId != null">
-                #{operatorId,jdbcType=BIGINT},
-            </if>
-            <if test="operateDate != null">
-                #{operateDate,jdbcType=TIMESTAMP},
-            </if>
-            <if test="beforeContent != null">
-                #{beforeContent,jdbcType=LONGVARCHAR},
-            </if>
-            <if test="afterContent != null">
-                #{afterContent,jdbcType=LONGVARCHAR},
-            </if>
-        </trim>
-    </insert>
-
 </mapper>

+ 0 - 331
lift-business-service/src/main/resources/mapper/ProjectMapper.xml

@@ -39,13 +39,6 @@
 		evaluate, end_remarks, if_monitor, all_project, region_id
 	</sql>
 
-	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
-		select 
-		<include refid="Base_Column_List" />
-		from project
-		where id = #{id,jdbcType=BIGINT}
-	</select>
-
 	<!-- 根据省,市,区,区域,区域主管,项目名称、项目编号、甲方名称、项目地址查询项目管理列表-->
 	<select id="findByCondition" resultType="cn.com.ty.lift.business.project.dao.entity.model.ProjectResponse" parameterType="cn.com.ty.lift.business.project.dao.entity.model.ProjectRequest" >
 		SELECT
@@ -84,328 +77,4 @@
 		</if>
 	</select>
 
-	<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
-		delete from project
-		where id = #{id,jdbcType=BIGINT}
-	</delete>
-
-	<insert id="insert" parameterType="cn.com.ty.lift.business.project.dao.entity.Project" >
-		insert into project (id, mt_company_id, pp_company_id, 
-			pp_contact_id, project_code, project_name, 
-			province_code, province, city_code, 
-			city, district_code, district, 
-			address, num, actual_num, 
-			project_usage, start_date, end_date, 
-			project_status, remarks, is_locked, 
-			creator_id, create_date, evaluate, 
-			end_remarks, if_monitor, all_project, 
-			region_id)
-		values (#{id,jdbcType=BIGINT}, #{mtCompanyId,jdbcType=BIGINT}, #{ppCompanyId,jdbcType=BIGINT}, 
-			#{ppContactId,jdbcType=BIGINT}, #{projectCode,jdbcType=CHAR}, #{projectName,jdbcType=VARCHAR}, 
-			#{provinceCode,jdbcType=CHAR}, #{province,jdbcType=VARCHAR}, #{cityCode,jdbcType=CHAR}, 
-			#{city,jdbcType=VARCHAR}, #{districtCode,jdbcType=CHAR}, #{district,jdbcType=VARCHAR}, 
-			#{address,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, #{actualNum,jdbcType=INTEGER}, 
-			#{projectUsage,jdbcType=TINYINT}, #{startDate,jdbcType=DATE}, #{endDate,jdbcType=DATE}, 
-			#{projectStatus,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}, #{isLocked,jdbcType=TINYINT}, 
-			#{creatorId,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, #{evaluate,jdbcType=INTEGER}, 
-			#{endRemarks,jdbcType=VARCHAR}, #{ifMonitor,jdbcType=INTEGER}, #{allProject,jdbcType=INTEGER}, 
-			#{regionId,jdbcType=BIGINT})
-	</insert>
-
-	<insert id="insertSelective" parameterType="cn.com.ty.lift.business.project.dao.entity.Project" >
-		insert into project
-		<trim prefix="(" suffix=")" suffixOverrides="," >
-			<if test="id != null" >
-				id,
-			</if>
-			<if test="mtCompanyId != null" >
-				mt_company_id,
-			</if>
-			<if test="ppCompanyId != null" >
-				pp_company_id,
-			</if>
-			<if test="ppContactId != null" >
-				pp_contact_id,
-			</if>
-			<if test="projectCode != null" >
-				project_code,
-			</if>
-			<if test="projectName != null" >
-				project_name,
-			</if>
-			<if test="provinceCode != null" >
-				province_code,
-			</if>
-			<if test="province != null" >
-				province,
-			</if>
-			<if test="cityCode != null" >
-				city_code,
-			</if>
-			<if test="city != null" >
-				city,
-			</if>
-			<if test="districtCode != null" >
-				district_code,
-			</if>
-			<if test="district != null" >
-				district,
-			</if>
-			<if test="address != null" >
-				address,
-			</if>
-			<if test="num != null" >
-				num,
-			</if>
-			<if test="actualNum != null" >
-				actual_num,
-			</if>
-			<if test="projectUsage != null" >
-				project_usage,
-			</if>
-			<if test="startDate != null" >
-				start_date,
-			</if>
-			<if test="endDate != null" >
-				end_date,
-			</if>
-			<if test="projectStatus != null" >
-				project_status,
-			</if>
-			<if test="remarks != null" >
-				remarks,
-			</if>
-			<if test="isLocked != null" >
-				is_locked,
-			</if>
-			<if test="creatorId != null" >
-				creator_id,
-			</if>
-			<if test="createDate != null" >
-				create_date,
-			</if>
-			<if test="evaluate != null" >
-				evaluate,
-			</if>
-			<if test="endRemarks != null" >
-				end_remarks,
-			</if>
-			<if test="ifMonitor != null" >
-				if_monitor,
-			</if>
-			<if test="allProject != null" >
-				all_project,
-			</if>
-			<if test="regionId != null" >
-				region_id,
-			</if>
-		</trim>
-		<trim prefix="values (" suffix=")" suffixOverrides="," >
-			<if test="id != null" >
-				#{id,jdbcType=BIGINT},
-			</if>
-			<if test="mtCompanyId != null" >
-				#{mtCompanyId,jdbcType=BIGINT},
-			</if>
-			<if test="ppCompanyId != null" >
-				#{ppCompanyId,jdbcType=BIGINT},
-			</if>
-			<if test="ppContactId != null" >
-				#{ppContactId,jdbcType=BIGINT},
-			</if>
-			<if test="projectCode != null" >
-				#{projectCode,jdbcType=CHAR},
-			</if>
-			<if test="projectName != null" >
-				#{projectName,jdbcType=VARCHAR},
-			</if>
-			<if test="provinceCode != null" >
-				#{provinceCode,jdbcType=CHAR},
-			</if>
-			<if test="province != null" >
-				#{province,jdbcType=VARCHAR},
-			</if>
-			<if test="cityCode != null" >
-				#{cityCode,jdbcType=CHAR},
-			</if>
-			<if test="city != null" >
-				#{city,jdbcType=VARCHAR},
-			</if>
-			<if test="districtCode != null" >
-				#{districtCode,jdbcType=CHAR},
-			</if>
-			<if test="district != null" >
-				#{district,jdbcType=VARCHAR},
-			</if>
-			<if test="address != null" >
-				#{address,jdbcType=VARCHAR},
-			</if>
-			<if test="num != null" >
-				#{num,jdbcType=INTEGER},
-			</if>
-			<if test="actualNum != null" >
-				#{actualNum,jdbcType=INTEGER},
-			</if>
-			<if test="projectUsage != null" >
-				#{projectUsage,jdbcType=TINYINT},
-			</if>
-			<if test="startDate != null" >
-				#{startDate,jdbcType=DATE},
-			</if>
-			<if test="endDate != null" >
-				#{endDate,jdbcType=DATE},
-			</if>
-			<if test="projectStatus != null" >
-				#{projectStatus,jdbcType=TINYINT},
-			</if>
-			<if test="remarks != null" >
-				#{remarks,jdbcType=VARCHAR},
-			</if>
-			<if test="isLocked != null" >
-				#{isLocked,jdbcType=TINYINT},
-			</if>
-			<if test="creatorId != null" >
-				#{creatorId,jdbcType=BIGINT},
-			</if>
-			<if test="createDate != null" >
-				#{createDate,jdbcType=TIMESTAMP},
-			</if>
-			<if test="evaluate != null" >
-				#{evaluate,jdbcType=INTEGER},
-			</if>
-			<if test="endRemarks != null" >
-				#{endRemarks,jdbcType=VARCHAR},
-			</if>
-			<if test="ifMonitor != null" >
-				#{ifMonitor,jdbcType=INTEGER},
-			</if>
-			<if test="allProject != null" >
-				#{allProject,jdbcType=INTEGER},
-			</if>
-			<if test="regionId != null" >
-				#{regionId,jdbcType=BIGINT},
-			</if>
-		</trim>
-	</insert>
-
-	<update id="updateByPrimaryKeySelective" parameterType="cn.com.ty.lift.business.project.dao.entity.Project" >
-		update project
-		<set >
-			<if test="mtCompanyId != null" >
-				mt_company_id = #{mtCompanyId,jdbcType=BIGINT},
-			</if>
-			<if test="ppCompanyId != null" >
-				pp_company_id = #{ppCompanyId,jdbcType=BIGINT},
-			</if>
-			<if test="ppContactId != null" >
-				pp_contact_id = #{ppContactId,jdbcType=BIGINT},
-			</if>
-			<if test="projectCode != null" >
-				project_code = #{projectCode,jdbcType=CHAR},
-			</if>
-			<if test="projectName != null" >
-				project_name = #{projectName,jdbcType=VARCHAR},
-			</if>
-			<if test="provinceCode != null" >
-				province_code = #{provinceCode,jdbcType=CHAR},
-			</if>
-			<if test="province != null" >
-				province = #{province,jdbcType=VARCHAR},
-			</if>
-			<if test="cityCode != null" >
-				city_code = #{cityCode,jdbcType=CHAR},
-			</if>
-			<if test="city != null" >
-				city = #{city,jdbcType=VARCHAR},
-			</if>
-			<if test="districtCode != null" >
-				district_code = #{districtCode,jdbcType=CHAR},
-			</if>
-			<if test="district != null" >
-				district = #{district,jdbcType=VARCHAR},
-			</if>
-			<if test="address != null" >
-				address = #{address,jdbcType=VARCHAR},
-			</if>
-			<if test="num != null" >
-				num = #{num,jdbcType=INTEGER},
-			</if>
-			<if test="actualNum != null" >
-				actual_num = #{actualNum,jdbcType=INTEGER},
-			</if>
-			<if test="projectUsage != null" >
-				project_usage = #{projectUsage,jdbcType=TINYINT},
-			</if>
-			<if test="startDate != null" >
-				start_date = #{startDate,jdbcType=DATE},
-			</if>
-			<if test="endDate != null" >
-				end_date = #{endDate,jdbcType=DATE},
-			</if>
-			<if test="projectStatus != null" >
-				project_status = #{projectStatus,jdbcType=TINYINT},
-			</if>
-			<if test="remarks != null" >
-				remarks = #{remarks,jdbcType=VARCHAR},
-			</if>
-			<if test="isLocked != null" >
-				is_locked = #{isLocked,jdbcType=TINYINT},
-			</if>
-			<if test="creatorId != null" >
-				creator_id = #{creatorId,jdbcType=BIGINT},
-			</if>
-			<if test="createDate != null" >
-				create_date = #{createDate,jdbcType=TIMESTAMP},
-			</if>
-			<if test="evaluate != null" >
-				evaluate = #{evaluate,jdbcType=INTEGER},
-			</if>
-			<if test="endRemarks != null" >
-				end_remarks = #{endRemarks,jdbcType=VARCHAR},
-			</if>
-			<if test="ifMonitor != null" >
-				if_monitor = #{ifMonitor,jdbcType=INTEGER},
-			</if>
-			<if test="allProject != null" >
-				all_project = #{allProject,jdbcType=INTEGER},
-			</if>
-			<if test="regionId != null" >
-				region_id = #{regionId,jdbcType=BIGINT},
-			</if>
-		</set>
-		where id = #{id,jdbcType=BIGINT}
-	</update>
-
-	<update id="updateByPrimaryKey" parameterType="cn.com.ty.lift.business.project.dao.entity.Project" >
-		update project
-		set mt_company_id = #{mtCompanyId,jdbcType=BIGINT},
-			pp_company_id = #{ppCompanyId,jdbcType=BIGINT},
-			pp_contact_id = #{ppContactId,jdbcType=BIGINT},
-			project_code = #{projectCode,jdbcType=CHAR},
-			project_name = #{projectName,jdbcType=VARCHAR},
-			province_code = #{provinceCode,jdbcType=CHAR},
-			province = #{province,jdbcType=VARCHAR},
-			city_code = #{cityCode,jdbcType=CHAR},
-			city = #{city,jdbcType=VARCHAR},
-			district_code = #{districtCode,jdbcType=CHAR},
-			district = #{district,jdbcType=VARCHAR},
-			address = #{address,jdbcType=VARCHAR},
-			num = #{num,jdbcType=INTEGER},
-			actual_num = #{actualNum,jdbcType=INTEGER},
-			project_usage = #{projectUsage,jdbcType=TINYINT},
-			start_date = #{startDate,jdbcType=DATE},
-			end_date = #{endDate,jdbcType=DATE},
-			project_status = #{projectStatus,jdbcType=TINYINT},
-			remarks = #{remarks,jdbcType=VARCHAR},
-			is_locked = #{isLocked,jdbcType=TINYINT},
-			creator_id = #{creatorId,jdbcType=BIGINT},
-			create_date = #{createDate,jdbcType=TIMESTAMP},
-			evaluate = #{evaluate,jdbcType=INTEGER},
-			end_remarks = #{endRemarks,jdbcType=VARCHAR},
-			if_monitor = #{ifMonitor,jdbcType=INTEGER},
-			all_project = #{allProject,jdbcType=INTEGER},
-			region_id = #{regionId,jdbcType=BIGINT}
-		where id = #{id,jdbcType=BIGINT}
-	</update>
-
 </mapper>

+ 16 - 0
lift-business-service/src/main/resources/mapper/ProjectUserMapper.xml

@@ -0,0 +1,16 @@
+<?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="cn.com.ty.lift.business.project.dao.mapper.ProjectUserMapper" >
+	<resultMap id="BaseResultMap" type="cn.com.ty.lift.business.project.dao.entity.ProjectUser" >
+		<id column="project_id" property="projectId" jdbcType="BIGINT" />
+		<id column="user_id" property="userId" jdbcType="BIGINT" />
+		<id column="user_role" property="userRole" jdbcType="TINYINT" />
+		<result column="mt_company_id" property="mtCompanyId" jdbcType="BIGINT" />
+		<result column="is_monitor" property="isMonitor" jdbcType="TINYINT" />
+	</resultMap>
+
+	<sql id="Base_Column_List" >
+		project_id, user_id, user_role, mt_company_id, is_monitor
+	</sql>
+
+</mapper>

+ 3 - 0
lift-manager-service/src/main/java/cn/com/ty/lift/manager/library/dao/entity/Lift.java

@@ -4,6 +4,8 @@ import java.math.BigDecimal;
 import java.util.Date;
 
 import cn.com.ty.lift.manager.library.dao.entity.model.LiftExtensionRequest;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import lombok.Data;
 
 /**
@@ -17,6 +19,7 @@ public class Lift extends LiftExtensionRequest {
     /**
      * 电梯id
      */
+    @TableId(value = "id",type = IdType.ID_WORKER)
     private Long id;
 
     /**

+ 2 - 11
lift-manager-service/src/main/java/cn/com/ty/lift/manager/library/dao/mapper/LiftExtensionMapper.java

@@ -1,22 +1,13 @@
 package cn.com.ty.lift.manager.library.dao.mapper;
 
 import cn.com.ty.lift.manager.library.dao.entity.LiftExtension;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 /**
  * @author bieao
  * @description 电梯扩展数据层
  * @date 2019/12/3 2:32 PM
  */
-public interface LiftExtensionMapper {
-    int deleteByPrimaryKey(Long id);
+public interface LiftExtensionMapper extends BaseMapper<LiftExtension> {
 
-    int insert(LiftExtension record);
-
-    int insertSelective(LiftExtension record);
-
-    LiftExtension selectByPrimaryKey(Long id);
-
-    int updateByPrimaryKeySelective(LiftExtension record);
-
-    int updateByPrimaryKey(LiftExtension record);
 }

+ 0 - 10
lift-manager-service/src/main/java/cn/com/ty/lift/manager/library/dao/mapper/LiftMapper.java

@@ -4,7 +4,6 @@ import cn.com.ty.lift.manager.library.dao.entity.Lift;
 import cn.com.ty.lift.manager.library.dao.entity.model.LiftRequest;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Constants;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -15,16 +14,7 @@ import java.util.List;
  * @description 电梯档案数据层
  */
 public interface LiftMapper extends BaseMapper<Lift> {
-    int deleteByPrimaryKey(Long id);
-
-    Long insertSelective(Lift record);
 
     List<Lift> findByCondition(IPage page, @Param("request") LiftRequest request);
 
-    int updateByPrimaryKeySelective(Lift record);
-
-    int updateByPrimaryKey(Lift record);
-
-    List<Lift> selectBatchIds(@Param(Constants.COLLECTION) List<String> ids);
-
 }

+ 5 - 5
lift-manager-service/src/main/java/cn/com/ty/lift/manager/library/service/LibraryService.java

@@ -79,11 +79,11 @@ public class LibraryService {
      */
     @Transactional
     public RestResponse add(Lift lift) {
-        Long id = liftMapper.insertSelective(lift);
-        if (id != null) {
+        int result = liftMapper.insert(lift);
+        if (result > 0) {
             LiftExtension extension = init(lift);
-            Integer result = liftExtensionMapper.insertSelective(extension);
-            if (result > 0) {
+            int ret = liftExtensionMapper.insert(extension);
+            if (ret > 0) {
                 return RestResponse.ok(result, ApiConstants.RESULT_SUCCESS, MessageUtils.get("msg.add.success"));
             }
         }
@@ -97,7 +97,7 @@ public class LibraryService {
      * @date 2019/11/27 2:22 PM
      */
     public RestResponse modify(Lift lift) {
-        Integer result = liftMapper.updateByPrimaryKeySelective(lift);
+        Integer result = liftMapper.updateById(lift);
         if (result > 0) {
             return RestResponse.ok(result, ApiConstants.RESULT_SUCCESS, MessageUtils.get("msg.modify.success"));
         }

+ 0 - 193
lift-manager-service/src/main/resources/mapper/LiftExtensionMapper.xml

@@ -25,197 +25,4 @@
 		device_type
 	</sql>
 
-	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
-		select 
-		<include refid="Base_Column_List" />
-		from lift_extension
-		where id = #{id,jdbcType=BIGINT}
-	</select>
-
-	<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
-		delete from lift_extension
-		where id = #{id,jdbcType=BIGINT}
-	</delete>
-
-	<insert id="insert" parameterType="cn.com.ty.lift.manager.library.dao.entity.LiftExtension" >
-		insert into lift_extension (id, mt_company_id, project_id, 
-			worker_id, first_time, out_service_date, 
-			annual_inspection_date, area_code, lift_status, 
-			is_certificated, is_locked, stop_date, 
-			plan_interval, device_id, device_type
-			)
-		values (#{id,jdbcType=BIGINT}, #{mtCompanyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, 
-			#{workerId,jdbcType=BIGINT}, #{firstTime,jdbcType=DATE}, #{outServiceDate,jdbcType=DATE}, 
-			#{annualInspectionDate,jdbcType=DATE}, #{areaCode,jdbcType=CHAR}, #{liftStatus,jdbcType=TINYINT}, 
-			#{isCertificated,jdbcType=TINYINT}, #{isLocked,jdbcType=TINYINT}, #{stopDate,jdbcType=TIMESTAMP}, 
-			#{planInterval,jdbcType=TINYINT}, #{deviceId,jdbcType=VARCHAR}, #{deviceType,jdbcType=TINYINT}
-			)
-	</insert>
-
-	<insert id="insertSelective" parameterType="cn.com.ty.lift.manager.library.dao.entity.LiftExtension" >
-		insert into lift_extension
-		<trim prefix="(" suffix=")" suffixOverrides="," >
-			<if test="id != null" >
-				id,
-			</if>
-			<if test="mtCompanyId != null" >
-				mt_company_id,
-			</if>
-			<if test="projectId != null" >
-				project_id,
-			</if>
-			<if test="workerId != null" >
-				worker_id,
-			</if>
-			<if test="firstTime != null" >
-				first_time,
-			</if>
-			<if test="outServiceDate != null" >
-				out_service_date,
-			</if>
-			<if test="annualInspectionDate != null" >
-				annual_inspection_date,
-			</if>
-			<if test="areaCode != null" >
-				area_code,
-			</if>
-			<if test="liftStatus != null" >
-				lift_status,
-			</if>
-			<if test="isCertificated != null" >
-				is_certificated,
-			</if>
-			<if test="isLocked != null" >
-				is_locked,
-			</if>
-			<if test="stopDate != null" >
-				stop_date,
-			</if>
-			<if test="planInterval != null" >
-				plan_interval,
-			</if>
-			<if test="deviceId != null" >
-				device_id,
-			</if>
-			<if test="deviceType != null" >
-				device_type,
-			</if>
-		</trim>
-		<trim prefix="values (" suffix=")" suffixOverrides="," >
-			<if test="id != null" >
-				#{id,jdbcType=BIGINT},
-			</if>
-			<if test="mtCompanyId != null" >
-				#{mtCompanyId,jdbcType=BIGINT},
-			</if>
-			<if test="projectId != null" >
-				#{projectId,jdbcType=BIGINT},
-			</if>
-			<if test="workerId != null" >
-				#{workerId,jdbcType=BIGINT},
-			</if>
-			<if test="firstTime != null" >
-				#{firstTime,jdbcType=DATE},
-			</if>
-			<if test="outServiceDate != null" >
-				#{outServiceDate,jdbcType=DATE},
-			</if>
-			<if test="annualInspectionDate != null" >
-				#{annualInspectionDate,jdbcType=DATE},
-			</if>
-			<if test="areaCode != null" >
-				#{areaCode,jdbcType=CHAR},
-			</if>
-			<if test="liftStatus != null" >
-				#{liftStatus,jdbcType=TINYINT},
-			</if>
-			<if test="isCertificated != null" >
-				#{isCertificated,jdbcType=TINYINT},
-			</if>
-			<if test="isLocked != null" >
-				#{isLocked,jdbcType=TINYINT},
-			</if>
-			<if test="stopDate != null" >
-				#{stopDate,jdbcType=TIMESTAMP},
-			</if>
-			<if test="planInterval != null" >
-				#{planInterval,jdbcType=TINYINT},
-			</if>
-			<if test="deviceId != null" >
-				#{deviceId,jdbcType=VARCHAR},
-			</if>
-			<if test="deviceType != null" >
-				#{deviceType,jdbcType=TINYINT},
-			</if>
-		</trim>
-	</insert>
-
-	<update id="updateByPrimaryKeySelective" parameterType="cn.com.ty.lift.manager.library.dao.entity.LiftExtension" >
-		update lift_extension
-		<set >
-			<if test="mtCompanyId != null" >
-				mt_company_id = #{mtCompanyId,jdbcType=BIGINT},
-			</if>
-			<if test="projectId != null" >
-				project_id = #{projectId,jdbcType=BIGINT},
-			</if>
-			<if test="workerId != null" >
-				worker_id = #{workerId,jdbcType=BIGINT},
-			</if>
-			<if test="firstTime != null" >
-				first_time = #{firstTime,jdbcType=DATE},
-			</if>
-			<if test="outServiceDate != null" >
-				out_service_date = #{outServiceDate,jdbcType=DATE},
-			</if>
-			<if test="annualInspectionDate != null" >
-				annual_inspection_date = #{annualInspectionDate,jdbcType=DATE},
-			</if>
-			<if test="areaCode != null" >
-				area_code = #{areaCode,jdbcType=CHAR},
-			</if>
-			<if test="liftStatus != null" >
-				lift_status = #{liftStatus,jdbcType=TINYINT},
-			</if>
-			<if test="isCertificated != null" >
-				is_certificated = #{isCertificated,jdbcType=TINYINT},
-			</if>
-			<if test="isLocked != null" >
-				is_locked = #{isLocked,jdbcType=TINYINT},
-			</if>
-			<if test="stopDate != null" >
-				stop_date = #{stopDate,jdbcType=TIMESTAMP},
-			</if>
-			<if test="planInterval != null" >
-				plan_interval = #{planInterval,jdbcType=TINYINT},
-			</if>
-			<if test="deviceId != null" >
-				device_id = #{deviceId,jdbcType=VARCHAR},
-			</if>
-			<if test="deviceType != null" >
-				device_type = #{deviceType,jdbcType=TINYINT},
-			</if>
-		</set>
-		where id = #{id,jdbcType=BIGINT}
-	</update>
-
-	<update id="updateByPrimaryKey" parameterType="cn.com.ty.lift.manager.library.dao.entity.LiftExtension" >
-		update lift_extension
-		set mt_company_id = #{mtCompanyId,jdbcType=BIGINT},
-			project_id = #{projectId,jdbcType=BIGINT},
-			worker_id = #{workerId,jdbcType=BIGINT},
-			first_time = #{firstTime,jdbcType=DATE},
-			out_service_date = #{outServiceDate,jdbcType=DATE},
-			annual_inspection_date = #{annualInspectionDate,jdbcType=DATE},
-			area_code = #{areaCode,jdbcType=CHAR},
-			lift_status = #{liftStatus,jdbcType=TINYINT},
-			is_certificated = #{isCertificated,jdbcType=TINYINT},
-			is_locked = #{isLocked,jdbcType=TINYINT},
-			stop_date = #{stopDate,jdbcType=TIMESTAMP},
-			plan_interval = #{planInterval,jdbcType=TINYINT},
-			device_id = #{deviceId,jdbcType=VARCHAR},
-			device_type = #{deviceType,jdbcType=TINYINT}
-		where id = #{id,jdbcType=BIGINT}
-	</update>
-
 </mapper>

+ 0 - 491
lift-manager-service/src/main/resources/mapper/LiftMapper.xml

@@ -57,13 +57,6 @@
 		agency, reform_date, install_date, inner_floor
 	</sql>
 
-	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
-		select 
-		<include refid="Base_Column_List" />
-		from lift
-		where id = #{id,jdbcType=BIGINT}
-	</select>
-
 	<!-- 根据区域,项目,电梯号,电梯品牌,电梯类型,维保工查询电梯列表信息-->
 	<select id="findByCondition" resultType="cn.com.ty.lift.manager.library.dao.entity.model.LiftResponse" parameterType="cn.com.ty.lift.manager.library.dao.entity.model.LiftRequest" >
 		SELECT
@@ -82,488 +75,4 @@
 		</if>
 	</select>
 
-	<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
-		delete from lift
-		where id = #{id,jdbcType=BIGINT}
-	</delete>
-
-	<insert id="insert" parameterType="cn.com.ty.lift.manager.library.dao.entity.Lift" >
-		insert into lift (id, registration_code, category, 
-			lift_type, lift_code, manufacture_date, 
-			factory_code, device_usage, lift_brand, 
-			install_company, lift_model, pulley_diameter, 
-			rope_num, lock_model, rated_load, 
-			promote_height, step_width, sidewalk_length, 
-			tilt_angle, motor_power, rated_speed, 
-			layer_station_door, clamp_type, reform_company, 
-			device_position, coordinate, remarks, 
-			creator_id, create_date, steel_belt, 
-			cylinder_type, cylinder_num, top_type, 
-			control_type, mpa, factory, 
-			custom_number, use_company_code, device_position_code, 
-			agency, reform_date, install_date, 
-			inner_floor)
-		values (#{id,jdbcType=BIGINT}, #{registrationCode,jdbcType=VARCHAR}, #{category,jdbcType=TINYINT}, 
-			#{liftType,jdbcType=INTEGER}, #{liftCode,jdbcType=CHAR}, #{manufactureDate,jdbcType=DATE}, 
-			#{factoryCode,jdbcType=VARCHAR}, #{deviceUsage,jdbcType=TINYINT}, #{liftBrand,jdbcType=VARCHAR}, 
-			#{installCompany,jdbcType=VARCHAR}, #{liftModel,jdbcType=VARCHAR}, #{pulleyDiameter,jdbcType=DECIMAL}, 
-			#{ropeNum,jdbcType=INTEGER}, #{lockModel,jdbcType=VARCHAR}, #{ratedLoad,jdbcType=INTEGER}, 
-			#{promoteHeight,jdbcType=DECIMAL}, #{stepWidth,jdbcType=DECIMAL}, #{sidewalkLength,jdbcType=DECIMAL}, 
-			#{tiltAngle,jdbcType=DECIMAL}, #{motorPower,jdbcType=DECIMAL}, #{ratedSpeed,jdbcType=DECIMAL}, 
-			#{layerStationDoor,jdbcType=VARCHAR}, #{clampType,jdbcType=TINYINT}, #{reformCompany,jdbcType=VARCHAR}, 
-			#{devicePosition,jdbcType=VARCHAR}, #{coordinate,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, 
-			#{creatorId,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, #{steelBelt,jdbcType=INTEGER}, 
-			#{cylinderType,jdbcType=VARCHAR}, #{cylinderNum,jdbcType=INTEGER}, #{topType,jdbcType=TINYINT}, 
-			#{controlType,jdbcType=VARCHAR}, #{mpa,jdbcType=INTEGER}, #{factory,jdbcType=VARCHAR}, 
-			#{customNumber,jdbcType=VARCHAR}, #{useCompanyCode,jdbcType=VARCHAR}, #{devicePositionCode,jdbcType=CHAR}, 
-			#{agency,jdbcType=VARCHAR}, #{reformDate,jdbcType=TIMESTAMP}, #{installDate,jdbcType=TIMESTAMP}, 
-			#{innerFloor,jdbcType=TINYINT})
-	</insert>
-
-	<insert id="insertSelective" keyProperty="id" parameterType="cn.com.ty.lift.manager.library.dao.entity.Lift" >
-		insert into lift
-		<trim prefix="(" suffix=")" suffixOverrides="," >
-			<if test="id != null" >
-				id,
-			</if>
-			<if test="registrationCode != null" >
-				registration_code,
-			</if>
-			<if test="category != null" >
-				category,
-			</if>
-			<if test="liftType != null" >
-				lift_type,
-			</if>
-			<if test="liftCode != null" >
-				lift_code,
-			</if>
-			<if test="manufactureDate != null" >
-				manufacture_date,
-			</if>
-			<if test="factoryCode != null" >
-				factory_code,
-			</if>
-			<if test="deviceUsage != null" >
-				device_usage,
-			</if>
-			<if test="liftBrand != null" >
-				lift_brand,
-			</if>
-			<if test="installCompany != null" >
-				install_company,
-			</if>
-			<if test="liftModel != null" >
-				lift_model,
-			</if>
-			<if test="pulleyDiameter != null" >
-				pulley_diameter,
-			</if>
-			<if test="ropeNum != null" >
-				rope_num,
-			</if>
-			<if test="lockModel != null" >
-				lock_model,
-			</if>
-			<if test="ratedLoad != null" >
-				rated_load,
-			</if>
-			<if test="promoteHeight != null" >
-				promote_height,
-			</if>
-			<if test="stepWidth != null" >
-				step_width,
-			</if>
-			<if test="sidewalkLength != null" >
-				sidewalk_length,
-			</if>
-			<if test="tiltAngle != null" >
-				tilt_angle,
-			</if>
-			<if test="motorPower != null" >
-				motor_power,
-			</if>
-			<if test="ratedSpeed != null" >
-				rated_speed,
-			</if>
-			<if test="layerStationDoor != null" >
-				layer_station_door,
-			</if>
-			<if test="clampType != null" >
-				clamp_type,
-			</if>
-			<if test="reformCompany != null" >
-				reform_company,
-			</if>
-			<if test="devicePosition != null" >
-				device_position,
-			</if>
-			<if test="coordinate != null" >
-				coordinate,
-			</if>
-			<if test="remarks != null" >
-				remarks,
-			</if>
-			<if test="creatorId != null" >
-				creator_id,
-			</if>
-			<if test="createDate != null" >
-				create_date,
-			</if>
-			<if test="steelBelt != null" >
-				steel_belt,
-			</if>
-			<if test="cylinderType != null" >
-				cylinder_type,
-			</if>
-			<if test="cylinderNum != null" >
-				cylinder_num,
-			</if>
-			<if test="topType != null" >
-				top_type,
-			</if>
-			<if test="controlType != null" >
-				control_type,
-			</if>
-			<if test="mpa != null" >
-				mpa,
-			</if>
-			<if test="factory != null" >
-				factory,
-			</if>
-			<if test="customNumber != null" >
-				custom_number,
-			</if>
-			<if test="useCompanyCode != null" >
-				use_company_code,
-			</if>
-			<if test="devicePositionCode != null" >
-				device_position_code,
-			</if>
-			<if test="agency != null" >
-				agency,
-			</if>
-			<if test="reformDate != null" >
-				reform_date,
-			</if>
-			<if test="installDate != null" >
-				install_date,
-			</if>
-			<if test="innerFloor != null" >
-				inner_floor,
-			</if>
-		</trim>
-		<trim prefix="values (" suffix=")" suffixOverrides="," >
-			<if test="id != null" >
-				#{id,jdbcType=BIGINT},
-			</if>
-			<if test="registrationCode != null" >
-				#{registrationCode,jdbcType=VARCHAR},
-			</if>
-			<if test="category != null" >
-				#{category,jdbcType=TINYINT},
-			</if>
-			<if test="liftType != null" >
-				#{liftType,jdbcType=INTEGER},
-			</if>
-			<if test="liftCode != null" >
-				#{liftCode,jdbcType=CHAR},
-			</if>
-			<if test="manufactureDate != null" >
-				#{manufactureDate,jdbcType=DATE},
-			</if>
-			<if test="factoryCode != null" >
-				#{factoryCode,jdbcType=VARCHAR},
-			</if>
-			<if test="deviceUsage != null" >
-				#{deviceUsage,jdbcType=TINYINT},
-			</if>
-			<if test="liftBrand != null" >
-				#{liftBrand,jdbcType=VARCHAR},
-			</if>
-			<if test="installCompany != null" >
-				#{installCompany,jdbcType=VARCHAR},
-			</if>
-			<if test="liftModel != null" >
-				#{liftModel,jdbcType=VARCHAR},
-			</if>
-			<if test="pulleyDiameter != null" >
-				#{pulleyDiameter,jdbcType=DECIMAL},
-			</if>
-			<if test="ropeNum != null" >
-				#{ropeNum,jdbcType=INTEGER},
-			</if>
-			<if test="lockModel != null" >
-				#{lockModel,jdbcType=VARCHAR},
-			</if>
-			<if test="ratedLoad != null" >
-				#{ratedLoad,jdbcType=INTEGER},
-			</if>
-			<if test="promoteHeight != null" >
-				#{promoteHeight,jdbcType=DECIMAL},
-			</if>
-			<if test="stepWidth != null" >
-				#{stepWidth,jdbcType=DECIMAL},
-			</if>
-			<if test="sidewalkLength != null" >
-				#{sidewalkLength,jdbcType=DECIMAL},
-			</if>
-			<if test="tiltAngle != null" >
-				#{tiltAngle,jdbcType=DECIMAL},
-			</if>
-			<if test="motorPower != null" >
-				#{motorPower,jdbcType=DECIMAL},
-			</if>
-			<if test="ratedSpeed != null" >
-				#{ratedSpeed,jdbcType=DECIMAL},
-			</if>
-			<if test="layerStationDoor != null" >
-				#{layerStationDoor,jdbcType=VARCHAR},
-			</if>
-			<if test="clampType != null" >
-				#{clampType,jdbcType=TINYINT},
-			</if>
-			<if test="reformCompany != null" >
-				#{reformCompany,jdbcType=VARCHAR},
-			</if>
-			<if test="devicePosition != null" >
-				#{devicePosition,jdbcType=VARCHAR},
-			</if>
-			<if test="coordinate != null" >
-				#{coordinate,jdbcType=VARCHAR},
-			</if>
-			<if test="remarks != null" >
-				#{remarks,jdbcType=VARCHAR},
-			</if>
-			<if test="creatorId != null" >
-				#{creatorId,jdbcType=BIGINT},
-			</if>
-			<if test="createDate != null" >
-				#{createDate,jdbcType=TIMESTAMP},
-			</if>
-			<if test="steelBelt != null" >
-				#{steelBelt,jdbcType=INTEGER},
-			</if>
-			<if test="cylinderType != null" >
-				#{cylinderType,jdbcType=VARCHAR},
-			</if>
-			<if test="cylinderNum != null" >
-				#{cylinderNum,jdbcType=INTEGER},
-			</if>
-			<if test="topType != null" >
-				#{topType,jdbcType=TINYINT},
-			</if>
-			<if test="controlType != null" >
-				#{controlType,jdbcType=VARCHAR},
-			</if>
-			<if test="mpa != null" >
-				#{mpa,jdbcType=INTEGER},
-			</if>
-			<if test="factory != null" >
-				#{factory,jdbcType=VARCHAR},
-			</if>
-			<if test="customNumber != null" >
-				#{customNumber,jdbcType=VARCHAR},
-			</if>
-			<if test="useCompanyCode != null" >
-				#{useCompanyCode,jdbcType=VARCHAR},
-			</if>
-			<if test="devicePositionCode != null" >
-				#{devicePositionCode,jdbcType=CHAR},
-			</if>
-			<if test="agency != null" >
-				#{agency,jdbcType=VARCHAR},
-			</if>
-			<if test="reformDate != null" >
-				#{reformDate,jdbcType=TIMESTAMP},
-			</if>
-			<if test="installDate != null" >
-				#{installDate,jdbcType=TIMESTAMP},
-			</if>
-			<if test="innerFloor != null" >
-				#{innerFloor,jdbcType=TINYINT},
-			</if>
-		</trim>
-	</insert>
-
-	<update id="updateByPrimaryKeySelective" parameterType="cn.com.ty.lift.manager.library.dao.entity.Lift" >
-		update lift
-		<set >
-			<if test="registrationCode != null" >
-				registration_code = #{registrationCode,jdbcType=VARCHAR},
-			</if>
-			<if test="category != null" >
-				category = #{category,jdbcType=TINYINT},
-			</if>
-			<if test="liftType != null" >
-				lift_type = #{liftType,jdbcType=INTEGER},
-			</if>
-			<if test="liftCode != null" >
-				lift_code = #{liftCode,jdbcType=CHAR},
-			</if>
-			<if test="manufactureDate != null" >
-				manufacture_date = #{manufactureDate,jdbcType=DATE},
-			</if>
-			<if test="factoryCode != null" >
-				factory_code = #{factoryCode,jdbcType=VARCHAR},
-			</if>
-			<if test="deviceUsage != null" >
-				device_usage = #{deviceUsage,jdbcType=TINYINT},
-			</if>
-			<if test="liftBrand != null" >
-				lift_brand = #{liftBrand,jdbcType=VARCHAR},
-			</if>
-			<if test="installCompany != null" >
-				install_company = #{installCompany,jdbcType=VARCHAR},
-			</if>
-			<if test="liftModel != null" >
-				lift_model = #{liftModel,jdbcType=VARCHAR},
-			</if>
-			<if test="pulleyDiameter != null" >
-				pulley_diameter = #{pulleyDiameter,jdbcType=DECIMAL},
-			</if>
-			<if test="ropeNum != null" >
-				rope_num = #{ropeNum,jdbcType=INTEGER},
-			</if>
-			<if test="lockModel != null" >
-				lock_model = #{lockModel,jdbcType=VARCHAR},
-			</if>
-			<if test="ratedLoad != null" >
-				rated_load = #{ratedLoad,jdbcType=INTEGER},
-			</if>
-			<if test="promoteHeight != null" >
-				promote_height = #{promoteHeight,jdbcType=DECIMAL},
-			</if>
-			<if test="stepWidth != null" >
-				step_width = #{stepWidth,jdbcType=DECIMAL},
-			</if>
-			<if test="sidewalkLength != null" >
-				sidewalk_length = #{sidewalkLength,jdbcType=DECIMAL},
-			</if>
-			<if test="tiltAngle != null" >
-				tilt_angle = #{tiltAngle,jdbcType=DECIMAL},
-			</if>
-			<if test="motorPower != null" >
-				motor_power = #{motorPower,jdbcType=DECIMAL},
-			</if>
-			<if test="ratedSpeed != null" >
-				rated_speed = #{ratedSpeed,jdbcType=DECIMAL},
-			</if>
-			<if test="layerStationDoor != null" >
-				layer_station_door = #{layerStationDoor,jdbcType=VARCHAR},
-			</if>
-			<if test="clampType != null" >
-				clamp_type = #{clampType,jdbcType=TINYINT},
-			</if>
-			<if test="reformCompany != null" >
-				reform_company = #{reformCompany,jdbcType=VARCHAR},
-			</if>
-			<if test="devicePosition != null" >
-				device_position = #{devicePosition,jdbcType=VARCHAR},
-			</if>
-			<if test="coordinate != null" >
-				coordinate = #{coordinate,jdbcType=VARCHAR},
-			</if>
-			<if test="remarks != null" >
-				remarks = #{remarks,jdbcType=VARCHAR},
-			</if>
-			<if test="creatorId != null" >
-				creator_id = #{creatorId,jdbcType=BIGINT},
-			</if>
-			<if test="createDate != null" >
-				create_date = #{createDate,jdbcType=TIMESTAMP},
-			</if>
-			<if test="steelBelt != null" >
-				steel_belt = #{steelBelt,jdbcType=INTEGER},
-			</if>
-			<if test="cylinderType != null" >
-				cylinder_type = #{cylinderType,jdbcType=VARCHAR},
-			</if>
-			<if test="cylinderNum != null" >
-				cylinder_num = #{cylinderNum,jdbcType=INTEGER},
-			</if>
-			<if test="topType != null" >
-				top_type = #{topType,jdbcType=TINYINT},
-			</if>
-			<if test="controlType != null" >
-				control_type = #{controlType,jdbcType=VARCHAR},
-			</if>
-			<if test="mpa != null" >
-				mpa = #{mpa,jdbcType=INTEGER},
-			</if>
-			<if test="factory != null" >
-				factory = #{factory,jdbcType=VARCHAR},
-			</if>
-			<if test="customNumber != null" >
-				custom_number = #{customNumber,jdbcType=VARCHAR},
-			</if>
-			<if test="useCompanyCode != null" >
-				use_company_code = #{useCompanyCode,jdbcType=VARCHAR},
-			</if>
-			<if test="devicePositionCode != null" >
-				device_position_code = #{devicePositionCode,jdbcType=CHAR},
-			</if>
-			<if test="agency != null" >
-				agency = #{agency,jdbcType=VARCHAR},
-			</if>
-			<if test="reformDate != null" >
-				reform_date = #{reformDate,jdbcType=TIMESTAMP},
-			</if>
-			<if test="installDate != null" >
-				install_date = #{installDate,jdbcType=TIMESTAMP},
-			</if>
-			<if test="innerFloor != null" >
-				inner_floor = #{innerFloor,jdbcType=TINYINT},
-			</if>
-		</set>
-		where id = #{id,jdbcType=BIGINT}
-	</update>
-
-	<update id="updateByPrimaryKey" parameterType="cn.com.ty.lift.manager.library.dao.entity.Lift" >
-		update lift
-		set registration_code = #{registrationCode,jdbcType=VARCHAR},
-			category = #{category,jdbcType=TINYINT},
-			lift_type = #{liftType,jdbcType=INTEGER},
-			lift_code = #{liftCode,jdbcType=CHAR},
-			manufacture_date = #{manufactureDate,jdbcType=DATE},
-			factory_code = #{factoryCode,jdbcType=VARCHAR},
-			device_usage = #{deviceUsage,jdbcType=TINYINT},
-			lift_brand = #{liftBrand,jdbcType=VARCHAR},
-			install_company = #{installCompany,jdbcType=VARCHAR},
-			lift_model = #{liftModel,jdbcType=VARCHAR},
-			pulley_diameter = #{pulleyDiameter,jdbcType=DECIMAL},
-			rope_num = #{ropeNum,jdbcType=INTEGER},
-			lock_model = #{lockModel,jdbcType=VARCHAR},
-			rated_load = #{ratedLoad,jdbcType=INTEGER},
-			promote_height = #{promoteHeight,jdbcType=DECIMAL},
-			step_width = #{stepWidth,jdbcType=DECIMAL},
-			sidewalk_length = #{sidewalkLength,jdbcType=DECIMAL},
-			tilt_angle = #{tiltAngle,jdbcType=DECIMAL},
-			motor_power = #{motorPower,jdbcType=DECIMAL},
-			rated_speed = #{ratedSpeed,jdbcType=DECIMAL},
-			layer_station_door = #{layerStationDoor,jdbcType=VARCHAR},
-			clamp_type = #{clampType,jdbcType=TINYINT},
-			reform_company = #{reformCompany,jdbcType=VARCHAR},
-			device_position = #{devicePosition,jdbcType=VARCHAR},
-			coordinate = #{coordinate,jdbcType=VARCHAR},
-			remarks = #{remarks,jdbcType=VARCHAR},
-			creator_id = #{creatorId,jdbcType=BIGINT},
-			create_date = #{createDate,jdbcType=TIMESTAMP},
-			steel_belt = #{steelBelt,jdbcType=INTEGER},
-			cylinder_type = #{cylinderType,jdbcType=VARCHAR},
-			cylinder_num = #{cylinderNum,jdbcType=INTEGER},
-			top_type = #{topType,jdbcType=TINYINT},
-			control_type = #{controlType,jdbcType=VARCHAR},
-			mpa = #{mpa,jdbcType=INTEGER},
-			factory = #{factory,jdbcType=VARCHAR},
-			custom_number = #{customNumber,jdbcType=VARCHAR},
-			use_company_code = #{useCompanyCode,jdbcType=VARCHAR},
-			device_position_code = #{devicePositionCode,jdbcType=CHAR},
-			agency = #{agency,jdbcType=VARCHAR},
-			reform_date = #{reformDate,jdbcType=TIMESTAMP},
-			install_date = #{installDate,jdbcType=TIMESTAMP},
-			inner_floor = #{innerFloor,jdbcType=TINYINT}
-		where id = #{id,jdbcType=BIGINT}
-	</update>
-
 </mapper>