| | |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoApiUtil; |
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoUtil; |
| | | import com.yeshi.fanli.vo.pdd.PDDConvertLinkResultVO; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | @Override |
| | | public String createPDDAuthLink(Long uid, String pid) throws Exception { |
| | | String customParams = PinDuoDuoUtil.getCustomParams(uid); |
| | | String link = PinDuoDuoApiUtil.getAuthLink(pid, customParams); |
| | | if (StringUtil.isNullOrEmpty(link)) { |
| | | PDDConvertLinkResultVO link = PinDuoDuoApiUtil.getAuthLink(pid, customParams); |
| | | if (link == null) { |
| | | throw new Exception("生成授权链接失败"); |
| | | } |
| | | UserPDDAuthRecord record = new UserPDDAuthRecord(); |
| | |
| | | if (userPDDAuthRecordDao.get(record.getId()) == null) { |
| | | userPDDAuthRecordDao.save(record); |
| | | } |
| | | return link; |
| | | return link.getMobile_url(); |
| | | } |
| | | |
| | | @Override |