java110 лет назад: 2
Родитель
Сommit
4d2bac789f
18 измененных файлов с 1585 добавлено и 0 удалено
  1. 88 0
      java110-bean/src/main/java/com/java110/dto/questionTitle/QuestionTitleDto.java
  2. 106 0
      java110-bean/src/main/java/com/java110/dto/questionTitleValue/QuestionTitleValueDto.java
  3. 68 0
      java110-bean/src/main/java/com/java110/po/questionTitle/QuestionTitlePo.java
  4. 82 0
      java110-bean/src/main/java/com/java110/po/questionTitleValue/QuestionTitleValuePo.java
  5. 93 0
      java110-db/src/main/resources/mapper/user/QuestionTitleV1ServiceDaoImplMapper.xml
  6. 117 0
      java110-db/src/main/resources/mapper/user/QuestionTitleValueV1ServiceDaoImplMapper.xml
  7. 68 0
      java110-interface/src/main/java/com/java110/intf/user/IQuestionTitleV1InnerServiceSMO.java
  8. 68 0
      java110-interface/src/main/java/com/java110/intf/user/IQuestionTitleValueV1InnerServiceSMO.java
  9. 71 0
      service-user/src/main/java/com/java110/user/cmd/question/DeleteQuestionTitleCmd.java
  10. 125 0
      service-user/src/main/java/com/java110/user/cmd/question/ListQuestionTitleCmd.java
  11. 77 0
      service-user/src/main/java/com/java110/user/cmd/question/SaveQuestionTitleCmd.java
  12. 74 0
      service-user/src/main/java/com/java110/user/cmd/question/UpdateQuestionTitleCmd.java
  13. 73 0
      service-user/src/main/java/com/java110/user/dao/IQuestionTitleV1ServiceDao.java
  14. 73 0
      service-user/src/main/java/com/java110/user/dao/IQuestionTitleValueV1ServiceDao.java
  15. 112 0
      service-user/src/main/java/com/java110/user/dao/impl/QuestionTitleV1ServiceDaoImpl.java
  16. 112 0
      service-user/src/main/java/com/java110/user/dao/impl/QuestionTitleValueV1ServiceDaoImpl.java
  17. 89 0
      service-user/src/main/java/com/java110/user/smo/impl/QuestionTitleV1InnerServiceSMOImpl.java
  18. 89 0
      service-user/src/main/java/com/java110/user/smo/impl/QuestionTitleValueV1InnerServiceSMOImpl.java

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

@@ -0,0 +1,88 @@
+package com.java110.dto.questionTitle;
+
+import com.java110.dto.PageDto;
+import com.java110.dto.questionTitleValue.QuestionTitleValueDto;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @ClassName FloorDto
+ * @Description 问卷题目数据层封装
+ * @Author wuxw
+ * @Date 2019/4/24 8:52
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+public class QuestionTitleDto extends PageDto implements Serializable {
+
+    private String titleType;
+    private String titleId;
+    private String communityId;
+    private String qaTitle;
+
+    private List<QuestionTitleValueDto> titleValues;
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getTitleType() {
+        return titleType;
+    }
+
+    public void setTitleType(String titleType) {
+        this.titleType = titleType;
+    }
+
+    public String getTitleId() {
+        return titleId;
+    }
+
+    public void setTitleId(String titleId) {
+        this.titleId = titleId;
+    }
+
+    public String getCommunityId() {
+        return communityId;
+    }
+
+    public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+    public String getQaTitle() {
+        return qaTitle;
+    }
+
+    public void setQaTitle(String qaTitle) {
+        this.qaTitle = qaTitle;
+    }
+
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+
+    public List<QuestionTitleValueDto> getTitleValues() {
+        return titleValues;
+    }
+
+    public void setTitleValues(List<QuestionTitleValueDto> titleValues) {
+        this.titleValues = titleValues;
+    }
+}

+ 106 - 0
java110-bean/src/main/java/com/java110/dto/questionTitleValue/QuestionTitleValueDto.java

