Przeglądaj źródła

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

xiaogang 3 lat temu
rodzic
commit
0ed29a9b6e
32 zmienionych plików z 551 dodań i 616 usunięć
  1. 40 0
      java110-bean/src/main/java/com/java110/dto/questionAnswer/QuestionAnswerDto.java
  2. 10 0
      java110-bean/src/main/java/com/java110/dto/questionTitle/QuestionTitleDto.java
  3. 10 0
      java110-bean/src/main/java/com/java110/dto/user/UserQuestionAnswerDto.java
  4. 50 78
      java110-bean/src/main/java/com/java110/po/user/UserQuestionAnswerValuePo.java
  5. 0 89
      java110-bean/src/main/java/com/java110/po/userQuestionAnswerValue/UserQuestionAnswerValuePo.java
  6. 28 5
      java110-core/src/main/java/com/java110/core/cache/Java110RedisConfig.java
  7. 3 3
      java110-core/src/main/java/com/java110/core/cache/JedisClientTemplate.java
  8. 9 0
      java110-db/src/main/resources/mapper/report/ReportCommunityServiceDaoImplMapper.xml
  9. 1 0
      java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
  10. 12 0
      java110-db/src/main/resources/mapper/user/QuestionTitleV1ServiceDaoImplMapper.xml
  11. 16 2
      java110-db/src/main/resources/mapper/user/UserQuestionAnswerV1ServiceDaoImplMapper.xml
  12. 101 95
      java110-db/src/main/resources/mapper/user/UserQuestionAnswerValueV1ServiceDaoImplMapper.xml
  13. 8 0
      java110-interface/src/main/java/com/java110/intf/user/IUserQuestionAnswerV1InnerServiceSMO.java
  14. 6 1
      java110-interface/src/main/java/com/java110/intf/user/IUserQuestionAnswerValueV1InnerServiceSMO.java
  15. 2 0
      service-fee/src/main/java/com/java110/fee/cmd/feeConfig/SaveFeeConfigCmd.java
  16. 2 0
      service-fee/src/main/java/com/java110/fee/cmd/feeConfig/UpdateFeeConfigCmd.java
  17. 6 6
      service-fee/src/main/java/com/java110/fee/feeMonth/PayFeeMonthHelp.java
  18. 0 12
      service-report/src/main/java/com/java110/report/smo/impl/QueryPayFeeDetailInnerServiceSMOImpl.java
  19. 0 1
      service-user/src/main/java/com/java110/user/api/UserQuestionAnswerApi.java
  20. 1 6
      service-user/src/main/java/com/java110/user/bmo/userQuestionAnswerValue/impl/SaveUserQuestionAnswerValueBMOImpl.java
  21. 55 0
      service-user/src/main/java/com/java110/user/cmd/question/QueryOwnerQuestionAnswerCmd.java
  22. 133 0
      service-user/src/main/java/com/java110/user/cmd/question/SaveOwnerQuestionAnswerCmd.java
  23. 0 71
      service-user/src/main/java/com/java110/user/cmd/userQuestionAnswerValue/DeleteUserQuestionAnswerValueCmd.java
  24. 0 80
      service-user/src/main/java/com/java110/user/cmd/userQuestionAnswerValue/ListUserQuestionAnswerValueCmd.java
  25. 0 80
      service-user/src/main/java/com/java110/user/cmd/userQuestionAnswerValue/SaveUserQuestionAnswerValueCmd.java
  26. 0 75
      service-user/src/main/java/com/java110/user/cmd/userQuestionAnswerValue/UpdateUserQuestionAnswerValueCmd.java
  27. 3 0
      service-user/src/main/java/com/java110/user/dao/IUserQuestionAnswerV1ServiceDao.java
  28. 6 0
      service-user/src/main/java/com/java110/user/dao/IUserQuestionAnswerValueV1ServiceDao.java
  29. 9 0
      service-user/src/main/java/com/java110/user/dao/impl/UserQuestionAnswerV1ServiceDaoImpl.java
  30. 8 0
      service-user/src/main/java/com/java110/user/dao/impl/UserQuestionAnswerValueV1ServiceDaoImpl.java
  31. 20 10
      service-user/src/main/java/com/java110/user/smo/impl/UserQuestionAnswerV1InnerServiceSMOImpl.java
  32. 12 2
      service-user/src/main/java/com/java110/user/smo/impl/UserQuestionAnswerValueV1InnerServiceSMOImpl.java

+ 40 - 0
java110-bean/src/main/java/com/java110/dto/questionAnswer/QuestionAnswerDto.java

