bug
This commit is contained in:
parent
f0d00a61e1
commit
bc13cc8d40
@ -220,7 +220,7 @@ public class LJUserController extends BaseController {
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
public ResponseObject remove(@PathVariable Integer id){
|
||||
userService.deleteUserById(id);
|
||||
userService.deleteUserBy(id);
|
||||
return getSuccessResult("操作成功");
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,8 @@ public interface LJUserService extends IService<LJUser> {
|
||||
* 根据id删除会员信息
|
||||
* @param id
|
||||
*/
|
||||
public void deleteUserById(Integer id);
|
||||
public void deleteUserById(Integer id,Integer storeId);
|
||||
public void deleteUserBy(Integer id);
|
||||
|
||||
/**
|
||||
* 增加会员信息
|
||||
|
@ -59,5 +59,5 @@ public interface MtInvitationService {
|
||||
* 根据会员id和店铺id删除用户邀请注册信息
|
||||
* @param userId
|
||||
*/
|
||||
void deleteByUserIdAndeStoreId(Integer userId);
|
||||
void deleteByUserIdAndeStoreId(Integer userId,Integer storeId);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public interface UserBalanceService extends IService<UserBalance> {
|
||||
* 根据用户id和店铺id删除会员储值信息
|
||||
* @param userId
|
||||
*/
|
||||
public void deleteUserBalanceByUserId(Integer userId);
|
||||
public void deleteUserBalanceByUserId(Integer userId,Integer storeId);
|
||||
|
||||
/**
|
||||
* 根据用户id修改储值卡金额
|
||||
|
@ -291,15 +291,28 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void deleteUserById(Integer id) {
|
||||
balanceService.deleteUserBalanceByUserId(id);
|
||||
public void deleteUserById(Integer id,Integer storeId) {
|
||||
balanceService.deleteUserBalanceByUserId(id,storeId);
|
||||
|
||||
List<UserBalance> userBalances = balanceService.selectUserBalance(id);
|
||||
if (userBalances.size()==0){
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
invitationService.deleteByUserIdAndeStoreId(id);
|
||||
invitationService.deleteByUserIdAndeStoreId(id,storeId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteUserBy(Integer id) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
balanceService.deleteUserBalanceByUserId(id,nowAccountInfo.getStoreId());
|
||||
|
||||
List<UserBalance> userBalances = balanceService.selectUserBalance(id);
|
||||
if (userBalances.size()==0){
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
invitationService.deleteByUserIdAndeStoreId(id,nowAccountInfo.getStoreId());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
|
@ -89,11 +89,10 @@ public class MtInvitationServiceImpl implements MtInvitationService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByUserIdAndeStoreId(Integer userId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
public void deleteByUserIdAndeStoreId(Integer userId,Integer storeId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("userId",userId);
|
||||
queryWrapper.eq("storeId",nowAccountInfo.getStoreId());
|
||||
queryWrapper.eq("storeId",storeId);
|
||||
mtInvitationMapper.delete(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
@ -46,9 +46,9 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteUserBalanceByUserId(Integer userId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId());
|
||||
public void deleteUserBalanceByUserId(Integer userId,Integer storeId) {
|
||||
/*AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();*/
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("mt_user_id",userId);
|
||||
queryWrapper.eq("chain_store_id",store.getChainStoreId());
|
||||
|
@ -835,7 +835,7 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
||||
|
||||
if (ObjectUtil.isNotEmpty(user)){
|
||||
if (mtUserMobile.getId()!=user.getId()){
|
||||
ljUserService.deleteUserById(user.getId());
|
||||
ljUserService.deleteUserById(user.getId(),Integer.parseInt(storeId));
|
||||
}
|
||||
}
|
||||
int i = baseMapper.updateById(mtUserMobile);
|
||||
|
@ -49,6 +49,7 @@ public class ShiroConfig {
|
||||
filterMap.put("/excel/export","anon");
|
||||
//根据地理位置获取最近的店铺信息
|
||||
filterMap.put("/business/storeInformation/store/recentlyStore","anon");
|
||||
filterMap.put("/business/storeInformation/store/isRecharge","anon");
|
||||
//会员扫码进入小程序后根据id获取店铺信息
|
||||
filterMap.put("/business/storeInformation/store/queryStoreById","anon");
|
||||
filterMap.put("/backendApi/store/loginVerification","anon");
|
||||
|
@ -251,20 +251,16 @@
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
this.chainStoreId = uni.getStorageSync("chainStoreId")
|
||||
this.staffId = uni.getStorageSync("inviteStaffId")
|
||||
await this.getUserAuthority();
|
||||
// await this.getUserAuthority();
|
||||
// await this.getOilType();
|
||||
} else {
|
||||
if (uni.getStorageSync("storeId")) {
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
} else {
|
||||
let storeId = "34";
|
||||
|
||||
uni.setStorageSync("storeId", storeId)
|
||||
}
|
||||
await this.getUserAuthority();
|
||||
// await this.getOilType();
|
||||
}
|
||||
|
||||
await this.getUserAuthority();
|
||||
await this.getTheJudgmentIsTheSame();
|
||||
} else {
|
||||
await this.getUserAuthority();
|
||||
|
Loading…
Reference in New Issue
Block a user