@@ -0,0 +1,106 @@
+package com.java110.dto.questionTitleValue;
+
+import com.java110.dto.PageDto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @ClassName FloorDto
+ * @Description 问卷题目选项数据层封装
+ * @Author wuxw
+ * @Date 2019/4/24 8:52
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+public class QuestionTitleValueDto extends PageDto implements Serializable {
+
+    private String score;
+    private String valueId;
+    private String titleId;
+
+    private String[] titleIds;
+
+    private String communityId;
+    private String qaValue;
+    private String seq;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getScore() {
+        return score;
+    }
+
+    public void setScore(String score) {
+        this.score = score;
+    }
+
+    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 getCommunityId() {
+        return communityId;
+    }
+
+    public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+    public String getQaValue() {
+        return qaValue;
+    }
+
+    public void setQaValue(String qaValue) {
+        this.qaValue = qaValue;
+    }
+
+    public String getSeq() {
+        return seq;
+    }
+
+    public void setSeq(String seq) {
+        this.seq = seq;
+    }
+
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+
+    public String[] getTitleIds() {
+        return titleIds;
+    }
+
+    public void setTitleIds(String[] titleIds) {
+        this.titleIds = titleIds;
+    }
+}

+ 68 - 0
java110-bean/src/main/java/com/java110/po/questionTitle/QuestionTitlePo.java

