采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
老师,优惠券是在哪加入缓存的,商户系统还是用户系统?看课程介绍上面的架构图,优惠券投放后有个优惠券token保存,这个在代码中哪块怎么体现出来的
这个在投放的时候就已经完成了,可以看看投放优惠券那里
public Response dropPassTemplate(PassTemplate template) { Response response = new Response(); //校验优惠券码的有效性 ErrorCode errorCode = template.validate(merchantsDao); if(errorCode != ErrorCode.SUCCESS){ response.setErrorCode(errorCode.getCode()); response.setErrorMsg(errorCode.getDesc()); }else{ String passTemplate = JSON.toJSONString(template); kafkaTemplate.send( Constants.TEMPLATE_TOPIC, Constants.TEMPLATE_TOPIC, passTemplate); log.info("DropPassTemplates: {}", passTemplate); } return response; } 这段投放的代码里只是下发到kafka,没写入redis啊
登录后可查看更多问答,登录/注册
从零到一完整搭建企业级架构的通用卡包工程,让你迈到百度T4+ 。
1.9k 1
1.3k 1
1.2k 11
1.6k 8
1.2k 6
购课补贴联系客服咨询优惠详情
慕课网APP您的移动学习伙伴
扫描二维码关注慕课网微信公众号