|
@@ -86,6 +86,7 @@ namespace molilian.api.Controllers
|
|
|
var oaid = form.Read("oaid", string.Empty);
|
|
var oaid = form.Read("oaid", string.Empty);
|
|
|
var scene = form.Read("scene", string.Empty);
|
|
var scene = form.Read("scene", string.Empty);
|
|
|
var recommand = form.Read("recommand", true);
|
|
var recommand = form.Read("recommand", true);
|
|
|
|
|
+ var useCouponLinkFirst = form.Read("useCouponLinkFirst", true);
|
|
|
var aid = form.Read("aid", 0);
|
|
var aid = form.Read("aid", 0);
|
|
|
|
|
|
|
|
//验证签名
|
|
//验证签名
|
|
@@ -116,7 +117,7 @@ namespace molilian.api.Controllers
|
|
|
var bytes = new WebClientUtility().Request(url).ResponseBody;
|
|
var bytes = new WebClientUtility().Request(url).ResponseBody;
|
|
|
img = Convert.ToBase64String(bytes);
|
|
img = Convert.ToBase64String(bytes);
|
|
|
}
|
|
}
|
|
|
- return await core.PromotionQueryAsync(img, oaid, ip, scene, recommand, false, aid);
|
|
|
|
|
|
|
+ return await core.PromotionQueryAsync(img, oaid, ip, scene, recommand, false, aid, useCouponLinkFirst);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -132,6 +133,7 @@ namespace molilian.api.Controllers
|
|
|
var scene = form.Read("scene", string.Empty);
|
|
var scene = form.Read("scene", string.Empty);
|
|
|
var recommand = form.Read("recommand", true);
|
|
var recommand = form.Read("recommand", true);
|
|
|
var debug = form.Read("debug", false);
|
|
var debug = form.Read("debug", false);
|
|
|
|
|
+ var useCouponLinkFirst = form.Read("useCouponLinkFirst", true);
|
|
|
var aid = form.Read("aid", 0);
|
|
var aid = form.Read("aid", 0);
|
|
|
|
|
|
|
|
int count = form.Read("count", 0);
|
|
int count = form.Read("count", 0);
|
|
@@ -152,7 +154,7 @@ namespace molilian.api.Controllers
|
|
|
{
|
|
{
|
|
|
for (int i = 0; i < count; i++)
|
|
for (int i = 0; i < count; i++)
|
|
|
{
|
|
{
|
|
|
- _ = core.PromotionQueryAsync(img, oaid, ip, scene, recommand, debug, aid);
|
|
|
|
|
|
|
+ _ = core.PromotionQueryAsync(img, oaid, ip, scene, recommand, debug, aid, useCouponLinkFirst);
|
|
|
}
|
|
}
|
|
|
return new APIResult(new { msg = "ok" });
|
|
return new APIResult(new { msg = "ok" });
|
|
|
}
|
|
}
|
|
@@ -166,7 +168,7 @@ namespace molilian.api.Controllers
|
|
|
{
|
|
{
|
|
|
itemid = AlimamaPlus.ExtractItemId(itemUrl);
|
|
itemid = AlimamaPlus.ExtractItemId(itemUrl);
|
|
|
(APIResult target, PromotionQueryDTO data) = await core.PromotionQueryByItemIdAsync(itemid, oaid, ip, scene, recommand, debug, aid);
|
|
(APIResult target, PromotionQueryDTO data) = await core.PromotionQueryByItemIdAsync(itemid, oaid, ip, scene, recommand, debug, aid);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
if (data != null)
|
|
if (data != null)
|
|
|
{
|
|
{
|
|
@@ -177,16 +179,16 @@ namespace molilian.api.Controllers
|
|
|
img = Convert.ToBase64String(bytes);
|
|
img = Convert.ToBase64String(bytes);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return await core.PromotionQueryAsync(img, oaid, ip, scene, recommand, debug, aid);
|
|
|
|
|
|
|
+ return await core.PromotionQueryAsync(img, oaid, ip, scene, recommand, debug, aid, useCouponLinkFirst);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(itemid))
|
|
if (!string.IsNullOrEmpty(itemid))
|
|
|
{
|
|
{
|
|
|
- (APIResult result, PromotionQueryDTO data) = await core.PromotionQueryByItemIdAsync(itemid, oaid, ip, scene, recommand, debug, aid);
|
|
|
|
|
|
|
+ (APIResult result, PromotionQueryDTO data) = await core.PromotionQueryByItemIdAsync(itemid, oaid, ip, scene, recommand, debug, aid, useCouponLinkFirst);
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return await core.PromotionQueryAsync(img, oaid, ip, scene, recommand, debug, aid);
|
|
|
|
|
|
|
+ return await core.PromotionQueryAsync(img, oaid, ip, scene, recommand, debug, aid, useCouponLinkFirst);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|