Skip to content

Commit 99a30f7

Browse files
author
sqmax
committed
13-1
1 parent 37657a6 commit 99a30f7

21 files changed

+186
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.aspect;
2+
3+
/**
4+
* Created by SqMax on 2018/4/2.
5+
*/
6+
public class SellerAuthorizeAspect {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.config;
2+
3+
/**
4+
* Created by SqMax on 2018/4/1.
5+
*/
6+
public class ProjectUrl {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.config;
2+
3+
/**
4+
* Created by SqMax on 2018/4/2.
5+
*/
6+
public class WebSocketConfig {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.config;
2+
3+
/**
4+
* Created by SqMax on 2018/4/1.
5+
*/
6+
public class WechatOpenConfig {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.constant;
2+
3+
/**
4+
* Created by SqMax on 2018/4/1.
5+
*/
6+
public interface CookieConstant {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.constant;
2+
3+
/**
4+
* Created by SqMax on 2018/4/1.
5+
*/
6+
public class RedisConstant {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.controller;
2+
3+
/**
4+
* Created by SqMax on 2018/4/1.
5+
*/
6+
public class SellerUserController {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.dataobject;
2+
3+
/**
4+
* Created by SqMax on 2018/3/31.
5+
*/
6+
public class SellerInfo {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.exception;
2+
3+
/**
4+
* Created by SqMax on 2018/4/3.
5+
*/
6+
public class ResponseBankException {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.exception;
2+
3+
/**
4+
* Created by SqMax on 2018/4/2.
5+
*/
6+
public class SellerAuthorizeAspectException {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.handler;
2+
3+
/**
4+
* Created by SqMax on 2018/4/2.
5+
*/
6+
public class ExceptionHandler {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.repository;
2+
3+
/**
4+
* Created by SqMax on 2018/3/31.
5+
*/
6+
public interface SellerInfoRepository {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.imooc.service;
2+
3+
import com.imooc.dto.OrderDTO;
4+
5+
/**
6+
* 推送消息
7+
* Created by SqMax on 2018/4/2.
8+
*/
9+
public interface PushMessage {
10+
11+
/**
12+
* 订单状态变更消息
13+
* @param orderDTO
14+
*/
15+
void orderStatus(OrderDTO orderDTO);
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.service;
2+
3+
/**
4+
* Created by SqMax on 2018/4/1.
5+
*/
6+
public interface SellerService {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.service;
2+
3+
/**
4+
* Created by SqMax on 2018/4/2.
5+
*/
6+
public class WebSocket {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package com.imooc.service.impl;
2+
3+
import com.imooc.dto.OrderDTO;
4+
import com.imooc.service.PushMessage;
5+
import lombok.extern.slf4j.Slf4j;
6+
import me.chanjar.weixin.common.exception.WxErrorException;
7+
import me.chanjar.weixin.mp.api.WxMpService;
8+
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
9+
import org.springframework.beans.factory.annotation.Autowired;
10+
import org.springframework.stereotype.Service;
11+
12+
/**
13+
* Created by SqMax on 2018/4/2.
14+
*/
15+
@Service
16+
@Slf4j
17+
public class PushMessageImpl implements PushMessage {
18+
19+
@Autowired
20+
private WxMpService wxMpService;
21+
22+
@Override
23+
public void orderStatus(OrderDTO orderDTO) {
24+
25+
WxMpTemplateMessage templateMessage=new WxMpTemplateMessage();
26+
templateMessage.setTemplateId("GoCullfix05R-rCibvoyI87ZUg50cyieKA5AyX7pPzo");
27+
templateMessage.setToUser("");
28+
try {
29+
wxMpService.getTemplateMsgService().sendTemplateMsg(templateMessage);
30+
}catch (WxErrorException e){
31+
log.error("【微信模板消息】发送失败,{}",e);
32+
}
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.service.impl;
2+
3+
/**
4+
* Created by SqMax on 2018/4/1.
5+
*/
6+
public class SellerServiceImpl {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.imooc.utils;
2+
3+
/**
4+
* Created by SqMax on 2018/4/1.
5+
*/
6+
public class CookieUtil {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import static org.junit.Assert.*;
2+
3+
/**
4+
* Created by SqMax on 2018/3/31.
5+
*/
6+
public class SellerInfoRepositoryTest {
7+
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import static org.junit.Assert.*;
2+
3+
/**
4+
* Created by SqMax on 2018/4/2.
5+
*/
6+
public class PushMessageImplTest {
7+
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import static org.junit.Assert.*;
2+
3+
/**
4+
* Created by SqMax on 2018/4/1.
5+
*/
6+
public class SellerServiceImplTest {
7+
8+
}

0 commit comments

Comments
 (0)