Browse Source

拼团购后台接口Bug修改

feature/syp_points
songyunpeng 5 years ago
parent
commit
ca4e43c8f0
  1. 2
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyEvaluationServiceImpl.java
  2. 9
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyEvaluationDao.xml
  3. 49
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml

2
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyEvaluationServiceImpl.java

@ -119,7 +119,7 @@ public class GroupBuyEvaluationServiceImpl extends BaseServiceImpl<GroupBuyEvalu
if(formDTO.getEvaluationImg()!=null && formDTO.getEvaluationImg().size()>0){
formDTO.getEvaluationImg().forEach(evaluationImg -> {
CustomImgEntity customImgEntity= ConvertUtils.sourceToTarget(evaluationImg,CustomImgEntity.class);
customImgEntity.setReferenceId(groupBuyEvaluationEntity.getGroupBuyId());
customImgEntity.setReferenceId(groupBuyEvaluationEntity.getId());
customImgEntity.setImgUrl(evaluationImg);
customImgEntity.setImgType(CustomImageConstant.IMAGE_TYPE_GROUP_BUY_EVALUATION);
customImgService.insert(customImgEntity);

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

@ -32,8 +32,13 @@
from epdc_group_buy_evaluation t
left join
(select * from epdc_custom_img order by IMG_URL) t1
on t.GROUP_BUY_ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy_evaluation' and t1.DEL_FLAG = '0'
where t.DEL_FLAG = '0' and t.GROUP_BUY_ID = #{groupBuyId} and t.SHIELD_FLAG = '0'
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>

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

@ -22,12 +22,12 @@
t1.IMG_URL
from epdc_group_buy_info 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' and t1.DEL_FLAG = '0'
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
LIMIT #{pageIndex},#{pageSize}
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>
<resultMap id="getGroupBuyDetailMap" type="com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO">
<result property="id" column="ID"/>
@ -71,13 +71,12 @@
t1.IMG_URL
from epdc_group_buy_info t
left join
(select * from epdc_custom_img order by IMG_URL) t1
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_price_number order by GROUP_BUY_NUMBER) t2
on t.ID = t2.GROUP_BUY_ID and t2.DEL_FLAG = '0'
left join epdc_group_buy_price_number t2 on t.ID = t2.GROUP_BUY_ID and t2.DEL_FLAG = '0'
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0'
and t.ID = #{id}
order by t2.GROUP_BUY_NUMBER,t1.IMG_URL
</select>
<select id="selectListOfOrganizationInfo" resultType="com.elink.esua.epdc.dto.GroupBuyInfoDTO">
SELECT
@ -113,15 +112,17 @@
and egbe.GROUP_BUY_ID = t.ID) = 0,0,1)isEvaluation
from epdc_group_buy_info t
left join
(select * from epdc_custom_img order by IMG_URL) t1
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.DEL_FLAG = '0'
and t.SHIELD_FLAG = '0'
and t.GROUP_BUY_STATUS != '10'
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}
order by t.GROUP_BUY_STATUS, t.CREATED_TIME desc
LIMIT #{pageIndex},#{pageSize}
and t2.SIGN_UP_STATUS != 10
order by t.GROUP_BUY_STATUS, t.CREATED_TIME desc,t1.IMG_URL
</select>
<resultMap id="getMyGroupBuyPublishMap"
type="com.elink.esua.epdc.dto.result.EpdcSelectMyGroupBuyPublishInfoListResultDTO">
@ -144,17 +145,17 @@
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
(select * from epdc_custom_img order by IMG_URL) t1
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' group by GROUP_BUY_ID)t2
(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.GROUP_BUY_STATUS != '10'
and t.USER_ID = #{userId}
order by t.GROUP_BUY_STATUS, t.CREATED_TIME desc
LIMIT #{pageIndex},#{pageSize}
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
</select>
<select id="getGroupBuySignUpList"
resultType="com.elink.esua.epdc.dto.result.EpdcSelectSignUpInfoListResultDTO">

Loading…
Cancel
Save