|
|
|
@@ -5,11 +5,14 @@ import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.iformall.common.IdWorker; |
|
|
|
import com.iformall.domain.po.WxVtwoActivityGrant; |
|
|
|
import com.iformall.domain.po.WxVtwoActivityGrantOrder; |
|
|
|
import com.iformall.domain.po.WxVtwoActivityOrder; |
|
|
|
import com.iformall.domain.po.WxVtwoCashBackGrant; |
|
|
|
import com.iformall.domain.po.base.BaseEntity; |
|
|
|
import com.iformall.domain.vo.WxVtwoActivityStatisticsVo; |
|
|
|
import com.iformall.domain.vo.WxVtwoAwardStatistics; |
|
|
|
import com.iformall.enums.EnumYesOrNo; |
|
|
|
import com.iformall.mapper.WxVtwoActivityGrantOrderMapper; |
|
|
|
import com.iformall.service.WxVtwoCashBackGrantService; |
|
|
|
import com.iformall.mapper.WxVtwoCashBackGrantMapper; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -33,6 +36,9 @@ public class WxVtwoCashBackGrantServiceImpl extends ServiceImpl<WxVtwoCashBackGr |
|
|
|
@Autowired |
|
|
|
private WxVtwoCashBackGrantMapper wxVtwoCashBackGrantMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxVtwoActivityGrantOrderMapper wxVtwoActivityGrantOrderMapper; |
|
|
|
|
|
|
|
@Override |
|
|
|
public void handleFromOrder(WxVtwoCashBackGrant activityGrant, List<WxVtwoActivityOrder> orderList, boolean isGrant) { |
|
|
|
activityGrant.setOrderList(orderList); |
|
|
|
@@ -101,6 +107,21 @@ public class WxVtwoCashBackGrantServiceImpl extends ServiceImpl<WxVtwoCashBackGr |
|
|
|
WxVtwoCashBackGrant wxVtwoCashBackGrant = handleStatisticsVo(statisticsVo); |
|
|
|
return wxVtwoCashBackGrantMapper.activityAwardStatisticsChart(wxVtwoCashBackGrant); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<WxVtwoCashBackGrant> getGrantAwardHistory(WxVtwoCashBackGrant activityGrant) { |
|
|
|
activityGrant.setStatus(EnumYesOrNo.YES.getCode()); |
|
|
|
activityGrant.setSortColumns(BaseEntity.SortField.CreateDate_DESC); |
|
|
|
List<WxVtwoCashBackGrant> cashBackGrantList = wxVtwoCashBackGrantMapper.findList(activityGrant); |
|
|
|
if(cashBackGrantList != null && !cashBackGrantList.isEmpty()){ |
|
|
|
cashBackGrantList.forEach(wxVtwoCashBackGrant -> { |
|
|
|
List<WxVtwoActivityGrantOrder> orderNoList = wxVtwoActivityGrantOrderMapper.findOrderNoList(wxVtwoCashBackGrant.getId(), wxVtwoCashBackGrant.getTenantId()); |
|
|
|
wxVtwoCashBackGrant.setGrantOrderList(orderNoList); |
|
|
|
}); |
|
|
|
return cashBackGrantList; |
|
|
|
} |
|
|
|
return Collections.emptyList(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|