Commit d40e95da by hanghang.wang

华莱士

parent 5b212274
package cn.freemud.entities.dto.promotion;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @author freemud
* @title: QueryHistorygroupVO
* @projectName order-group
* @description: TODO
* @date 2021/4/28下午2:45
*/
@Data
public class QueryHistoryGroupVO {
private String activeId;
private String activeName;
private String startTime;
private String endTime;
private Integer groupStatus;
private String groupEndTime;
private List<Participants> participants;
private Good good;
@Data
public static class Participants{
private Integer sponsor;
private String groupId;
private String userName;
private String headUrl;
private String orderId;
}
@Data
public static class Good{
private String goodId;
private String goodName;
private Integer price;
private Integer originPrice;
}
}
package cn.freemud.entities.dto.promotion;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @author freemud
* @title: QueryHistoryGroupVOResponse
* @projectName order-group
* @description: TODO
* @date 2021/4/28下午2:47
*/
@Data
public class QueryHistoryGroupVOResponse {
private String statusCode;
private String msg;
private List<QueryHistoryGroupVO> result;
private String ver;
}
...@@ -14,6 +14,7 @@ package cn.freemud.entities.vo; ...@@ -14,6 +14,7 @@ package cn.freemud.entities.vo;
import cn.freemud.entities.dto.PromotionMessageDto; import cn.freemud.entities.dto.PromotionMessageDto;
import cn.freemud.entities.dto.activity.PayGiftCheckAndJoinResponseDto; import cn.freemud.entities.dto.activity.PayGiftCheckAndJoinResponseDto;
import cn.freemud.entities.dto.promotion.QueryHistoryGroupVO;
import cn.freemud.entities.dto.promotion.QuerySpellGroupVo; import cn.freemud.entities.dto.promotion.QuerySpellGroupVo;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
...@@ -475,7 +476,7 @@ public class QueryOrderResponseVo { ...@@ -475,7 +476,7 @@ public class QueryOrderResponseVo {
/** /**
* 团号查询拼团信息 * 团号查询拼团信息
*/ */
private QuerySpellGroupVo spellGroup; private QueryHistoryGroupVO spellGroup;
/** /**
* 拼团团号,此处用于接收转换信息 * 拼团团号,此处用于接收转换信息
......
...@@ -164,17 +164,17 @@ public class SpellGroupOrderDataManager { ...@@ -164,17 +164,17 @@ public class SpellGroupOrderDataManager {
return groupWorkJoinResponse; return groupWorkJoinResponse;
} }
public QuerySpellGroupVo queryHistoryByGroupId(String groupId, String partnerId){ public QueryHistoryGroupVO queryHistoryByGroupId(String groupId, String partnerId){
QueryGroupHistoryRequest querySpellGroupRequest = new QueryGroupHistoryRequest(); QueryGroupHistoryRequest querySpellGroupRequest = new QueryGroupHistoryRequest();
List<String> groups = new ArrayList<>(); List<String> groups = new ArrayList<>();
groups.add(groupId); groups.add(groupId);
querySpellGroupRequest.setPartnerId(partnerId); querySpellGroupRequest.setPartnerId(partnerId);
querySpellGroupRequest.setGroupIds(groups); querySpellGroupRequest.setGroupIds(groups);
QuerySpellGroupVoResponse querySpellGroupVoResponse = promotionDiscountClient.queryHistory(querySpellGroupRequest); QueryHistoryGroupVOResponse queryHistory = promotionDiscountClient.queryHistory(querySpellGroupRequest);
if(!ResponseResult.SUCCESS.getCode().equals(querySpellGroupVoResponse.getStatusCode()) || querySpellGroupVoResponse.getResult() == null){ if(!ResponseResult.SUCCESS.getCode().equals(queryHistory.getStatusCode()) || queryHistory.getResult() == null){
return null; return null;
} }
return querySpellGroupVoResponse.getResult(); return queryHistory.getResult().get(0);
} }
public QuerySpellGroupVoResponse queryByGroupIdNew(String groupId, String userId, String activityCode, String partnerId){ public QuerySpellGroupVoResponse queryByGroupIdNew(String groupId, String userId, String activityCode, String partnerId){
......
...@@ -1081,7 +1081,7 @@ public class OrderServiceImpl implements Orderservice { ...@@ -1081,7 +1081,7 @@ public class OrderServiceImpl implements Orderservice {
for(QueryOrderResponseVo orderResponseVo : queryOrderResponseVos){ for(QueryOrderResponseVo orderResponseVo : queryOrderResponseVos){
if (OrderMarketType.GROUPB.getIndex() == orderResponseVo.getMarketingType() && StringUtils.isNotEmpty(orderResponseVo.getSpellGroupCode()) if (OrderMarketType.GROUPB.getIndex() == orderResponseVo.getMarketingType() && StringUtils.isNotEmpty(orderResponseVo.getSpellGroupCode())
&& orders.get(0).getApportionDetails() != null) { && orders.get(0).getApportionDetails() != null) {
QuerySpellGroupVo querySpellGroupVo = spellGroupOrderDataManager.queryHistoryByGroupId(orderResponseVo.getSpellGroupCode(), QueryHistoryGroupVO querySpellGroupVo = spellGroupOrderDataManager.queryHistoryByGroupId(orderResponseVo.getSpellGroupCode(),
partnerId); partnerId);
orderResponseVo.setSpellGroup(querySpellGroupVo); orderResponseVo.setSpellGroup(querySpellGroupVo);
} }
...@@ -1672,7 +1672,7 @@ public class OrderServiceImpl implements Orderservice { ...@@ -1672,7 +1672,7 @@ public class OrderServiceImpl implements Orderservice {
//拼团订单 //拼团订单
if(OrderMarketType.GROUPB.getIndex() == queryOrderResponseVo.getMarketingType() && StringUtils.isNotEmpty(queryOrderResponseVo.getSpellGroupCode()) if(OrderMarketType.GROUPB.getIndex() == queryOrderResponseVo.getMarketingType() && StringUtils.isNotEmpty(queryOrderResponseVo.getSpellGroupCode())
&& orderBean.getApportionDetails()!=null){ && orderBean.getApportionDetails()!=null){
QuerySpellGroupVo querySpellGroupVo = spellGroupOrderDataManager.queryHistoryByGroupId(queryOrderResponseVo.getSpellGroupCode(),partnerId); QueryHistoryGroupVO querySpellGroupVo = spellGroupOrderDataManager.queryHistoryByGroupId(queryOrderResponseVo.getSpellGroupCode(),partnerId);
queryOrderResponseVo.setSpellGroup(querySpellGroupVo); queryOrderResponseVo.setSpellGroup(querySpellGroupVo);
} }
buildQueryOrderResponseVo(queryOrderResponseVo, response, partnerId); buildQueryOrderResponseVo(queryOrderResponseVo, response, partnerId);
......
...@@ -92,7 +92,7 @@ public interface PromotionDiscountClient { ...@@ -92,7 +92,7 @@ public interface PromotionDiscountClient {
* @return * @return
*/ */
@PostMapping("/activity/groupWork/queryHistory") @PostMapping("/activity/groupWork/queryHistory")
QuerySpellGroupVoResponse queryHistory(QueryGroupHistoryRequest querySpellGroupRequest); QueryHistoryGroupVOResponse queryHistory(QueryGroupHistoryRequest querySpellGroupRequest);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment