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