|
|
@ -5,7 +5,7 @@ |
|
|
|
<resultMap id="getGroupBuyListMap" type="com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO"> |
|
|
|
<result property="id" column="ID"/> |
|
|
|
<result property="groupBuyTitle" column="GROUP_BUY_TITLE"/> |
|
|
|
<result property="groupBuyStatus" column="GROUP_BUY_STATUS"/> |
|
|
|
<result property="groupBuyStatus" column="groupBuyStatus"/> |
|
|
|
<result property="groupBuyPublishTime" column="groupBuyPublishTime"/> |
|
|
|
<result property="topFlag" column="TOP_FLAG"/> |
|
|
|
<collection property="groupBuyImg" ofType="java.lang.String"> |
|
|
@ -14,11 +14,11 @@ |
|
|
|
</resultMap> |
|
|
|
<select id="getGroupBuyList" |
|
|
|
resultMap="getGroupBuyListMap"> |
|
|
|
select egbi.ID, egbi.GROUP_BUY_TITLE, egbi.GROUP_BUY_STATUS, egbi.groupBuyPublishTime, egbi.TOP_FLAG,t1.IMG_URL |
|
|
|
select egbi.ID, egbi.GROUP_BUY_TITLE, egbi.groupBuyStatus, egbi.groupBuyPublishTime, egbi.TOP_FLAG,t1.IMG_URL |
|
|
|
from ( |
|
|
|
select t.ID, |
|
|
|
t.GROUP_BUY_TITLE, |
|
|
|
t.GROUP_BUY_STATUS, |
|
|
|
if(t.GROUP_BUY_STATUS = '0' and t.GROUP_BUY_END_TIME is not null and t.GROUP_BUY_END_TIME < now(),4,t.GROUP_BUY_STATUS) as groupBuyStatus, |
|
|
|
t.CREATED_TIME as groupBuyPublishTime, |
|
|
|
t.TOP_FLAG, |
|
|
|
t.TOP_TIME, |
|
|
@ -27,11 +27,11 @@ |
|
|
|
where t.DEL_FLAG = '0' |
|
|
|
and t.SHIELD_FLAG = '0' |
|
|
|
and t.GROUP_BUY_STATUS != '10' |
|
|
|
order by t.TOP_FLAG desc, t.TOP_TIME desc, t.GROUP_BUY_STATUS, t.CREATED_TIME desc |
|
|
|
order by t.TOP_FLAG desc, t.TOP_TIME desc, groupBuyStatus, t.CREATED_TIME desc |
|
|
|
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 |
|
|
|
order by egbi.TOP_FLAG desc, egbi.TOP_TIME desc, egbi.groupBuyStatus, egbi.CREATED_TIME desc, t1.IMG_URL |
|
|
|
</select> |
|
|
|
<resultMap id="getGroupBuyDetailMap" type="com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO"> |
|
|
|
<result property="id" column="ID"/> |
|
|
@ -41,7 +41,8 @@ |
|
|
|
<result property="groupBuyNumber" column="groupBuyNumber"/> |
|
|
|
<result property="signUpStatus" column="signUpStatus"/> |
|
|
|
<result property="cancelReason" column="CANCEL_REASON"/> |
|
|
|
<result property="groupBuyStatus" column="GROUP_BUY_STATUS"/> |
|
|
|
<result property="groupBuyStatus" column="groupBuyStatus"/> |
|
|
|
<result property="groupBuyEndTime" column="GROUP_BUY_END_TIME"/> |
|
|
|
<collection property="groupBuyImg" ofType="java.lang.String"> |
|
|
|
<result property="image" column="IMG_URL"/> |
|
|
|
</collection> |
|
|
@ -69,10 +70,11 @@ |
|
|
|
and egbsu.DEL_FLAG = '0' |
|
|
|
and egbsu.SIGN_UP_STATUS != 10), 0) signUpStatus, |
|
|
|
t.CANCEL_REASON, |
|
|
|
t.GROUP_BUY_STATUS, |
|
|
|
if(t.GROUP_BUY_STATUS = '0' and t.GROUP_BUY_END_TIME is not null and t.GROUP_BUY_END_TIME < now(),4,t.GROUP_BUY_STATUS) as groupBuyStatus, |
|
|
|
t2.GROUP_BUY_NUMBER, |
|
|
|
t2.GROUP_BUY_PRICE, |
|
|
|
t1.IMG_URL |
|
|
|
t1.IMG_URL, |
|
|
|
t.GROUP_BUY_END_TIME |
|
|
|
from epdc_group_buy_info t |
|
|
|
left join |
|
|
|
epdc_custom_img t1 |
|
|
@ -98,7 +100,7 @@ |
|
|
|
type="com.elink.esua.epdc.dto.result.EpdcSelectMyGroupBuyJoinInfoListResultDTO"> |
|
|
|
<result property="id" column="ID"/> |
|
|
|
<result property="groupBuyTitle" column="GROUP_BUY_TITLE"/> |
|
|
|
<result property="groupBuyStatus" column="GROUP_BUY_STATUS"/> |
|
|
|
<result property="groupBuyStatus" column="groupBuyStatus"/> |
|
|
|
<result property="groupBuyPublishTime" column="groupBuyPublishTime"/> |
|
|
|
<result property="isEvaluation" column="isEvaluation"/> |
|
|
|
<collection property="groupBuyImg" ofType="java.lang.String"> |
|
|
@ -109,14 +111,14 @@ |
|
|
|
resultMap="getMyGroupBuyJoinMap"> |
|
|
|
select egbi.ID, |
|
|
|
egbi.GROUP_BUY_TITLE, |
|
|
|
egbi.GROUP_BUY_STATUS, |
|
|
|
egbi.groupBuyStatus, |
|
|
|
egbi.groupBuyPublishTime, |
|
|
|
egbi.isEvaluation, |
|
|
|
t1.IMG_URL |
|
|
|
from ( |
|
|
|
select t.ID, |
|
|
|
t.GROUP_BUY_TITLE, |
|
|
|
t.GROUP_BUY_STATUS, |
|
|
|
if(t.GROUP_BUY_STATUS = '0' and t.GROUP_BUY_END_TIME is not null and t.GROUP_BUY_END_TIME < now(),4,t.GROUP_BUY_STATUS) as groupBuyStatus, |
|
|
|
t.CREATED_TIME as groupBuyPublishTime, |
|
|
|
if((select count(1) |
|
|
|
from epdc_group_buy_evaluation egbe |
|
|
@ -130,18 +132,18 @@ |
|
|
|
and t.SHIELD_FLAG = '0' |
|
|
|
and t2.USER_ID = #{userId} |
|
|
|
and t2.SIGN_UP_STATUS != 10 |
|
|
|
order by t.GROUP_BUY_STATUS, t.CREATED_TIME desc |
|
|
|
order by groupBuyStatus, t.CREATED_TIME desc |
|
|
|
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 |
|
|
|
order by egbi.groupBuyStatus, egbi.CREATED_TIME desc, t1.IMG_URL |
|
|
|
</select> |
|
|
|
<resultMap id="getMyGroupBuyPublishMap" |
|
|
|
type="com.elink.esua.epdc.dto.result.EpdcSelectMyGroupBuyPublishInfoListResultDTO"> |
|
|
|
<result property="id" column="ID"/> |
|
|
|
<result property="groupBuyTitle" column="GROUP_BUY_TITLE"/> |
|
|
|
<result property="groupBuyStatus" column="GROUP_BUY_STATUS"/> |
|
|
|
<result property="groupBuyStatus" column="groupBuyStatus"/> |
|
|
|
<result property="groupBuyPublishTime" column="groupBuyPublishTime"/> |
|
|
|
<result property="isEdit" column="isEdit"/> |
|
|
|
<collection property="groupBuyImg" ofType="java.lang.String"> |
|
|
@ -152,14 +154,14 @@ |
|
|
|
resultMap="getMyGroupBuyPublishMap"> |
|
|
|
select egbi.ID, |
|
|
|
egbi.GROUP_BUY_TITLE, |
|
|
|
egbi.GROUP_BUY_STATUS, |
|
|
|
egbi.groupBuyStatus, |
|
|
|
egbi.groupBuyPublishTime, |
|
|
|
egbi.isEdit, |
|
|
|
t1.IMG_URL |
|
|
|
from( |
|
|
|
select t.ID, |
|
|
|
t.GROUP_BUY_TITLE, |
|
|
|
t.GROUP_BUY_STATUS, |
|
|
|
if(t.GROUP_BUY_STATUS = '0' and t.GROUP_BUY_END_TIME is not null and t.GROUP_BUY_END_TIME < now(),4,t.GROUP_BUY_STATUS) as groupBuyStatus, |
|
|
|
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 |
|
|
@ -171,12 +173,12 @@ |
|
|
|
t.DEL_FLAG = '0' |
|
|
|
and t.SHIELD_FLAG = '0' |
|
|
|
and t.USER_ID = #{userId} |
|
|
|
order by t.GROUP_BUY_STATUS, t.CREATED_TIME desc |
|
|
|
order by groupBuyStatus, t.CREATED_TIME desc |
|
|
|
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; |
|
|
|
order by egbi.groupBuyStatus, egbi.CREATED_TIME desc, t1.IMG_URL; |
|
|
|
</select> |
|
|
|
<select id="getGroupBuySignUpList" |
|
|
|
resultType="com.elink.esua.epdc.dto.result.EpdcSelectSignUpInfoListResultDTO"> |
|
|
@ -218,9 +220,10 @@ |
|
|
|
<result property="shieldReason" column="SHIELD_REASON"/> |
|
|
|
<result property="topFlag" column="TOP_FLAG"/> |
|
|
|
<result property="topTime" column="TOP_TIME"/> |
|
|
|
<result property="groupBuyStatus" column="GROUP_BUY_STATUS"/> |
|
|
|
<result property="groupBuyStatus" column="groupBuyStatus"/> |
|
|
|
<result property="cancelReason" column="CANCEL_REASON"/> |
|
|
|
<result property="createdTime" column="CREATED_TIME"/> |
|
|
|
<result property="groupBuyEndTime" column="GROUP_BUY_END_TIME"/> |
|
|
|
<collection property="prices" ofType="com.elink.esua.epdc.dto.GroupBuyPriceNumberDTO"> |
|
|
|
<result property="groupBuyNumber" column="GROUP_BUY_NUMBER"/> |
|
|
|
<result property="groupBuyPrice" column="GROUP_BUY_PRICE"/> |
|
|
@ -240,12 +243,13 @@ |
|
|
|
i.SHIELD_REASON, |
|
|
|
i.TOP_FLAG, |
|
|
|
i.TOP_TIME, |
|
|
|
i.GROUP_BUY_STATUS, |
|
|
|
if(i.GROUP_BUY_STATUS = '0' and i.GROUP_BUY_END_TIME is not null and i.GROUP_BUY_END_TIME < now(),4,i.GROUP_BUY_STATUS) as groupBuyStatus, |
|
|
|
i.CANCEL_REASON, |
|
|
|
i.CREATED_TIME, |
|
|
|
n.GROUP_BUY_NUMBER, |
|
|
|
n.GROUP_BUY_PRICE, |
|
|
|
img.IMG_URL |
|
|
|
img.IMG_URL, |
|
|
|
i.GROUP_BUY_END_TIME |
|
|
|
FROM |
|
|
|
`epdc_group_buy_info` i |
|
|
|
LEFT JOIN epdc_group_buy_price_number n ON n.GROUP_BUY_ID = i.ID |
|
|
|