Compare commits

..

No commits in common. '758705b08db755856a086cb2db5f5986f9c93ceb' and '15369e8a327a4c556ac0682afc048fe7dd9a149f' have entirely different histories.

  1. 5
      cweb/src/main/java/com/hfkj/controller/GoodsController.java
  2. 46
      cweb/src/main/java/com/hfkj/controller/UserController.java

@ -55,7 +55,8 @@ public class GoodsController {
try { try {
List<GoodsModel> goodsList; List<GoodsModel> goodsList;
// 用户session
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class);
// 1:淘宝 2:拼多多 // 1:淘宝 2:拼多多
if (type == 1) { if (type == 1) {
@ -68,8 +69,6 @@ public class GoodsController {
goodsList = goodsDataService.goodsModelTaoBaoList(jsonObject); goodsList = goodsDataService.goodsModelTaoBaoList(jsonObject);
} else if (type == 2) { } else if (type == 2) {
// 用户session
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class);
Map<String , Object> mapUser = new JSONObject(); Map<String , Object> mapUser = new JSONObject();
mapUser.put("uid", userSession.getUser().getId()); mapUser.put("uid", userSession.getUser().getId());
JSONObject object = PddService.authority(mapUser.toString()); JSONObject object = PddService.authority(mapUser.toString());

@ -14,7 +14,6 @@ import com.hfkj.entity.BsUserPlatformAuthorize;
import com.hfkj.model.ResponseData; import com.hfkj.model.ResponseData;
import com.hfkj.model.SecUserSessionObject; import com.hfkj.model.SecUserSessionObject;
import com.hfkj.model.UserSessionObject; import com.hfkj.model.UserSessionObject;
import com.hfkj.service.pdd.PddService;
import com.hfkj.service.user.BsUserPlatformAuthorizeService; import com.hfkj.service.user.BsUserPlatformAuthorizeService;
import com.hfkj.service.user.BsUserService; import com.hfkj.service.user.BsUserService;
import com.hfkj.sysenum.user.UserAuthorizePlatformEnum; import com.hfkj.sysenum.user.UserAuthorizePlatformEnum;
@ -186,51 +185,6 @@ public class UserController {
} }
} }
@RequestMapping(value = "/userAccreditList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "用户授权列表")
public ResponseData userAccreditList() {
try {
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class);
JSONObject object = new JSONObject();
object.put("taobao", userSession.getUser().getRelationId() != null);
Map<String , Object> mapUser = new JSONObject();
mapUser.put("uid", userSession.getUser().getId());
// 判断是否需要授权
JSONObject jsonObject = PddService.authority(mapUser.toString());
boolean generateAuthorityUrl = jsonObject.getJSONObject("authorityQueryResponse").getInteger("bind") == 1;
object.put("pdd", generateAuthorityUrl);
return ResponseMsgUtil.success(object);
} catch (Exception e) {
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/taoBaoAccreditDelete", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "淘宝授权取消")
public ResponseData taoBaoAccreditDelete() {
try {
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class);
BsUser user = userService.getUser(userSession.getUser().getId());
user.setRelationId(null);
userService.editData(user);
return ResponseMsgUtil.success("取消成功");
} catch (Exception e) {
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/bindPhone", method = RequestMethod.POST) @RequestMapping(value = "/bindPhone", method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "绑定手机号") @ApiOperation(value = "绑定手机号")

Loading…
Cancel
Save