mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-21 23:59:50 +08:00
update 登录注册接口
This commit is contained in:
@@ -7,7 +7,6 @@ import com.jsowell.common.core.controller.BaseController;
|
|||||||
import com.jsowell.common.response.RestApiResponse;
|
import com.jsowell.common.response.RestApiResponse;
|
||||||
import com.jsowell.pile.domain.AuthorizationEventResult;
|
import com.jsowell.pile.domain.AuthorizationEventResult;
|
||||||
import com.jsowell.pile.domain.agentDev.CategoryInfo;
|
import com.jsowell.pile.domain.agentDev.CategoryInfo;
|
||||||
import com.jsowell.pile.dto.WechatLoginDTO;
|
|
||||||
import com.jsowell.pile.dto.agentDev.*;
|
import com.jsowell.pile.dto.agentDev.*;
|
||||||
import com.jsowell.pile.vo.agentDev.AuthInfoVO;
|
import com.jsowell.pile.vo.agentDev.AuthInfoVO;
|
||||||
import com.jsowell.service.AgentDevService;
|
import com.jsowell.service.AgentDevService;
|
||||||
@@ -301,7 +300,7 @@ public class AgentDevController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信一键登录
|
* 代开发小程序 微信一键登录
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -136,9 +136,12 @@ public class MemberService {
|
|||||||
if (StringUtils.isBlank(phoneNumber)) {
|
if (StringUtils.isBlank(phoneNumber)) {
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_GET_MOBILE_NUMBER_BY_CODE_ERROR);
|
throw new BusinessException(ReturnCodeEnum.CODE_GET_MOBILE_NUMBER_BY_CODE_ERROR);
|
||||||
}
|
}
|
||||||
// if (Objects.isNull(merchantId)) {
|
if (StringUtils.isBlank(merchantId)) {
|
||||||
// throw new BusinessException(ReturnCodeEnum.CODE_GET_MERCHANT_ID_BY_APP_ID_ERROR);
|
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);
|
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(phoneNumber, merchantId);
|
||||||
if (Objects.isNull(memberBasicInfo)) {
|
if (Objects.isNull(memberBasicInfo)) {
|
||||||
@@ -149,9 +152,7 @@ public class MemberService {
|
|||||||
memberBasicInfo.setMemberId(memberId);
|
memberBasicInfo.setMemberId(memberId);
|
||||||
memberBasicInfo.setNickName("会员" + memberId);
|
memberBasicInfo.setNickName("会员" + memberId);
|
||||||
memberBasicInfo.setMobileNumber(phoneNumber);
|
memberBasicInfo.setMobileNumber(phoneNumber);
|
||||||
if (StringUtils.isNotBlank(merchantId)) {
|
|
||||||
memberBasicInfo.setMerchantId(Long.valueOf(merchantId));
|
memberBasicInfo.setMerchantId(Long.valueOf(merchantId));
|
||||||
}
|
|
||||||
memberBasicInfo.setOpenId(openId);
|
memberBasicInfo.setOpenId(openId);
|
||||||
|
|
||||||
// 首次新建会员,同时新建会员钱包
|
// 首次新建会员,同时新建会员钱包
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ public enum ReturnCodeEnum {
|
|||||||
|
|
||||||
CODE_INSUFFICIENT_BALANCE_ERROR("00100049", "余额不足"),
|
CODE_INSUFFICIENT_BALANCE_ERROR("00100049", "余额不足"),
|
||||||
|
|
||||||
|
CODE_OPEN_ID_IS_NULL_ERROR("00100050", "获取openId失败"),
|
||||||
|
|
||||||
/* 个人桩 start */
|
/* 个人桩 start */
|
||||||
|
|
||||||
CODE_PILE_HAS_BEEN_BINDING_ERROR("00400001", "此桩已被绑定,请联系管理员!"),
|
CODE_PILE_HAS_BEEN_BINDING_ERROR("00400001", "此桩已被绑定,请联系管理员!"),
|
||||||
|
|||||||
@@ -339,8 +339,8 @@
|
|||||||
id
|
id
|
||||||
from
|
from
|
||||||
pile_merchant_info
|
pile_merchant_info
|
||||||
where
|
where del_flag = '0'
|
||||||
app_id = #{appId,jdbcType=VARCHAR}
|
|
||||||
and merchant_level = '1'
|
and merchant_level = '1'
|
||||||
|
and app_id = #{appId,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user