Authored by unknown

联盟代码优化

... ... @@ -70,12 +70,6 @@
<artifactId>yoho-message-sdk</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.yoho.service.model</groupId>
<artifactId>union-service-model</artifactId>
</dependency>
</dependencies>
</project>
... ...
... ... @@ -13,6 +13,8 @@ public interface IOrdersMapper {
List<Orders> selectByOrderCode(@Param("orderCode") long orderCode);
List<Orders> selectByOrderCodeList(@Param("list") List<Long> list);
/**
* 查询某用户一段时间以来的已交寄订单
* @param uid
... ...
... ... @@ -2,8 +2,14 @@ package com.yoho.unions.dal;
import com.yoho.unions.dal.model.OrdersAccessOry;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
public interface OrdersAccessOryMapper {
OrdersAccessOry selectByPrimaryKey(Long orderCode);
List<OrdersAccessOry> selectByOrderCodeList(@Param("list") List<Long> orderCode);
}
\ No newline at end of file
... ...
... ... @@ -2,9 +2,15 @@ package com.yoho.unions.dal;
import com.yoho.unions.dal.model.OrdersCoupons;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
public interface OrdersCouponsMapper {
OrdersCoupons selectByOrderCode(Long orderCode);
List<OrdersCoupons> selectByOrderCodeList(@Param("list") List<Long> orderCode);
}
\ No newline at end of file
... ...
package com.yoho.unions.dal;
import com.yoho.unions.dal.model.OrdersFreightCoupons;
import java.math.BigDecimal;
public interface OrdersFreightCouponsMapper {
BigDecimal selectCouponAmount(Long orderCode);
}
\ No newline at end of file
... ...
package com.yoho.unions.dal;
import com.yoho.unions.dal.model.OrdersGiftCard;
import java.math.BigDecimal;
public interface OrdersGiftCardMapper {
BigDecimal selectPayShippingAmount (Long orderCode);
}
\ No newline at end of file
... ...
... ... @@ -11,6 +11,8 @@ import java.util.List;
*/
public class OrdersDetailBO extends BaseBO{
private Long orderCode;
private Orders orders;
private String unionId;
... ... @@ -40,4 +42,12 @@ public class OrdersDetailBO extends BaseBO{
public void setOrders(Orders orders) {
this.orders = orders;
}
public Long getOrderCode() {
return orderCode;
}
public void setOrderCode(Long orderCode) {
this.orderCode = orderCode;
}
}
... ...
package com.yoho.unions.dal.model;
import java.math.BigDecimal;
public class OrdersFreightCoupons {
private Integer id;
private Long orderCode;
private Integer couponId;
private Byte couponType;
private String couponCode;
private BigDecimal couponAmount;
private BigDecimal couponAdjustAmount;
private String couponTitle;
private Byte feeSharingType;
private BigDecimal feeSharingRatio;
private Integer createTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Long getOrderCode() {
return orderCode;
}
public void setOrderCode(Long orderCode) {
this.orderCode = orderCode;
}
public Integer getCouponId() {
return couponId;
}
public void setCouponId(Integer couponId) {
this.couponId = couponId;
}
public Byte getCouponType() {
return couponType;
}
public void setCouponType(Byte couponType) {
this.couponType = couponType;
}
public String getCouponCode() {
return couponCode;
}
public void setCouponCode(String couponCode) {
this.couponCode = couponCode == null ? null : couponCode.trim();
}
public BigDecimal getCouponAmount() {
return couponAmount;
}
public void setCouponAmount(BigDecimal couponAmount) {
this.couponAmount = couponAmount;
}
public BigDecimal getCouponAdjustAmount() {
return couponAdjustAmount;
}
public void setCouponAdjustAmount(BigDecimal couponAdjustAmount) {
this.couponAdjustAmount = couponAdjustAmount;
}
public String getCouponTitle() {
return couponTitle;
}
public void setCouponTitle(String couponTitle) {
this.couponTitle = couponTitle == null ? null : couponTitle.trim();
}
public Byte getFeeSharingType() {
return feeSharingType;
}
public void setFeeSharingType(Byte feeSharingType) {
this.feeSharingType = feeSharingType;
}
public BigDecimal getFeeSharingRatio() {
return feeSharingRatio;
}
public void setFeeSharingRatio(BigDecimal feeSharingRatio) {
this.feeSharingRatio = feeSharingRatio;
}
public Integer getCreateTime() {
return createTime;
}
public void setCreateTime(Integer createTime) {
this.createTime = createTime;
}
}
\ No newline at end of file
... ...
package com.yoho.unions.dal.model;
import java.math.BigDecimal;
public class OrdersGiftCard {
private Integer id;
private Long orderCode;
private String code;
private BigDecimal payAmount;
private BigDecimal payShippingAmount;
private Integer createTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Long getOrderCode() {
return orderCode;
}
public void setOrderCode(Long orderCode) {
this.orderCode = orderCode;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
public BigDecimal getPayAmount() {
return payAmount;
}
public void setPayAmount(BigDecimal payAmount) {
this.payAmount = payAmount;
}
public BigDecimal getPayShippingAmount() {
return payShippingAmount;
}
public void setPayShippingAmount(BigDecimal payShippingAmount) {
this.payShippingAmount = payShippingAmount;
}
public Integer getCreateTime() {
return createTime;
}
public void setCreateTime(Integer createTime) {
this.createTime = createTime;
}
}
\ No newline at end of file
... ...
package com.yoho.unions.dal.model;
import com.yoho.service.model.union.BaseBO;
/**
* Created by zhengwen.ge on 2017/12/15.
*/
public class UserOrderDatailBO extends BaseBO {
private Long orderCode;
private String unionId;
private String unionName;
public Long getOrderCode() {
return orderCode;
}
public void setOrderCode(Long orderCode) {
this.orderCode = orderCode;
}
public String getUnionId() {
return unionId;
}
public void setUnionId(String unionId) {
this.unionId = unionId;
}
public String getUnionName() {
return unionName;
}
public void setUnionName(String unionName) {
this.unionName = unionName;
}
}
... ...
... ... @@ -45,6 +45,14 @@
from orders
where parent_order_code = #{orderCode,jdbcType=BIGINT}
</select>
<select id="selectByOrderCodeList" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from orders where parent_order_code in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectCountShipStatusOrderSince" resultType="java.lang.Integer">
select count(1)
... ...
... ... @@ -26,4 +26,12 @@
from orders_accessory
where order_code = #{orderCode,jdbcType=BIGINT}
</select>
<select id="selectByOrderCodeList" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from orders_accessory where order_code in
<foreach collection="list" item="item" separator="," index="index" open="(" close=")">
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -22,4 +22,13 @@
where order_code = #{orderCode,jdbcType=BIGINT}
</select>
<select id="selectByOrderCodeList" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from orders_coupons
where order_code in
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yoho.unions.dal.OrdersFreightCouponsMapper" >
<resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.OrdersFreightCoupons" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="order_code" property="orderCode" jdbcType="BIGINT" />
<result column="coupon_id" property="couponId" jdbcType="INTEGER" />
<result column="coupon_type" property="couponType" jdbcType="TINYINT" />
<result column="coupon_code" property="couponCode" jdbcType="VARCHAR" />
<result column="coupon_amount" property="couponAmount" jdbcType="DECIMAL" />
<result column="coupon_adjust_amount" property="couponAdjustAmount" jdbcType="DECIMAL" />
<result column="coupon_title" property="couponTitle" jdbcType="VARCHAR" />
<result column="fee_sharing_type" property="feeSharingType" jdbcType="TINYINT" />
<result column="fee_sharing_ratio" property="feeSharingRatio" jdbcType="DECIMAL" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
id, order_code, coupon_id, coupon_type, coupon_code, coupon_amount, coupon_adjust_amount,
coupon_title, fee_sharing_type, fee_sharing_ratio, create_time
</sql>
<select id="selectCouponAmount" resultType="java.math.BigDecimal">
select IFNULL(sum(coupon_amount),0) from orders_freight_coupons where order_code = #{orderCode}
</select>
</mapper>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yoho.unions.dal.OrdersGiftCardMapper" >
<resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.OrdersGiftCard" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="order_code" property="orderCode" jdbcType="BIGINT" />
<result column="code" property="code" jdbcType="VARCHAR" />
<result column="pay_amount" property="payAmount" jdbcType="DECIMAL" />
<result column="pay_shipping_amount" property="payShippingAmount" jdbcType="DECIMAL" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
id, order_code, code, pay_amount, pay_shipping_amount, create_time
</sql>
<select id="selectPayShippingAmount" resultType="java.math.BigDecimal">
select IFNULL(sum(pay_shipping_amount), 0) from orders_gift_card where order_code = #{orderCode}
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -44,6 +44,7 @@
from user_orders
where order_code = #{orderCode} limit 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from user_orders
where id = #{id,jdbcType=INTEGER}
... ...
... ... @@ -5,7 +5,7 @@
<parent>
<groupId>com.yoho</groupId>
<artifactId>parent</artifactId>
<version>1.2.6-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
</parent>
<groupId>com.yoho.dsf</groupId>
<artifactId>yoho-unions</artifactId>
... ...
... ... @@ -61,16 +61,6 @@
<groupId>com.yoho.service.model</groupId>
<artifactId>union-service-model</artifactId>
</dependency>
<dependency>
<groupId>com.yoho.service.model</groupId>
<artifactId>union-service-model</artifactId>
<version>1.2.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.yoho.service.model</groupId>
<artifactId>union-service-model</artifactId>
<version>1.2.6-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
... ...
... ... @@ -2,6 +2,8 @@ package com.yoho.unions.server.service.impl;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.Function;
import com.google.common.collect.Maps;
import com.yoho.error.exception.ServiceException;
import com.yoho.service.model.response.PageResponseBO;
import com.yoho.service.model.union.request.ChannelUserBO;
... ... @@ -18,7 +20,9 @@ import com.yoho.unions.common.utils.DateUtil;
import com.yoho.unions.dal.*;
import com.yoho.unions.dal.model.*;
import com.yoho.unions.server.service.IUserOrdersService;
import com.yoho.unions.vo.OrderInfo;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... ... @@ -28,9 +32,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.*;
import java.util.concurrent.TimeUnit;
/**
... ... @@ -51,70 +53,116 @@ public class UserOrdersServiceImpl implements IUserOrdersService,IBusinessExport
@Autowired
IMktMarketingUrlDAO mktMarketingUrlDAO;
@Autowired
OrdersFreightCouponsMapper ordersFreightCouponsMapper;
@Autowired
OrdersGiftCardMapper ordersGiftCardMapper;
@Autowired
OrdersAccessOryMapper ordersAccessOryMapper;
@Resource
RedisValueCache redisValueCache;
public PageUnionOrderRspBO queryUnionOrders(UnionOrderReqBO reqBO){
logger.info("queryUnionOrders param is {}",reqBO);
int beginTime = StringUtils.isBlank(reqBO.getBeginTime())?0:Integer.valueOf(reqBO.getBeginTime());
int endTime = StringUtils.isBlank(reqBO.getEndTime())?0:Integer.valueOf(reqBO.getEndTime());
int orderCode =StringUtils.isBlank(reqBO.getOrderCode())?0:Integer.valueOf(reqBO.getOrderCode());
String unionId = StringUtils.isBlank(reqBO.getUnionId())?null:reqBO.getUnionId();
public PageUnionOrderRspBO queryUnionOrders(UnionOrderReqBO reqBO) {
logger.info("queryUnionOrders param is {}", reqBO);
int beginTime = StringUtils.isBlank(reqBO.getBeginTime()) ? 0 : Integer.valueOf(reqBO.getBeginTime());
int endTime = StringUtils.isBlank(reqBO.getEndTime()) ? 0 : Integer.valueOf(reqBO.getEndTime());
int orderCode = StringUtils.isBlank(reqBO.getOrderCode()) ? 0 : Integer.valueOf(reqBO.getOrderCode());
String unionId = StringUtils.isBlank(reqBO.getUnionId()) ? null : reqBO.getUnionId();
String unionType = StringUtils.isBlank(reqBO.getUnionType()) ? null : reqBO.getUnionType();
List<String> idList = new ArrayList<>();
if(StringUtils.isNotBlank(reqBO.getIds())){
String[] ids = StringUtils.isBlank(reqBO.getIds())? null: reqBO.getIds().split(",");
if (StringUtils.isNotBlank(reqBO.getIds())) {
String[] ids = StringUtils.isBlank(reqBO.getIds()) ? null : reqBO.getIds().split(",");
idList = Arrays.asList(ids);
}
if(StringUtils.isNotEmpty(unionType)){
if (StringUtils.isNotEmpty(unionType)) {
MktMarketingUrl mktMarketingUrl = mktMarketingUrlDAO.selectByName(unionType);
if(null!=mktMarketingUrl){
if (null != mktMarketingUrl) {
String mktMarkeringUnionId = String.valueOf(mktMarketingUrl.getUnionType());
if(StringUtils.isEmpty(unionId)){
if (StringUtils.isEmpty(unionId)) {
unionId = mktMarkeringUnionId;
}
if(StringUtils.isNotEmpty(unionId)&&!unionId.equals(mktMarkeringUnionId)){
if (StringUtils.isNotEmpty(unionId) && !unionId.equals(mktMarkeringUnionId)) {
return null;
}
}
}
//查询总数
int count = userOrdersDAO.selectCount(beginTime,endTime,String.valueOf(orderCode),unionId,idList);
int count = userOrdersDAO.selectCount(beginTime, endTime, String.valueOf(orderCode), unionId, idList);
logger.info("userOrdersDAO.selectCount: size is {}", count);
List<UserOrders> userOrdersList = new ArrayList<>();
List<UnionOrderRspBO> unionOrderRspBOList = new ArrayList<>();
if(count>0){
userOrdersList = userOrdersDAO.selectUserOrderList(beginTime,endTime,String.valueOf(orderCode),unionId,idList,reqBO.getStart(),reqBO.getSize());
if (count < 1) {
return null;
}
if (count > 0) {
userOrdersList = userOrdersDAO.selectUserOrderList(beginTime, endTime, String.valueOf(orderCode), unionId, idList, reqBO.getStart(), reqBO.getSize());
}
List<OrdersDetailBO> ordersDetailBOList = new ArrayList<>();
List<Long> orderCodeList = new ArrayList<>();
List<UserOrderDatailBO> userOrderDatailBOList = new ArrayList<>();
for (UserOrders userOrders : userOrdersList) {
//根据查询出来的uid,ordercode,查询ERP_ORDERS.Orders
// Orders orders = ordersMapper.selectByUidAndOrderCode(userOrders.getuId(),Long.valueOf(userOrders.getOrderCode()));
List<Orders> order = ordersMapper.selectByOrderCode(Long.valueOf(userOrders.getOrderCode()));
for(Orders orders:order){
OrdersDetailBO ordersDetailBO = new OrdersDetailBO();
ordersDetailBO.setOrders(orders);
ordersDetailBO.setUnionId(userOrders.getUid());
MktMarketingUrl mktMarketingUrl = redisValueCache.get("yh:union:uniontype:"+userOrders.getUid(),MktMarketingUrl.class);
if(mktMarketingUrl==null){
mktMarketingUrl = mktMarketingUrlDAO.selectByPrimaryKey(Long.valueOf(userOrders.getUid()));
redisValueCache.set("yh:union:uniontype:"+userOrders.getUid(), mktMarketingUrl, 1, TimeUnit.HOURS);
}
if (mktMarketingUrl != null) {
ordersDetailBO.setUnionType(mktMarketingUrl.getName());
}
ordersDetailBOList.add(ordersDetailBO);
UserOrderDatailBO userOrderDatailBO = new UserOrderDatailBO();
userOrderDatailBO.setUnionId(userOrders.getUid());
MktMarketingUrl mktMarketingUrl = redisValueCache.get("yh:union:uniontype:" + userOrders.getUid(), MktMarketingUrl.class);
if (mktMarketingUrl == null) {
mktMarketingUrl = mktMarketingUrlDAO.selectByPrimaryKey(Long.valueOf(userOrders.getUid()));
redisValueCache.set("yh:union:uniontype:" + userOrders.getUid(), mktMarketingUrl, 1, TimeUnit.HOURS);
}
if (mktMarketingUrl != null) {
userOrderDatailBO.setUnionName(mktMarketingUrl.getName());
}
userOrderDatailBO.setOrderCode(Long.valueOf(userOrders.getOrderCode()));
userOrderDatailBOList.add(userOrderDatailBO);
orderCodeList.add(Long.valueOf(userOrders.getOrderCode()));
}
Map<Long, UserOrderDatailBO> userOrderDatailBOMap = Maps.uniqueIndex(userOrderDatailBOList, new Function<UserOrderDatailBO, Long>() {
@Override
public Long apply(UserOrderDatailBO userOrderDatailBO) {
return userOrderDatailBO.getOrderCode();
}
});
//批量查询erp_orders.orders表
List<Orders> ordersList = ordersMapper.selectByOrderCodeList(orderCodeList);
Map<Long, Orders> ordersMap = Maps.uniqueIndex(ordersList, new Function<Orders, Long>() {
@Override
public Long apply(Orders orders) {
return orders.getOrderCode();
}
});
List<Long> subOrderCodeList = new ArrayList<>();
for (Map.Entry<Long, Orders> map : ordersMap.entrySet()) {
OrdersDetailBO ordersDetailBO = new OrdersDetailBO();
Orders orders = map.getValue();
ordersDetailBO.setOrders(orders);
subOrderCodeList.add(map.getKey());
ordersDetailBOList.add(ordersDetailBO);
}
//批量查询优惠券金额
List<OrdersCoupons> ordersCouponsList = ordersCouponsMapper.selectByOrderCodeList(subOrderCodeList);
Map<Long, OrdersCoupons> couponsMap = Maps.uniqueIndex(ordersCouponsList, new Function<OrdersCoupons, Long>() {
@Override
public Long apply(OrdersCoupons ordersCoupons) {
return ordersCoupons.getOrderCode();
}
});
//批量查询是否新客
List<OrdersAccessOry> ordersAccessOryList = ordersAccessOryMapper.selectByOrderCodeList(subOrderCodeList);
Map<Long, OrdersAccessOry> ordersAccessOryMap = Maps.uniqueIndex(ordersAccessOryList, new Function<OrdersAccessOry, Long>() {
@Override
public Long apply(OrdersAccessOry ordersAccessOry) {
return ordersAccessOry.getOrderCode();
}
});
for (OrdersDetailBO ordersDetailBO : ordersDetailBOList) {
Orders orders = ordersDetailBO.getOrders();
UnionOrderRspBO orderRspBO = new UnionOrderRspBO();
//优惠券金额
OrdersCoupons ordersCoupons = ordersCouponsMapper.selectByOrderCode(Long.valueOf(orders.getOrderCode()));
OrdersCoupons ordersCoupons = couponsMap.get(orders.getOrderCode());
if (null != ordersCoupons) {
orderRspBO.setCouponAmount(ordersCoupons.getCouponAmount());
} else {
... ... @@ -125,14 +173,17 @@ public class UserOrdersServiceImpl implements IUserOrdersService,IBusinessExport
//订单金额
orderRspBO.setOrderAmount(orders.getOrderAmount());
orderRspBO.setYohoCoinNum(orders.getYohoCoinNum());
int yohoCoin = 0;
if(orders.getYohoCoinNum()>0){
yohoCoin = orders.getYohoCoinNum()/100;
}
//礼品卡抵运费--数据较少,暂时就用单个查询把
BigDecimal pay_shipping_amount = ordersGiftCardMapper.selectPayShippingAmount(Long.valueOf(orders.getOrderCode()));
// 免邮券--数据较少,暂时就用单个查询把
BigDecimal coupon_amount = ordersFreightCouponsMapper.selectCouponAmount(Long.valueOf(orders.getOrderCode()));
//运费
orderRspBO.setShipmentAmount(orders.getShippingCost());
BigDecimal realShipmentAmount = orders.getShippingCost().subtract(pay_shipping_amount).subtract(coupon_amount);
orderRspBO.setShipmentAmount(realShipmentAmount);
//实际支付金额
orderRspBO.setRealPayAmount(orders.getLastOrderAmount().subtract(orders.getShippingCost()));
orderRspBO.setRealPayAmount(orders.getLastOrderAmount().subtract(realShipmentAmount));
//订单状态
orderRspBO.setOrderStatus(OrderStatusEnum.getNameByCode(String.valueOf(orders.getOrderStatus())));
//附加信息
... ... @@ -140,26 +191,20 @@ public class UserOrdersServiceImpl implements IUserOrdersService,IBusinessExport
//支付方式
orderRspBO.setPayChannel(PaymentTypeEnum.getNameByCode(String.valueOf(orders.getPaymentType())));
//是否新客---从新的表中获取
OrdersAccessOry ordersAccessOry = ordersAccessOryMapper.selectByPrimaryKey(Long.valueOf(orders.getOrderCode()));
OrdersAccessOry ordersAccessOry = ordersAccessOryMap.get(orders.getOrderCode());
if (null != ordersAccessOry) {
orderRspBO.setIsNew(NewUserEnum.getNameByCode(ordersAccessOry.getIsNew() == null ? "N" : ordersAccessOry.getIsNew()));
} else {
orderRspBO.setIsNew(NewUserEnum.getNameByCode("N"));
}
orderRspBO.setUid(orders.getUid());
orderRspBO.setOrderCode(orders.getOrderCode().intValue());
orderRspBO.setOrderCode(orders.getOrderCode());
orderRspBO.setId(orders.getId());
orderRspBO.setOrderTime(DateUtil.long2DateStr(Long.valueOf(orders.getCreateTime()) * Long.valueOf(1000), "yyyy-MM-dd"));
// UserOrders userOrders = userOrdersDAO.selectByOrderCode(orders.getParentOrderCode());
// if(userOrders!=null){
// orderRspBO.setUnionId(userOrders.getUid());
// MktMarketingUrl mktMarketingUrl = mktMarketingUrlDAO.selectByPrimaryKey(Long.valueOf(userOrders.getUid()));
// if (mktMarketingUrl != null) {
// orderRspBO.setUnionType(mktMarketingUrl.getName());
// }
// }
orderRspBO.setUnionId(ordersDetailBO.getUnionId());
orderRspBO.setUnionType(ordersDetailBO.getUnionType());
//
UserOrderDatailBO userOrderDatailBO = userOrderDatailBOMap.get(orders.getParentOrderCode());
orderRspBO.setUnionId(userOrderDatailBO.getUnionId());
orderRspBO.setUnionType(userOrderDatailBO.getUnionName());
unionOrderRspBOList.add(orderRspBO);
}
PageUnionOrderRspBO pageUnionOrderRspBO = new PageUnionOrderRspBO();
... ...
... ... @@ -99,6 +99,16 @@ datasources:
- com.yoho.unions.dal.OrdersCouponsMapper
- com.yoho.unions.dal.OrdersAccessOryMapper
erp_orders_new:
servers:
- 192.168.102.219:3306
- 192.168.102.219:3306
username: yh_test
password: 9nm0icOwt6bMHjMusIfMLw==
daos:
- com.yoho.unions.dal.OrdersFreightCouponsMapper
- com.yoho.unions.dal.OrdersGiftCardMapper
yh_guang:
servers:
- 192.168.102.219:3306
... ...
... ... @@ -100,6 +100,16 @@ datasources:
- com.yoho.unions.dal.OrdersCouponsMapper
- com.yoho.unions.dal.OrdersAccessOryMapper
erp_orders_new:
servers:
- ${jdbc.mysql.platform.erp_orders.slave}
- ${jdbc.mysql.platform.erp_orders.slave}
username: ${jdbc.mysql.platform.erp_orders.username}
password: ${jdbc.mysql.platform.erp_orders.password}
daos:
- com.yoho.unions.dal.OrdersFreightCouponsMapper
- com.yoho.unions.dal.OrdersGiftCardMapper
yh_guang:
servers:
- ${jdbc.mysql.yhguang.master}
... ...