1
|
package com.yoho.message.sdk.service.product;
|
1
|
package com.yoho.message.sdk.service.product;
|
2
|
|
2
|
|
|
|
3
|
+import com.yoho.message.sdk.common.constants.SendScenes;
|
|
|
4
|
+import com.yoho.message.sdk.common.handler.MessageCenterMqHandler;
|
|
|
5
|
+import com.yoho.message.sdk.common.model.MessageCenterCommonEvent;
|
3
|
import com.yoho.message.sdk.common.model.SendMessageRspBo;
|
6
|
import com.yoho.message.sdk.common.model.SendMessageRspBo;
|
|
|
7
|
+import com.yoho.message.sdk.service.AbstractSendMessage;
|
|
|
8
|
+import org.springframework.beans.factory.annotation.Autowired;
|
4
|
|
9
|
|
5
|
/**
|
10
|
/**
|
6
|
* Created by min.ling on 2018/8/3.
|
11
|
* Created by min.ling on 2018/8/3.
|
7
|
*/
|
12
|
*/
|
8
|
-public class SendProductMessageImpl implements ISendProductMessage {
|
13
|
+public class SendProductMessageImpl extends AbstractSendMessage implements ISendProductMessage {
|
|
|
14
|
+
|
|
|
15
|
+ @Autowired
|
|
|
16
|
+ private MessageCenterMqHandler messageCenterMqHandler;
|
|
|
17
|
+
|
|
|
18
|
+
|
9
|
@Override
|
19
|
@Override
|
10
|
public SendMessageRspBo commissionNotice(String uid, String orderNum, String orderAmount) {
|
20
|
public SendMessageRspBo commissionNotice(String uid, String orderNum, String orderAmount) {
|
11
|
- return null;
|
21
|
+ MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.YOZHUAN_COMMISSION_SETTLEMENT, uid, uid);
|
|
|
22
|
+ messageCenterCommonEvent.putInParams("orderNum", orderNum);
|
|
|
23
|
+ messageCenterCommonEvent.putInParams("orderAmount", orderAmount);
|
|
|
24
|
+ messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
|
|
|
25
|
+ return new SendMessageRspBo(200, "SUCCESS");
|
12
|
}
|
26
|
}
|
13
|
|
27
|
|
14
|
@Override
|
28
|
@Override
|
15
|
public SendMessageRspBo cashAccountNotice(String uid, String accountCode, String accountAmount, String accountTime) {
|
29
|
public SendMessageRspBo cashAccountNotice(String uid, String accountCode, String accountAmount, String accountTime) {
|
16
|
- return null;
|
30
|
+ MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.YOZHUAN_CRASH_ACCOUNT, accountCode, uid);
|
|
|
31
|
+ messageCenterCommonEvent.putInParams("accountCode", accountCode);
|
|
|
32
|
+ messageCenterCommonEvent.putInParams("accountAmount", accountAmount);
|
|
|
33
|
+ messageCenterCommonEvent.putInParams("accountTime", accountTime);
|
|
|
34
|
+ messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
|
|
|
35
|
+ return new SendMessageRspBo(200, "SUCCESS");
|
17
|
}
|
36
|
}
|
18
|
|
37
|
|
19
|
@Override
|
38
|
@Override
|
20
|
public SendMessageRspBo orderCompletedNotice(String uid, String ForecastIncome) {
|
39
|
public SendMessageRspBo orderCompletedNotice(String uid, String ForecastIncome) {
|
21
|
- return null;
|
40
|
+ MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.YOZHUAN_ORDER_COMPLETE, uid, uid);
|
|
|
41
|
+ messageCenterCommonEvent.putInParams("ForecastIncome", ForecastIncome);
|
|
|
42
|
+ messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
|
|
|
43
|
+ return new SendMessageRspBo(200, "SUCCESS");
|
22
|
}
|
44
|
}
|
23
|
} |
45
|
} |