...
|
...
|
@@ -73,6 +73,29 @@ public class SendCouponHelper { |
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 发送有货币
|
|
|
*
|
|
|
* @param uid
|
|
|
* @param num
|
|
|
* @return
|
|
|
*/
|
|
|
public boolean sendYOHOBi(int uid, int num, int type) {
|
|
|
YohoCoinRecordReq req = buildYohoCoinCostReq(uid, num, type);
|
|
|
final String serviceName = "users.addRecord";
|
|
|
boolean result = false;
|
|
|
try {
|
|
|
log.info("BrandActivityServiceImpl sendYOHOBi req------ is {}", req);
|
|
|
CommonRspBO rspBO = serviceCaller.call(serviceName, req, CommonRspBO.class);
|
|
|
if (rspBO != null && rspBO.getCode() == 200) {
|
|
|
result = true;
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.warn("in method sendYOHOBIEvent ,invoke {} occurs error,detail is {}", serviceName, e);
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
// 构造参数
|
|
|
private YohoCoinRecordReq buildYohoCoinCostReq(int uid, int num) {
|
|
|
YohoCoinRecordReq req = new YohoCoinRecordReq();
|
...
|
...
|
@@ -93,4 +116,26 @@ public class SendCouponHelper { |
|
|
req.setHistory(yohoCoinLogReqBO);
|
|
|
return req;
|
|
|
}
|
|
|
|
|
|
// 构造参数
|
|
|
private YohoCoinRecordReq buildYohoCoinCostReq(int uid, int num, int type) {
|
|
|
YohoCoinRecordReq req = new YohoCoinRecordReq();
|
|
|
|
|
|
YohoCoinCostReqBO yohoCoinCostReq = new YohoCoinCostReqBO();
|
|
|
yohoCoinCostReq.setUid(uid);
|
|
|
yohoCoinCostReq.setNum(num);
|
|
|
yohoCoinCostReq.setType(Byte.valueOf(String.valueOf(type)));// 抽奖送币
|
|
|
yohoCoinCostReq.setParams("{}");
|
|
|
yohoCoinCostReq.setOrderCode("0");
|
|
|
req.setCost(yohoCoinCostReq);
|
|
|
|
|
|
YohoCoinLogReqBO yohoCoinLogReqBO = new YohoCoinLogReqBO();
|
|
|
yohoCoinLogReqBO.setUid(uid);
|
|
|
yohoCoinLogReqBO.setChangeNum(Short.valueOf(String.valueOf(num)));
|
|
|
yohoCoinLogReqBO.setChangeType(Byte.valueOf(String.valueOf(type)));
|
|
|
yohoCoinLogReqBO.setChangeParams("{}");
|
|
|
req.setHistory(yohoCoinLogReqBO);
|
|
|
return req;
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|