java110
2021-02-05 18e0135569cfdf07354cb5efd8dcc951f9f5af47
优化objId 抒写错误问题
4个文件已修改
301 ■■■■ 已修改文件
java110-bean/src/main/java/com/java110/dto/questionAnswer/QuestionAnswerDto.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/questionAnswer/QuestionAnswerPo.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/user/QuestionAnswerServiceDaoImplMapper.xml 205 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/api/QuestionAnswerApi.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/questionAnswer/QuestionAnswerDto.java
@@ -24,7 +24,7 @@
    private String endTime;
    private String storeId;
    private String objType;
    private String objTd;
    private String objId;
    private String qaId;
@@ -81,12 +81,12 @@
        this.objType = objType;
    }
    public String getObjTd() {
        return objTd;
    public String getObjId() {
        return objId;
    }
    public void setObjTd(String objTd) {
        this.objTd = objTd;
    public void setObjId(String objId) {
        this.objId = objId;
    }
    public String getQaId() {
java110-bean/src/main/java/com/java110/po/questionAnswer/QuestionAnswerPo.java
@@ -1,74 +1,90 @@
package com.java110.po.questionAnswer;
import java.io.Serializable;
import java.util.Date;
public class QuestionAnswerPo implements Serializable {
    private String qaName;
private String qaType;
private String statusCd = "0";
private String startTime;
private String endTime;
private String storeId;
private String objType;
private String objTd;
private String qaId;
public String getQaName() {
    private String qaType;
    private String statusCd = "0";
    private String startTime;
    private String endTime;
    private String storeId;
    private String objType;
    private String objId;
    private String qaId;
    public String getQaName() {
        return qaName;
    }
public void setQaName(String qaName) {
    public void setQaName(String qaName) {
        this.qaName = qaName;
    }
public String getQaType() {
    public String getQaType() {
        return qaType;
    }
public void setQaType(String qaType) {
    public void setQaType(String qaType) {
        this.qaType = qaType;
    }
public String getStatusCd() {
    public String getStatusCd() {
        return statusCd;
    }
public void setStatusCd(String statusCd) {
    public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    }
public String getStartTime() {
    public String getStartTime() {
        return startTime;
    }
public void setStartTime(String startTime) {
    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }
public String getEndTime() {
    public String getEndTime() {
        return endTime;
    }
public void setEndTime(String endTime) {
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
public String getStoreId() {
    public String getStoreId() {
        return storeId;
    }
public void setStoreId(String storeId) {
    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }
public String getObjType() {
    public String getObjType() {
        return objType;
    }
public void setObjType(String objType) {
    public void setObjType(String objType) {
        this.objType = objType;
    }
public String getObjTd() {
        return objTd;
    }
public void setObjTd(String objTd) {
        this.objTd = objTd;
    }
public String getQaId() {
        return qaId;
    }
public void setQaId(String qaId) {
        this.qaId = qaId;
    public String getObjId() {
        return objId;
    }
    public void setObjId(String objId) {
        this.objId = objId;
    }
    public String getQaId() {
        return qaId;
    }
    public void setQaId(String qaId) {
        this.qaId = qaId;
    }
}
java110-db/src/main/resources/mapper/user/QuestionAnswerServiceDaoImplMapper.xml
@@ -5,129 +5,126 @@
<mapper namespace="questionAnswerServiceDaoImpl">
    <!-- 保存答卷信息 add by wuxw 2018-07-03 -->
    <insert id="saveQuestionAnswerInfo" parameterType="Map">
        insert into question_answer(
qa_name,qa_type,start_time,end_time,remark,obj_type,obj_id,qa_id
) values (
#{qaName},#{qaType},#{startTime},#{endTime},#{storeId},#{objType},#{objTd},#{qaId}
)
        qa_name,qa_type,start_time,end_time,remark,obj_type,obj_id,qa_id
        ) values (
        #{qaName},#{qaType},#{startTime},#{endTime},#{storeId},#{objType},#{objId},#{qaId}
        )
    </insert>
    <!-- 查询答卷信息 add by wuxw 2018-07-03 -->
    <select id="getQuestionAnswerInfo" parameterType="Map" resultType="Map">
        select  t.qa_name,t.qa_name qaName,t.qa_type,t.qa_type qaType,t.status_cd,t.status_cd statusCd,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.remark,t.remark storeId,t.obj_type,t.obj_type objType,t.obj_id,t.obj_id objTd,t.qa_id,t.qa_id qaId
from question_answer t
where 1 =1
<if test="qaName !=null and qaName != ''">
   and t.qa_name= #{qaName}
</if>
<if test="qaType !=null and qaType != ''">
   and t.qa_type= #{qaType}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="startTime !=null and startTime != ''">
   and t.start_time= #{startTime}
</if>
<if test="endTime !=null and endTime != ''">
   and t.end_time= #{endTime}
</if>
<if test="storeId !=null and storeId != ''">
   and t.remark= #{storeId}
</if>
<if test="objType !=null and objType != ''">
   and t.obj_type= #{objType}
</if>
<if test="objTd !=null and objTd != ''">
   and t.obj_id= #{objTd}
</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.qa_name,t.qa_name qaName,t.qa_type,t.qa_type qaType,t.status_cd,t.status_cd
        statusCd,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.remark,t.remark
        storeId,t.obj_type,t.obj_type objType,t.obj_id,t.obj_id objId,t.qa_id,t.qa_id qaId
        from question_answer t
        where 1 =1
        <if test="qaName !=null and qaName != ''">
            and t.qa_name= #{qaName}
        </if>
        <if test="qaType !=null and qaType != ''">
            and t.qa_type= #{qaType}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="startTime !=null and startTime != ''">
            and t.start_time= #{startTime}
        </if>
        <if test="endTime !=null and endTime != ''">
            and t.end_time= #{endTime}
        </if>
        <if test="storeId !=null and storeId != ''">
            and t.remark= #{storeId}
        </if>
        <if test="objType !=null and objType != ''">
            and t.obj_type= #{objType}
        </if>
        <if test="objId !=null and objId != ''">
            and t.obj_id= #{objId}
        </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="updateQuestionAnswerInfo" parameterType="Map">
        update  question_answer t set t.status_cd = #{statusCd}
<if test="newBId != null and newBId != ''">
,t.b_id = #{newBId}
</if>
<if test="qaName !=null and qaName != ''">
, t.qa_name= #{qaName}
</if>
<if test="qaType !=null and qaType != ''">
, t.qa_type= #{qaType}
</if>
<if test="startTime !=null and startTime != ''">
, t.start_time= #{startTime}
</if>
<if test="endTime !=null and endTime != ''">
, t.end_time= #{endTime}
</if>
<if test="storeId !=null and storeId != ''">
, t.remark= #{storeId}
</if>
<if test="objType !=null and objType != ''">
, t.obj_type= #{objType}
</if>
<if test="objTd !=null and objTd != ''">
, t.obj_id= #{objTd}
</if>
 where 1=1 <if test="qaId !=null and qaId != ''">
and t.qa_id= #{qaId}
</if>
        update question_answer t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="qaName !=null and qaName != ''">
            , t.qa_name= #{qaName}
        </if>
        <if test="qaType !=null and qaType != ''">
            , t.qa_type= #{qaType}
        </if>
        <if test="startTime !=null and startTime != ''">
            , t.start_time= #{startTime}
        </if>
        <if test="endTime !=null and endTime != ''">
            , t.end_time= #{endTime}
        </if>
        <if test="storeId !=null and storeId != ''">
            , t.remark= #{storeId}
        </if>
        <if test="objType !=null and objType != ''">
            , t.obj_type= #{objType}
        </if>
        <if test="objId !=null and objId != ''">
            , t.obj_id= #{objId}
        </if>
        where 1=1
        <if test="qaId !=null and qaId != ''">
            and t.qa_id= #{qaId}
        </if>
    </update>
    <!-- 查询答卷数量 add by wuxw 2018-07-03 -->
     <select id="queryQuestionAnswersCount" parameterType="Map" resultType="Map">
        select  count(1) count
from question_answer t
where 1 =1
<if test="qaName !=null and qaName != ''">
   and t.qa_name= #{qaName}
</if>
<if test="qaType !=null and qaType != ''">
   and t.qa_type= #{qaType}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="startTime !=null and startTime != ''">
   and t.start_time= #{startTime}
</if>
<if test="endTime !=null and endTime != ''">
   and t.end_time= #{endTime}
</if>
<if test="storeId !=null and storeId != ''">
   and t.remark= #{storeId}
</if>
<if test="objType !=null and objType != ''">
   and t.obj_type= #{objType}
</if>
<if test="objTd !=null and objTd != ''">
   and t.obj_id= #{objTd}
</if>
<if test="qaId !=null and qaId != ''">
   and t.qa_id= #{qaId}
</if>
    <select id="queryQuestionAnswersCount" parameterType="Map" resultType="Map">
        select count(1) count
        from question_answer t
        where 1 =1
        <if test="qaName !=null and qaName != ''">
            and t.qa_name= #{qaName}
        </if>
        <if test="qaType !=null and qaType != ''">
            and t.qa_type= #{qaType}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="startTime !=null and startTime != ''">
            and t.start_time= #{startTime}
        </if>
        <if test="endTime !=null and endTime != ''">
            and t.end_time= #{endTime}
        </if>
        <if test="storeId !=null and storeId != ''">
            and t.remark= #{storeId}
        </if>
        <if test="objType !=null and objType != ''">
            and t.obj_type= #{objType}
        </if>
        <if test="objId !=null and objId != ''">
            and t.obj_id= #{objId}
        </if>
        <if test="qaId !=null and qaId != ''">
            and t.qa_id= #{qaId}
        </if>
     </select>
    </select>
</mapper>
service-user/src/main/java/com/java110/user/api/QuestionAnswerApi.java
@@ -149,7 +149,7 @@
        questionAnswerDto.setPage(page);
        questionAnswerDto.setRow(row);
        questionAnswerDto.setObjType(objType);
        questionAnswerDto.setObjTd(QuestionAnswerDto.QA_TYPE_COMMUNITY.endsWith(objType) ? communityId : storeId);
        questionAnswerDto.setObjId(QuestionAnswerDto.QA_TYPE_COMMUNITY.endsWith(objType) ? communityId : storeId);
        return getQuestionAnswerBMOImpl.get(questionAnswerDto);
    }