|
|
package com.yoho.unions.server.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONException;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yoho.core.config.ConfigReader;
|
|
|
import com.yoho.core.rabbitmq.YhProducer;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yoho.service.model.union.bo.*;
|
|
|
import com.yoho.service.model.union.request.UnionShareOrderReqBO;
|
|
|
import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;
|
|
|
import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;
|
|
|
import com.yoho.service.model.union.response.UnionShareOrderRspBO;
|
|
|
import com.yoho.unions.common.enums.OrderStatusEnum;
|
|
|
import com.yoho.unions.common.enums.ShareOrdersKeyEnum;
|
|
|
import com.yoho.unions.common.enums.ShareOrdersStatusEnum;
|
|
|
import com.yoho.unions.common.redis.RedisHashCache;
|
|
|
import com.yoho.unions.common.redis.RedisValueCache;
|
|
|
import com.yoho.unions.common.service.IBusinessExportService;
|
|
|
import com.yoho.unions.common.utils.DateUtil;
|
|
|
import com.yoho.unions.common.utils.RandomUtil;
|
|
|
import com.yoho.unions.convert.BeanConvert;
|
|
|
import com.yoho.unions.convert.Convert;
|
|
|
import com.yoho.unions.dal.UnionShareOrdersMapper;
|
|
|
import com.yoho.unions.dal.UnionShareOrdersProductMapper;
|
|
|
import com.yoho.unions.dal.UnionShareSettlementMapper;
|
|
|
import com.yoho.unions.dal.UnionShareUserMapper;
|
|
|
import com.yoho.unions.dal.*;
|
|
|
import com.yoho.unions.dal.model.*;
|
|
|
import com.yoho.unions.server.service.IUnionShareService;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.BeansException;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
...
|
...
|
@@ -30,13 +38,13 @@ import java.util.*; |
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 联盟红人推广返利
|
|
|
* Created by mingdan.ge on 2018/5/10.
|
|
|
*/
|
|
|
@Service
|
|
|
public class UnionShareServiceImpl implements IUnionShareService {
|
|
|
|
|
|
public class UnionShareServiceImpl implements IUnionShareService,IBusinessExportService {
|
|
|
private Logger logger = LoggerFactory.getLogger(UnionShareServiceImpl.class);
|
|
|
|
|
|
@Autowired
|
...
|
...
|
@@ -47,10 +55,12 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
private UnionShareSettlementMapper unionShareSettlementMapper;
|
|
|
@Autowired
|
|
|
private UnionShareUserMapper unionShareUserMapper;
|
|
|
|
|
|
@Autowired
|
|
|
IMktMarketingUrlDAO mktMarketingUrlDAO;
|
|
|
@Resource
|
|
|
RedisValueCache redisValueCache;
|
|
|
@Resource( name = "yhProducer")
|
|
|
private YhProducer yhProducer;
|
|
|
|
|
|
@Resource(name = "core-config-reader")
|
|
|
private ConfigReader configReader;
|
|
|
|
...
|
...
|
@@ -88,10 +98,116 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
result.setCanSettlement(canSettlement);
|
|
|
result.setHistorySettlementAmount(historySettlementAmount);
|
|
|
result.setSettlementAmount(settlementAmount);
|
|
|
logger.info("getUserSettleMentInfo enter,uid is {},result is {}",uid,result);
|
|
|
logger.info("getUserSettleMentInfo end,uid is {},result is {}",uid,result);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public PageUnionShareOrderRspBO queryUnionShareOrders(UnionShareOrderSearchReqBO reqBO){
|
|
|
logger.info("queryUnionShareOrders param is {}", reqBO);
|
|
|
UnionShareOrderSearchBo bo=initUnionShareOrderSearchBo(reqBO);
|
|
|
List<Integer> uids=null;
|
|
|
if(bo.getUnionType()!=null || bo.getUnionName()!=null || bo.getChannelType()!=null){
|
|
|
uids=queryUids(bo);
|
|
|
if(null==uids){
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
//查询总数
|
|
|
int count = unionShareOrdersMapper.selectCountByUids(bo.getBeginTime(), bo.getEndTime(), uids,bo.getOrderCode());
|
|
|
logger.info("unionShareOrdersMapper.selectCountByUids: size is {}", count);
|
|
|
if (count < 1) {
|
|
|
return null;
|
|
|
}
|
|
|
Map<String,UnionShareOrders> ordersDOMap=this.unionShareOrdersMapper.selectListByUids(bo.getBeginTime(), bo.getEndTime(), uids,bo.getOrderCode(), reqBO.getStart(), reqBO.getSize());
|
|
|
List<UnionShareOrderRspBO> unionOrderRspBOList = queryUnionShareOrderRsp(ordersDOMap);
|
|
|
PageUnionShareOrderRspBO pageUnionOrderRspBO = new PageUnionShareOrderRspBO();
|
|
|
pageUnionOrderRspBO.setList(unionOrderRspBOList);
|
|
|
pageUnionOrderRspBO.setTotal(count);
|
|
|
pageUnionOrderRspBO.setSize(reqBO.getSize());
|
|
|
pageUnionOrderRspBO.setPage(reqBO.getPage());
|
|
|
return pageUnionOrderRspBO;
|
|
|
}
|
|
|
|
|
|
private List<Integer> queryUids(UnionShareOrderSearchBo bo){
|
|
|
List<Integer> uids=null;
|
|
|
List<Long> unionTypes=mktMarketingUrlDAO.selectUnionTypes(bo.getUnionType(), bo.getUnionName(), bo.getChannelType());
|
|
|
if(unionTypes.isEmpty()){
|
|
|
return null;
|
|
|
}
|
|
|
uids=this.unionShareUserMapper.selectUids(unionTypes);
|
|
|
if(uids.isEmpty()){
|
|
|
return null;
|
|
|
}
|
|
|
return uids;
|
|
|
}
|
|
|
private UnionShareOrderSearchBo initUnionShareOrderSearchBo(UnionShareOrderSearchReqBO reqBO){
|
|
|
UnionShareOrderSearchBo bo=new UnionShareOrderSearchBo();
|
|
|
bo.setBeginTime(StringUtils.isBlank(reqBO.getBeginTime()) ? 0 : Integer.parseInt(reqBO.getBeginTime()));
|
|
|
bo.setEndTime(StringUtils.isBlank(reqBO.getEndTime()) ? 0 : Integer.parseInt(reqBO.getEndTime()));
|
|
|
bo.setOrderCode(StringUtils.isBlank(reqBO.getOrderCode()) ? null : reqBO.getOrderCode());
|
|
|
bo.setUnionType(StringUtils.isBlank(reqBO.getUnionId()) ? null :Long.valueOf( reqBO.getUnionId()));
|
|
|
bo.setUnionName(StringUtils.isBlank(reqBO.getUnionType()) ? null : reqBO.getUnionType());
|
|
|
bo.setChannelType(StringUtils.isBlank(reqBO.getChannelType())?null:reqBO.getChannelType());
|
|
|
bo.setIdList(reqBO.getIdsList());
|
|
|
return bo;
|
|
|
}
|
|
|
|
|
|
private List<UnionShareOrderRspBO> queryUnionShareOrderRsp(Map<String,UnionShareOrders> ordersDOMap){
|
|
|
List<UnionShareOrderRspBO> unionOrderRspBOList = new ArrayList<>(ordersDOMap.size());
|
|
|
Map<String, ShareUserOrderDatailBO> userOrderDatailBOMap = initUserShareOrderDatails(ordersDOMap);
|
|
|
for (UnionShareOrders orders : ordersDOMap.values()) {
|
|
|
UnionShareOrderRspBO bo=initShareUnionOrderRspBO(orders,userOrderDatailBOMap);
|
|
|
unionOrderRspBOList.add(bo);
|
|
|
}
|
|
|
return unionOrderRspBOList;
|
|
|
}
|
|
|
|
|
|
private UnionShareOrderRspBO initShareUnionOrderRspBO(UnionShareOrders orders,Map<String, ShareUserOrderDatailBO> userOrderDatailBOMap){
|
|
|
UnionShareOrderRspBO orderRspBO=new UnionShareOrderRspBO();
|
|
|
orderRspBO.setOrderAmount(orders.getAmount());
|
|
|
orderRspBO.setOrderStatus(OrderStatusEnum.getNameByCode(orders.getStatus()));
|
|
|
Byte isNew=orders.getIsNew();
|
|
|
orderRspBO.setIsNew(isNew==null||isNew.equals(2)?"N":"Y");
|
|
|
orderRspBO.setUid(orders.getPromoteUid());
|
|
|
orderRspBO.setOrderCode(orders.getOrderCode());
|
|
|
orderRspBO.setId(orders.getId());
|
|
|
orderRspBO.setOrderTime(DateUtil.long2DateStr(Long.valueOf(orders.getCreateTime()) * Long.valueOf(1000), "yyyy-MM-dd HH:mm:ss"));
|
|
|
ShareUserOrderDatailBO userOrderDatailBO = userOrderDatailBOMap.get(orders.getOrderCode());
|
|
|
orderRspBO.setUnionId(userOrderDatailBO.getUnionType());
|
|
|
orderRspBO.setUnionType(userOrderDatailBO.getUnionName());
|
|
|
orderRspBO.setChannelType(userOrderDatailBO.getChannelType());
|
|
|
return orderRspBO;
|
|
|
}
|
|
|
|
|
|
private List<Integer> getUids(Map<String,UnionShareOrders> ordersDOMap){
|
|
|
List<Integer> uids=new ArrayList<>(ordersDOMap.size());
|
|
|
for(UnionShareOrders order:ordersDOMap.values()){
|
|
|
uids.add(order.getPromoteUid());
|
|
|
}
|
|
|
return uids;
|
|
|
}
|
|
|
private Map<String, ShareUserOrderDatailBO> initUserShareOrderDatails( Map<String,UnionShareOrders> ordersDOMap){
|
|
|
Map<String, ShareUserOrderDatailBO> userOrderDatailBOMap = new HashMap<>(ordersDOMap.size());
|
|
|
Map<Integer,UnionShareUser> userMap=unionShareUserMapper.selectByUids(getUids(ordersDOMap));
|
|
|
for (UnionShareOrders userOrders : ordersDOMap.values()) {
|
|
|
String unionType=userMap.get(userOrders.getPromoteUid()).getUnionType();
|
|
|
ShareUserOrderDatailBO userOrderDatailBO = new ShareUserOrderDatailBO();
|
|
|
userOrderDatailBO.setUnionType(unionType);
|
|
|
MktMarketingUrl mktMarketingUrl = redisValueCache.get("yh:union:uniontype:" + unionType, MktMarketingUrl.class);
|
|
|
if (mktMarketingUrl == null) {
|
|
|
mktMarketingUrl = mktMarketingUrlDAO.selectByPrimaryKey(Long.valueOf(unionType));
|
|
|
redisValueCache.set("yh:union:uniontype:" + unionType, mktMarketingUrl, 1, TimeUnit.HOURS);
|
|
|
}
|
|
|
if (mktMarketingUrl != null) {
|
|
|
userOrderDatailBO.setUnionName(mktMarketingUrl.getName());
|
|
|
userOrderDatailBO.setChannelType(mktMarketingUrl.getChannelType());
|
|
|
}
|
|
|
userOrderDatailBO.setOrderCode(userOrders.getOrderCode());
|
|
|
userOrderDatailBOMap.put(userOrderDatailBO.getOrderCode(),userOrderDatailBO);
|
|
|
}
|
|
|
return userOrderDatailBOMap;
|
|
|
}
|
|
|
/**
|
|
|
* 用户登录时获取对应的渠道号
|
|
|
* @param uid
|
...
|
...
|
@@ -113,7 +229,7 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
unionShareUser.setShareId(configReader.getString(UNION_SHAREID, ""));
|
|
|
unionShareUser.setUrl(configReader.getString(UNION_URL, ""));
|
|
|
//设置缓存
|
|
|
addToRedis(ShareOrdersKeyEnum.UNION_TYPE,uid,unionShareUser,key);
|
|
|
addToRedis(ShareOrdersKeyEnum.UNION_TYPE, uid, unionShareUser, key);
|
|
|
return unionShareUser;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -212,18 +328,22 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
//判断是否可以进行状态变更
|
|
|
if (!checkOrderStatusChangePass(unionShareOrders.getStatus(), bo.getStatus())) {
|
|
|
//订单状态不可变更
|
|
|
logger.info("saveOrUpdateOrder end,status can not be change,oldStatus is {} ,req is {}",unionShareOrders.getStatus(),bo);
|
|
|
return;
|
|
|
}
|
|
|
int result = unionShareOrdersMapper.updateStatusById(unionShareOrders.getId(), unionShareOrders.getStatus(), bo.getStatus(), DateUtil.getCurrentTimeSecond());
|
|
|
if (result == 0) {
|
|
|
logger.info("saveOrUpdateOrder enter,update nothing,req is {}",bo);
|
|
|
//没有更新到数据,应该有并发更新事件,查询新的再试一下
|
|
|
UnionShareOrders unionShareOrdersNew = unionShareOrdersMapper.selectByCode(bo.getOrderCode());
|
|
|
if (unionShareOrdersNew == null) {
|
|
|
logger.info("saveOrUpdateOrder end,can not find the orderCode,req is {}",bo);
|
|
|
//查不到数据,不该出现的情况,目前没有硬删数据的途径
|
|
|
return;
|
|
|
}
|
|
|
if (!checkOrderStatusChangePass(unionShareOrdersNew.getStatus(), bo.getStatus())) {
|
|
|
//订单状态不可变更
|
|
|
logger.info("saveOrUpdateOrder end,Second try,status can not be change,oldStatus is {} ,req is {}",unionShareOrdersNew.getStatus(),bo);
|
|
|
return;
|
|
|
}
|
|
|
unionShareOrdersMapper.updateStatusById(unionShareOrdersNew.getId(), unionShareOrdersNew.getStatus(), bo.getStatus(), DateUtil.getCurrentTimeSecond());
|
...
|
...
|
@@ -239,13 +359,15 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
logger.info("insertOrder,req is {}",bo);
|
|
|
//检查参数
|
|
|
if (!checkParam(bo)) {
|
|
|
//缺少参数 todo logger
|
|
|
//缺少参数
|
|
|
logger.warn("insertOrder end,param is invaild,req is {}",bo);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
//检查状态
|
|
|
if (!canInsertStatus(bo.getStatus())) {
|
|
|
//该状态数据不可插入 todo logger
|
|
|
//该状态数据不可插入
|
|
|
logger.warn("insertOrder end,status can not be change,req is {}",bo);
|
|
|
return;
|
|
|
}
|
|
|
//新增订单信息
|
...
|
...
|
@@ -271,10 +393,14 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
unionShareOrdersMapper.insertSelective(insertReq);
|
|
|
//新增订单商品信息
|
|
|
bo.getProductList().forEach(p->{
|
|
|
UnionShareOrdersProduct insertPro = new UnionShareOrdersProduct();
|
|
|
BeanUtils.copyProperties(p, insertPro);
|
|
|
insertPro.setOrderCode(bo.getOrderCode());
|
|
|
unionShareOrdersProductMapper.insertSelective(insertPro);
|
|
|
try {
|
|
|
UnionShareOrdersProduct insertPro = new UnionShareOrdersProduct();
|
|
|
BeanUtils.copyProperties(p, insertPro);
|
|
|
insertPro.setOrderCode(bo.getOrderCode());
|
|
|
unionShareOrdersProductMapper.insertSelective(insertPro);
|
|
|
} catch (BeansException e) {
|
|
|
logger.info("insertOrder product error,orderCode is {},product is {}",bo.getOrderCode(), p);
|
|
|
}
|
|
|
});
|
|
|
logger.info("insertOrder end,req is {}",bo);
|
|
|
}
|
...
|
...
|
@@ -325,11 +451,13 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
int count = unionShareUserMapper.selectCountByUid(uid);
|
|
|
if (count == 0) {
|
|
|
//不是特邀用户
|
|
|
logger.info("addSettlement end,can not find unionType,uid is {}",uid);
|
|
|
return null;
|
|
|
}
|
|
|
//查询是否有处理中的提现
|
|
|
if (hasSettlement(uid)) {
|
|
|
//有处理中的提现单,不可提现
|
|
|
logger.info("addSettlement end,hasSettlement,uid is {}",uid);
|
|
|
return null;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -337,10 +465,12 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
int orderCount = unionShareOrdersMapper.selectCountByCondition(uid,ShareOrdersStatusEnum.CAN_SETTLE.getCode());
|
|
|
if (orderCount == 0 ) {
|
|
|
//没有可以提现的订单
|
|
|
logger.info("addSettlement end,has not remaining settlement,uid is {}",uid);
|
|
|
return null;
|
|
|
}
|
|
|
//todo 生成取现单,绑定订单,考虑是否异步操作
|
|
|
BigDecimal amount = relateSettlementAndOrder(uid);
|
|
|
logger.info("addSettlement end,remaining settlement is {},uid is {}",amount,uid);
|
|
|
return amount;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -392,7 +522,7 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
return cacheResult;
|
|
|
}
|
|
|
int count = unionShareSettlementMapper.selectCountByUid(uid,(byte) 1);//是否打款成功:1-处理中,2-已打款
|
|
|
logger.info("hasSettlement ,uid is {},result is {},count is {}",uid,count);
|
|
|
logger.info("hasSettlement ,uid is {},count is {}",uid,count);
|
|
|
if (count > 0) {
|
|
|
addToRedis(ShareOrdersKeyEnum.USER_SETTLEMENT,uid,true,type);
|
|
|
return true;
|
...
|
...
|
@@ -429,17 +559,22 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
* */
|
|
|
public BigDecimal relateSettlementAndOrder(int uid) {
|
|
|
|
|
|
logger.info("relateSettlementAndOrder enter,uid is {}",uid);
|
|
|
|
|
|
//生成提现编号
|
|
|
String settlementCode = createSettlementCode();
|
|
|
logger.info("relateSettlementAndOrder,uid is {},settlementCode is {}",uid,settlementCode);
|
|
|
|
|
|
//更新订单状态,由可结算变为打款中
|
|
|
int updateTime = DateUtil.getCurrentTimeSecond();
|
|
|
int count=unionShareOrdersMapper.updateStatusByUid(uid,settlementCode, ShareOrdersStatusEnum.CAN_SETTLE.getCode(), ShareOrdersStatusEnum.SETTLE.getCode(), updateTime);
|
|
|
if (count == 0) {
|
|
|
logger.info("relateSettlementAndOrder end,uid is {},settlementCode is {},There are no available orders.",uid,settlementCode);
|
|
|
return null;
|
|
|
}
|
|
|
//计算提现金额
|
|
|
BigDecimal totalAmount=unionShareOrdersMapper.selectAmountBySettleCode(uid, settlementCode);
|
|
|
logger.info("relateSettlementAndOrder,uid is {},settlementCode is {},totalAmount is {}",uid,settlementCode,totalAmount);
|
|
|
|
|
|
//生成提现单
|
|
|
UnionShareSettlement insertReq = new UnionShareSettlement();
|
...
|
...
|
@@ -451,7 +586,8 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
insertReq.setStatus((byte)1);//是否打款成功:1-处理中,2-已打款
|
|
|
int num=unionShareSettlementMapper.insertSelective(insertReq);
|
|
|
if (num < 1) {
|
|
|
//todo 插入失败
|
|
|
//插入失败
|
|
|
logger.warn("relateSettlementAndOrder end,uid is {},settlementCode is {},totalAmount is {},insert nothing.",uid,settlementCode,totalAmount);
|
|
|
}
|
|
|
|
|
|
Set<String> orderCodes = new HashSet<>();
|
...
|
...
|
@@ -466,6 +602,8 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
orderCodes.addAll(periodOrders);
|
|
|
}
|
|
|
if (orderCodes.size() == 0) {
|
|
|
//不该查不到订单
|
|
|
logger.warn("relateSettlementAndOrder end,uid is {},settlementCode is {},totalAmount is {},can not find orders.",uid,settlementCode,totalAmount);
|
|
|
return null;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -477,6 +615,7 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
ShareSettlementBo bo = new ShareSettlementBo();
|
|
|
BeanUtils.copyProperties(insertReq,bo);
|
|
|
bo.setOrderCodes(orderCodes);
|
|
|
logger.info("relateSettlementAndOrder,send mq {} to erp,uid is {},settlementCode is {},bo is {}", SETTLEMENT_TOPIC, uid, settlementCode, bo);
|
|
|
yhProducer.send(SETTLEMENT_TOPIC, bo);
|
|
|
return totalAmount;
|
|
|
}
|
...
|
...
|
@@ -532,4 +671,43 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
redisHashCache.delete(ShareOrdersKeyEnum.USER_SETTLEMENT.getPreKey(),uid);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public Class getDataClass() {
|
|
|
return UnionShareOrderRspBO.class;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<? extends Object> batchExport(String confStr) {
|
|
|
try {
|
|
|
UnionShareOrderSearchReqBO request = JSONObject.parseObject(confStr, UnionShareOrderSearchReqBO.class);
|
|
|
List<UnionShareOrderRspBO> unionOrderRspBOList = queryUnionShareOrderRspBOForExport(request);
|
|
|
if (CollectionUtils.isEmpty(unionOrderRspBOList)) {
|
|
|
throw new ServiceException(400, "没有要导出的数据");
|
|
|
}
|
|
|
return unionOrderRspBOList;
|
|
|
} catch (JSONException e) {
|
|
|
logger.warn("parse confStr error: confStr {}, e {}", confStr, e);
|
|
|
throw new ServiceException(400, "传入数据格式错误");
|
|
|
} catch (com.yoho.error.exception.ServiceException e) {
|
|
|
logger.warn("make url error params is confStr {}, e {}", confStr, e);
|
|
|
throw new ServiceException(e.getCode(), e.getErrorMessage());
|
|
|
}
|
|
|
}
|
|
|
private List<UnionShareOrderRspBO> queryUnionShareOrderRspBOForExport(UnionShareOrderSearchReqBO reqBO){
|
|
|
UnionShareOrderSearchBo bo=initUnionShareOrderSearchBo(reqBO);
|
|
|
Map<String,UnionShareOrders> ordersDOMap=null;
|
|
|
if(bo.getIdList()!=null&&!bo.getIdList().isEmpty()){
|
|
|
ordersDOMap= this.unionShareOrdersMapper.selectListByIds(bo.getIdList());
|
|
|
}else{
|
|
|
List<Integer> uids=null;
|
|
|
if(bo.getUnionType()!=null || bo.getUnionName()!=null || bo.getChannelType()!=null){
|
|
|
uids=queryUids(bo);
|
|
|
if(null==uids){
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
ordersDOMap=this.unionShareOrdersMapper.selectAllListByUids(bo.getBeginTime(), bo.getEndTime(), uids, bo.getOrderCode());
|
|
|
}
|
|
|
return ordersDOMap.isEmpty()?null:queryUnionShareOrderRsp(ordersDOMap);
|
|
|
}
|
|
|
} |
...
|
...
|
|