| @@ -494,7 +494,7 @@ public class WxMicroPayController extends BaseController { | |||
| // record.setIp(ipStr); | |||
| WxPayOrder qpo = new WxPayOrder(); | |||
| qpo.setOrderId(microOrder.getId()); | |||
| qpo.setOrderId(microOrder.getComposeOrderId()); | |||
| qpo.updateTenantInfo(getTenantInfo()); | |||
| WxPayOrder po = wxPayOrderService.getByObj(qpo); | |||
| if (null == po) { | |||
| @@ -202,11 +202,11 @@ public class CouponOrderExpiringSchedule { | |||
| try { | |||
| WxPayOrder wxPayOrder = new WxPayOrder(); | |||
| wxPayOrder.updateTenantInfo(co); | |||
| Long orderId = co.getOrderId(); | |||
| if (!EnumComposeOrder.isSingle(co.getComposeOrderType())) { | |||
| orderId = co.getComposeOrderId(); | |||
| } | |||
| wxPayOrder.setOrderId(orderId); | |||
| // Long orderId = co.getOrderId(); | |||
| // if (!EnumComposeOrder.isSingle(co.getComposeOrderType())) { | |||
| // orderId = co.getComposeOrderId(); | |||
| // } | |||
| wxPayOrder.setOrderId(co.getComposeOrderId()); | |||
| wxPayOrder.setPayOrderStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode()); | |||
| wxPayOrder = wxPayOrderMapper.selectOne(new QueryWrapper(wxPayOrder)); | |||
| @@ -48,7 +48,4 @@ public class WxOrderCouponPressVo extends WxOrder { | |||
| @io.swagger.annotations.ApiModelProperty(value="商户列表",name="orderPressList") | |||
| private List<WxOrderPressVo> orderPressList; | |||
| @io.swagger.annotations.ApiModelProperty(value="组合订单类型EnumComposeOrder",name="composeOrderType") | |||
| private Integer composeOrderType; | |||
| } | |||
| @@ -201,9 +201,9 @@ public class DataTowerServiceImpl implements DataTowerService { | |||
| //今日车流量*********************************************** | |||
| private Map<String, Object> carRunning(TenantEntity tenantEntity) { | |||
| HashMap<String, Object> carMap = new HashMap<>(); | |||
| List<TenantEntity> tenantEntitys = wxMallMapper.getTenantEntitys(tenantEntity); | |||
| // List<TenantEntity> tenantEntitys = wxMallMapper.getTenantEntitys(tenantEntity); | |||
| HashMap<String, Object> paramsCar = new HashMap<>(); | |||
| paramsCar.put("tenantEntitys",tenantEntitys); | |||
| // paramsCar.put("tenantEntitys",tenantEntitys); | |||
| paramsCar.put("tenantId", tenantEntity.getTenantId()); | |||
| if (StringUtils.isNotBlank(tenantEntity.getParentTenantId())) { | |||
| paramsCar.put("parentTenantId", tenantEntity.getParentTenantId()); | |||
| @@ -410,16 +410,14 @@ public class DataTowerServiceImpl implements DataTowerService { | |||
| HashMap<String, Object> dataMap = new HashMap<>(); | |||
| dataMap.put("shop", shopRunning(tenantEntity)); | |||
| dataMap.put("rent", rentRunning(tenantEntity)); | |||
| dataMap.put("report", reportRunning(tenantEntity)); | |||
| //TODO 待优化数据 | |||
| //dataMap.put("car", carRunning(tenantEntity)); | |||
| dataMap.put("car", null); | |||
| // dataMap.put("rent", rentRunning(tenantEntity)); | |||
| // dataMap.put("report", reportRunning(tenantEntity)); | |||
| dataMap.put("car", carRunning(tenantEntity)); | |||
| dataMap.put("coupon", couponRunning(tenantEntity)); | |||
| dataMap.put("visitor", visitorRunning(tenantEntity)); | |||
| dataMap.put("contract", contractRunning(tenantEntity)); | |||
| dataMap.put("message", messageRunning(tenantEntity)); | |||
| dataMap.put("bill", billRunning(tenantEntity)); | |||
| // dataMap.put("bill", billRunning(tenantEntity)); | |||
| return dataMap; | |||
| } | |||
| @@ -1548,12 +1548,12 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||
| //TODO (系统设置不分账抖音也需要分账)抖音先记账, 定时去处理分账业务 | |||
| WxPayOrder wxPayOrder = new WxPayOrder(); | |||
| Long orderId = couponOrder.getOrderId(); | |||
| if (!EnumComposeOrder.isSingle(couponOrder.getComposeOrderType())) { | |||
| orderId = couponOrder.getComposeOrderId(); | |||
| } | |||
| // Long orderId = couponOrder.getOrderId(); | |||
| // if (!EnumComposeOrder.isSingle(couponOrder.getComposeOrderType())) { | |||
| // orderId = couponOrder.getComposeOrderId(); | |||
| // } | |||
| wxPayOrder.updateTenantInfo(couponOrder); | |||
| wxPayOrder.setOrderId(orderId); | |||
| wxPayOrder.setOrderId(couponOrder.getComposeOrderId()); | |||
| wxPayOrder.setPayOrderStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode()); | |||
| wxPayOrder = wxPayOrderMapper.selectOne(new QueryWrapper(wxPayOrder)); | |||
| @@ -1610,6 +1610,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||
| public WxMerchantSubsidy recordAfterVerified(WxCouponOrder couponOrder, Long merchantId) { | |||
| WxCoupon wxCoupon = wxCouponMapper.selectById(couponOrder.getCouponId(),couponOrder.getTenantId()); | |||
| WxMerchantSubsidy merchantSubsidy = new WxMerchantSubsidy(); | |||
| merchantSubsidy.updateTenantInfo(couponOrder); | |||
| if (couponOrder.getCouponType().equals(EnumCouponType.COUPON_PRESS.getCode()) | |||
| && couponOrder.getCouponPrice().equals(wxCoupon.getSalePrice())) { | |||
| //砍价 | |||
| @@ -1642,7 +1643,6 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| Date curDate = new Date(); | |||
| merchantSubsidy.setId(idWorker.nextId()); | |||
| merchantSubsidy.updateTenantInfo(couponOrder); | |||
| merchantSubsidy.setMerchantId(merchantId); | |||
| merchantSubsidy.setOrderPayment(couponOrder.getCouponPrice()); | |||
| merchantSubsidy.setReceiverPayment(couponOrder.getCouponPrice()); | |||
| @@ -1668,14 +1668,14 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||
| // 微信分账 | |||
| try { | |||
| WxPayOrder wxPayOrder = new WxPayOrder(); | |||
| Long orderId = couponOrder.getOrderId(); | |||
| if (!EnumComposeOrder.isSingle(couponOrder.getComposeOrderType())) { | |||
| orderId = couponOrder.getComposeOrderId(); | |||
| } | |||
| // Long orderId = couponOrder.getOrderId(); | |||
| // | |||
| // if (!EnumComposeOrder.isSingle(couponOrder.getComposeOrderType())) { | |||
| // orderId = couponOrder.getComposeOrderId(); | |||
| // } | |||
| wxPayOrder.updateTenantInfo(couponOrder); | |||
| wxPayOrder.setOrderId(orderId); | |||
| wxPayOrder.setOrderId(couponOrder.getComposeOrderId()); | |||
| wxPayOrder.setPayOrderStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode()); | |||
| wxPayOrder = wxPayOrderMapper.selectOne(new QueryWrapper(wxPayOrder)); | |||
| if (wxPayOrder != null && wxPayOrder.getShare().equals(EnumPayShare.YES.getCode())) { | |||
| @@ -2640,7 +2640,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||
| payOrder.setId(payOrderId); | |||
| payOrder.updateTenantInfo(composeOrder.getSingleOrder()); | |||
| payOrder.setCUserId(composeOrder.getSingleOrder().getCUserId()); | |||
| payOrder.setOrderId(composeOrder.getSingleOrder().getId()); | |||
| payOrder.setOrderId(composeOrder.getSingleOrder().getComposeOrderId()); | |||
| payOrder.setCreateTime(curDate); | |||
| payOrder.setUpdateTime(curDate); | |||
| payOrder.setPayTimeStart(curDate); | |||
| @@ -460,7 +460,7 @@ public class WxOrderGroupServiceImpl implements WxOrderGroupService { | |||
| WxPayOrder payOrderQ = new WxPayOrder(); | |||
| payOrderQ.updateTenantInfo(wxOrder); | |||
| payOrderQ.setCUserId(wxOrder.getCUserId()); | |||
| payOrderQ.setOrderId(wxOrder.getId()); | |||
| payOrderQ.setOrderId(wxOrder.getComposeOrderId()); | |||
| payOrderQ.setPayOrderStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode()); | |||
| WxPayOrder payOrder = null; | |||
| @@ -2387,7 +2387,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| Long allRefundOrderSummary = wxOrderMapper.queryOrderForSum(params); | |||
| result.put("allRefundOrderSummary", allRefundOrderSummary); | |||
| Long allOrderSummary = allPayOrderSummary - allRefundOrderSummary; | |||
| result.put("allOrderSummary", allPayOrderSummary); | |||
| result.put("allOrderSummary", allOrderSummary); | |||
| //今日 | |||
| params.put("startdate", systemTime + " 00:00:00"); | |||
| params.put("enddate", systemTime + " 23:59:59"); | |||
| @@ -226,12 +226,6 @@ | |||
| ((date_format(cs.create_date,'%H:%m') < '06:00') | |||
| and date_format(cs.create_date,'%w') in (6,0))) | |||
| </if> | |||
| <if test=" null != merchantIds "> | |||
| and cs.merchant_id in | |||
| <foreach collection="merchantIds" index="index" item="merchantIdItem" open="(" separator="," close=")"> | |||
| #{merchantIdItem} | |||
| </foreach> | |||
| </if> | |||
| group by cs.merchant_id | |||
| </select> | |||
| @@ -667,7 +667,7 @@ | |||
| group by co.coupon_id | |||
| </select> | |||
| <select id="queryPriceTotalGroup" resultType="com.iformall.domain.vo.CUserDateAmountVo" > | |||
| <select id="queryPriceTotalGroup" resultType="com.iformall.domain.vo.CUserDateAmountVo" > | |||
| SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as xTime,IFNULL(SUM(coupon_price),0) as price | |||
| from wx_coupon_order | |||
| where create_date_times >= unix_timestamp(#{startTime}) and create_date_times < unix_timestamp(#{endTime}) | |||
| @@ -921,21 +921,17 @@ | |||
| </select> | |||
| <select id="queryOrderForSum" resultType="Long" parameterType="hashmap"> | |||
| select ifnull(sum(o.payment),0) payment from ( | |||
| select o.* from wx_order o | |||
| select ifnull(sum(o.payment),0) payment from wx_order o | |||
| where o.type in (0,1,2) and o.order_status = #{order_status} | |||
| ) o | |||
| <where> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and o.`tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and o.`parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test="startdate!=null and enddate!=null"> | |||
| and o.create_date between #{startdate} and #{enddate} | |||
| </if> | |||
| </where> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and o.`tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and o.`parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test="startdate!=null and enddate!=null"> | |||
| and o.create_date between #{startdate} and #{enddate} | |||
| </if> | |||
| </select> | |||
| <select id="queryOrderForCount" resultType="Long" parameterType="hashmap"> | |||
| @@ -991,7 +987,8 @@ | |||
| <result column="coupon_order_id" jdbcType="BIGINT" property="couponOrderId"/> | |||
| <result column="coupon_order_status" jdbcType="INTEGER" property="couponOrderStatus"/> | |||
| <result column="compose_order_id" jdbcType="BIGINT" property="composeOrderId"/> | |||
| <result column="compose_order_type" jdbcType="INTEGER" property="composeOrderType"/> | |||
| <result column="shipping_type" jdbcType="INTEGER" property="shippingType"/> | |||
| @@ -1034,6 +1031,9 @@ | |||
| <result column="coupon_order_id" jdbcType="BIGINT" property="couponOrderId"/> | |||
| <result column="coupon_order_status" jdbcType="INTEGER" property="couponOrderStatus"/> | |||
| <result column="compose_order_id" jdbcType="BIGINT" property="composeOrderId"/> | |||
| <result column="compose_order_type" jdbcType="INTEGER" property="composeOrderType"/> | |||
| <!-- <collection column="{orderId=order_number,tenantId=tenant_id}" property="orderPressList" | |||
| ofType="com.iformall.domain.vo.WxOrderPressVo" | |||
| javaType="java.util.List" | |||
| @@ -1045,12 +1045,13 @@ | |||
| o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.`freight_price`,o.order_status, | |||
| o.create_date,o.update_date,o.press_end_date,o.press_current_num,o.press_current_value, | |||
| c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.press_limit_num, | |||
| o.compose_order_type,o.`shipping_type`,o.`shipping_address` | |||
| o.compose_order_id,o.compose_order_type,o.`shipping_type`,o.`shipping_address` | |||
| </sql> | |||
| <sql id="allOrderPressDetailColumns"> | |||
| o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.`freight_price`,o.order_status, | |||
| o.create_date,o.update_date,o.press_end_date,o.press_current_num,o.press_current_value, | |||
| o.compose_order_id,o.compose_order_type, | |||
| c.type as coupon_type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.detail,c.remark,c.press_limit_num, | |||
| co.id as coupon_order_id,co.coupon_order_status | |||
| </sql> | |||