| | |
| | | import com.yeshi.fanli.entity.taobao.TaoKeAppInfo;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoBuyRelationMapService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.util.RedisKeyEnum;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.TaoBaoConstant;
|
| | | import com.yeshi.fanli.util.jd.JDApiUtil;
|
| | | import com.yeshi.fanli.util.jd.JDUtil;
|
| | |
| | | @Resource
|
| | | private TaoBaoBuyRelationMapService taoBaoBuyRelationMapService;
|
| | |
|
| | | @Resource
|
| | | private RedisManager redisManager;
|
| | |
|
| | | /**
|
| | | *
|
| | | * @Title: convertJDLinkFromText
|
| | |
| | | * @throws
|
| | | */
|
| | |
|
| | | private String convertJDLinkFromText(String text, Long uid, boolean share) throws Exception {
|
| | | public String convertJDLinkFromText(String text, Long uid, boolean share) throws Exception {
|
| | |
|
| | | StringBuilder builder = new StringBuilder(text);
|
| | | String newText = builder.toString();
|
| | |
| | | return newText;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 创建口令
|
| | | * @Title: createTaoBaoToken
|
| | | * @Description: |
| | | * @param uid 用户ID
|
| | | * @param picturl |
| | | * @param title
|
| | | * @param link
|
| | | * @return |
| | | * String 返回类型
|
| | | * @throws
|
| | | */
|
| | | public String createTaoBaoToken(Long uid, String picturl, String title, String link) {
|
| | |
|
| | | String token = TaoKeApiUtil.getTKToken(picturl, title, link);
|
| | | if (!StringUtil.isNullOrEmpty(token)) {
|
| | | // 缓存30分钟
|
| | | redisManager.cacheCommonString(
|
| | | RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoUserTKToken, uid + "-" + StringUtil.Md5(token)), "1",
|
| | | 60 * 30);
|
| | | }
|
| | | return token;
|
| | | }
|
| | |
|
| | | }
|