@@ -0,0 +1,68 @@
+/*
+ * 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.questionTitle;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2023-07-10 15:10:47 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 QuestionTitlePo implements Serializable {
+
+    private String titleType;
+private String titleId;
+private String statusCd = "0";
+private String communityId;
+private String qaTitle;
+public String getTitleType() {
+        return titleType;
+    }
+public void setTitleType(String titleType) {
+        this.titleType = titleType;
+    }
+public String getTitleId() {
+        return titleId;
+    }
+public void setTitleId(String titleId) {
+        this.titleId = titleId;
+    }
+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 getQaTitle() {
+        return qaTitle;
+    }
+public void setQaTitle(String qaTitle) {
+        this.qaTitle = qaTitle;
+    }
+
+
+
+}

+ 82 - 0
java110-bean/src/main/java/com/java110/po/questionTitleValue/QuestionTitleValuePo.java

@@ -0,0 +1,82 @@
+/*
+ * 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.questionTitleValue;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2023-07-10 15:24:35 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 QuestionTitleValuePo implements Serializable {
+
+    private String score;
+private String valueId;
+private String titleId;
+private String statusCd = "0";
+private String communityId;
+private String qaValue;
+private String seq;
+public String getScore() {
+        return score;
+    }
+public void setScore(String score) {
+        this.score = score;
+    }
+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 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 getQaValue() {
+        return qaValue;
+    }
+public void setQaValue(String qaValue) {
+        this.qaValue = qaValue;
+    }
+public String getSeq() {
+        return seq;
+    }
+public void setSeq(String seq) {
+        this.seq = seq;
+    }
+
+
+
+}

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

@@ -0,0 +1,93 @@
+<?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="questionTitleV1ServiceDaoImpl">
+
+
+    <!-- 保存问卷题目信息 add by wuxw 2018-07-03 -->
+    <insert id="saveQuestionTitleInfo" parameterType="Map">
+        insert into question_title(
+        title_type,title_id,community_id,qa_title
+        ) values (
+        #{titleType},#{titleId},#{communityId},#{qaTitle}
+        )
+    </insert>
+
+
+    <!-- 查询问卷题目信息 add by wuxw 2018-07-03 -->
+    <select id="getQuestionTitleInfo" parameterType="Map" resultType="Map">
+        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
+        from question_title t
+        where 1 =1
+        <if test="titleType !=null and titleType != ''">
+            and t.title_type= #{titleType}
+        </if>
+        <if test="titleId !=null and titleId != ''">
+            and t.title_id= #{titleId}
+        </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="qaTitle !=null and qaTitle != ''">
+            and t.qa_title= #{qaTitle}
+        </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="updateQuestionTitleInfo" parameterType="Map">
+        update question_title t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="titleType !=null and titleType != ''">
+            , t.title_type= #{titleType}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="qaTitle !=null and qaTitle != ''">
+            , t.qa_title= #{qaTitle}
+        </if>
+        where 1=1
+        <if test="titleId !=null and titleId != ''">
+            and t.title_id= #{titleId}
+        </if>
+
+    </update>
+
+    <!-- 查询问卷题目数量 add by wuxw 2018-07-03 -->
+    <select id="queryQuestionTitlesCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from question_title t
+        where 1 =1
+        <if test="titleType !=null and titleType != ''">
+            and t.title_type= #{titleType}
+        </if>
+        <if test="titleId !=null and titleId != ''">
+            and t.title_id= #{titleId}
+        </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="qaTitle !=null and qaTitle != ''">
+            and t.qa_title= #{qaTitle}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 117 - 0
java110-db/src/main/resources/mapper/user/QuestionTitleValueV1ServiceDaoImplMapper.xml

@@ -0,0 +1,117 @@
+<?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="questionTitleValueV1ServiceDaoImpl">
+
+
+    <!-- 保存问卷题目选项信息 add by wuxw 2018-07-03 -->
+    <insert id="saveQuestionTitleValueInfo" parameterType="Map">
+        insert into question_title_value(
+        score,value_id,title_id,community_id,qa_value,seq
+        ) values (
+        #{score},#{valueId},#{titleId},#{communityId},#{qaValue},#{seq}
+        )
+    </insert>
+
+
+    <!-- 查询问卷题目选项信息 add by wuxw 2018-07-03 -->
+    <select id="getQuestionTitleValueInfo" parameterType="Map" resultType="Map">
+        select t.score,t.value_id,t.value_id valueId,t.title_id,t.title_id titleId,t.status_cd,t.status_cd
+        statusCd,t.community_id,t.community_id communityId,t.qa_value,t.qa_value qaValue,t.seq
+        from question_title_value t
+        where 1 =1
+        <if test="score !=null and score != ''">
+            and t.score= #{score}
+        </if>
+        <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="titleIds !=null">
+            and t.title_id in
+            <foreach collection="titleIds" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </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="qaValue !=null and qaValue != ''">
+            and t.qa_value= #{qaValue}
+        </if>
+        <if test="seq !=null and seq != ''">
+            and t.seq= #{seq}
+        </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="updateQuestionTitleValueInfo" parameterType="Map">
+        update question_title_value t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="score !=null and score != ''">
+            , t.score= #{score}
+        </if>
+        <if test="titleId !=null and titleId != ''">
+            , t.title_id= #{titleId}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="qaValue !=null and qaValue != ''">
+            , t.qa_value= #{qaValue}
+        </if>
+        <if test="seq !=null and seq != ''">
+            , t.seq= #{seq}
+        </if>
+        where 1=1
+        <if test="valueId !=null and valueId != ''">
+            and t.value_id= #{valueId}
+        </if>
+
+    </update>
+
+    <!-- 查询问卷题目选项数量 add by wuxw 2018-07-03 -->
+    <select id="queryQuestionTitleValuesCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from question_title_value t
+        where 1 =1
+        <if test="score !=null and score != ''">
+            and t.score= #{score}
+        </if>
+        <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="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="qaValue !=null and qaValue != ''">
+            and t.qa_value= #{qaValue}
+        </if>
+        <if test="seq !=null and seq != ''">
+            and t.seq= #{seq}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/user/IQuestionTitleV1InnerServiceSMO.java

@@ -0,0 +1,68 @@
+/*
+ * 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.intf.user;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.questionTitle.QuestionTitleDto;
+import com.java110.po.questionTitle.QuestionTitlePo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2023-07-10 15:10:47 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行
+ */
+@FeignClient(name = "user-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/questionTitleV1Api")
+public interface IQuestionTitleV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveQuestionTitle", method = RequestMethod.POST)
+    public int saveQuestionTitle(@RequestBody  QuestionTitlePo questionTitlePo);
+
+    @RequestMapping(value = "/updateQuestionTitle", method = RequestMethod.POST)
+    public int updateQuestionTitle(@RequestBody  QuestionTitlePo questionTitlePo);
+
+    @RequestMapping(value = "/deleteQuestionTitle", method = RequestMethod.POST)
+    public int deleteQuestionTitle(@RequestBody  QuestionTitlePo questionTitlePo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param questionTitleDto 数据对象分享
+     * @return QuestionTitleDto 对象数据
+     */
+    @RequestMapping(value = "/queryQuestionTitles", method = RequestMethod.POST)
+    List<QuestionTitleDto> queryQuestionTitles(@RequestBody QuestionTitleDto questionTitleDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param questionTitleDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryQuestionTitlesCount", method = RequestMethod.POST)
+    int queryQuestionTitlesCount(@RequestBody QuestionTitleDto questionTitleDto);
+}

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/user/IQuestionTitleValueV1InnerServiceSMO.java

@@ -0,0 +1,68 @@
+/*
+ * 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.intf.user;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.questionTitleValue.QuestionTitleValueDto;
+import com.java110.po.questionTitleValue.QuestionTitleValuePo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2023-07-10 15:24:35 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行
+ */
+@FeignClient(name = "user-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/questionTitleValueV1Api")
+public interface IQuestionTitleValueV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveQuestionTitleValue", method = RequestMethod.POST)
+    public int saveQuestionTitleValue(@RequestBody  QuestionTitleValuePo questionTitleValuePo);
+
+    @RequestMapping(value = "/updateQuestionTitleValue", method = RequestMethod.POST)
+    public int updateQuestionTitleValue(@RequestBody  QuestionTitleValuePo questionTitleValuePo);
+
+    @RequestMapping(value = "/deleteQuestionTitleValue", method = RequestMethod.POST)
+    public int deleteQuestionTitleValue(@RequestBody  QuestionTitleValuePo questionTitleValuePo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param questionTitleValueDto 数据对象分享
+     * @return QuestionTitleValueDto 对象数据
+     */
+    @RequestMapping(value = "/queryQuestionTitleValues", method = RequestMethod.POST)
+    List<QuestionTitleValueDto> queryQuestionTitleValues(@RequestBody QuestionTitleValueDto questionTitleValueDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param questionTitleValueDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryQuestionTitleValuesCount", method = RequestMethod.POST)
+    int queryQuestionTitleValuesCount(@RequestBody QuestionTitleValueDto questionTitleValueDto);
+}

+ 71 - 0
service-user/src/main/java/com/java110/user/cmd/question/DeleteQuestionTitleCmd.java

@@ -0,0 +1,71 @@
+/*
+ * 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.question;
+
+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.intf.user.IQuestionTitleV1InnerServiceSMO;
+import com.java110.po.questionTitle.QuestionTitlePo;
+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;
+
+/**
+ * 类表述:删除
+ * 服务编码:questionTitle.deleteQuestionTitle
+ * 请求路劲:/app/questionTitle.DeleteQuestionTitle
+ * add by 吴学文 at 2023-07-10 15:10:47 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 = "question.deleteQuestionTitle")
+public class DeleteQuestionTitleCmd extends Cmd {
+    private static Logger logger = LoggerFactory.getLogger(DeleteQuestionTitleCmd.class);
+
+    @Autowired
+    private IQuestionTitleV1InnerServiceSMO questionTitleV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "titleId", "titleId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        QuestionTitlePo questionTitlePo = BeanConvertUtil.covertBean(reqJson, QuestionTitlePo.class);
+        int flag = questionTitleV1InnerServiceSMOImpl.deleteQuestionTitle(questionTitlePo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 125 - 0
service-user/src/main/java/com/java110/user/cmd/question/ListQuestionTitleCmd.java

@@ -0,0 +1,125 @@
+/*
+ * 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.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.maintainance.MaintainanceItemDto;
+import com.java110.dto.maintainance.MaintainanceItemValueDto;
+import com.java110.dto.questionTitleValue.QuestionTitleValueDto;
+import com.java110.intf.user.IQuestionTitleV1InnerServiceSMO;
+import com.java110.intf.user.IQuestionTitleValueV1InnerServiceSMO;
+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 com.java110.dto.questionTitle.QuestionTitleDto;
+
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:questionTitle.listQuestionTitle
+ * 请求路劲:/app/questionTitle.ListQuestionTitle
+ * add by 吴学文 at 2023-07-10 15:10:47 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 = "question.listQuestionTitle")
+public class ListQuestionTitleCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(ListQuestionTitleCmd.class);
+    @Autowired
+    private IQuestionTitleV1InnerServiceSMO questionTitleV1InnerServiceSMOImpl;
+
+    @Autowired
+    private IQuestionTitleValueV1InnerServiceSMO questionTitleValueV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        QuestionTitleDto questionTitleDto = BeanConvertUtil.covertBean(reqJson, QuestionTitleDto.class);
+
+        int count = questionTitleV1InnerServiceSMOImpl.queryQuestionTitlesCount(questionTitleDto);
+
+        List<QuestionTitleDto> questionTitleDtos = null;
+
+        if (count > 0) {
+            questionTitleDtos = questionTitleV1InnerServiceSMOImpl.queryQuestionTitles(questionTitleDto);
+
+            refreshTitileValues(questionTitleDtos);
+        } else {
+            questionTitleDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, questionTitleDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+
+    private void refreshTitileValues(List<QuestionTitleDto> questionTitleDtos) {
+
+        if (questionTitleDtos == null || questionTitleDtos.size() < 1) {
+            return;
+        }
+
+        List<String> itemIds = new ArrayList<>();
+        for (QuestionTitleDto questionTitle : questionTitleDtos) {
+            itemIds.add(questionTitle.getTitleId());
+        }
+
+        QuestionTitleValueDto questionTitleValueDto = new QuestionTitleValueDto();
+        questionTitleValueDto.setTitleIds(itemIds.toArray(new String[itemIds.size()]));
+        questionTitleValueDto.setCommunityId(questionTitleDtos.get(0).getCommunityId());
+        List<QuestionTitleValueDto> questionTitleValues
+                = questionTitleValueV1InnerServiceSMOImpl.queryQuestionTitleValues(questionTitleValueDto);
+
+        List<QuestionTitleValueDto> tmpQuestionTitleValueDtos = null;
+        for (QuestionTitleDto questionTitle : questionTitleDtos) {
+            tmpQuestionTitleValueDtos = new ArrayList<>();
+            for (QuestionTitleValueDto tmpQuestionTitleValueDto : questionTitleValues) {
+                if (tmpQuestionTitleValueDto.getTitleId().equals(questionTitle.getTitleId())) {
+                    tmpQuestionTitleValueDtos.add(tmpQuestionTitleValueDto);
+                }
+            }
+            questionTitle.setTitleValues(tmpQuestionTitleValueDtos);
+        }
+
+
+    }
+}

+ 77 - 0
service-user/src/main/java/com/java110/user/cmd/question/SaveQuestionTitleCmd.java

@@ -0,0 +1,77 @@
+/*
+ * 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.question;
+
+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.IQuestionTitleV1InnerServiceSMO;
+import com.java110.po.questionTitle.QuestionTitlePo;
+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;
+
+/**
+ * 类表述:保存
+ * 服务编码:questionTitle.saveQuestionTitle
+ * 请求路劲:/app/questionTitle.SaveQuestionTitle
+ * add by 吴学文 at 2023-07-10 15:10:47 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 = "question.saveQuestionTitle")
+public class SaveQuestionTitleCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveQuestionTitleCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IQuestionTitleV1InnerServiceSMO questionTitleV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "qaTitle", "请求报文中未包含qaTitle");
+        Assert.hasKeyAndValue(reqJson, "titleType", "请求报文中未包含titleType");
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        QuestionTitlePo questionTitlePo = BeanConvertUtil.covertBean(reqJson, QuestionTitlePo.class);
+        questionTitlePo.setTitleId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = questionTitleV1InnerServiceSMOImpl.saveQuestionTitle(questionTitlePo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 74 - 0
service-user/src/main/java/com/java110/user/cmd/question/UpdateQuestionTitleCmd.java

@@ -0,0 +1,74 @@
+/*
+ * 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.question;
+
+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.intf.user.IQuestionTitleV1InnerServiceSMO;
+import com.java110.po.questionTitle.QuestionTitlePo;
+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;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:questionTitle.updateQuestionTitle
+ * 请求路劲:/app/questionTitle.UpdateQuestionTitle
+ * add by 吴学文 at 2023-07-10 15:10:47 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 = "question.updateQuestionTitle")
+public class UpdateQuestionTitleCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(UpdateQuestionTitleCmd.class);
+
+
+    @Autowired
+    private IQuestionTitleV1InnerServiceSMO questionTitleV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "titleId", "titleId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        QuestionTitlePo questionTitlePo = BeanConvertUtil.covertBean(reqJson, QuestionTitlePo.class);
+        int flag = questionTitleV1InnerServiceSMOImpl.updateQuestionTitle(questionTitlePo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 73 - 0
service-user/src/main/java/com/java110/user/dao/IQuestionTitleV1ServiceDao.java

@@ -0,0 +1,73 @@
+/*
+ * 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.dao;
+
+
+import com.java110.utils.exception.DAOException;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2023-07-10 15:10:47 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 interface IQuestionTitleV1ServiceDao {
+
+
+    /**
+     * 保存 问卷题目信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveQuestionTitleInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询问卷题目信息(instance过程)
+     * 根据bId 查询问卷题目信息
+     * @param info bId 信息
+     * @return 问卷题目信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getQuestionTitleInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改问卷题目信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateQuestionTitleInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询问卷题目总数
+     *
+     * @param info 问卷题目信息
+     * @return 问卷题目数量
+     */
+    int queryQuestionTitlesCount(Map info);
+
+}

+ 73 - 0
service-user/src/main/java/com/java110/user/dao/IQuestionTitleValueV1ServiceDao.java

@@ -0,0 +1,73 @@
+/*
+ * 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.dao;
+
+
+import com.java110.utils.exception.DAOException;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2023-07-10 15:24:35 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 interface IQuestionTitleValueV1ServiceDao {
+
+
+    /**
+     * 保存 问卷题目选项信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveQuestionTitleValueInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询问卷题目选项信息(instance过程)
+     * 根据bId 查询问卷题目选项信息
+     * @param info bId 信息
+     * @return 问卷题目选项信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getQuestionTitleValueInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改问卷题目选项信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateQuestionTitleValueInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询问卷题目选项总数
+     *
+     * @param info 问卷题目选项信息
+     * @return 问卷题目选项数量
+     */
+    int queryQuestionTitleValuesCount(Map info);
+
+}

