| | |
| | | JSONObject data = new JSONObject();
|
| | | // 分享统计
|
| | | BigDecimal sharemoney = commonOrderService.countOrderMoney(uid,2, dateType);
|
| | | |
| | | data.put("shareCount", commonOrderService.countOrder(uid, 2, dateType));
|
| | | data.put("sharemoney", sharemoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | |
| | | // 邀请统计
|
| | | BigDecimal inviteMoney = commonOrderService.countOrderMoney(uid,3, dateType);
|
| | | |
| | | data.put("inviteCount", commonOrderService.countOrder(uid, 3, dateType));
|
| | | data.put("inviteMoney", inviteMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | |
|
| | |
| | | <if test="day != null and day == 4"> <!-- 上月 --> |
| | | AND PERIOD_DIFF( DATE_FORMAT(NOW(), '%Y%m'), |
| | | DATE_FORMAT(tc.`co_create_time`, '%Y%m')) = 1 |
| | | <!-- 统计已收货 --> |
| | | AND tc.`co_state` = 2 |
| | | </if> |
| | | |
| | | GROUP BY tc.`co_order_no`,tc.co_source_type)A |
| | | </select> |
| | | |
| | |
| | | LEFT JOIN yeshi_ec_hongbao_v2 th ON |
| | | (tr.`ho_hongbao_id` = th.`hb_id` OR |
| | | th.`hb_pid` = tr.`ho_hongbao_id` ) |
| | | WHERE <![CDATA[tc.`co_state` <> 4]]> |
| | | <if test="uid != null"> |
| | | AND th.`hb_uid` = ${uid} |
| | | </if> |
| | | WHERE th.`hb_uid` = ${uid} |
| | | <if test="type != null and type == 1"> <!-- 自购订单 --> |
| | | AND (th.hb_type =1 or th.hb_type =2) |
| | | </if> |
| | |
| | | <if test="day != null and day == 4"> <!-- 上月 --> |
| | | AND PERIOD_DIFF( DATE_FORMAT(NOW(), '%Y%m'), |
| | | DATE_FORMAT(tc.`co_create_time`, '%Y%m')) = 1 |
| | | |
| | | <!-- 统计已收货 --> |
| | | AND tc.`co_state` = 2 |
| | | </if> |
| | | </select> |
| | | |