|
|
@@ -12,13 +12,16 @@ import com.cyksj.model.request.UserBindInfoReq;
|
|
|
import com.cyksj.model.views.TaskFrontView;
|
|
|
import com.cyksj.service.market.MarketFrontService;
|
|
|
import com.cyksj.service.market.task.BindTaskService;
|
|
|
+import com.cyksj.service.user.BadIntentionOpService;
|
|
|
import com.cyksj.service.user.UserBindRelationService;
|
|
|
import com.cyksj.service.user.UserService;
|
|
|
import com.cyksj.web.util.StpUserUtil;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
import com.ejlchina.searcher.SearchResult;
|
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
|
+import com.ejlchina.searcher.util.StringUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -31,6 +34,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
*创建者: JavaZou
|
|
|
*创建时间:2022/12/28 13:51
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@RestController
|
|
|
@RequestMapping("/applets/market/task")
|
|
|
@RequiredArgsConstructor
|
|
|
@@ -48,6 +52,9 @@ public class TaskFrontController {
|
|
|
|
|
|
private final UserBindRelationService userBindRelationService;
|
|
|
|
|
|
+ private final BadIntentionOpService badIntentionOpService;
|
|
|
+
|
|
|
+ private final HttpServletRequest request;
|
|
|
/**
|
|
|
* 任务列表
|
|
|
*/
|
|
|
@@ -82,6 +89,10 @@ public class TaskFrontController {
|
|
|
@Deprecated
|
|
|
public Result<String> bindPhone(@RequestBody LoginReq phoneReq) {
|
|
|
Long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
+ log.info("绑定手机号 userId:{}, params:{}", userId, phoneReq);
|
|
|
+ if(StringUtils.isNotBlank(phoneReq.getPhone())){
|
|
|
+ badIntentionOpService.isBadOpLoginPhone(request, phoneReq.getPhone());
|
|
|
+ }
|
|
|
User user = userMapper.selectById(userId);
|
|
|
bindTaskService.bindPhone(user, phoneReq.getPhone(), phoneReq.getCode());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult("绑定手机号成功");
|