update 登录注册接口

This commit is contained in:
2023-08-04 16:14:55 +08:00
parent b4906f3c6c
commit 9331edb6de
4 changed files with 13 additions and 11 deletions

View File

@@ -7,7 +7,6 @@ import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.domain.AuthorizationEventResult;
import com.jsowell.pile.domain.agentDev.CategoryInfo;
import com.jsowell.pile.dto.WechatLoginDTO;
import com.jsowell.pile.dto.agentDev.*;
import com.jsowell.pile.vo.agentDev.AuthInfoVO;
import com.jsowell.service.AgentDevService;
@@ -301,7 +300,7 @@ public class AgentDevController extends BaseController {
}
/**
* 微信一键登录
* 代开发小程序 微信一键登录
* @param dto
* @return
*/

View File

@@ -136,9 +136,12 @@ public class MemberService {
if (StringUtils.isBlank(phoneNumber)) {
throw new BusinessException(ReturnCodeEnum.CODE_GET_MOBILE_NUMBER_BY_CODE_ERROR);
}
// if (Objects.isNull(merchantId)) {
// throw new BusinessException(ReturnCodeEnum.CODE_GET_MERCHANT_ID_BY_APP_ID_ERROR);
// }
if (StringUtils.isBlank(merchantId)) {
throw new BusinessException(ReturnCodeEnum.CODE_GET_MERCHANT_ID_BY_APP_ID_ERROR);
}
if (StringUtils.isBlank(openId)) {
throw new BusinessException(ReturnCodeEnum.CODE_OPEN_ID_IS_NULL_ERROR);
}
// 查询手机号码是否注册过
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(phoneNumber, merchantId);
if (Objects.isNull(memberBasicInfo)) {
@@ -149,9 +152,7 @@ public class MemberService {
memberBasicInfo.setMemberId(memberId);
memberBasicInfo.setNickName("会员" + memberId);
memberBasicInfo.setMobileNumber(phoneNumber);
if (StringUtils.isNotBlank(merchantId)) {
memberBasicInfo.setMerchantId(Long.valueOf(merchantId));
}
memberBasicInfo.setMerchantId(Long.valueOf(merchantId));
memberBasicInfo.setOpenId(openId);
// 首次新建会员,同时新建会员钱包

View File

@@ -106,6 +106,8 @@ public enum ReturnCodeEnum {
CODE_INSUFFICIENT_BALANCE_ERROR("00100049", "余额不足"),
CODE_OPEN_ID_IS_NULL_ERROR("00100050", "获取openId失败"),
/* 个人桩 start */
CODE_PILE_HAS_BEEN_BINDING_ERROR("00400001", "此桩已被绑定,请联系管理员!"),

View File

@@ -339,8 +339,8 @@
id
from
pile_merchant_info
where
app_id = #{appId,jdbcType=VARCHAR}
and merchant_level = '1'
where del_flag = '0'
and merchant_level = '1'
and app_id = #{appId,jdbcType=VARCHAR}
</select>
</mapper>