Authored by mingdan.ge

+日志

... ... @@ -353,7 +353,7 @@
select
<include refid="Base_Column_List" />
from union_share_orders where order_code is not null and status in (10,20,30,40)
and order_uid = #{orderUid} and promote_uid = #{promoteUid}
and order_uid = #{orderUid} and promote_uid = #{promoteUid} and extra_activity_id=0
<if test="beginTime != 0" >
and order_time &gt; #{beginTime}
</if>
... ...
... ... @@ -1361,6 +1361,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
}
result=unionShareOrdersMapper.updateStatusById(unionShareOrders.getId(), unionShareOrders.getStatus(), bo.getStatus(), DateUtil.getCurrentTimeSecond());
}
logger.info("saveOrUpdateOrder ,req is {},unionShareOrders is {},update result is {}.",bo,unionShareOrders,result);
if (result > 0 && unionShareOrders.getExtraActivityId() != null) {
if (ShareOrdersStatusEnum.isFailOrder(bo.getStatus())) {
//订单不可参与活动,重新处理该单参与的满单返
... ... @@ -1525,7 +1526,6 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
//发放完成
logger.info("dealWithWaitActivity over,activity is {},begin to change status to 2.",activity);
unionShareOrdersActivityMapper.updateStatusById(activity.getId(), 1, 2, DateUtil.getCurrentTimeSecond());
//更新用户月统计数据
return ;
}
... ... @@ -1672,10 +1672,12 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
UnionShareOrdersActivity activity = queryActivity(activityId);
if (null == activity || activity.getType() != 3) {
logger.info("joinExtraActivity end,activity error,orderUid is {},promoteUid is {},activityId is {},activity is {}.",orderUid,promoteUid,activityId,activity);
return false;
}
List<UnionShareOrders> orders = queryUidActivity(orderUid,promoteUid, activity.getStartTime(), activity.getEndTime());
if (orders.size() == 0) {
if (CollectionUtils.isEmpty(orders)) {
logger.info("joinExtraActivity end,orders null,orderUid is {},promoteUid is {},activityId is {},activity is {}.",orderUid,promoteUid,activityId,activity);
return false;
}
//查询满x单返活动条目(正常状态)
... ... @@ -1695,6 +1697,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
}
//更新订单额外返数据
int now = DateUtil.getCurrentTimeSecond();
logger.info("joinExtraActivity,orderUid is {},promoteUid is {},activityId is {},updateByIdsForExtraActivity,orderIds is {} .",orderUid,promoteUid,activityId,orderIds);
unionShareOrdersMapper.updateByIdsForExtraActivity(orderIds, activityId,now);
//插入额外返利单
... ... @@ -1710,6 +1713,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
insertExtraOrder.setOrderTime(now);
insertExtraOrder.setCreateTime(now);
insertExtraOrder.setUpdateTime(now);
logger.info("joinExtraActivity,orderUid is {},promoteUid is {},activityId is {},insertExtraOrder is {} .",orderUid,promoteUid,activityId,insertExtraOrder);
unionShareOrdersMapper.insertSelective(insertExtraOrder);
//记录满单返活动参与日志
... ... @@ -1725,7 +1729,9 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
logs.setUpdateTime(now);
logs.setPromoteUid(promoteUid);
logs.setOrderUid(orderUid);
logger.info("joinExtraActivity,orderUid is {},promoteUid is {},activityId is {},logs is {} .",orderUid,promoteUid,activityId,logs);
unionShareOrdersActivityLogsMapper.insertSelective(logs);
//更新用户月统计数据
updateMonthData(logs.getPromoteUid(),new HashSet<String>(){{add(DateUtil.getDateStrBySecond(now,"yyyyMM"));}});
return true;
}
... ...