no message
This commit is contained in:
parent
d0348342f5
commit
ed40ec677e
@ -735,7 +735,7 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
||||
@Override
|
||||
public MtUser queryMemberByOpenId2(String openId, JSONObject userInfo) throws BusinessCheckException {
|
||||
// merchantId 可以不需要
|
||||
MtUser user = mtUserMapper.queryMemberByOpenId2(openId);
|
||||
// MtUser user = mtUserMapper.queryMemberByOpenId2(openId);
|
||||
|
||||
String avatar = Optional.ofNullable(userInfo.getString("avatarUrl")).orElse("");
|
||||
String gender = StringUtil.isNotEmpty(userInfo.getString("gender")) ? userInfo.getString("gender") : GenderEnum.MAN.getKey().toString();
|
||||
@ -779,11 +779,11 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
||||
// 新增余额信息
|
||||
if (ObjectUtil.isNotEmpty(storeId) && storeId !="") {
|
||||
// 根据userid和stortId查询是否存在对应的余额信息
|
||||
UserBalance userBalance = userBalanceService.selectUserBalance(user.getId(), Integer.parseInt(storeId));
|
||||
UserBalance userBalance = userBalanceService.selectUserBalance(mtUserMobile.getId(), Integer.parseInt(storeId));
|
||||
if (ObjectUtil.isEmpty(userBalance)) {
|
||||
// 新增余额信息
|
||||
UserBalance userBalanceAdd = new UserBalance();
|
||||
userBalanceAdd.setMtUserId(user.getId());
|
||||
userBalanceAdd.setMtUserId(mtUserMobile.getId());
|
||||
userBalanceAdd.setStoreId(Integer.parseInt(storeId));
|
||||
userBalanceAdd.setCardBalance(0.0);
|
||||
userBalanceAdd.setPoints(0);
|
||||
@ -799,13 +799,20 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
||||
}
|
||||
LJStore store = iljStoreService.selectStoreByStoreId(Integer.parseInt(storeId));
|
||||
// 查询关联表里面是否有信息
|
||||
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), user.getId());
|
||||
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), mtUserMobile.getId());
|
||||
if (ObjectUtil.isEmpty(mtInvitation1)) {
|
||||
MtInvitation mtInvitation = new MtInvitation();
|
||||
mtInvitation.setUserId(user.getId());
|
||||
mtInvitation.setUserId(mtUserMobile.getId());
|
||||
mtInvitation.setStoreId(Integer.parseInt(storeId));
|
||||
mtInvitation.setStaffId(Integer.parseInt(staffId));
|
||||
mtInvitation.setInviterId(Integer.parseInt(inviterId));
|
||||
if (ObjectUtil.isNotEmpty(staffId) && staffId !="") {
|
||||
mtInvitation.setStaffId(Integer.parseInt(staffId));
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(inviterId) && inviterId !="") {
|
||||
mtInvitation.setInviterId(Integer.parseInt(inviterId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!ObjectUtil.isEmpty(store)){
|
||||
mtInvitation.setChainStoreId(store.getChainStoreId());
|
||||
}
|
||||
@ -816,7 +823,7 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
||||
|
||||
}else {
|
||||
// 已被禁用
|
||||
if (user.getStatus().equals(StatusEnum.DISABLE.getKey())) {
|
||||
if (!"qy".equals(mtUserMobile.getStatus())) {
|
||||
return null;
|
||||
}
|
||||
// 修改
|
||||
@ -825,13 +832,19 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
||||
updateById(mtUserMobile);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(storeId) && storeId !="") {
|
||||
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), user.getId());
|
||||
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), mtUserMobile.getId());
|
||||
if (ObjectUtil.isEmpty(mtInvitation1)) {
|
||||
MtInvitation mtInvitation = new MtInvitation();
|
||||
mtInvitation.setUserId(user.getId());
|
||||
mtInvitation.setUserId(mtUserMobile.getId());
|
||||
mtInvitation.setStoreId(Integer.parseInt(storeId));
|
||||
mtInvitation.setStaffId(Integer.parseInt(staffId));
|
||||
mtInvitation.setInviterId(Integer.parseInt(inviterId));
|
||||
if (ObjectUtil.isNotEmpty(staffId) && staffId !="") {
|
||||
mtInvitation.setStaffId(Integer.parseInt(staffId));
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(inviterId) && inviterId !="") {
|
||||
mtInvitation.setInviterId(Integer.parseInt(inviterId));
|
||||
|
||||
}
|
||||
|
||||
mtInvitationMapper.insert(mtInvitation);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user