Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b117f0fe79
@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.fuint.business.storeInformation.entity.LJStore;
|
||||||
|
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||||
import com.fuint.business.userManager.entity.CertifiedMember;
|
import com.fuint.business.userManager.entity.CertifiedMember;
|
||||||
import com.fuint.business.userManager.entity.LJUser;
|
import com.fuint.business.userManager.entity.LJUser;
|
||||||
|
import com.fuint.business.userManager.entity.MtInvitation;
|
||||||
import com.fuint.business.userManager.entity.UserBalance;
|
import com.fuint.business.userManager.entity.UserBalance;
|
||||||
import com.fuint.business.userManager.mapper.CertifiedMemberMapper;
|
import com.fuint.business.userManager.mapper.CertifiedMemberMapper;
|
||||||
import com.fuint.business.userManager.mapper.LJUserMapper;
|
import com.fuint.business.userManager.mapper.LJUserMapper;
|
||||||
@ -145,6 +148,9 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
balanceService.deleteUserBalanceByUserId(id);
|
balanceService.deleteUserBalanceByUserId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ILJStoreService storeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加会员信息
|
* 添加会员信息
|
||||||
* @param user
|
* @param user
|
||||||
@ -155,7 +161,6 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
Integer storeId = nowAccountInfo.getStoreId();
|
Integer storeId = nowAccountInfo.getStoreId();
|
||||||
LJUser user1 = new LJUser();
|
LJUser user1 = new LJUser();
|
||||||
user1.setStoreId(storeId);
|
|
||||||
if (user.getMobile()==null || user.getMobile().equals("")){
|
if (user.getMobile()==null || user.getMobile().equals("")){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -196,6 +201,7 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
user1.setDescription(user.getDescription());
|
user1.setDescription(user.getDescription());
|
||||||
user1.setOfficial(user.getOfficial());
|
user1.setOfficial(user.getOfficial());
|
||||||
int row = baseMapper.insert(user1);
|
int row = baseMapper.insert(user1);
|
||||||
|
|
||||||
// 查询添加后的用户id
|
// 查询添加后的用户id
|
||||||
LJUser ljUser = this.selectUserByMobile(user.getMobile());
|
LJUser ljUser = this.selectUserByMobile(user.getMobile());
|
||||||
// 添加用户储值卡信息
|
// 添加用户储值卡信息
|
||||||
@ -209,6 +215,18 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
balance.setSecondCard(user.getSecondCard());
|
balance.setSecondCard(user.getSecondCard());
|
||||||
balance.setFixingLevel(user.getFixingLevel());
|
balance.setFixingLevel(user.getFixingLevel());
|
||||||
balanceService.insertUserBalance(balance);
|
balanceService.insertUserBalance(balance);
|
||||||
|
Integer chainStoreId = null;
|
||||||
|
// 根据店铺id查询店铺所对应的连锁店id
|
||||||
|
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||||
|
if (!ObjectUtil.isEmpty(store)){
|
||||||
|
chainStoreId = store.getChainStoreId();
|
||||||
|
}
|
||||||
|
// 添加邀请注册信息
|
||||||
|
MtInvitation invitation = new MtInvitation();
|
||||||
|
invitation.setUserid(ljUser.getId());
|
||||||
|
invitation.setStoreId(storeId);
|
||||||
|
invitation.setStaffid(nowAccountInfo.getStaffId());
|
||||||
|
invitation.setChainStoreId(chainStoreId);
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +239,6 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
public int updateUser(LJUserVo userVo) {
|
public int updateUser(LJUserVo userVo) {
|
||||||
LJUser user = new LJUser();
|
LJUser user = new LJUser();
|
||||||
user.setUserNo(userVo.getUserNo());
|
user.setUserNo(userVo.getUserNo());
|
||||||
user.setStoreId(userVo.getStoreId());
|
|
||||||
user.setAvatar(userVo.getAvatar());
|
user.setAvatar(userVo.getAvatar());
|
||||||
user.setName(userVo.getName());
|
user.setName(userVo.getName());
|
||||||
user.setOpenId(userVo.getOpenId());
|
user.setOpenId(userVo.getOpenId());
|
||||||
|
@ -15,6 +15,7 @@ public class LJUserVo extends BaseEntity {
|
|||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
private Integer balanceId;
|
||||||
|
|
||||||
// 会员号
|
// 会员号
|
||||||
@ExcelProperty(value = "会员号")
|
@ExcelProperty(value = "会员号")
|
||||||
@ -105,4 +106,8 @@ public class LJUserVo extends BaseEntity {
|
|||||||
* 邀请人id
|
* 邀请人id
|
||||||
*/
|
*/
|
||||||
private Integer inviterid;
|
private Integer inviterid;
|
||||||
|
/**
|
||||||
|
* 连锁店id
|
||||||
|
*/
|
||||||
|
private Integer chainStoreId;
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fuint.business.store.entity.MtStore;
|
import com.fuint.business.store.entity.MtStore;
|
||||||
import com.fuint.business.store.service.StoreService;
|
import com.fuint.business.store.service.StoreService;
|
||||||
|
import com.fuint.business.storeInformation.entity.LJStore;
|
||||||
|
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||||
import com.fuint.business.userManager.entity.MtInvitation;
|
import com.fuint.business.userManager.entity.MtInvitation;
|
||||||
import com.fuint.business.userManager.entity.UserBalance;
|
import com.fuint.business.userManager.entity.UserBalance;
|
||||||
import com.fuint.business.userManager.mapper.MtInvitationMapper;
|
import com.fuint.business.userManager.mapper.MtInvitationMapper;
|
||||||
@ -36,6 +38,7 @@ import com.github.pagehelper.Page;
|
|||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.data.domain.PageImpl;
|
import org.springframework.data.domain.PageImpl;
|
||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
@ -722,6 +725,8 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private UserBalanceService userBalanceService;
|
private UserBalanceService userBalanceService;
|
||||||
|
@Autowired
|
||||||
|
private ILJStoreService iljStoreService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -822,7 +827,7 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
|||||||
// 新增会员余额信息
|
// 新增会员余额信息
|
||||||
userBalanceService.insertUserBalance(userBalanceAdd);
|
userBalanceService.insertUserBalance(userBalanceAdd);
|
||||||
}
|
}
|
||||||
|
LJStore store = iljStoreService.selectStoreByStoreId(Integer.parseInt(storeId));
|
||||||
// 查询关联表里面是否有信息
|
// 查询关联表里面是否有信息
|
||||||
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), user.getId());
|
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), user.getId());
|
||||||
if (ObjectUtil.isEmpty(mtInvitation1)) {
|
if (ObjectUtil.isEmpty(mtInvitation1)) {
|
||||||
@ -831,6 +836,9 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
|||||||
mtInvitation.setStoreId(Integer.parseInt(storeId));
|
mtInvitation.setStoreId(Integer.parseInt(storeId));
|
||||||
mtInvitation.setStaffid(Integer.parseInt(staffId));
|
mtInvitation.setStaffid(Integer.parseInt(staffId));
|
||||||
mtInvitation.setInviterid(Integer.parseInt(inviterId));
|
mtInvitation.setInviterid(Integer.parseInt(inviterId));
|
||||||
|
if (!ObjectUtil.isEmpty(store)){
|
||||||
|
mtInvitation.setChainStoreId(store.getChainStoreId());
|
||||||
|
}
|
||||||
mtInvitationMapper.insert(mtInvitation);
|
mtInvitationMapper.insert(mtInvitation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user