yujian
2019-12-11 0f52108bac0ebf47a563c41bcb97d934b7cf12ab
订单筛选
5个文件已修改
35 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserOrderControllerV2.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/HongBaoV2CountMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/hongbao/HongBaoV2CountMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/HongBaoV2CountServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/count/HongBaoV2CountService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserOrderControllerV2.java
@@ -81,13 +81,14 @@
     *            时间段: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;
@@ -117,6 +118,9 @@
            orderType = Integer.parseInt(type); 
        } 
        if (goodsType != null && goodsType == 0)
            goodsType = null;
        // 筛选时间
        if (slotTime != null) {
            try {
@@ -162,12 +166,12 @@
            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();
                
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/HongBaoV2CountMapper.java
@@ -220,6 +220,7 @@
     */
    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);
}
fanli/src/main/java/com/yeshi/fanli/mapping/hongbao/HongBaoV2CountMapper.xml
@@ -436,6 +436,16 @@
            <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`
fanli/src/main/java/com/yeshi/fanli/service/impl/count/HongBaoV2CountServiceImpl.java
@@ -8,7 +8,6 @@
import javax.annotation.Resource;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.yeshi.utils.DateUtil;
@@ -346,13 +345,14 @@
    
    @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);
    }
    
fanli/src/main/java/com/yeshi/fanli/service/inter/count/HongBaoV2CountService.java
@@ -261,6 +261,6 @@
     * @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);
}