| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.fanli.entity.bus.user.UserInfo; |
| | | import com.yeshi.fanli.exception.goods.ConvertLinkException; |
| | | import com.yeshi.fanli.service.inter.user.UserInfoService; |
| | | import com.yeshi.fanli.service.manger.goods.ConvertLinkManager; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.yeshi.utils.JsonUtil; |
| | |
| | | @Resource |
| | | private UserInfoService userInfoService; |
| | | |
| | | @Resource |
| | | private ConvertLinkManager convertLinkManager; |
| | | |
| | | /** |
| | | * 获取超级红包分享口令 |
| | | * |
| | | * @param sign |
| | | * @param uid |
| | | * @param callback |
| | |
| | | token = redisManager.getCommonString(key); |
| | | if (StringUtil.isNullOrEmpty(token)) { |
| | | try { |
| | | TaoKeOfficialActivityConvertResultDTO dto = TaoKeApiUtil.officialActivityConvert("19507100253", |
| | | "20150318020005224", info.getRelationId()); |
| | | TaoKeOfficialActivityConvertResultDTO dto = null; |
| | | try { |
| | | dto = convertLinkManager.taobaoOfficialActivityConvert(uid, "mm_124933865_56750082_19507100253", "20150318020005224", info.getRelationId(), false); |
| | | } catch (ConvertLinkException e) { |
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult(e.getCode(), e.getMessage()))); |
| | | return; |
| | | } |
| | | String link = dto.getClick_url(); |
| | | |
| | | if (!StringUtil.isNullOrEmpty(link)) { |
| | |
| | | token = redisManager.getCommonString(key); |
| | | if (StringUtil.isNullOrEmpty(token)) { |
| | | try { |
| | | TaoKeOfficialActivityConvertResultDTO dto = TaoKeApiUtil.officialActivityConvert("19507100253", |
| | | "20150318020005224", info.getRelationId()); |
| | | TaoKeOfficialActivityConvertResultDTO dto = null; |
| | | try { |
| | | dto = convertLinkManager.taobaoOfficialActivityConvert(uid, "mm_124933865_56750082_19507100253", |
| | | "20150318020005224", info.getRelationId(), true); |
| | | } catch (ConvertLinkException e) { |
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult(e.getCode(), e.getMessage()))); |
| | | return; |
| | | } |
| | | String link = dto.getClick_url(); |
| | | if (!StringUtil.isNullOrEmpty(link)) { |
| | | token = TaoKeApiUtil.getTKToken("http://img.flqapp.com/resource/s11/banner.jpg", "预售商品付定金,得奖金!", |