|
@@ -3,6 +3,8 @@ package com.mangoo.rating.recommend.cart;
|
|
|
import com.mangoo.rating.recommend.AjaxResult;
|
|
import com.mangoo.rating.recommend.AjaxResult;
|
|
|
import com.mangoo.rating.recommend.config.RecommendProperties;
|
|
import com.mangoo.rating.recommend.config.RecommendProperties;
|
|
|
import com.mangoo.rating.recommend.enums.MatchLevelEnum;
|
|
import com.mangoo.rating.recommend.enums.MatchLevelEnum;
|
|
|
|
|
+import com.mangoo.rating.recommend.manager.ActiveBatchManager;
|
|
|
|
|
+import com.mangoo.rating.recommend.manager.CardPopManager;
|
|
|
import com.mangoo.rating.recommend.manager.RatingRecommendRuleManager;
|
|
import com.mangoo.rating.recommend.manager.RatingRecommendRuleManager;
|
|
|
import com.mangoo.rating.recommend.po.RatingRecommendRulePO;
|
|
import com.mangoo.rating.recommend.po.RatingRecommendRulePO;
|
|
|
import com.mangoo.rating.recommend.request.recommend.RecommendCardDTO;
|
|
import com.mangoo.rating.recommend.request.recommend.RecommendCardDTO;
|
|
@@ -23,6 +25,7 @@ import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
import java.util.Collections;
|
|
import java.util.Collections;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
@@ -30,48 +33,38 @@ import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
|
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
|
|
import static org.mockito.ArgumentMatchers.any;
|
|
import static org.mockito.ArgumentMatchers.any;
|
|
|
import static org.mockito.ArgumentMatchers.anyString;
|
|
import static org.mockito.ArgumentMatchers.anyString;
|
|
|
|
|
+import static org.mockito.ArgumentMatchers.eq;
|
|
|
import static org.mockito.Mockito.lenient;
|
|
import static org.mockito.Mockito.lenient;
|
|
|
import static org.mockito.Mockito.when;
|
|
import static org.mockito.Mockito.when;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * RecommendServiceImpl Mockito 单测(11 项)
|
|
|
|
|
- *
|
|
|
|
|
- * 覆盖:入参校验、L1/L2/L3/兜底降级、规则时效非法跳过、价格缺失、
|
|
|
|
|
- * 多档分组、同档合并、图片透传。
|
|
|
|
|
- *
|
|
|
|
|
- * 备注:AjaxResult 同时继承 HashMap 且提供 getCode() Bean 方法,
|
|
|
|
|
- * 这里统一采用 Map 风格 .get("code") / .get("data") 取值。
|
|
|
|
|
|
|
+ * RecommendServiceImpl Mockito 单测(适配 batch_no 过滤 + POP/价值增强)
|
|
|
*
|
|
*
|
|
|
* @author gengjintao
|
|
* @author gengjintao
|
|
|
- * @date 2026/06/24
|
|
|
|
|
|
|
+ * @date 2026/06/25
|
|
|
*/
|
|
*/
|
|
|
@ExtendWith(MockitoExtension.class)
|
|
@ExtendWith(MockitoExtension.class)
|
|
|
class RecommendServiceImplTest {
|
|
class RecommendServiceImplTest {
|
|
|
|
|
|
|
|
- /** 规则查询 Manager Mock */
|
|
|
|
|
@Mock
|
|
@Mock
|
|
|
private RatingRecommendRuleManager ruleManager;
|
|
private RatingRecommendRuleManager ruleManager;
|
|
|
-
|
|
|
|
|
- /** 价格 Provider Mock */
|
|
|
|
|
@Mock
|
|
@Mock
|
|
|
private EfficiencyPriceProvider priceProvider;
|
|
private EfficiencyPriceProvider priceProvider;
|
|
|
-
|
|
|
|
|
- /** 配置属性 Mock */
|
|
|
|
|
@Mock
|
|
@Mock
|
|
|
private RecommendProperties recommendProperties;
|
|
private RecommendProperties recommendProperties;
|
|
|
-
|
|
|
|
|
- /** 被测对象:按类型注入上述 3 个 Mock */
|
|
|
|
|
|
|
+ @Mock
|
|
|
|
|
+ private ActiveBatchManager activeBatchManager;
|
|
|
|
|
+ @Mock
|
|
|
|
|
+ private CardPopManager cardPopManager;
|
|
|
@InjectMocks
|
|
@InjectMocks
|
|
|
private RecommendServiceImpl recommendService;
|
|
private RecommendServiceImpl recommendService;
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 公共桩:默认兜底档=1,上限=50,价格 Map={1:50.00, 2:100.00, 3:200.00}。
|
|
|
|
|
- * 用 lenient() 避免严格模式下"未使用 stub"告警。
|
|
|
|
|
- */
|
|
|
|
|
@BeforeEach
|
|
@BeforeEach
|
|
|
void setUp() {
|
|
void setUp() {
|
|
|
lenient().when(recommendProperties.getDefaultEfficiency()).thenReturn(1);
|
|
lenient().when(recommendProperties.getDefaultEfficiency()).thenReturn(1);
|
|
|
lenient().when(recommendProperties.getBatchMax()).thenReturn(50);
|
|
lenient().when(recommendProperties.getBatchMax()).thenReturn(50);
|
|
|
|
|
+ lenient().when(activeBatchManager.selectActiveBatchNo()).thenReturn("B1");
|
|
|
|
|
+ lenient().when(cardPopManager.selectByCardId(anyString(), anyString())).thenReturn(Collections.emptyList());
|
|
|
Map<Integer, BigDecimal> defaultPrices = new HashMap<>();
|
|
Map<Integer, BigDecimal> defaultPrices = new HashMap<>();
|
|
|
defaultPrices.put(1, new BigDecimal("50.00"));
|
|
defaultPrices.put(1, new BigDecimal("50.00"));
|
|
|
defaultPrices.put(2, new BigDecimal("100.00"));
|
|
defaultPrices.put(2, new BigDecimal("100.00"));
|
|
@@ -79,7 +72,6 @@ class RecommendServiceImplTest {
|
|
|
lenient().when(priceProvider.loadEfficiencyPrices()).thenReturn(defaultPrices);
|
|
lenient().when(priceProvider.loadEfficiencyPrices()).thenReturn(defaultPrices);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /** 构造卡入参 DTO 的便捷方法 */
|
|
|
|
|
private RecommendCardDTO card(String id, String player, String year, String series, String cardSet) {
|
|
private RecommendCardDTO card(String id, String player, String year, String series, String cardSet) {
|
|
|
RecommendCardDTO d = new RecommendCardDTO();
|
|
RecommendCardDTO d = new RecommendCardDTO();
|
|
|
d.setClientCardId(id);
|
|
d.setClientCardId(id);
|
|
@@ -90,44 +82,34 @@ class RecommendServiceImplTest {
|
|
|
return d;
|
|
return d;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /** 构造请求体 */
|
|
|
|
|
private RecommendRequest req(RecommendCardDTO... cards) {
|
|
private RecommendRequest req(RecommendCardDTO... cards) {
|
|
|
RecommendRequest r = new RecommendRequest();
|
|
RecommendRequest r = new RecommendRequest();
|
|
|
r.setCards(new ArrayList<>(Arrays.asList(cards)));
|
|
r.setCards(new ArrayList<>(Arrays.asList(cards)));
|
|
|
return r;
|
|
return r;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /** 构造规则 PO(只填推荐时效字段即可) */
|
|
|
|
|
private RatingRecommendRulePO rule(Integer eff) {
|
|
private RatingRecommendRulePO rule(Integer eff) {
|
|
|
RatingRecommendRulePO po = new RatingRecommendRulePO();
|
|
RatingRecommendRulePO po = new RatingRecommendRulePO();
|
|
|
po.setRecommendEfficiency(eff);
|
|
po.setRecommendEfficiency(eff);
|
|
|
return po;
|
|
return po;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /** 从 AjaxResult(Map 风格)取出 code 数值 */
|
|
|
|
|
private int code(AjaxResult r) {
|
|
private int code(AjaxResult r) {
|
|
|
return ((Number) r.get("code")).intValue();
|
|
return ((Number) r.get("code")).intValue();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /** 从 AjaxResult(Map 风格)取出 data 数据体 */
|
|
|
|
|
private RecommendResultVO data(AjaxResult r) {
|
|
private RecommendResultVO data(AjaxResult r) {
|
|
|
return (RecommendResultVO) r.get("data");
|
|
return (RecommendResultVO) r.get("data");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void 空入参_返回error() {
|
|
void 空入参_返回error() {
|
|
|
- // null 请求
|
|
|
|
|
- AjaxResult result = recommendService.recommendEfficiency(null);
|
|
|
|
|
- assertNotEquals(0, code(result));
|
|
|
|
|
-
|
|
|
|
|
- // 空卡列表
|
|
|
|
|
- result = recommendService.recommendEfficiency(new RecommendRequest());
|
|
|
|
|
- assertNotEquals(0, code(result));
|
|
|
|
|
|
|
+ assertNotEquals(0, code(recommendService.recommendEfficiency(null)));
|
|
|
|
|
+ assertNotEquals(0, code(recommendService.recommendEfficiency(new RecommendRequest())));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void 超限_返回error() {
|
|
void 超限_返回error() {
|
|
|
- // 上限设置为 1,但传入 2 张卡 → 应返回 error
|
|
|
|
|
when(recommendProperties.getBatchMax()).thenReturn(1);
|
|
when(recommendProperties.getBatchMax()).thenReturn(1);
|
|
|
AjaxResult result = recommendService.recommendEfficiency(
|
|
AjaxResult result = recommendService.recommendEfficiency(
|
|
|
req(card("c1", "p", "y", "s", "cs"), card("c2", "p", "y", "s", "cs")));
|
|
req(card("c1", "p", "y", "s", "cs"), card("c2", "p", "y", "s", "cs")));
|
|
@@ -136,12 +118,9 @@ class RecommendServiceImplTest {
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void L1全等命中_单卡_单订单_含价格() {
|
|
void L1全等命中_单卡_单订单_含价格() {
|
|
|
- // 四字段全等命中 → 推荐档 3(闪评),单价 200.00
|
|
|
|
|
- when(ruleManager.selectByExact("Jordan", "1986", "Fleer", "Base")).thenReturn(rule(3));
|
|
|
|
|
-
|
|
|
|
|
|
|
+ when(ruleManager.selectByExact("Jordan", "1986", "Fleer", "Base", "B1")).thenReturn(rule(3));
|
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "Jordan", "1986", "Fleer", "Base")));
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "Jordan", "1986", "Fleer", "Base")));
|
|
|
RecommendResultVO d = data(result);
|
|
RecommendResultVO d = data(result);
|
|
|
-
|
|
|
|
|
assertEquals(1, d.getTotalCards());
|
|
assertEquals(1, d.getTotalCards());
|
|
|
assertEquals(1, d.getOrderCount());
|
|
assertEquals(1, d.getOrderCount());
|
|
|
OrderSuggestionVO order = d.getOrders().get(0);
|
|
OrderSuggestionVO order = d.getOrders().get(0);
|
|
@@ -154,10 +133,8 @@ class RecommendServiceImplTest {
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void L1未命中_L2命中_matchLevel为L2() {
|
|
void L1未命中_L2命中_matchLevel为L2() {
|
|
|
- // L1 返回 null → 走 L2,L2 命中 rule(2)
|
|
|
|
|
- when(ruleManager.selectByExact(anyString(), anyString(), anyString(), anyString())).thenReturn(null);
|
|
|
|
|
- when(ruleManager.selectBySeriesSetYear("Fleer", "Base", "1986")).thenReturn(rule(2));
|
|
|
|
|
-
|
|
|
|
|
|
|
+ when(ruleManager.selectByExact(anyString(), anyString(), anyString(), anyString(), anyString())).thenReturn(null);
|
|
|
|
|
+ when(ruleManager.selectBySeriesSetYear("Fleer", "Base", "1986", "B1")).thenReturn(rule(2));
|
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "Jordan", "1986", "Fleer", "Base")));
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "Jordan", "1986", "Fleer", "Base")));
|
|
|
RecommendResultVO d = data(result);
|
|
RecommendResultVO d = data(result);
|
|
|
assertEquals(MatchLevelEnum.L2.getCode(), d.getOrders().get(0).getCards().get(0).getMatchLevel());
|
|
assertEquals(MatchLevelEnum.L2.getCode(), d.getOrders().get(0).getCards().get(0).getMatchLevel());
|
|
@@ -166,11 +143,9 @@ class RecommendServiceImplTest {
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void L1L2未命中_L3命中_matchLevel为L3() {
|
|
void L1L2未命中_L3命中_matchLevel为L3() {
|
|
|
- // L1、L2 均返回 null → 走 L3,L3 命中 rule(2)
|
|
|
|
|
- when(ruleManager.selectByExact(anyString(), anyString(), anyString(), anyString())).thenReturn(null);
|
|
|
|
|
- when(ruleManager.selectBySeriesSetYear(anyString(), anyString(), anyString())).thenReturn(null);
|
|
|
|
|
- when(ruleManager.selectBySeriesSet("Fleer", "Base")).thenReturn(rule(2));
|
|
|
|
|
-
|
|
|
|
|
|
|
+ when(ruleManager.selectByExact(anyString(), anyString(), anyString(), anyString(), anyString())).thenReturn(null);
|
|
|
|
|
+ when(ruleManager.selectBySeriesSetYear(anyString(), anyString(), anyString(), anyString())).thenReturn(null);
|
|
|
|
|
+ when(ruleManager.selectBySeriesSet("Fleer", "Base", "B1")).thenReturn(rule(2));
|
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "Jordan", "1986", "Fleer", "Base")));
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "Jordan", "1986", "Fleer", "Base")));
|
|
|
RecommendResultVO d = data(result);
|
|
RecommendResultVO d = data(result);
|
|
|
assertEquals(MatchLevelEnum.L3.getCode(), d.getOrders().get(0).getCards().get(0).getMatchLevel());
|
|
assertEquals(MatchLevelEnum.L3.getCode(), d.getOrders().get(0).getCards().get(0).getMatchLevel());
|
|
@@ -178,11 +153,9 @@ class RecommendServiceImplTest {
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void 三层均未命中_走兜底_matchLevel为DEFAULT() {
|
|
void 三层均未命中_走兜底_matchLevel为DEFAULT() {
|
|
|
- // 三层全 null → 走 DEFAULT,时效=defaultEfficiency=1
|
|
|
|
|
- when(ruleManager.selectByExact(any(), any(), any(), any())).thenReturn(null);
|
|
|
|
|
- when(ruleManager.selectBySeriesSetYear(any(), any(), any())).thenReturn(null);
|
|
|
|
|
- when(ruleManager.selectBySeriesSet(any(), any())).thenReturn(null);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ when(ruleManager.selectByExact(any(), any(), any(), any(), any())).thenReturn(null);
|
|
|
|
|
+ when(ruleManager.selectBySeriesSetYear(any(), any(), any(), any())).thenReturn(null);
|
|
|
|
|
+ when(ruleManager.selectBySeriesSet(any(), any(), any())).thenReturn(null);
|
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "X", "Y", "Z", "W")));
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "X", "Y", "Z", "W")));
|
|
|
RecommendResultVO d = data(result);
|
|
RecommendResultVO d = data(result);
|
|
|
assertEquals(MatchLevelEnum.DEFAULT.getCode(), d.getOrders().get(0).getCards().get(0).getMatchLevel());
|
|
assertEquals(MatchLevelEnum.DEFAULT.getCode(), d.getOrders().get(0).getCards().get(0).getMatchLevel());
|
|
@@ -191,22 +164,17 @@ class RecommendServiceImplTest {
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void 规则时效非法_跳过该层继续降级() {
|
|
void 规则时效非法_跳过该层继续降级() {
|
|
|
- // L1 命中 rule(99) → recommendEfficiency=99 不在 EvaluateEfficiencyEnum 范围内 → isLegalRule=false
|
|
|
|
|
- // → 继续 L2,L2 返回合法 rule(2) → matchLevel=L2
|
|
|
|
|
- when(ruleManager.selectByExact(any(), any(), any(), any())).thenReturn(rule(99));
|
|
|
|
|
- when(ruleManager.selectBySeriesSetYear(any(), any(), any())).thenReturn(rule(2));
|
|
|
|
|
|
|
+ when(ruleManager.selectByExact(any(), any(), any(), any(), any())).thenReturn(rule(99));
|
|
|
|
|
+ when(ruleManager.selectBySeriesSetYear(any(), any(), any(), any())).thenReturn(rule(2));
|
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "p", "y", "s", "cs")));
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "p", "y", "s", "cs")));
|
|
|
RecommendResultVO d = data(result);
|
|
RecommendResultVO d = data(result);
|
|
|
assertEquals(MatchLevelEnum.L2.getCode(), d.getOrders().get(0).getCards().get(0).getMatchLevel());
|
|
assertEquals(MatchLevelEnum.L2.getCode(), d.getOrders().get(0).getCards().get(0).getMatchLevel());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
- void 价格Map为空_订单与卡的单价均为null_grandTotal为null() {
|
|
|
|
|
- // 全等命中 rule(3),但价格 Map 为空 → 该档无价
|
|
|
|
|
- // → 订单 unitPrice/totalAmount=null,卡级 unitPrice=null,grandTotal=null
|
|
|
|
|
- when(ruleManager.selectByExact(any(), any(), any(), any())).thenReturn(rule(3));
|
|
|
|
|
|
|
+ void 价格Map为空_单价均为null_grandTotal为null() {
|
|
|
|
|
+ when(ruleManager.selectByExact(any(), any(), any(), any(), any())).thenReturn(rule(3));
|
|
|
when(priceProvider.loadEfficiencyPrices()).thenReturn(Collections.emptyMap());
|
|
when(priceProvider.loadEfficiencyPrices()).thenReturn(Collections.emptyMap());
|
|
|
-
|
|
|
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "p", "y", "s", "cs")));
|
|
AjaxResult result = recommendService.recommendEfficiency(req(card("c1", "p", "y", "s", "cs")));
|
|
|
RecommendResultVO d = data(result);
|
|
RecommendResultVO d = data(result);
|
|
|
assertNull(d.getOrders().get(0).getUnitPrice());
|
|
assertNull(d.getOrders().get(0).getUnitPrice());
|
|
@@ -217,12 +185,9 @@ class RecommendServiceImplTest {
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void 多卡多档_按档位升序分3单_总计正确() {
|
|
void 多卡多档_按档位升序分3单_总计正确() {
|
|
|
- // 三张卡分别命中 1/2/3 档 → 分 3 单(按档位升序)
|
|
|
|
|
- // grandTotal = 50 + 100 + 200 = 350.00
|
|
|
|
|
- when(ruleManager.selectByExact("p1", "y", "s", "cs")).thenReturn(rule(1));
|
|
|
|
|
- when(ruleManager.selectByExact("p2", "y", "s", "cs")).thenReturn(rule(2));
|
|
|
|
|
- when(ruleManager.selectByExact("p3", "y", "s", "cs")).thenReturn(rule(3));
|
|
|
|
|
-
|
|
|
|
|
|
|
+ when(ruleManager.selectByExact("p1", "y", "s", "cs", "B1")).thenReturn(rule(1));
|
|
|
|
|
+ when(ruleManager.selectByExact("p2", "y", "s", "cs", "B1")).thenReturn(rule(2));
|
|
|
|
|
+ when(ruleManager.selectByExact("p3", "y", "s", "cs", "B1")).thenReturn(rule(3));
|
|
|
AjaxResult result = recommendService.recommendEfficiency(req(
|
|
AjaxResult result = recommendService.recommendEfficiency(req(
|
|
|
card("c1", "p1", "y", "s", "cs"),
|
|
card("c1", "p1", "y", "s", "cs"),
|
|
|
card("c2", "p2", "y", "s", "cs"),
|
|
card("c2", "p2", "y", "s", "cs"),
|
|
@@ -236,9 +201,8 @@ class RecommendServiceImplTest {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
- void 同档多卡_合并为一单_单价不变_总计为单价乘以数量() {
|
|
|
|
|
- // 3 张同档 2 卡 → 合并为 1 单,cardCount=3,unitPrice=100.00,totalAmount=300.00
|
|
|
|
|
- when(ruleManager.selectByExact(any(), any(), any(), any())).thenReturn(rule(2));
|
|
|
|
|
|
|
+ void 同档多卡_合并为一单_总计为单价乘数量() {
|
|
|
|
|
+ when(ruleManager.selectByExact(any(), any(), any(), any(), any())).thenReturn(rule(2));
|
|
|
AjaxResult result = recommendService.recommendEfficiency(req(
|
|
AjaxResult result = recommendService.recommendEfficiency(req(
|
|
|
card("c1", "p", "y", "s", "cs"),
|
|
card("c1", "p", "y", "s", "cs"),
|
|
|
card("c2", "p", "y", "s", "cs"),
|
|
card("c2", "p", "y", "s", "cs"),
|
|
@@ -252,13 +216,11 @@ class RecommendServiceImplTest {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
- void 图片透传_前端clientCardId与图片原样返回() {
|
|
|
|
|
- // 验证 clientCardId、frontImageUrl、backImageUrl 原样透传
|
|
|
|
|
- when(ruleManager.selectByExact(any(), any(), any(), any())).thenReturn(rule(1));
|
|
|
|
|
|
|
+ void 图片透传_clientCardId与图片原样返回() {
|
|
|
|
|
+ when(ruleManager.selectByExact(any(), any(), any(), any(), any())).thenReturn(rule(1));
|
|
|
RecommendCardDTO c = card("MY-CARD-1", "p", "y", "s", "cs");
|
|
RecommendCardDTO c = card("MY-CARD-1", "p", "y", "s", "cs");
|
|
|
c.setFrontImageUrl("http://x/f.jpg");
|
|
c.setFrontImageUrl("http://x/f.jpg");
|
|
|
c.setBackImageUrl("http://x/b.jpg");
|
|
c.setBackImageUrl("http://x/b.jpg");
|
|
|
-
|
|
|
|
|
AjaxResult result = recommendService.recommendEfficiency(req(c));
|
|
AjaxResult result = recommendService.recommendEfficiency(req(c));
|
|
|
RecommendResultVO d = data(result);
|
|
RecommendResultVO d = data(result);
|
|
|
assertEquals("MY-CARD-1", d.getOrders().get(0).getCards().get(0).getClientCardId());
|
|
assertEquals("MY-CARD-1", d.getOrders().get(0).getCards().get(0).getClientCardId());
|