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>
<select id="getEvaluationList"
resultMap="getEvaluationListMap">
select
t.FACE_IMG,
t.NICKNAME,
t.EVALUATION_CONTENT,
t.CREATED_TIME,
t1.IMG_URL
from epdc_group_buy_evaluation t
left join
(select * from epdc_custom_img order by IMG_URL) t1
on t.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy_evaluation' and t1.DEL_FLAG = '0'
where
t.ID in (select ID from ( select ID from epdc_group_buy_evaluation
where DEL_FLAG = '0'
and GROUP_BUY_ID = #{groupBuyId}
and SHIELD_FLAG = '0'
LIMIT #{pageIndex},#{pageSize})a)
order by t.CREATED_TIME desc
select egbi.FACE_IMG,egbi.NICKNAME,egbi.EVALUATION_CONTENT,egbi.CREATED_TIME, t1.IMG_URL
from (
select t.ID,
t.FACE_IMG,
t.NICKNAME,
t.EVALUATION_CONTENT,
t.CREATED_TIME
from epdc_group_buy_evaluation t
where t.DEL_FLAG = '0'
and t.GROUP_BUY_ID = #{groupBuyId}
and t.SHIELD_FLAG = '0'
limit #{pageIndex},#{pageSize}) egbi
left join
epdc_custom_img t1
on egbi.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy_evaluation' and t1.DEL_FLAG = '0'
order by egbi.CREATED_TIME desc,t1.IMG_URL
</select>
<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>
<select id="getGroupBuyList"
resultMap="getGroupBuyListMap">
select t.ID,
t.GROUP_BUY_TITLE,
t.GROUP_BUY_STATUS,
t.CREATED_TIME as groupBuyPublishTime,
t.TOP_FLAG,
t1.IMG_URL
from epdc_group_buy_info t
left join
epdc_custom_img t1 on t.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy' and t1.DEL_FLAG = '0'
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)
order by t.TOP_FLAG desc,t.TOP_TIME desc, t.GROUP_BUY_STATUS, t.CREATED_TIME desc,t1.IMG_URL
select egbi.ID, egbi.GROUP_BUY_TITLE, egbi.GROUP_BUY_STATUS, egbi.groupBuyPublishTime, egbi.TOP_FLAG,t1.IMG_URL
from (
select t.ID,
t.GROUP_BUY_TITLE,
t.GROUP_BUY_STATUS,
t.CREATED_TIME as groupBuyPublishTime,
t.TOP_FLAG,
t.TOP_TIME,
t.CREATED_TIME
from epdc_group_buy_info t
where t.DEL_FLAG = '0'
and t.SHIELD_FLAG = '0'
and t.GROUP_BUY_STATUS != '10'
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>
<resultMap id="getGroupBuyDetailMap" type="com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO">
<result property="id" column="ID"/>
@ -103,26 +106,35 @@
</resultMap>
<select id="getMyGroupBuyJoin"
resultMap="getMyGroupBuyJoinMap">
select t.ID,
t.GROUP_BUY_TITLE,
t.GROUP_BUY_STATUS,
t.CREATED_TIME as groupBuyPublishTime,
t1.IMG_URL,
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
from epdc_group_buy_info t
select egbi.ID,
egbi.GROUP_BUY_TITLE,
egbi.GROUP_BUY_STATUS,
egbi.groupBuyPublishTime,
egbi.isEvaluation,
t1.IMG_URL
from (
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
epdc_custom_img t1
on t.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'
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
epdc_custom_img t1
on egbi.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy' and t1.DEL_FLAG = '0'
order by egbi.GROUP_BUY_STATUS, egbi.CREATED_TIME desc, t1.IMG_URL
</select>
<resultMap id="getMyGroupBuyPublishMap"
type="com.elink.esua.epdc.dto.result.EpdcSelectMyGroupBuyPublishInfoListResultDTO">
@ -137,25 +149,32 @@
</resultMap>
<select id="getMyGroupBuyPublish"
resultMap="getMyGroupBuyPublishMap">
select egbi.ID,
egbi.GROUP_BUY_TITLE,
egbi.GROUP_BUY_STATUS,
egbi.groupBuyPublishTime,
egbi.isEdit,
t1.IMG_URL
from(
select t.ID,
t.GROUP_BUY_TITLE,
t.GROUP_BUY_STATUS,
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
from epdc_group_buy_info t
left join
epdc_custom_img t1
on t.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy' and t1.DEL_FLAG = '0'
left join
(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 = t2.GROUP_BUY_ID
where
t.ID in (select ID from ( select ID from epdc_group_buy_info where DEL_FLAG = '0'
and SHIELD_FLAG = '0'
and USER_ID = #{userId}
LIMIT #{pageIndex},#{pageSize})a)
order by t.GROUP_BUY_STATUS, t.CREATED_TIME desc,t1.IMG_URL
t.GROUP_BUY_TITLE,
t.GROUP_BUY_STATUS,
t.CREATED_TIME as groupBuyPublishTime,
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
left join
(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 = t2.GROUP_BUY_ID
where
t.DEL_FLAG = '0'
and t.SHIELD_FLAG = '0'
and t.USER_ID = #{userId}
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.GROUP_BUY_STATUS, egbi.CREATED_TIME desc, t1.IMG_URL;
</select>
<select id="getGroupBuySignUpList"
resultType="com.elink.esua.epdc.dto.result.EpdcSelectSignUpInfoListResultDTO">

Loading…
Cancel
Save