去掉去掉mq注释,修复后台发货微信用户为空的问题
This commit is contained in:
@ -1407,8 +1407,8 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<YxStoreOrderMapper,
|
|||||||
|
|
||||||
|
|
||||||
//使用MQ延时消息
|
//使用MQ延时消息
|
||||||
//mqProducer.sendMsg("yshop-topic",storeOrder.getId().toString());
|
mqProducer.sendMsg("yshop-topic",storeOrder.getId().toString());
|
||||||
//log.info("投递延时订单id: [{}]:", storeOrder.getId());
|
log.info("投递延时订单id: [{}]:", storeOrder.getId());
|
||||||
|
|
||||||
return storeOrder;
|
return storeOrder;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import co.yixiang.utils.OrderUtil;
|
|||||||
import co.yixiang.utils.RedisUtil;
|
import co.yixiang.utils.RedisUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@ -38,6 +39,7 @@ import java.util.Map;
|
|||||||
@Api(tags = "订单管理")
|
@Api(tags = "订单管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("api")
|
@RequestMapping("api")
|
||||||
|
@Slf4j
|
||||||
public class YxStoreOrderController {
|
public class YxStoreOrderController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -164,6 +166,7 @@ public class YxStoreOrderController {
|
|||||||
|
|
||||||
//模板消息通知
|
//模板消息通知
|
||||||
String siteUrl = RedisUtil.get("site_url");
|
String siteUrl = RedisUtil.get("site_url");
|
||||||
|
try{
|
||||||
YxWechatUserDTO wechatUser = wechatUserService.findById(resources.getUid());
|
YxWechatUserDTO wechatUser = wechatUserService.findById(resources.getUid());
|
||||||
if(ObjectUtil.isNotNull(wechatUser)){
|
if(ObjectUtil.isNotNull(wechatUser)){
|
||||||
YxWechatTemplate WechatTemplate = yxWechatTemplateService
|
YxWechatTemplate WechatTemplate = yxWechatTemplateService
|
||||||
@ -178,6 +181,10 @@ public class YxStoreOrderController {
|
|||||||
,WechatTemplate.getTempid(),
|
,WechatTemplate.getTempid(),
|
||||||
siteUrl+"/order/detail/"+resources.getOrderId(),map);
|
siteUrl+"/order/detail/"+resources.getOrderId(),map);
|
||||||
}
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
log.info("当前用户不是微信用户不能发送模板消息哦!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user