mcwl-ai/mcwl-communityCenter/src/main/resources/mapper/communityCenter/QuestionMapper.xml

26 lines
1.0 KiB
XML

<?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="com.mcwl.communityCenter.mapper.QuestionMapper">
<select id="list" resultType="com.mcwl.communityCenter.domain.Question">
select id, tenant_id, community_id, question_user_id, content,question_url, reply,reply_time,is_anonymous,status
from cc_question
where del_flag = '0'
and tenant_id = #{tenantId}
and community_id = #{communityId}
<if test="status != null">
and status= #{status}
</if>
</select>
<select id="selectByIdAndTenantIdAndCommunityId" resultType="com.mcwl.communityCenter.domain.Question">
select id, tenant_id, community_id, question_user_id, content,question_url, reply,reply_time,is_anonymous,status
from cc_question
where id = #{id}
and tenant_id = #{tenantId}
and community_id = #{communityId}
and del_flag = '0'
</select>
</mapper>