+ 112 - 0
service-user/src/main/java/com/java110/user/dao/impl/QuestionTitleV1ServiceDaoImpl.java

@@ -0,0 +1,112 @@
+/*
+ * 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.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.user.dao.IQuestionTitleV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2023-07-10 15:10:47 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行
+ */
+@Service("questionTitleV1ServiceDaoImpl")
+public class QuestionTitleV1ServiceDaoImpl extends BaseServiceDao implements IQuestionTitleV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(QuestionTitleV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存问卷题目信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveQuestionTitleInfo(Map info) throws DAOException {
+        logger.debug("保存 saveQuestionTitleInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("questionTitleV1ServiceDaoImpl.saveQuestionTitleInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询问卷题目信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getQuestionTitleInfo(Map info) throws DAOException {
+        logger.debug("查询 getQuestionTitleInfo 入参 info : {}",info);
+
+        List<Map> businessQuestionTitleInfos = sqlSessionTemplate.selectList("questionTitleV1ServiceDaoImpl.getQuestionTitleInfo",info);
+
+        return businessQuestionTitleInfos;
+    }
+
+
+    /**
+     * 修改问卷题目信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateQuestionTitleInfo(Map info) throws DAOException {
+        logger.debug("修改 updateQuestionTitleInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("questionTitleV1ServiceDaoImpl.updateQuestionTitleInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询问卷题目数量
+     * @param info 问卷题目信息
+     * @return 问卷题目数量
+     */
+    @Override
+    public int queryQuestionTitlesCount(Map info) {
+        logger.debug("查询 queryQuestionTitlesCount 入参 info : {}",info);
+
+        List<Map> businessQuestionTitleInfos = sqlSessionTemplate.selectList("questionTitleV1ServiceDaoImpl.queryQuestionTitlesCount", info);
+        if (businessQuestionTitleInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessQuestionTitleInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 112 - 0
service-user/src/main/java/com/java110/user/dao/impl/QuestionTitleValueV1ServiceDaoImpl.java

@@ -0,0 +1,112 @@
+/*
+ * 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.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.user.dao.IQuestionTitleValueV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2023-07-10 15:24:35 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行
+ */
+@Service("questionTitleValueV1ServiceDaoImpl")
+public class QuestionTitleValueV1ServiceDaoImpl extends BaseServiceDao implements IQuestionTitleValueV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(QuestionTitleValueV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存问卷题目选项信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveQuestionTitleValueInfo(Map info) throws DAOException {
+        logger.debug("保存 saveQuestionTitleValueInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("questionTitleValueV1ServiceDaoImpl.saveQuestionTitleValueInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询问卷题目选项信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getQuestionTitleValueInfo(Map info) throws DAOException {
+        logger.debug("查询 getQuestionTitleValueInfo 入参 info : {}",info);
+
+        List<Map> businessQuestionTitleValueInfos = sqlSessionTemplate.selectList("questionTitleValueV1ServiceDaoImpl.getQuestionTitleValueInfo",info);
+
+        return businessQuestionTitleValueInfos;
+    }
+
+
+    /**
+     * 修改问卷题目选项信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateQuestionTitleValueInfo(Map info) throws DAOException {
+        logger.debug("修改 updateQuestionTitleValueInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("questionTitleValueV1ServiceDaoImpl.updateQuestionTitleValueInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询问卷题目选项数量
+     * @param info 问卷题目选项信息
+     * @return 问卷题目选项数量
+     */
+    @Override
+    public int queryQuestionTitleValuesCount(Map info) {
+        logger.debug("查询 queryQuestionTitleValuesCount 入参 info : {}",info);
+
+        List<Map> businessQuestionTitleValueInfos = sqlSessionTemplate.selectList("questionTitleValueV1ServiceDaoImpl.queryQuestionTitleValuesCount", info);
+        if (businessQuestionTitleValueInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessQuestionTitleValueInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-user/src/main/java/com/java110/user/smo/impl/QuestionTitleV1InnerServiceSMOImpl.java

@@ -0,0 +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.user.smo.impl;
+
+
+import com.java110.user.dao.IQuestionTitleV1ServiceDao;
+import com.java110.intf.user.IQuestionTitleV1InnerServiceSMO;
+import com.java110.dto.questionTitle.QuestionTitleDto;
+import com.java110.po.questionTitle.QuestionTitlePo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2023-07-10 15:10:47 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行
+ */
+@RestController
+public class QuestionTitleV1InnerServiceSMOImpl extends BaseServiceSMO implements IQuestionTitleV1InnerServiceSMO {
+
+    @Autowired
+    private IQuestionTitleV1ServiceDao questionTitleV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveQuestionTitle(@RequestBody  QuestionTitlePo questionTitlePo) {
+        int saveFlag = questionTitleV1ServiceDaoImpl.saveQuestionTitleInfo(BeanConvertUtil.beanCovertMap(questionTitlePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateQuestionTitle(@RequestBody  QuestionTitlePo questionTitlePo) {
+        int saveFlag = questionTitleV1ServiceDaoImpl.updateQuestionTitleInfo(BeanConvertUtil.beanCovertMap(questionTitlePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteQuestionTitle(@RequestBody  QuestionTitlePo questionTitlePo) {
+       questionTitlePo.setStatusCd("1");
+       int saveFlag = questionTitleV1ServiceDaoImpl.updateQuestionTitleInfo(BeanConvertUtil.beanCovertMap(questionTitlePo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<QuestionTitleDto> queryQuestionTitles(@RequestBody  QuestionTitleDto questionTitleDto) {
+
+        //校验是否传了 分页信息
+
+        int page = questionTitleDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            questionTitleDto.setPage((page - 1) * questionTitleDto.getRow());
+        }
+
+        List<QuestionTitleDto> questionTitles = BeanConvertUtil.covertBeanList(questionTitleV1ServiceDaoImpl.getQuestionTitleInfo(BeanConvertUtil.beanCovertMap(questionTitleDto)), QuestionTitleDto.class);
+
+        return questionTitles;
+    }
+
+
+    @Override
+    public int queryQuestionTitlesCount(@RequestBody QuestionTitleDto questionTitleDto) {
+        return questionTitleV1ServiceDaoImpl.queryQuestionTitlesCount(BeanConvertUtil.beanCovertMap(questionTitleDto));    }
+
+}

+ 89 - 0
service-user/src/main/java/com/java110/user/smo/impl/QuestionTitleValueV1InnerServiceSMOImpl.java

@@ -0,0 +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.user.smo.impl;
+
+
+import com.java110.user.dao.IQuestionTitleValueV1ServiceDao;
+import com.java110.intf.user.IQuestionTitleValueV1InnerServiceSMO;
+import com.java110.dto.questionTitleValue.QuestionTitleValueDto;
+import com.java110.po.questionTitleValue.QuestionTitleValuePo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2023-07-10 15:24:35 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行
+ */
+@RestController
+public class QuestionTitleValueV1InnerServiceSMOImpl extends BaseServiceSMO implements IQuestionTitleValueV1InnerServiceSMO {
+
+    @Autowired
+    private IQuestionTitleValueV1ServiceDao questionTitleValueV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveQuestionTitleValue(@RequestBody  QuestionTitleValuePo questionTitleValuePo) {
+        int saveFlag = questionTitleValueV1ServiceDaoImpl.saveQuestionTitleValueInfo(BeanConvertUtil.beanCovertMap(questionTitleValuePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateQuestionTitleValue(@RequestBody  QuestionTitleValuePo questionTitleValuePo) {
+        int saveFlag = questionTitleValueV1ServiceDaoImpl.updateQuestionTitleValueInfo(BeanConvertUtil.beanCovertMap(questionTitleValuePo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteQuestionTitleValue(@RequestBody  QuestionTitleValuePo questionTitleValuePo) {
+       questionTitleValuePo.setStatusCd("1");
+       int saveFlag = questionTitleValueV1ServiceDaoImpl.updateQuestionTitleValueInfo(BeanConvertUtil.beanCovertMap(questionTitleValuePo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<QuestionTitleValueDto> queryQuestionTitleValues(@RequestBody  QuestionTitleValueDto questionTitleValueDto) {
+
+        //校验是否传了 分页信息
+
+        int page = questionTitleValueDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            questionTitleValueDto.setPage((page - 1) * questionTitleValueDto.getRow());
+        }
+
+        List<QuestionTitleValueDto> questionTitleValues = BeanConvertUtil.covertBeanList(questionTitleValueV1ServiceDaoImpl.getQuestionTitleValueInfo(BeanConvertUtil.beanCovertMap(questionTitleValueDto)), QuestionTitleValueDto.class);
+
+        return questionTitleValues;
+    }
+
+
+    @Override
+    public int queryQuestionTitleValuesCount(@RequestBody QuestionTitleValueDto questionTitleValueDto) {
+        return questionTitleValueV1ServiceDaoImpl.queryQuestionTitleValuesCount(BeanConvertUtil.beanCovertMap(questionTitleValueDto));    }
+
+}