@@ -40,10 +40,18 @@ public class QuestionAnswerDto extends PageDto implements Serializable {
 
     private long votedCount; // 已投票人数
 
+    private String ownerName;
+
+    private String link;
+
+    private String roomName;
+
     private List<QuestionTitleValueDto> titleValues;
 
     private String state;
 
+    private String userQaId;
+
     public String getQaName() {
         return qaName;
     }
@@ -164,4 +172,36 @@ public class QuestionAnswerDto extends PageDto implements Serializable {
     public void setState(String state) {
         this.state = state;
     }
+
+    public String getOwnerName() {
+        return ownerName;
+    }
+
+    public void setOwnerName(String ownerName) {
+        this.ownerName = ownerName;
+    }
+
+    public String getLink() {
+        return link;
+    }
+
+    public void setLink(String link) {
+        this.link = link;
+    }
+
+    public String getRoomName() {
+        return roomName;
+    }
+
+    public void setRoomName(String roomName) {
+        this.roomName = roomName;
+    }
+
+    public String getUserQaId() {
+        return userQaId;
+    }
+
+    public void setUserQaId(String userQaId) {
+        this.userQaId = userQaId;
+    }
 }

+ 10 - 0
java110-bean/src/main/java/com/java110/dto/questionTitle/QuestionTitleDto.java

@@ -32,6 +32,8 @@ public class QuestionTitleDto extends PageDto implements Serializable {
 
     private String statusCd = "0";
 
+    private String qaId;
+
 
     public String getTitleType() {
         return titleType;
@@ -89,4 +91,12 @@ public class QuestionTitleDto extends PageDto implements Serializable {
     public void setTitleValues(List<QuestionTitleValueDto> titleValues) {
         this.titleValues = titleValues;
     }
+
+    public String getQaId() {
+        return qaId;
+    }
+
+    public void setQaId(String qaId) {
+        this.qaId = qaId;
+    }
 }

+ 10 - 0
java110-bean/src/main/java/com/java110/dto/user/UserQuestionAnswerDto.java

@@ -34,6 +34,8 @@ public class UserQuestionAnswerDto extends PageDto implements Serializable {
 
     private String statusCd = "0";
 
+    private String qaType;
+
     private List<UserQuestionAnswerValueDto> values;
 
 
@@ -141,4 +143,12 @@ public class UserQuestionAnswerDto extends PageDto implements Serializable {
     public void setValues(List<UserQuestionAnswerValueDto> values) {
         this.values = values;
     }
+
+    public String getQaType() {
+        return qaType;
+    }
+
+    public void setQaType(String qaType) {
+        this.qaType = qaType;
+    }
 }

+ 50 - 78
java110-bean/src/main/java/com/java110/po/user/UserQuestionAnswerValuePo.java

@@ -1,117 +1,89 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.java110.po.user;
 
 import java.io.Serializable;
-
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2023-07-14 13:27:51 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
 public class UserQuestionAnswerValuePo implements Serializable {
 
-    private String score;
     private String valueId;
-    private String titleId;
-    private String answerType;
-    private String objId;
-    private String userQaId;
-    private String valueContent;
-    private String personId;
-    private String statusCd = "0";
-    private String objType;
-    private String userTitleId;
-    private String qaId;
-
-    public String getScore() {
-        return score;
-    }
-
-    public void setScore(String score) {
-        this.score = score;
-    }
-
-    public String getValueId() {
+private String titleId;
+private String userQaId;
+private String valueContent;
+private String statusCd = "0";
+private String communityId;
+private String userTitleId;
+private String qaId;
+public String getValueId() {
         return valueId;
     }
-
-    public void setValueId(String valueId) {
+public void setValueId(String valueId) {
         this.valueId = valueId;
     }
-
-    public String getTitleId() {
+public String getTitleId() {
         return titleId;
     }
-
-    public void setTitleId(String titleId) {
+public void setTitleId(String titleId) {
         this.titleId = titleId;
     }
-
-    public String getAnswerType() {
-        return answerType;
-    }
-
-    public void setAnswerType(String answerType) {
-        this.answerType = answerType;
-    }
-
-    public String getObjId() {
-        return objId;
-    }
-
-    public void setObjId(String objId) {
-        this.objId = objId;
-    }
-
-    public String getUserQaId() {
+public String getUserQaId() {
         return userQaId;
     }
-
-    public void setUserQaId(String userQaId) {
+public void setUserQaId(String userQaId) {
         this.userQaId = userQaId;
     }
-
-    public String getValueContent() {
+public String getValueContent() {
         return valueContent;
     }
-
-    public void setValueContent(String valueContent) {
+public void setValueContent(String valueContent) {
         this.valueContent = valueContent;
     }
-
-    public String getPersonId() {
-        return personId;
-    }
-
-    public void setPersonId(String personId) {
-        this.personId = personId;
-    }
-
-    public String getStatusCd() {
+public String getStatusCd() {
         return statusCd;
     }
-
-    public void setStatusCd(String statusCd) {
+public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
-
-    public String getObjType() {
-        return objType;
+public String getCommunityId() {
+        return communityId;
     }
-
-    public void setObjType(String objType) {
-        this.objType = objType;
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
     }
-
-    public String getUserTitleId() {
+public String getUserTitleId() {
         return userTitleId;
     }
-
-    public void setUserTitleId(String userTitleId) {
+public void setUserTitleId(String userTitleId) {
         this.userTitleId = userTitleId;
     }
-
-    public String getQaId() {
+public String getQaId() {
         return qaId;
     }
-
-    public void setQaId(String qaId) {
+public void setQaId(String qaId) {
         this.qaId = qaId;
     }
 
 
+
 }

+ 0 - 89
java110-bean/src/main/java/com/java110/po/userQuestionAnswerValue/UserQuestionAnswerValuePo.java

@@ -1,89 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.po.userQuestionAnswerValue;
-
-import java.io.Serializable;
-import java.util.Date;
-/**
- * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
- * add by 吴学文 at 2023-07-14 13:27:51 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-public class UserQuestionAnswerValuePo implements Serializable {
-
-    private String valueId;
-private String titleId;
-private String userQaId;
-private String valueContent;
-private String statusCd = "0";
-private String communityId;
-private String userTitleId;
-private String qaId;
-public String getValueId() {
-        return valueId;
-    }
-public void setValueId(String valueId) {
-        this.valueId = valueId;
-    }
-public String getTitleId() {
-        return titleId;
-    }
-public void setTitleId(String titleId) {
-        this.titleId = titleId;
-    }
-public String getUserQaId() {
-        return userQaId;
-    }
-public void setUserQaId(String userQaId) {
-        this.userQaId = userQaId;
-    }
-public String getValueContent() {
-        return valueContent;
-    }
-public void setValueContent(String valueContent) {
-        this.valueContent = valueContent;
-    }
-public String getStatusCd() {
-        return statusCd;
-    }
-public void setStatusCd(String statusCd) {
-        this.statusCd = statusCd;
-    }
-public String getCommunityId() {
-        return communityId;
-    }
-public void setCommunityId(String communityId) {
-        this.communityId = communityId;
-    }
-public String getUserTitleId() {
-        return userTitleId;
-    }
-public void setUserTitleId(String userTitleId) {
-        this.userTitleId = userTitleId;
-    }
-public String getQaId() {
-        return qaId;
-    }
-public void setQaId(String qaId) {
-        this.qaId = qaId;
-    }
-
-
-
-}

Plik diff jest za duży
+ 28 - 5
java110-core/src/main/java/com/java110/core/cache/Java110RedisConfig.java


+ 3 - 3
java110-core/src/main/java/com/java110/core/cache/JedisClientTemplate.java

@@ -32,7 +32,7 @@ public class JedisClientTemplate implements Jedis {
 
     @Override
     public String set(byte[] key, byte[] value) {
-        redisTemplate.opsForValue().set(key, value);
+        redisTemplate.opsForValue().set(new String(key), value);
         return "";
     }
 
@@ -75,7 +75,7 @@ public class JedisClientTemplate implements Jedis {
 
     @Override
     public byte[] get(byte[] key) {
-        Object value = redisTemplate.opsForValue().get(key);
+        Object value = redisTemplate.opsForValue().get(new String(key));
         if (value == null) {
             return null;
         }
@@ -133,7 +133,7 @@ public class JedisClientTemplate implements Jedis {
 
     @Override
     public Long del(byte[] key) {
-        redisTemplate.delete(key);
+        redisTemplate.delete(new String(key));
         return 1L;
     }
 

+ 9 - 0
java110-db/src/main/resources/mapper/report/ReportCommunityServiceDaoImplMapper.xml

@@ -387,11 +387,20 @@
         feeName,t.payment_cycle paymentCycle,t.start_time startTime,t.end_time
         endTime,t.community_id communityId,t.deduct_from deductFrom,
         t.pay_online payOnline,t.scale,t.decimal_place decimalPlace,t.units,t.b_id bId,
+        td1.name feeTypeCdName,td2.name feeFlagName,td3.name billTypeName,td4.name computingFormulaName,
         uu.`name` userName
         from business_pay_fee_config t
         left join c_business cb on t.b_id = cb.b_id
         left join c_orders co on cb.o_id = co.o_id
         left join u_user uu on co.user_id = uu.user_id
+        left join t_dict td1 on t.fee_type_cd = td1.status_cd and td1.table_name = 'pay_fee_config' and
+        td1.table_columns = 'fee_type_cd'
+        left join t_dict td2 on t.fee_flag = td2.status_cd and td2.table_name = 'pay_fee_config' and td2.table_columns =
+        'fee_flag'
+        left join t_dict td3 on t.bill_type = td3.status_cd and td3.table_name = 'pay_fee_config' and td3.table_columns
+        = 'bill_type'
+        left join t_dict td4 on t.computing_formula = td4.status_cd and td4.table_name = 'pay_fee_config' and
+        td4.table_columns = 'computing_formula'
         where 1=1
         and t.config_id = #{configId}
         and t.community_id = #{communityId}

+ 1 - 0
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml

@@ -1931,6 +1931,7 @@
         left join t_dict d on t.prime_rate = d.status_cd and d.table_name="pay_fee_detail" and
         d.table_columns="prime_rate"
         where t.status_cd = '0'
+        and pfdd.discount_price> 0
         <if test="roomNum !=null and roomNum != ''">
             and br.room_num= #{roomNum}
         </if>

+ 12 - 0
java110-db/src/main/resources/mapper/user/QuestionTitleV1ServiceDaoImplMapper.xml

@@ -20,7 +20,13 @@
         select t.title_type,t.title_type titleType,t.title_id,t.title_id titleId,t.status_cd,t.status_cd
         statusCd,t.community_id,t.community_id communityId,t.qa_title,t.qa_title qaTitle,t.create_time createTime
         from question_title t
+        <if test="qaId !=null and qaId != ''">
+             left join question_answer_title_rel qatr on t.title_id = qatr.title_id and qatr.status_cd = '0'
+        </if>
         where 1 =1
+        <if test="qaId !=null and qaId != ''">
+             and qatr.qa_id = #{qaId}
+        </if>
         <if test="titleType !=null and titleType != ''">
             and t.title_type= #{titleType}
         </if>
@@ -70,7 +76,13 @@
     <select id="queryQuestionTitlesCount" parameterType="Map" resultType="Map">
         select count(1) count
         from question_title t
+        <if test="qaId !=null and qaId != ''">
+            left join question_answer_title_rel qatr on t.title_id = qatr.title_id and qatr.status_cd = '0'
+        </if>
         where 1 =1
+        <if test="qaId !=null and qaId != ''">
+            and qatr.qa_id = #{qaId}
+        </if>
         <if test="titleType !=null and titleType != ''">
             and t.title_type= #{titleType}
         </if>

+ 16 - 2
java110-db/src/main/resources/mapper/user/UserQuestionAnswerV1ServiceDaoImplMapper.xml

@@ -155,8 +155,22 @@
         <if test="qaId !=null and qaId != ''">
             and t.qa_id= #{qaId}
         </if>
-
-
+    </select>
+    <select id="queryOwnerQuestionAnswers" parameterType="Map" resultType="Map">
+        select qa.qa_name qaName,qa.qa_type qaType,qa.start_time startTime,qa.end_time endTime,qa.remark,
+        qa.community_id communityId,qa.qa_id qaId,td.`name` qaTypeName,qa.content,
+        t.owner_name ownerName,t.link,t.room_name roomName,t.user_qa_id userQaId
+        from user_question_answer t
+        left join question_answer qa on t.qa_id = qa.qa_id and qa.status_cd = '0'
+        LEFT JOIN t_dict td on td.status_cd = qa.qa_type and td.table_name = 'question_answer' and td.table_columns = 'qa_type'
+        where 1=1
+            and t.status_cd = '0'
+            and t.community_id = #{communityId}
+            and t.link = #{link}
+            and qa.qa_type = #{qaType}
+            and qa.state = 'C'
+            and qa.start_time &lt; NOW()
+            and qa.end_time &gt; NOW()
     </select>
 
 </mapper>

+ 101 - 95
java110-db/src/main/resources/mapper/user/UserQuestionAnswerValueV1ServiceDaoImplMapper.xml

@@ -5,120 +5,126 @@
 <mapper namespace="userQuestionAnswerValueV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存问卷答案信息 add by wuxw 2018-07-03 -->
     <insert id="saveUserQuestionAnswerValueInfo" parameterType="Map">
         insert into user_question_answer_value(
-value_id,title_id,user_qa_id,value_content,community_id,user_title_id,qa_id
-) values (
-#{valueId},#{titleId},#{userQaId},#{valueContent},#{communityId},#{userTitleId},#{qaId}
-)
+        value_id,title_id,user_qa_id,value_content,community_id,user_title_id,qa_id
+        ) values (
+        #{valueId},#{titleId},#{userQaId},#{valueContent},#{communityId},#{userTitleId},#{qaId}
+        )
     </insert>
 
-
+    <insert id="saveUserQuestionAnswerValues" parameterType="Map">
+        insert into user_question_answer_value(
+        value_id,title_id,user_qa_id,value_content,community_id,user_title_id,qa_id
+        ) values
+        <foreach collection="userUserQuestionAnswerValues" item="item" separator=",">
+        (#{item.valueId},#{item.titleId},#{item.userQaId},#{item.valueContent},#{item.communityId},#{item.userTitleId},#{item.qaId})
+        </foreach>
+    </insert>
 
     <!-- 查询问卷答案信息 add by wuxw 2018-07-03 -->
     <select id="getUserQuestionAnswerValueInfo" parameterType="Map" resultType="Map">
-        select  t.value_id,t.value_id valueId,t.title_id,t.title_id titleId,t.user_qa_id,t.user_qa_id userQaId,t.value_content,t.value_content valueContent,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.user_title_id,t.user_title_id userTitleId,t.qa_id,t.qa_id qaId 
-from user_question_answer_value t 
-where 1 =1 
-<if test="valueId !=null and valueId != ''">
-   and t.value_id= #{valueId}
-</if> 
-<if test="titleId !=null and titleId != ''">
-   and t.title_id= #{titleId}
-</if> 
-<if test="userQaId !=null and userQaId != ''">
-   and t.user_qa_id= #{userQaId}
-</if> 
-<if test="valueContent !=null and valueContent != ''">
-   and t.value_content= #{valueContent}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="userTitleId !=null and userTitleId != ''">
-   and t.user_title_id= #{userTitleId}
-</if> 
-<if test="qaId !=null and qaId != ''">
-   and t.qa_id= #{qaId}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.value_id,t.value_id valueId,t.title_id,t.title_id titleId,t.user_qa_id,t.user_qa_id
+        userQaId,t.value_content,t.value_content valueContent,t.status_cd,t.status_cd
+        statusCd,t.community_id,t.community_id communityId,t.user_title_id,t.user_title_id userTitleId,t.qa_id,t.qa_id
+        qaId
+        from user_question_answer_value t
+        where 1 =1
+        <if test="valueId !=null and valueId != ''">
+            and t.value_id= #{valueId}
+        </if>
+        <if test="titleId !=null and titleId != ''">
+            and t.title_id= #{titleId}
+        </if>
+        <if test="userQaId !=null and userQaId != ''">
+            and t.user_qa_id= #{userQaId}
+        </if>
+        <if test="valueContent !=null and valueContent != ''">
+            and t.value_content= #{valueContent}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="userTitleId !=null and userTitleId != ''">
+            and t.user_title_id= #{userTitleId}
+        </if>
+        <if test="qaId !=null and qaId != ''">
+            and t.qa_id= #{qaId}
+        </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="updateUserQuestionAnswerValueInfo" parameterType="Map">
-        update  user_question_answer_value t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="valueId !=null and valueId != ''">
-, t.value_id= #{valueId}
-</if> 
-<if test="titleId !=null and titleId != ''">
-, t.title_id= #{titleId}
-</if> 
-<if test="userQaId !=null and userQaId != ''">
-, t.user_qa_id= #{userQaId}
-</if> 
-<if test="valueContent !=null and valueContent != ''">
-, t.value_content= #{valueContent}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
-<if test="qaId !=null and qaId != ''">
-, t.qa_id= #{qaId}
-</if> 
- where 1=1 <if test="userTitleId !=null and userTitleId != ''">
-and t.user_title_id= #{userTitleId}
-</if> 
+        update user_question_answer_value t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="valueId !=null and valueId != ''">
+            , t.value_id= #{valueId}
+        </if>
+        <if test="titleId !=null and titleId != ''">
+            , t.title_id= #{titleId}
+        </if>
+        <if test="userQaId !=null and userQaId != ''">
+            , t.user_qa_id= #{userQaId}
+        </if>
+        <if test="valueContent !=null and valueContent != ''">
+            , t.value_content= #{valueContent}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="qaId !=null and qaId != ''">
+            , t.qa_id= #{qaId}
+        </if>
+        where 1=1
+        <if test="userTitleId !=null and userTitleId != ''">
+            and t.user_title_id= #{userTitleId}
+        </if>
 
     </update>
 
     <!-- 查询问卷答案数量 add by wuxw 2018-07-03 -->
-     <select id="queryUserQuestionAnswerValuesCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from user_question_answer_value t 
-where 1 =1 
-<if test="valueId !=null and valueId != ''">
-   and t.value_id= #{valueId}
-</if> 
-<if test="titleId !=null and titleId != ''">
-   and t.title_id= #{titleId}
-</if> 
-<if test="userQaId !=null and userQaId != ''">
-   and t.user_qa_id= #{userQaId}
-</if> 
-<if test="valueContent !=null and valueContent != ''">
-   and t.value_content= #{valueContent}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="userTitleId !=null and userTitleId != ''">
-   and t.user_title_id= #{userTitleId}
-</if> 
-<if test="qaId !=null and qaId != ''">
-   and t.qa_id= #{qaId}
-</if> 
+    <select id="queryUserQuestionAnswerValuesCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from user_question_answer_value t
+        where 1 =1
+        <if test="valueId !=null and valueId != ''">
+            and t.value_id= #{valueId}
+        </if>
+        <if test="titleId !=null and titleId != ''">
+            and t.title_id= #{titleId}
+        </if>
+        <if test="userQaId !=null and userQaId != ''">
+            and t.user_qa_id= #{userQaId}
+        </if>
+        <if test="valueContent !=null and valueContent != ''">
+            and t.value_content= #{valueContent}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="userTitleId !=null and userTitleId != ''">
+            and t.user_title_id= #{userTitleId}
+        </if>
+        <if test="qaId !=null and qaId != ''">
+            and t.qa_id= #{qaId}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 8 - 0
java110-interface/src/main/java/com/java110/intf/user/IUserQuestionAnswerV1InnerServiceSMO.java

@@ -16,6 +16,7 @@
 package com.java110.intf.user;
 
 import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.questionAnswer.QuestionAnswerDto;
 import com.java110.dto.user.UserQuestionAnswerDto;
 import com.java110.po.user.UserQuestionAnswerPo;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -69,4 +70,11 @@ public interface IUserQuestionAnswerV1InnerServiceSMO {
     int queryUserQuestionAnswersCount(@RequestBody UserQuestionAnswerDto userQuestionAnswerDto);
 
 
+    /**
+     * 查询业主需要投票
+     * @param userQuestionAnswerDto
+     * @return
+     */
+    @RequestMapping(value = "/queryOwnerQuestionAnswers", method = RequestMethod.POST)
+    List<QuestionAnswerDto> queryOwnerQuestionAnswers(@RequestBody UserQuestionAnswerDto userQuestionAnswerDto);
 }

+ 6 - 1
java110-interface/src/main/java/com/java110/intf/user/IUserQuestionAnswerValueV1InnerServiceSMO.java

@@ -17,7 +17,7 @@ package com.java110.intf.user;
 
 import com.java110.config.feign.FeignConfiguration;
 import com.java110.dto.user.UserQuestionAnswerValueDto;
-import com.java110.po.userQuestionAnswerValue.UserQuestionAnswerValuePo;
+import com.java110.po.user.UserQuestionAnswerValuePo;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -41,6 +41,9 @@ public interface IUserQuestionAnswerValueV1InnerServiceSMO {
     @RequestMapping(value = "/saveUserQuestionAnswerValue", method = RequestMethod.POST)
     public int saveUserQuestionAnswerValue(@RequestBody  UserQuestionAnswerValuePo userQuestionAnswerValuePo);
 
+    @RequestMapping(value = "/saveUserQuestionAnswerValues", method = RequestMethod.POST)
+    int saveUserQuestionAnswerValues(@RequestBody  List<UserQuestionAnswerValuePo> tmpUserUserQuestionAnswerValues);
+
     @RequestMapping(value = "/updateUserQuestionAnswerValue", method = RequestMethod.POST)
     public int updateUserQuestionAnswerValue(@RequestBody  UserQuestionAnswerValuePo userQuestionAnswerValuePo);
 
@@ -65,4 +68,6 @@ public interface IUserQuestionAnswerValueV1InnerServiceSMO {
      */
     @RequestMapping(value = "/queryUserQuestionAnswerValuesCount", method = RequestMethod.POST)
     int queryUserQuestionAnswerValuesCount(@RequestBody UserQuestionAnswerValueDto userQuestionAnswerValueDto);
+
+
 }

+ 2 - 0
service-fee/src/main/java/com/java110/fee/cmd/feeConfig/SaveFeeConfigCmd.java

@@ -2,6 +2,7 @@ package com.java110.fee.cmd.feeConfig;
 
 import com.alibaba.fastjson.JSONObject;
 import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
@@ -52,6 +53,7 @@ public class SaveFeeConfigCmd extends Cmd {
     }
 
     @Override
+    @Java110Transactional
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
         reqJson.put("configId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId));
         reqJson.put("isDefault", "F");

+ 2 - 0
service-fee/src/main/java/com/java110/fee/cmd/feeConfig/UpdateFeeConfigCmd.java

@@ -2,6 +2,7 @@ package com.java110.fee.cmd.feeConfig;
 
 import com.alibaba.fastjson.JSONObject;
 import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
@@ -42,6 +43,7 @@ public class UpdateFeeConfigCmd extends Cmd {
     }
 
     @Override
+    @Java110Transactional
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
         FeeConfigDto feeConfigDto = new FeeConfigDto();
         feeConfigDto.setCommunityId(reqJson.getString("communityId"));

+ 6 - 6
service-fee/src/main/java/com/java110/fee/feeMonth/PayFeeMonthHelp.java

@@ -141,7 +141,7 @@ public class PayFeeMonthHelp implements IPayFeeMonthHelp {
             if (day < 1) {
                 day = 1;
             }
-            dayReceivableAmount = receivableAmount.divide(new BigDecimal(day), 4, BigDecimal.ROUND_HALF_UP);// 日 应收
+            dayReceivableAmount = receivableAmount.divide(new BigDecimal(day), 8, BigDecimal.ROUND_HALF_UP);// 日 应收
         }
 
         // todo 寻找第一个自然月 一日
@@ -165,16 +165,16 @@ public class PayFeeMonthHelp implements IPayFeeMonthHelp {
             curMonthMaxDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
 
             // todo 如果不是整月,则转换为按天计算
-            if (curDay != curMonthMaxDay) {
+//            if (curDay != curMonthMaxDay) {
                 //todo 周期性费用 日应收重新算
                 if (!FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())) {
-                    dayReceivableAmount = receivableAmount.divide(new BigDecimal(curMonthMaxDay), 4, BigDecimal.ROUND_HALF_UP);// 日 实收
+                    dayReceivableAmount = receivableAmount.divide(new BigDecimal(curMonthMaxDay), 8, BigDecimal.ROUND_HALF_UP);// 日 实收
                 }
                 // todo 计算 应收
                 curMonthReceivableAmount = new BigDecimal(curDay).multiply(dayReceivableAmount).setScale(4, BigDecimal.ROUND_HALF_UP);
-            } else { // todo 如果是整月 那就按月计算,以免 转换成天再 乘以天数后的误差
-                curMonthReceivableAmount = receivableAmount;
-            }
+//            } else { // todo 如果是整月 那就按月计算,以免 转换成天再 乘以天数后的误差
+//                curMonthReceivableAmount = receivableAmount;
+//            }
             // todo 保存数据到pay_fee_detail_month
             toSavePayFeeDetailMonth(curMonthReceivableAmount.doubleValue(), 0, null, feeDto, payFeeMonthOwnerDto, payFeeDetailMonthPos, startMonthDayTime, deadlineTime);
 

+ 0 - 12
service-report/src/main/java/com/java110/report/smo/impl/QueryPayFeeDetailInnerServiceSMOImpl.java

@@ -65,10 +65,6 @@ public class QueryPayFeeDetailInnerServiceSMOImpl implements IQueryPayFeeDetailI
         List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null;
         ReportFeeMonthStatisticsTotalDto reportFeeMonthStatisticsTotalDto = new ReportFeeMonthStatisticsTotalDto();
         List<ReportFeeMonthStatisticsDto> reportList = new ArrayList<>();
-        //查询该小区下的费用项目
-        FeeConfigDto feeConfigDto = new FeeConfigDto();
-        feeConfigDto.setCommunityId(reportFeeMonthStatisticsDto.getCommunityId());
-        List<FeeConfigDto> feeConfigDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto);
         //应收总金额(大计)
         Double allReceivableAmount = 0.0;
         //实收金额(大计)
@@ -154,12 +150,6 @@ public class QueryPayFeeDetailInnerServiceSMOImpl implements IQueryPayFeeDetailI
             Double totalLateFee = 0.0;
             List<String> ownerIds = new ArrayList<>();
             for (ReportFeeMonthStatisticsDto reportFeeMonthStatistics : reportFeeMonthStatisticsDtos) {
-//                FeeDetailDto feeDetailDto = new FeeDetailDto();
-//                feeDetailDto.setDetailId(reportFeeMonthStatistics.getDetailId());
-//                List<FeeDetailDto> feeDetailDtos = feeDetailInnerServiceSMOImpl.queryFeeDetails(feeDetailDto);
-//                Assert.listOnlyOne(feeDetailDtos, "查询费用明细表错误");
-//                reportFeeMonthStatistics.setReceivableAmount(feeDetailDtos.get(0).getReceivableAmount());
-//                reportFeeMonthStatistics.setPayableAmount(feeDetailDtos.get(0).getPayableAmount());
                 //应收金额
                 Double receivableAmount = Double.valueOf(reportFeeMonthStatistics.getReceivableAmount());
                 //实收金额
@@ -251,8 +241,6 @@ public class QueryPayFeeDetailInnerServiceSMOImpl implements IQueryPayFeeDetailI
                 if (!StringUtil.isEmpty(reportFeeMonthStatistics.getImportFeeName())) {
                     reportFeeMonthStatistics.setFeeName(reportFeeMonthStatistics.getImportFeeName());
                 }
-                //费用项目
-                reportFeeMonthStatistics.setFeeConfigDtos(feeConfigDtos);
                 if (!StringUtil.isEmpty(reportFeeMonthStatistics.getRepairId())) {
                     RepairDto repairDto = new RepairDto();
                     repairDto.setRepairId(reportFeeMonthStatistics.getRepairId());

+ 0 - 1
service-user/src/main/java/com/java110/user/api/UserQuestionAnswerApi.java

@@ -167,7 +167,6 @@ public class UserQuestionAnswerApi {
 
         UserQuestionAnswerValuePo userQuestionAnswerValuePo = BeanConvertUtil.covertBean(reqJson, UserQuestionAnswerValuePo.class);
 
-        userQuestionAnswerValuePo.setPersonId(userId);
 
 
         return saveUserQuestionAnswerValueBMOImpl.save(userQuestionAnswerValuePo, questionAnswerTitles);

+ 1 - 6
service-user/src/main/java/com/java110/user/bmo/userQuestionAnswerValue/impl/SaveUserQuestionAnswerValueBMOImpl.java

@@ -60,12 +60,7 @@ public class SaveUserQuestionAnswerValueBMOImpl implements ISaveUserQuestionAnsw
         for (int questionAnswerTitleIndex = 0; questionAnswerTitleIndex < questionAnswerTitles.size(); questionAnswerTitleIndex++) {
             titleObj = questionAnswerTitles.getJSONObject(questionAnswerTitleIndex);
             tmpUserUserQuestionAnswerValue = new UserQuestionAnswerValuePo();
-            tmpUserUserQuestionAnswerValue.setAnswerType(userQuestionAnswerValuePo.getAnswerType());
-            tmpUserUserQuestionAnswerValue.setObjId(userQuestionAnswerValuePo.getObjId());
-            tmpUserUserQuestionAnswerValue.setObjType(userQuestionAnswerValuePo.getObjType());
-            tmpUserUserQuestionAnswerValue.setPersonId(userQuestionAnswerValuePo.getPersonId());
             tmpUserUserQuestionAnswerValue.setQaId(userQuestionAnswerValuePo.getQaId());
-            tmpUserUserQuestionAnswerValue.setScore("0");
             tmpUserUserQuestionAnswerValue.setTitleId(titleObj.getString("titleId"));
             tmpUserUserQuestionAnswerValue.setUserQaId(userQuestionAnswerPo.getUserQaId());
             tmpUserUserQuestionAnswerValue.setUserTitleId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_userTitleId));
@@ -85,7 +80,7 @@ public class SaveUserQuestionAnswerValueBMOImpl implements ISaveUserQuestionAnsw
         }
 
         //如果是领导 评价 直接返回
-        String answerType = userQuestionAnswerValuePo.getAnswerType();
+        String answerType = "";
 
         if("2003".equals(answerType)){
             userQuestionAnswerPo.setState("1202");

+ 55 - 0
service-user/src/main/java/com/java110/user/cmd/question/QueryOwnerQuestionAnswerCmd.java

@@ -0,0 +1,55 @@
+package com.java110.user.cmd.question;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.questionAnswer.QuestionAnswerDto;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.user.UserQuestionAnswerDto;
+import com.java110.intf.user.IUserQuestionAnswerV1InnerServiceSMO;
+import com.java110.intf.user.IUserV1InnerServiceSMO;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.text.ParseException;
+import java.util.List;
+
+/**
+ * 查询用户投票 或者问卷
+ */
+@Java110Cmd(serviceCode = "question.queryOwnerQuestionAnswer")
+public class QueryOwnerQuestionAnswerCmd extends Cmd {
+
+    @Autowired
+    private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl;
+
+    @Autowired
+    private IUserQuestionAnswerV1InnerServiceSMO userQuestionAnswerV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+        Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息");
+        Assert.hasKeyAndValue(reqJson, "qaType", "未包含qaType");
+        String userId = context.getReqHeaders().get("user-id");
+        Assert.hasLength(userId, "用户未登录");
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+        String userId = context.getReqHeaders().get("user-id");
+        UserDto userDto = new UserDto();
+        userDto.setUserId(userId);
+        List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto);
+        Assert.listOnlyOne(userDtos, "用户不存在");
+        UserQuestionAnswerDto userQuestionAnswerDto = new UserQuestionAnswerDto();
+        userQuestionAnswerDto.setLink(userDtos.get(0).getTel());
+        userQuestionAnswerDto.setCommunityId(reqJson.getString("communityId"));
+        userQuestionAnswerDto.setQaType(reqJson.getString("qaType"));
+        List<QuestionAnswerDto> questionAnswerDtos = userQuestionAnswerV1InnerServiceSMOImpl.queryOwnerQuestionAnswers(userQuestionAnswerDto);
+        context.setResponseEntity(ResultVo.createResponseEntity(questionAnswerDtos));
+    }
+}

+ 133 - 0
service-user/src/main/java/com/java110/user/cmd/question/SaveOwnerQuestionAnswerCmd.java

@@ -0,0 +1,133 @@
+package com.java110.user.cmd.question;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.user.UserQuestionAnswerDto;
+import com.java110.intf.user.IUserQuestionAnswerV1InnerServiceSMO;
+import com.java110.intf.user.IUserQuestionAnswerValueV1InnerServiceSMO;
+import com.java110.intf.user.IUserV1InnerServiceSMO;
+import com.java110.po.user.UserQuestionAnswerPo;
+import com.java110.po.user.UserQuestionAnswerValuePo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.StringUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+
+@Java110Cmd(serviceCode = "question.saveOwnerQuestionAnswer")
+public class SaveOwnerQuestionAnswerCmd extends Cmd {
+
+    @Autowired
+    private IUserQuestionAnswerV1InnerServiceSMO userQuestionAnswerV1InnerServiceSMOImpl;
+
+    @Autowired
+    private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl;
+
+    @Autowired
+    private IUserQuestionAnswerValueV1InnerServiceSMO userQuestionAnswerValueV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+        Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区");
+        Assert.hasKeyAndValue(reqJson, "userQaId", "未包含题目");
+
+        Assert.hasKey(reqJson, "questionAnswerTitles", "未包含答案");
+
+        JSONArray questionAnswerTitles = reqJson.getJSONArray("questionAnswerTitles");
+
+        if (questionAnswerTitles == null || questionAnswerTitles.size() < 1) {
+            throw new IllegalArgumentException("未包含答案");
+        }
+
+        JSONObject titleObj = null;
+        for (int questionAnswerTitleIndex = 0; questionAnswerTitleIndex < questionAnswerTitles.size(); questionAnswerTitleIndex++) {
+            titleObj = questionAnswerTitles.getJSONObject(questionAnswerTitleIndex);
+            if (titleObj.containsKey("qaTitle") && !StringUtil.isEmpty(titleObj.getString("qaTitle"))) {
+                Assert.hasKeyAndValue(titleObj, "valueContent", titleObj.getString("qaTitle") + ",未填写答案");
+            } else {
+                Assert.hasKeyAndValue(titleObj, "valueContent", "未填写答案");
+            }
+        }
+
+        String userId = context.getReqHeaders().get("user-id");
+        Assert.hasLength(userId, "用户未登录");
+
+        UserDto userDto = new UserDto();
+        userDto.setUserId(userId);
+        List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto);
+
+        Assert.listOnlyOne(userDtos, "用户不存在");
+
+        UserQuestionAnswerDto userQuestionAnswerDto = new UserQuestionAnswerDto();
+        userQuestionAnswerDto.setUserQaId(reqJson.getString("userQaId"));
+        userQuestionAnswerDto.setCommunityId(reqJson.getString("communityId"));
+        userQuestionAnswerDto.setLink(userDtos.get(0).getTel());
+        int count = userQuestionAnswerV1InnerServiceSMOImpl.queryUserQuestionAnswersCount(userQuestionAnswerDto);
+        if (count < 1) {
+            throw new CmdException("数据不存在");
+        }
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+
+        UserQuestionAnswerDto userQuestionAnswerDto = new UserQuestionAnswerDto();
+        userQuestionAnswerDto.setUserQaId(reqJson.getString("userQaId"));
+        userQuestionAnswerDto.setCommunityId(reqJson.getString("communityId"));
+        List<UserQuestionAnswerDto> userQuestionAnswers = userQuestionAnswerV1InnerServiceSMOImpl.queryUserQuestionAnswers(userQuestionAnswerDto);
+
+        Assert.listOnlyOne(userQuestionAnswers, "数据不存在");
+
+        JSONArray questionAnswerTitles = reqJson.getJSONArray("questionAnswerTitles");
+        JSONObject titleObj = null;
+        UserQuestionAnswerValuePo tmpUserUserQuestionAnswerValue = null;
+        List<UserQuestionAnswerValuePo> tmpUserUserQuestionAnswerValues = new ArrayList<>();
+
+        for (int questionAnswerTitleIndex = 0; questionAnswerTitleIndex < questionAnswerTitles.size(); questionAnswerTitleIndex++) {
+            titleObj = questionAnswerTitles.getJSONObject(questionAnswerTitleIndex);
+            tmpUserUserQuestionAnswerValue = new UserQuestionAnswerValuePo();
+            tmpUserUserQuestionAnswerValue.setCommunityId(userQuestionAnswers.get(0).getCommunityId());
+            tmpUserUserQuestionAnswerValue.setQaId(userQuestionAnswers.get(0).getQaId());
+            tmpUserUserQuestionAnswerValue.setTitleId(titleObj.getString("titleId"));
+            tmpUserUserQuestionAnswerValue.setUserQaId(userQuestionAnswers.get(0).getUserQaId());
+            tmpUserUserQuestionAnswerValue.setUserTitleId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_userTitleId));
+            if ("3003".equals(titleObj.getString("titleType"))) {
+                tmpUserUserQuestionAnswerValue.setValueId("999");
+                tmpUserUserQuestionAnswerValue.setValueContent(titleObj.getString("valueContent"));
+            } else {
+                tmpUserUserQuestionAnswerValue.setValueId(titleObj.getString("valueContent"));
+                tmpUserUserQuestionAnswerValue.setValueContent(titleObj.getString("valueContent"));
+            }
+            tmpUserUserQuestionAnswerValues.add(tmpUserUserQuestionAnswerValue);
+        }
+
+        int flag = userQuestionAnswerValueV1InnerServiceSMOImpl.saveUserQuestionAnswerValues(tmpUserUserQuestionAnswerValues);
+        if (flag < 0) {
+            throw new IllegalArgumentException("保存失败");
+        }
+
+        UserQuestionAnswerPo userQuestionAnswerPo = new UserQuestionAnswerPo();
+
+        userQuestionAnswerPo.setUserQaId(userQuestionAnswers.get(0).getUserQaId());
+        userQuestionAnswerPo.setState("1202");
+        flag = userQuestionAnswerV1InnerServiceSMOImpl.updateUserQuestionAnswer(userQuestionAnswerPo);
+        if (flag < 0) {
+            throw new IllegalArgumentException("保存失败");
+        }
+        context.setResponseEntity(ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"));
+
+
+    }
+}

+ 0 - 71
service-user/src/main/java/com/java110/user/cmd/userQuestionAnswerValue/DeleteUserQuestionAnswerValueCmd.java

@@ -1,71 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.user.cmd.userQuestionAnswerValue;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.Cmd;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.user.IUserQuestionAnswerValueV1InnerServiceSMO;
-import com.java110.po.userQuestionAnswerValue.UserQuestionAnswerValuePo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-/**
- * 类表述:删除
- * 服务编码:userQuestionAnswerValue.deleteUserQuestionAnswerValue
- * 请求路劲:/app/userQuestionAnswerValue.DeleteUserQuestionAnswerValue
- * add by 吴学文 at 2023-07-14 13:27:51 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "userQuestionAnswerValue.deleteUserQuestionAnswerValue")
-public class DeleteUserQuestionAnswerValueCmd extends Cmd {
-  private static Logger logger = LoggerFactory.getLogger(DeleteUserQuestionAnswerValueCmd.class);
-
-    @Autowired
-    private IUserQuestionAnswerValueV1InnerServiceSMO userQuestionAnswerValueV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "userTitleId", "userTitleId不能为空");
-Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       UserQuestionAnswerValuePo userQuestionAnswerValuePo = BeanConvertUtil.covertBean(reqJson, UserQuestionAnswerValuePo.class);
-        int flag = userQuestionAnswerValueV1InnerServiceSMOImpl.deleteUserQuestionAnswerValue(userQuestionAnswerValuePo);
-
-        if (flag < 1) {
-            throw new CmdException("删除数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 80
service-user/src/main/java/com/java110/user/cmd/userQuestionAnswerValue/ListUserQuestionAnswerValueCmd.java

@@ -1,80 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.user.cmd.userQuestionAnswerValue;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.Cmd;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.intf.user.IUserQuestionAnswerValueV1InnerServiceSMO;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import com.java110.dto.user.UserQuestionAnswerValueDto;
-import java.util.List;
-import java.util.ArrayList;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.HttpStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:查询
- * 服务编码:userQuestionAnswerValue.listUserQuestionAnswerValue
- * 请求路劲:/app/userQuestionAnswerValue.ListUserQuestionAnswerValue
- * add by 吴学文 at 2023-07-14 13:27:51 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "userQuestionAnswerValue.listUserQuestionAnswerValue")
-public class ListUserQuestionAnswerValueCmd extends Cmd {
-
-  private static Logger logger = LoggerFactory.getLogger(ListUserQuestionAnswerValueCmd.class);
-    @Autowired
-    private IUserQuestionAnswerValueV1InnerServiceSMO userQuestionAnswerValueV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-           UserQuestionAnswerValueDto userQuestionAnswerValueDto = BeanConvertUtil.covertBean(reqJson, UserQuestionAnswerValueDto.class);
-
-           int count = userQuestionAnswerValueV1InnerServiceSMOImpl.queryUserQuestionAnswerValuesCount(userQuestionAnswerValueDto);
-
-           List<UserQuestionAnswerValueDto> userQuestionAnswerValueDtos = null;
-
-           if (count > 0) {
-               userQuestionAnswerValueDtos = userQuestionAnswerValueV1InnerServiceSMOImpl.queryUserQuestionAnswerValues(userQuestionAnswerValueDto);
-           } else {
-               userQuestionAnswerValueDtos = new ArrayList<>();
-           }
-
-           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, userQuestionAnswerValueDtos);
-
-           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-           cmdDataFlowContext.setResponseEntity(responseEntity);
-    }
-}

+ 0 - 80
service-user/src/main/java/com/java110/user/cmd/userQuestionAnswerValue/SaveUserQuestionAnswerValueCmd.java

@@ -1,80 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.user.cmd.userQuestionAnswerValue;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.Cmd;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.user.IUserQuestionAnswerValueV1InnerServiceSMO;
-import com.java110.po.userQuestionAnswerValue.UserQuestionAnswerValuePo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 类表述:保存
- * 服务编码:userQuestionAnswerValue.saveUserQuestionAnswerValue
- * 请求路劲:/app/userQuestionAnswerValue.SaveUserQuestionAnswerValue
- * add by 吴学文 at 2023-07-14 13:27:51 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "userQuestionAnswerValue.saveUserQuestionAnswerValue")
-public class SaveUserQuestionAnswerValueCmd extends Cmd {
-
-    private static Logger logger = LoggerFactory.getLogger(SaveUserQuestionAnswerValueCmd.class);
-
-    public static final String CODE_PREFIX_ID = "10";
-
-    @Autowired
-    private IUserQuestionAnswerValueV1InnerServiceSMO userQuestionAnswerValueV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "userQaId", "请求报文中未包含userQaId");
-Assert.hasKeyAndValue(reqJson, "qaId", "请求报文中未包含qaId");
-Assert.hasKeyAndValue(reqJson, "titleId", "请求报文中未包含titleId");
-Assert.hasKeyAndValue(reqJson, "valueId", "请求报文中未包含valueId");
-Assert.hasKeyAndValue(reqJson, "valueContent", "请求报文中未包含valueContent");
-Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       UserQuestionAnswerValuePo userQuestionAnswerValuePo = BeanConvertUtil.covertBean(reqJson, UserQuestionAnswerValuePo.class);
-        userQuestionAnswerValuePo.setUserTitleId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
-        int flag = userQuestionAnswerValueV1InnerServiceSMOImpl.saveUserQuestionAnswerValue(userQuestionAnswerValuePo);
-
-        if (flag < 1) {
-            throw new CmdException("保存数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 75
service-user/src/main/java/com/java110/user/cmd/userQuestionAnswerValue/UpdateUserQuestionAnswerValueCmd.java

@@ -1,75 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.user.cmd.userQuestionAnswerValue;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.Cmd;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.user.IUserQuestionAnswerValueV1InnerServiceSMO;
-import com.java110.po.userQuestionAnswerValue.UserQuestionAnswerValuePo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:更新
- * 服务编码:userQuestionAnswerValue.updateUserQuestionAnswerValue
- * 请求路劲:/app/userQuestionAnswerValue.UpdateUserQuestionAnswerValue
- * add by 吴学文 at 2023-07-14 13:27:51 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "userQuestionAnswerValue.updateUserQuestionAnswerValue")
-public class UpdateUserQuestionAnswerValueCmd extends Cmd {
-
-  private static Logger logger = LoggerFactory.getLogger(UpdateUserQuestionAnswerValueCmd.class);
-
-
-    @Autowired
-    private IUserQuestionAnswerValueV1InnerServiceSMO userQuestionAnswerValueV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "userTitleId", "userTitleId不能为空");
-Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       UserQuestionAnswerValuePo userQuestionAnswerValuePo = BeanConvertUtil.covertBean(reqJson, UserQuestionAnswerValuePo.class);
-        int flag = userQuestionAnswerValueV1InnerServiceSMOImpl.updateUserQuestionAnswerValue(userQuestionAnswerValuePo);
-
-        if (flag < 1) {
-            throw new CmdException("更新数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 3 - 0
service-user/src/main/java/com/java110/user/dao/IUserQuestionAnswerV1ServiceDao.java

@@ -16,6 +16,7 @@
 package com.java110.user.dao;
 
 
+import com.java110.dto.questionAnswer.QuestionAnswerDto;
 import com.java110.utils.exception.DAOException;
 
 
@@ -71,4 +72,6 @@ public interface IUserQuestionAnswerV1ServiceDao {
     int queryUserQuestionAnswersCount(Map info);
 
     int saveUserQuestionAnswers(Map info);
+
+    List<Map> queryOwnerQuestionAnswers(Map info);
 }

+ 6 - 0
service-user/src/main/java/com/java110/user/dao/IUserQuestionAnswerValueV1ServiceDao.java

@@ -70,4 +70,10 @@ public interface IUserQuestionAnswerValueV1ServiceDao {
      */
     int queryUserQuestionAnswerValuesCount(Map info);
 
+    /**
+     * 批量保存
+     * @param infos
+     * @return
+     */
+    int saveUserQuestionAnswerValues(Map infos);
 }

+ 9 - 0
service-user/src/main/java/com/java110/user/dao/impl/UserQuestionAnswerV1ServiceDaoImpl.java

@@ -116,5 +116,14 @@ public class UserQuestionAnswerV1ServiceDaoImpl extends BaseServiceDao implement
         return saveFlag;
     }
 
+    @Override
+    public List<Map> queryOwnerQuestionAnswers(Map info) {
+        logger.debug("查询 queryOwnerQuestionAnswers 入参 info : {}",info);
+
+        List<Map> infos = sqlSessionTemplate.selectList("userQuestionAnswerV1ServiceDaoImpl.queryOwnerQuestionAnswers",info);
+
+        return infos;
+    }
+
 
 }

+ 8 - 0
service-user/src/main/java/com/java110/user/dao/impl/UserQuestionAnswerValueV1ServiceDaoImpl.java

@@ -108,5 +108,13 @@ public class UserQuestionAnswerValueV1ServiceDaoImpl extends BaseServiceDao impl
         return Integer.parseInt(businessUserQuestionAnswerValueInfos.get(0).get("count").toString());
     }
 
+    @Override
+    public int saveUserQuestionAnswerValues(Map infos) {
+
+        int saveFlag = sqlSessionTemplate.insert("userQuestionAnswerValueV1ServiceDaoImpl.saveUserQuestionAnswerValues",infos);
+
+        return saveFlag;
+    }
+
 
 }

+ 20 - 10
service-user/src/main/java/com/java110/user/smo/impl/UserQuestionAnswerV1InnerServiceSMOImpl.java

@@ -16,6 +16,7 @@
 package com.java110.user.smo.impl;
 
 
+import com.java110.dto.questionAnswer.QuestionAnswerDto;
 import com.java110.user.dao.IUserQuestionAnswerV1ServiceDao;
 import com.java110.intf.user.IUserQuestionAnswerV1InnerServiceSMO;
 import com.java110.dto.user.UserQuestionAnswerDto;
@@ -47,7 +48,7 @@ public class UserQuestionAnswerV1InnerServiceSMOImpl extends BaseServiceSMO impl
 
 
     @Override
-    public int saveUserQuestionAnswer(@RequestBody  UserQuestionAnswerPo userQuestionAnswerPo) {
+    public int saveUserQuestionAnswer(@RequestBody UserQuestionAnswerPo userQuestionAnswerPo) {
         int saveFlag = userQuestionAnswerV1ServiceDaoImpl.saveUserQuestionAnswerInfo(BeanConvertUtil.beanCovertMap(userQuestionAnswerPo));
         return saveFlag;
     }
@@ -55,27 +56,27 @@ public class UserQuestionAnswerV1InnerServiceSMOImpl extends BaseServiceSMO impl
     @Override
     public int saveUserQuestionAnswers(@RequestBody List<UserQuestionAnswerPo> userQuestionAnswerPos) {
         Map info = new HashMap();
-        info.put("userQuestionAnswerPos",userQuestionAnswerPos);
+        info.put("userQuestionAnswerPos", userQuestionAnswerPos);
         int saveFlag = userQuestionAnswerV1ServiceDaoImpl.saveUserQuestionAnswers(info);
         return saveFlag;
     }
 
 
     @Override
-    public int updateUserQuestionAnswer(@RequestBody  UserQuestionAnswerPo userQuestionAnswerPo) {
+    public int updateUserQuestionAnswer(@RequestBody UserQuestionAnswerPo userQuestionAnswerPo) {
         int saveFlag = userQuestionAnswerV1ServiceDaoImpl.updateUserQuestionAnswerInfo(BeanConvertUtil.beanCovertMap(userQuestionAnswerPo));
         return saveFlag;
     }
 
-     @Override
-    public int deleteUserQuestionAnswer(@RequestBody  UserQuestionAnswerPo userQuestionAnswerPo) {
-       userQuestionAnswerPo.setStatusCd("1");
-       int saveFlag = userQuestionAnswerV1ServiceDaoImpl.updateUserQuestionAnswerInfo(BeanConvertUtil.beanCovertMap(userQuestionAnswerPo));
-       return saveFlag;
+    @Override
+    public int deleteUserQuestionAnswer(@RequestBody UserQuestionAnswerPo userQuestionAnswerPo) {
+        userQuestionAnswerPo.setStatusCd("1");
+        int saveFlag = userQuestionAnswerV1ServiceDaoImpl.updateUserQuestionAnswerInfo(BeanConvertUtil.beanCovertMap(userQuestionAnswerPo));
+        return saveFlag;
     }
 
     @Override
-    public List<UserQuestionAnswerDto> queryUserQuestionAnswers(@RequestBody  UserQuestionAnswerDto userQuestionAnswerDto) {
+    public List<UserQuestionAnswerDto> queryUserQuestionAnswers(@RequestBody UserQuestionAnswerDto userQuestionAnswerDto) {
 
         //校验是否传了 分页信息
 
@@ -93,6 +94,15 @@ public class UserQuestionAnswerV1InnerServiceSMOImpl extends BaseServiceSMO impl
 
     @Override
     public int queryUserQuestionAnswersCount(@RequestBody UserQuestionAnswerDto userQuestionAnswerDto) {
-        return userQuestionAnswerV1ServiceDaoImpl.queryUserQuestionAnswersCount(BeanConvertUtil.beanCovertMap(userQuestionAnswerDto));    }
+        return userQuestionAnswerV1ServiceDaoImpl.queryUserQuestionAnswersCount(BeanConvertUtil.beanCovertMap(userQuestionAnswerDto));
+    }
+
+    @Override
+    public List<QuestionAnswerDto> queryOwnerQuestionAnswers(@RequestBody UserQuestionAnswerDto userQuestionAnswerDto) {
+        List<QuestionAnswerDto> questionAnswerDtos = BeanConvertUtil.covertBeanList(
+                userQuestionAnswerV1ServiceDaoImpl.queryOwnerQuestionAnswers(BeanConvertUtil.beanCovertMap(userQuestionAnswerDto)),
+                QuestionAnswerDto.class);
+        return questionAnswerDtos;
+    }
 
 }

+ 12 - 2
service-user/src/main/java/com/java110/user/smo/impl/UserQuestionAnswerValueV1InnerServiceSMOImpl.java

@@ -19,7 +19,7 @@ package com.java110.user.smo.impl;
 import com.java110.user.dao.IUserQuestionAnswerValueV1ServiceDao;
 import com.java110.intf.user.IUserQuestionAnswerValueV1InnerServiceSMO;
 import com.java110.dto.user.UserQuestionAnswerValueDto;
-import com.java110.po.userQuestionAnswerValue.UserQuestionAnswerValuePo;
+import com.java110.po.user.UserQuestionAnswerValuePo;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.core.base.smo.BaseServiceSMO;
 import com.java110.dto.PageDto;
@@ -27,7 +27,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
@@ -50,7 +52,15 @@ public class UserQuestionAnswerValueV1InnerServiceSMOImpl extends BaseServiceSMO
         return saveFlag;
     }
 
-     @Override
+    @Override
+    public int saveUserQuestionAnswerValues(@RequestBody List<UserQuestionAnswerValuePo> userUserQuestionAnswerValues) {
+        Map infos = new HashMap();
+        infos.put("userUserQuestionAnswerValues",userUserQuestionAnswerValues);
+        int saveFlag = userQuestionAnswerValueV1ServiceDaoImpl.saveUserQuestionAnswerValues(infos);
+        return saveFlag;
+    }
+
+    @Override
     public int updateUserQuestionAnswerValue(@RequestBody  UserQuestionAnswerValuePo userQuestionAnswerValuePo) {
         int saveFlag = userQuestionAnswerValueV1ServiceDaoImpl.updateUserQuestionAnswerValueInfo(BeanConvertUtil.beanCovertMap(userQuestionAnswerValuePo));
         return saveFlag;