| | |
| | | * 时间段:1-最近三天 2-最近七天 3最近半月 4本月 5近三月 6近半年
|
| | | * @param dateType
|
| | | * 1-今日 2-昨天 3-本月 4-上个月 |
|
| | | * @param needCount
|
| | | * @param source |
| | | * 页面来源:welfareCore-福利中心、bonus -奖金统计(我的界面)
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getOrderList", method = RequestMethod.POST)
|
| | | public void getOrderList(AcceptData acceptData, Integer page, Long uid, Integer state, String type,
|
| | | Integer orderState, String orderNo, String startTime, String endTime, Integer slotTime,
|
| | | Integer dateType, Integer goodsType, PrintWriter out) {
|
| | | Integer dateType, Integer goodsType, String source, PrintWriter out) {
|
| | | if (uid == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | |
| | | orderType = Integer.parseInt(type);
|
| | | }
|
| | |
|
| | | if (goodsType != null && goodsType == 0)
|
| | | goodsType = null;
|
| | | |
| | | // 筛选时间
|
| | | if (slotTime != null) {
|
| | | try {
|
| | |
| | | String invalidMoney = "0.00";
|
| | | if (page == 1) {
|
| | | BigDecimal predictMoney = hongBaoV2CountService.getRewardMoneyByToSearch(uid, dateType, orderType, 1,
|
| | | orderNo, goodsType, startTime, endTime);
|
| | | orderNo, state, goodsType, startTime, endTime);
|
| | | if (predictMoney != null)
|
| | | validMoney = predictMoney.setScale(2, BigDecimal.ROUND_DOWN).toString();
|
| | |
|
| | | BigDecimal postSaleMoney = hongBaoV2CountService.getRewardMoneyByToSearch(uid, dateType, orderType, 2,
|
| | | orderNo, goodsType, startTime, endTime);
|
| | | orderNo, state, goodsType, startTime, endTime);
|
| | | if (postSaleMoney != null)
|
| | | invalidMoney = postSaleMoney.setScale(2, BigDecimal.ROUND_DOWN).toString();
|
| | |
|
| | |
| | | */ |
| | | BigDecimal getRewardMoneyByDate(@Param("uid") Long uid, @Param("day")Integer dateType, |
| | | @Param("type") Integer hbType, @Param("orderState") Integer orderState, |
| | | @Param("orderNo") String orderNo, @Param("source") Integer source, |
| | | @Param("orderNo") String orderNo, @Param("moneyState") Integer moneyState, |
| | | @Param("source") Integer source, |
| | | @Param("startTime") String startTime, @Param("endTime") String endTime); |
| | | } |
| | |
| | | <if test="type == 3 and day == 4"> <!-- 本月将要到账 --> |
| | | AND DATE_FORMAT(v.`hb_pre_get_time`,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m') |
| | | </if> |
| | | |
| | | <if test="moneyState != null and moneyState == 1"> <!-- 未到账 --> |
| | | AND (v.hb_state = 1 or v.hb_state = 2) |
| | | </if> |
| | | <if test="moneyState != null and moneyState == 2"> <!-- 已到账 --> |
| | | AND v.hb_state = 3 |
| | | </if> |
| | | <if test="moneyState != null and moneyState == 3"> <!-- 红包已失效、整个订单失效 --> |
| | | AND v.hb_state =4 AND co.co_state_whole_order = 3 |
| | | </if> |
| | | )v2 |
| | | LEFT JOIN yeshi_ec_hongbao_order ho ON ho.`ho_hongbao_id` = IF(v2.hb_pid IS NULL,v2.hb_id,v2.hb_pid) |
| | | LEFT JOIN yeshi_ec_common_order co ON co.`co_id` = ho.`ho_order_id` |
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.DateUtil;
|
| | |
|
| | |
| | |
|
| | | @Override
|
| | | public BigDecimal getRewardMoneyToCount(Long uid, Integer dateType, Integer hbType) {
|
| | | return hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, hbType, null, null, null, null, null);
|
| | | return hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, hbType, null, null, null, null, null, null);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public BigDecimal getRewardMoneyByToSearch(Long uid, Integer dateType, Integer orderType, Integer orderState, String orderNo, Integer source, String startTime, String endTime) {
|
| | | return hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, orderType, orderState, orderNo, source,
|
| | | public BigDecimal getRewardMoneyByToSearch(Long uid, Integer dateType, Integer orderType, Integer orderState,
|
| | | String orderNo, Integer moneyState, Integer source, String startTime, String endTime) {
|
| | | return hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, orderType, orderState, orderNo, moneyState, source,
|
| | | startTime, endTime);
|
| | | }
|
| | |
|
| | |
| | | * @return
|
| | | */
|
| | | public BigDecimal getRewardMoneyByToSearch(Long uid, Integer dateType, Integer hbType, Integer orderState, String orderNo,
|
| | | Integer source, String startTime, String endTime); |
| | | Integer moneyState, Integer source, String startTime, String endTime); |
| | |
|
| | | }
|