Parcourir la source

优化 保存失败问题

java110 il y a 5 ans
Parent
commit
bc0f6491c1

+ 64 - 40
java110-bean/src/main/java/com/java110/po/roomRenovation/RoomRenovationPo.java

@@ -1,102 +1,126 @@
 package com.java110.po.roomRenovation;
 
 import java.io.Serializable;
-import java.util.Date;
 
 public class RoomRenovationPo implements Serializable {
 
     private String statusCd = "0";
-private String remark;
-private String isViolation;
-private String rId;
-private String roomId;
-private String roomName;
-private String personName;
-private String violationDesc;
-private String startTime;
-private String endTime;
-private String state;
-private String communityId;
-private String personTel;
-public String getStatusCd() {
+    private String remark;
+    private String isViolation;
+    private String rId;
+    private String roomId;
+    private String roomName;
+    private String personName;
+    private String violationDesc;
+    private String startTime;
+    private String endTime;
+    private String state;
+    private String communityId;
+    private String personTel;
+
+    public String getStatusCd() {
         return statusCd;
     }
-public void setStatusCd(String statusCd) {
+
+    public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
-public String getRemark() {
+
+    public String getRemark() {
         return remark;
     }
-public void setRemark(String remark) {
+
+    public void setRemark(String remark) {
         this.remark = remark;
     }
-public String getIsViolation() {
+
+    public String getIsViolation() {
         return isViolation;
     }
-public void setIsViolation(String isViolation) {
+
+    public void setIsViolation(String isViolation) {
         this.isViolation = isViolation;
     }
-public String getRId() {
+
+    public String getrId() {
         return rId;
     }
-public void setRId(String rId) {
+
+    public void setrId(String rId) {
         this.rId = rId;
     }
-public String getRoomId() {
+
+    public String getRoomId() {
         return roomId;
     }
-public void setRoomId(String roomId) {
+
+    public void setRoomId(String roomId) {
         this.roomId = roomId;
     }
-public String getRoomName() {
+
+    public String getRoomName() {
         return roomName;
     }
-public void setRoomName(String roomName) {
+
+    public void setRoomName(String roomName) {
         this.roomName = roomName;
     }
-public String getPersonName() {
+
+    public String getPersonName() {
         return personName;
     }
-public void setPersonName(String personName) {
+
+    public void setPersonName(String personName) {
         this.personName = personName;
     }
-public String getViolationDesc() {
+
+    public String getViolationDesc() {
         return violationDesc;
     }
-public void setViolationDesc(String violationDesc) {
+
+    public void setViolationDesc(String violationDesc) {
         this.violationDesc = violationDesc;
     }
-public String getStartTime() {
+
+    public String getStartTime() {
         return startTime;
     }
-public void setStartTime(String startTime) {
+
+    public void setStartTime(String startTime) {
         this.startTime = startTime;
     }
-public String getEndTime() {
+
+    public String getEndTime() {
         return endTime;
     }
-public void setEndTime(String endTime) {
+
+    public void setEndTime(String endTime) {
         this.endTime = endTime;
     }
-public String getState() {
+
+    public String getState() {
         return state;
     }
-public void setState(String state) {
+
+    public void setState(String state) {
         this.state = state;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
-public String getPersonTel() {
+
+    public String getPersonTel() {
         return personTel;
     }
-public void setPersonTel(String personTel) {
+
+    public void setPersonTel(String personTel) {
         this.personTel = personTel;
     }
 
 
-
 }

+ 139 - 140
java110-db/src/main/resources/mapper/community/RoomRenovationServiceDaoImplMapper.xml

@@ -5,165 +5,164 @@
 <mapper namespace="roomRenovationServiceDaoImpl">
 
 
-
-
-
     <!-- 保存装修申请信息 add by wuxw 2018-07-03 -->
     <insert id="saveRoomRenovationInfo" parameterType="Map">
         insert into room_renovation(
-remark,is_violation,r_id,room_id,room_name,person_name,violation_desc,start_time,end_time,state,community_id,person_tel
-) values (
-#{remark},#{isViolation},#{rId},#{roomId},#{roomName},#{personName},#{violationDesc},#{startTime},#{endTime},#{state},#{communityId},#{personTel}
-)
+        remark,is_violation,r_id,room_id,room_name,person_name,violation_desc,start_time,end_time,state,community_id,person_tel
+        ) values (
+        #{remark},#{isViolation},#{rId},#{roomId},#{roomName},#{personName},#{violationDesc},#{startTime},#{endTime},#{state},#{communityId},#{personTel}
+        )
     </insert>
 
 
-
     <!-- 查询装修申请信息 add by wuxw 2018-07-03 -->
     <select id="getRoomRenovationInfo" parameterType="Map" resultType="Map">
-        select  t.status_cd,t.status_cd statusCd,t.remark,t.is_violation,t.is_violation isViolation,t.r_id,t.r_id rId,t.room_id,t.room_id roomId,t.room_name,t.room_name roomName,t.person_name,t.person_name personName,t.violation_desc,t.violation_desc violationDesc,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.state,t.community_id,t.community_id communityId,t.person_tel,t.person_tel personTel 
-from room_renovation t 
-where 1 =1 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="isViolation !=null and isViolation != ''">
-   and t.is_violation= #{isViolation}
-</if> 
-<if test="rId !=null and rId != ''">
-   and t.r_id= #{rId}
-</if> 
-<if test="roomId !=null and roomId != ''">
-   and t.room_id= #{roomId}
-</if> 
-<if test="roomName !=null and roomName != ''">
-   and t.room_name= #{roomName}
-</if> 
-<if test="personName !=null and personName != ''">
-   and t.person_name= #{personName}
-</if> 
-<if test="violationDesc !=null and violationDesc != ''">
-   and t.violation_desc= #{violationDesc}
-</if> 
-<if test="startTime !=null and startTime != ''">
-   and t.start_time= #{startTime}
-</if> 
-<if test="endTime !=null and endTime != ''">
-   and t.end_time= #{endTime}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="personTel !=null and personTel != ''">
-   and t.person_tel= #{personTel}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.status_cd,t.status_cd statusCd,t.remark,t.is_violation,t.is_violation isViolation,t.r_id,t.r_id
+        rId,t.room_id,t.room_id roomId,t.room_name,t.room_name roomName,t.person_name,t.person_name
+        personName,t.violation_desc,t.violation_desc violationDesc,t.start_time,t.start_time
+        startTime,t.end_time,t.end_time endTime,t.state,t.community_id,t.community_id
+        communityId,t.person_tel,t.person_tel personTel
+        from room_renovation t
+        where 1 =1
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="isViolation !=null and isViolation != ''">
+            and t.is_violation= #{isViolation}
+        </if>
+        <if test="rId !=null and rId != ''">
+            and t.r_id= #{rId}
+        </if>
+        <if test="roomId !=null and roomId != ''">
+            and t.room_id= #{roomId}
+        </if>
+        <if test="roomName !=null and roomName != ''">
+            and t.room_name= #{roomName}
+        </if>
+        <if test="personName !=null and personName != ''">
+            and t.person_name= #{personName}
+        </if>
+        <if test="violationDesc !=null and violationDesc != ''">
+            and t.violation_desc= #{violationDesc}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            and t.end_time= #{endTime}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="personTel !=null and personTel != ''">
+            and t.person_tel= #{personTel}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改装修申请信息 add by wuxw 2018-07-03 -->
     <update id="updateRoomRenovationInfo" parameterType="Map">
-        update  room_renovation t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="remark !=null and remark != ''">
-, t.remark= #{remark}
-</if> 
-<if test="isViolation !=null and isViolation != ''">
-, t.is_violation= #{isViolation}
-</if> 
-<if test="roomId !=null and roomId != ''">
-, t.room_id= #{roomId}
-</if> 
-<if test="roomName !=null and roomName != ''">
-, t.room_name= #{roomName}
-</if> 
-<if test="personName !=null and personName != ''">
-, t.person_name= #{personName}
-</if> 
-<if test="violationDesc !=null and violationDesc != ''">
-, t.violation_desc= #{violationDesc}
-</if> 
-<if test="startTime !=null and startTime != ''">
-, t.start_time= #{startTime}
-</if> 
-<if test="endTime !=null and endTime != ''">
-, t.end_time= #{endTime}
-</if> 
-<if test="state !=null and state != ''">
-, t.state= #{state}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
-<if test="personTel !=null and personTel != ''">
-, t.person_tel= #{personTel}
-</if> 
- where 1=1 <if test="rId !=null and rId != ''">
-and t.r_id= #{rId}
-</if> 
+        update room_renovation t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="isViolation !=null and isViolation != ''">
+            , t.is_violation= #{isViolation}
+        </if>
+        <if test="roomId !=null and roomId != ''">
+            , t.room_id= #{roomId}
+        </if>
+        <if test="roomName !=null and roomName != ''">
+            , t.room_name= #{roomName}
+        </if>
+        <if test="personName !=null and personName != ''">
+            , t.person_name= #{personName}
+        </if>
+        <if test="violationDesc !=null and violationDesc != ''">
+            , t.violation_desc= #{violationDesc}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            , t.start_time= #{startTime}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            , t.end_time= #{endTime}
+        </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="personTel !=null and personTel != ''">
+            , t.person_tel= #{personTel}
+        </if>
+        where 1=1
+        <if test="rId !=null and rId != ''">
+            and t.r_id= #{rId}
+        </if>
 
     </update>
 
     <!-- 查询装修申请数量 add by wuxw 2018-07-03 -->
-     <select id="queryRoomRenovationsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from room_renovation t 
-where 1 =1 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="isViolation !=null and isViolation != ''">
-   and t.is_violation= #{isViolation}
-</if> 
-<if test="rId !=null and rId != ''">
-   and t.r_id= #{rId}
-</if> 
-<if test="roomId !=null and roomId != ''">
-   and t.room_id= #{roomId}
-</if> 
-<if test="roomName !=null and roomName != ''">
-   and t.room_name= #{roomName}
-</if> 
-<if test="personName !=null and personName != ''">
-   and t.person_name= #{personName}
-</if> 
-<if test="violationDesc !=null and violationDesc != ''">
-   and t.violation_desc= #{violationDesc}
-</if> 
-<if test="startTime !=null and startTime != ''">
-   and t.start_time= #{startTime}
-</if> 
-<if test="endTime !=null and endTime != ''">
-   and t.end_time= #{endTime}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="personTel !=null and personTel != ''">
-   and t.person_tel= #{personTel}
-</if> 
+    <select id="queryRoomRenovationsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from room_renovation t
+        where 1 =1
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="isViolation !=null and isViolation != ''">
+            and t.is_violation= #{isViolation}
+        </if>
+        <if test="rId !=null and rId != ''">
+            and t.r_id= #{rId}
+        </if>
+        <if test="roomId !=null and roomId != ''">
+            and t.room_id= #{roomId}
+        </if>
+        <if test="roomName !=null and roomName != ''">
+            and t.room_name= #{roomName}
+        </if>
+        <if test="personName !=null and personName != ''">
+            and t.person_name= #{personName}
+        </if>
+        <if test="violationDesc !=null and violationDesc != ''">
+            and t.violation_desc= #{violationDesc}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            and t.end_time= #{endTime}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="personTel !=null and personTel != ''">
+            and t.person_tel= #{personTel}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 1 - 0
service-community/src/main/java/com/java110/community/api/RoomRenovationApi.java

@@ -55,6 +55,7 @@ public class RoomRenovationApi {
         RoomRenovationPo roomRenovationPo = BeanConvertUtil.covertBean(reqJson, RoomRenovationPo.class);
         roomRenovationPo.setState("1000");
         roomRenovationPo.setIsViolation("N");
+
         return saveRoomRenovationBMOImpl.save(roomRenovationPo);
     }