| | |
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TaoBaoConstant;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
| | | nickName = URLDecoder.decode(nickName, "UTF-8");
|
| | | } catch (Exception e) {
|
| | | }
|
| | | final String name = nickName;
|
| | | // LogHelper.test("uid:" + uid + "\n accessToken:" + accessToken);
|
| | |
|
| | | // 获取渠道ID与会员ID
|
| | |
| | | LogHelper.test(e.getMsg());
|
| | | errCode = 5;
|
| | | }
|
| | | // 异步申请会员ID
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | String specialId = TaoKeApiUtil.getSpecialId(accessToken, TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(specialId))
|
| | | LogHelper.test(uid + "会员备案失败");
|
| | | try {
|
| | | userExtraTaoBaoInfoService.addSpecialId(uid, specialId, taoBaoUid, name, true);
|
| | | } catch (UserExtraTaoBaoInfoException e) {
|
| | | LogHelper.test(e.getMsg());
|
| | | }
|
| | | }
|
| | | });
|
| | |
|
| | | } else if ("zigou".equalsIgnoreCase(source)) {
|
| | | String specialId = TaoKeApiUtil.getSpecialId(accessToken, TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
|
| | |
| | | LogHelper.test(e.getMsg());
|
| | | errCode = 5;
|
| | | }
|
| | |
|
| | | // 异步申请渠道ID
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | String relationId = TaoKeApiUtil.getRelationId(accessToken, TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | TaoBaoConstant.TAOBAO_AUTH_APPSECRET);// 渠道ID
|
| | | if (StringUtil.isNullOrEmpty(relationId))
|
| | | LogHelper.test(uid + "渠道备案失败");
|
| | | try {
|
| | | userExtraTaoBaoInfoService.addRelationId(uid, relationId, taoBaoUid, name, true);
|
| | | } catch (UserExtraTaoBaoInfoException e) {
|
| | | LogHelper.test(e.getMsg());
|
| | | }
|
| | | }
|
| | | });
|
| | |
|
| | | } else if ("bind".equalsIgnoreCase(source)) {
|
| | |
|
| | | boolean bindInfo = true;
|
| | |
| | |
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "pinduoduo")
|
| | | public void pinDuoDuo(HttpServletResponse response) {
|
| | |
|
| | | }
|
| | |
|
| | | }
|