Showing
2 changed files
with
12 additions
and
4 deletions
@@ -6,6 +6,7 @@ import com.yohobuy.ufo.model.order.common.OrderStatus; | @@ -6,6 +6,7 @@ import com.yohobuy.ufo.model.order.common.OrderStatus; | ||
6 | import com.yohobuy.ufo.model.order.resp.OrderListInfo; | 6 | import com.yohobuy.ufo.model.order.resp.OrderListInfo; |
7 | import com.yohoufo.dal.order.model.BuyerOrder; | 7 | import com.yohoufo.dal.order.model.BuyerOrder; |
8 | import com.yohoufo.order.model.response.OrderDetailInfo; | 8 | import com.yohoufo.order.model.response.OrderDetailInfo; |
9 | +import com.yohoufo.order.service.support.ThreeFunction; | ||
9 | import org.apache.commons.collections.CollectionUtils; | 10 | import org.apache.commons.collections.CollectionUtils; |
10 | 11 | ||
11 | import java.util.ArrayList; | 12 | import java.util.ArrayList; |
@@ -41,9 +42,9 @@ public class BuyerOrderButtonsHandler { | @@ -41,9 +42,9 @@ public class BuyerOrderButtonsHandler { | ||
41 | return this; | 42 | return this; |
42 | } | 43 | } |
43 | 44 | ||
44 | - BiFunction<BuyerOrder,List<ButtonShowBo>,List<ButtonShowBo>> fmtBtnFunc; | 45 | + ThreeFunction<BuyerOrder, List<ButtonShowBo>, Integer, List<ButtonShowBo>> fmtBtnFunc; |
45 | 46 | ||
46 | - public BuyerOrderButtonsHandler loadFmtBtnFunc(BiFunction<BuyerOrder,List<ButtonShowBo>,List<ButtonShowBo>> fmtBtnFunc){ | 47 | + public BuyerOrderButtonsHandler loadFmtBtnFunc(ThreeFunction<BuyerOrder,List<ButtonShowBo>, Integer, List<ButtonShowBo>> fmtBtnFunc){ |
47 | this.fmtBtnFunc = fmtBtnFunc; | 48 | this.fmtBtnFunc = fmtBtnFunc; |
48 | return this; | 49 | return this; |
49 | } | 50 | } |
@@ -64,7 +65,7 @@ public class BuyerOrderButtonsHandler { | @@ -64,7 +65,7 @@ public class BuyerOrderButtonsHandler { | ||
64 | pbos = buyerOrderDS.apply(paidOrderCodes, statusList); | 65 | pbos = buyerOrderDS.apply(paidOrderCodes, statusList); |
65 | if (CollectionUtils.isNotEmpty(pbos)){ | 66 | if (CollectionUtils.isNotEmpty(pbos)){ |
66 | BuyerOrder pbo = pbos.get(0); | 67 | BuyerOrder pbo = pbos.get(0); |
67 | - List<ButtonShowBo> fbsbs = fmtBtnFunc.apply(pbo, orderDetailInfo.getButtons()); | 68 | + List<ButtonShowBo> fbsbs = fmtBtnFunc.apply(pbo, orderDetailInfo.getButtons(), 2); |
68 | orderDetailInfo.setButtons(fbsbs); | 69 | orderDetailInfo.setButtons(fbsbs); |
69 | } | 70 | } |
70 | } | 71 | } |
@@ -91,7 +92,7 @@ public class BuyerOrderButtonsHandler { | @@ -91,7 +92,7 @@ public class BuyerOrderButtonsHandler { | ||
91 | if(olip.test(oli)) { | 92 | if(olip.test(oli)) { |
92 | Long orderCode = oli.getOrderCode(); | 93 | Long orderCode = oli.getOrderCode(); |
93 | BuyerOrder pbo = codeBuyorderMap.get(orderCode); | 94 | BuyerOrder pbo = codeBuyorderMap.get(orderCode); |
94 | - List<ButtonShowBo> fbsbs = fmtBtnFunc.apply(pbo, oli.getButtons()); | 95 | + List<ButtonShowBo> fbsbs = fmtBtnFunc.apply(pbo, oli.getButtons(), 1); |
95 | oli.setButtons(fbsbs); | 96 | oli.setButtons(fbsbs); |
96 | } | 97 | } |
97 | } | 98 | } |
-
Please register or login to post a comment