public String post() { try { log.debug( "发推荐,接收到的数据,playId={},betMatchs={},passTypes={},recommendContent={}", new Object[] {playId, betMatchs, passTypes, content}); long userId = getUserId(); if (userId > 0) { // if (StringUtils.isBlank(content)) { // log.info("微博内容为空!"); // data = Data.success(null); // } else if (content.length() > Constant.WeiboContentLength.POST) { log.info("微博内容字数={} , 不能大于{}字!", content.length(), Constant.WeiboContentLength.POST); } else { long weiboUserId = userAccountClient.findWeiboUserIdByLotteryUid(userId); if (weiboUserId <= 0) { data.setData("对应微博用户不存在."); } else { BetScheme scheme = schemeRecService.getScheme(playId, betMatchs, passTypes, money, multiple, bonus); scheme.setSponsorId(userId); scheme.setSponsor(getUsername()); schemeRecService.saveBetScheme(scheme, weiboUserId, content, annotations); data = Data.success(null); } } } } catch (Exception e) { data = Data.failure("发推荐请求异常。"); log.error("发推荐异常.", e); } return SUCCESS; }
public String execute() { Pattern p = Pattern.compile(","); passTypeService.modify(playId, p.split(passtype)); data = Data.success(null); return SUCCESS; }