Browse Source

拼团购后台接口Bug修改

feature/syp_points
songyunpeng 5 years ago
parent
commit
e07d16ede8
  1. 33
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyEvaluationDao.xml
  2. 121
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml

33
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyEvaluationDao.xml

@ -23,23 +23,22 @@
</resultMap> </resultMap>
<select id="getEvaluationList" <select id="getEvaluationList"
resultMap="getEvaluationListMap"> resultMap="getEvaluationListMap">
select select egbi.FACE_IMG,egbi.NICKNAME,egbi.EVALUATION_CONTENT,egbi.CREATED_TIME, t1.IMG_URL
t.FACE_IMG, from (
t.NICKNAME, select t.ID,
t.EVALUATION_CONTENT, t.FACE_IMG,
t.CREATED_TIME, t.NICKNAME,
t1.IMG_URL t.EVALUATION_CONTENT,
from epdc_group_buy_evaluation t t.CREATED_TIME
left join from epdc_group_buy_evaluation t
(select * from epdc_custom_img order by IMG_URL) t1 where t.DEL_FLAG = '0'
on t.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy_evaluation' and t1.DEL_FLAG = '0' and t.GROUP_BUY_ID = #{groupBuyId}
where and t.SHIELD_FLAG = '0'
t.ID in (select ID from ( select ID from epdc_group_buy_evaluation limit #{pageIndex},#{pageSize}) egbi
where DEL_FLAG = '0' left join
and GROUP_BUY_ID = #{groupBuyId} epdc_custom_img t1
and SHIELD_FLAG = '0' on egbi.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy_evaluation' and t1.DEL_FLAG = '0'
LIMIT #{pageIndex},#{pageSize})a) order by egbi.CREATED_TIME desc,t1.IMG_URL
order by t.CREATED_TIME desc
</select> </select>
<select id="selectListOfEvaluationsByGroupBuyId" resultMap="groupBuyEvaluationMap"> <select id="selectListOfEvaluationsByGroupBuyId" resultMap="groupBuyEvaluationMap">

121
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml

@ -14,20 +14,23 @@
</resultMap> </resultMap>
<select id="getGroupBuyList" <select id="getGroupBuyList"
resultMap="getGroupBuyListMap"> resultMap="getGroupBuyListMap">
select t.ID, select egbi.ID, egbi.GROUP_BUY_TITLE, egbi.GROUP_BUY_STATUS, egbi.groupBuyPublishTime, egbi.TOP_FLAG,t1.IMG_URL
t.GROUP_BUY_TITLE, from (
t.GROUP_BUY_STATUS, select t.ID,
t.CREATED_TIME as groupBuyPublishTime, t.GROUP_BUY_TITLE,
t.TOP_FLAG, t.GROUP_BUY_STATUS,
t1.IMG_URL t.CREATED_TIME as groupBuyPublishTime,
from epdc_group_buy_info t t.TOP_FLAG,
left join t.TOP_TIME,
epdc_custom_img t1 on t.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy' and t1.DEL_FLAG = '0' t.CREATED_TIME
where t.ID in (select ID from ( select ID from epdc_group_buy_info where DEL_FLAG = '0' from epdc_group_buy_info t
and SHIELD_FLAG = '0' where t.DEL_FLAG = '0'
and GROUP_BUY_STATUS != '10' and t.SHIELD_FLAG = '0'
LIMIT #{pageIndex},#{pageSize})a) and t.GROUP_BUY_STATUS != '10'
order by t.TOP_FLAG desc,t.TOP_TIME desc, t.GROUP_BUY_STATUS, t.CREATED_TIME desc,t1.IMG_URL limit #{pageIndex},#{pageSize}) egbi
left join
epdc_custom_img t1 on egbi.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy' and t1.DEL_FLAG = '0'
order by egbi.TOP_FLAG desc, egbi.TOP_TIME desc, egbi.GROUP_BUY_STATUS, egbi.CREATED_TIME desc, t1.IMG_URL
</select> </select>
<resultMap id="getGroupBuyDetailMap" type="com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO"> <resultMap id="getGroupBuyDetailMap" type="com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO">
<result property="id" column="ID"/> <result property="id" column="ID"/>
@ -103,26 +106,35 @@
</resultMap> </resultMap>
<select id="getMyGroupBuyJoin" <select id="getMyGroupBuyJoin"
resultMap="getMyGroupBuyJoinMap"> resultMap="getMyGroupBuyJoinMap">
select t.ID, select egbi.ID,
t.GROUP_BUY_TITLE, egbi.GROUP_BUY_TITLE,
t.GROUP_BUY_STATUS, egbi.GROUP_BUY_STATUS,
t.CREATED_TIME as groupBuyPublishTime, egbi.groupBuyPublishTime,
t1.IMG_URL, egbi.isEvaluation,
if((select count(1) from epdc_group_buy_evaluation egbe where egbe.DEL_FLAG='0' and egbe.USER_ID = t2.USER_ID t1.IMG_URL
and egbe.GROUP_BUY_ID = t.ID) = 0,0,1)isEvaluation from (
from epdc_group_buy_info t select t.ID,
t.GROUP_BUY_TITLE,
t.GROUP_BUY_STATUS,
t.CREATED_TIME as groupBuyPublishTime,
if((select count(1)
from epdc_group_buy_evaluation egbe
where egbe.DEL_FLAG = '0'
and egbe.USER_ID = t2.USER_ID
and egbe.GROUP_BUY_ID = t.ID) = 0, 0, 1) isEvaluation,
t.CREATED_TIME
from epdc_group_buy_info t
left join epdc_group_buy_sign_up t2 on t2.GROUP_BUY_ID = t.ID and t2.DEL_FLAG = '0'
where t.DEL_FLAG = '0'
and t.SHIELD_FLAG = '0'
and t.GROUP_BUY_STATUS != 10
and t2.USER_ID = #{userId}
and t2.SIGN_UP_STATUS != 10
limit #{pageIndex},#{pageSize}) egbi
left join left join
epdc_custom_img t1 epdc_custom_img t1
on t.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy' and t1.DEL_FLAG = '0' on egbi.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy' and t1.DEL_FLAG = '0'
left join epdc_group_buy_sign_up t2 on t2.GROUP_BUY_ID = t.ID and t2.DEL_FLAG= '0' order by egbi.GROUP_BUY_STATUS, egbi.CREATED_TIME desc, t1.IMG_URL
where
t.ID in (select ID from ( select ID from epdc_group_buy_info where DEL_FLAG = '0'
and SHIELD_FLAG = '0'
and GROUP_BUY_STATUS != 10
LIMIT #{pageIndex},#{pageSize})a)
and t2.USER_ID = #{userId}
and t2.SIGN_UP_STATUS != 10
order by t.GROUP_BUY_STATUS, t.CREATED_TIME desc,t1.IMG_URL
</select> </select>
<resultMap id="getMyGroupBuyPublishMap" <resultMap id="getMyGroupBuyPublishMap"
type="com.elink.esua.epdc.dto.result.EpdcSelectMyGroupBuyPublishInfoListResultDTO"> type="com.elink.esua.epdc.dto.result.EpdcSelectMyGroupBuyPublishInfoListResultDTO">
@ -137,25 +149,32 @@
</resultMap> </resultMap>
<select id="getMyGroupBuyPublish" <select id="getMyGroupBuyPublish"
resultMap="getMyGroupBuyPublishMap"> resultMap="getMyGroupBuyPublishMap">
select egbi.ID,
egbi.GROUP_BUY_TITLE,
egbi.GROUP_BUY_STATUS,
egbi.groupBuyPublishTime,
egbi.isEdit,
t1.IMG_URL
from(
select t.ID, select t.ID,
t.GROUP_BUY_TITLE, t.GROUP_BUY_TITLE,
t.GROUP_BUY_STATUS, t.GROUP_BUY_STATUS,
t.CREATED_TIME as groupBuyPublishTime, t.CREATED_TIME as groupBuyPublishTime,
t1.IMG_URL, if(t.GROUP_BUY_STATUS = 10 or t.GROUP_BUY_STATUS = 5 or t2.ID is not null,0,1)isEdit,
if(t.GROUP_BUY_STATUS = 10 or t.GROUP_BUY_STATUS = 5 or t2.ID is not null,0,1)isEdit t.CREATED_TIME
from epdc_group_buy_info t from epdc_group_buy_info t
left join left join
epdc_custom_img t1 (select * from epdc_group_buy_sign_up where DEL_FLAG = '0' and SIGN_UP_STATUS != 10 group by GROUP_BUY_ID)t2
on t.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy' and t1.DEL_FLAG = '0' on t.ID = t2.GROUP_BUY_ID
left join where
(select * from epdc_group_buy_sign_up where DEL_FLAG = '0' and SIGN_UP_STATUS != 10 group by GROUP_BUY_ID)t2 t.DEL_FLAG = '0'
on t.ID = t2.GROUP_BUY_ID and t.SHIELD_FLAG = '0'
where and t.USER_ID = #{userId}
t.ID in (select ID from ( select ID from epdc_group_buy_info where DEL_FLAG = '0' limit #{pageIndex},#{pageSize})egbi
and SHIELD_FLAG = '0' left join
and USER_ID = #{userId} epdc_custom_img t1
LIMIT #{pageIndex},#{pageSize})a) on egbi.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy' and t1.DEL_FLAG = '0'
order by t.GROUP_BUY_STATUS, t.CREATED_TIME desc,t1.IMG_URL order by egbi.GROUP_BUY_STATUS, egbi.CREATED_TIME desc, t1.IMG_URL;
</select> </select>
<select id="getGroupBuySignUpList" <select id="getGroupBuySignUpList"
resultType="com.elink.esua.epdc.dto.result.EpdcSelectSignUpInfoListResultDTO"> resultType="com.elink.esua.epdc.dto.result.EpdcSelectSignUpInfoListResultDTO">

Loading…
Cancel
Save