250522
This commit is contained in:
@@ -43,4 +43,7 @@ public interface AreaService extends IService<Area> {
|
||||
|
||||
Area getCityByName(String name);
|
||||
|
||||
Area getProvinceByName(String name);
|
||||
|
||||
Area getRegionByName(String name);
|
||||
}
|
||||
|
||||
@@ -41,4 +41,5 @@ public interface OrganizationService extends IService<Organization> {
|
||||
|
||||
Organization getByName(String name);
|
||||
|
||||
Organization getByCode(String code);
|
||||
}
|
||||
|
||||
@@ -98,19 +98,12 @@ public interface UserService extends IService<User>, UserDetailsService {
|
||||
*/
|
||||
User getByPhone(String phone);
|
||||
|
||||
User getByOpenId(String openId);
|
||||
|
||||
User getByUnionId(UserParam userParam);
|
||||
|
||||
User getByOauthId(UserParam userParam);
|
||||
|
||||
List<User> listStatisticsRel(UserParam param);
|
||||
|
||||
/***
|
||||
* 区代
|
||||
* @param cityId
|
||||
* @return
|
||||
*/
|
||||
User getCityAgent(Integer cityId);
|
||||
|
||||
User getCityLevel2(Integer cityId);
|
||||
|
||||
}
|
||||
|
||||
@@ -60,4 +60,22 @@ public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements Ar
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Area getProvinceByName(String name) {
|
||||
return getOne(
|
||||
new LambdaQueryWrapper<Area>()
|
||||
.eq(Area::getLevelId, 1)
|
||||
.like(Area::getName, name)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Area getRegionByName(String name) {
|
||||
return getOne(
|
||||
new LambdaQueryWrapper<Area>()
|
||||
.eq(Area::getLevelId, 3)
|
||||
.like(Area::getName, name)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,4 +51,12 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Organization getByCode(String code) {
|
||||
return getOne(
|
||||
new LambdaQueryWrapper<Organization>()
|
||||
.eq(Organization::getOrganizationCode, code)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gxwebsoft.common.system.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.common.core.exception.BusinessException;
|
||||
@@ -18,8 +17,6 @@ import com.gxwebsoft.common.system.service.CompanyService;
|
||||
import com.gxwebsoft.common.system.service.RoleMenuService;
|
||||
import com.gxwebsoft.common.system.service.UserRoleService;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import com.gxwebsoft.shop.entity.Merchant;
|
||||
import com.gxwebsoft.shop.entity.MerchantClerk;
|
||||
import com.gxwebsoft.shop.service.MerchantClerkService;
|
||||
import com.gxwebsoft.shop.service.MerchantService;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
@@ -37,7 +34,6 @@ import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.gxwebsoft.common.core.constants.RedisConstants.TEN_ANT_SETTING_KEY;
|
||||
import static com.gxwebsoft.common.core.constants.RedisConstants.USER_RANKING_BY_APPS;
|
||||
|
||||
/**
|
||||
* 用户Service实现
|
||||
@@ -216,6 +212,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
return query().eq("phone", phone).one();
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getByOpenId(String openId) {
|
||||
return query().eq("openId", openId).one();
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getByUnionId(UserParam param) {
|
||||
return param.getOne(baseMapper.getOne(param));
|
||||
@@ -232,24 +233,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getCityAgent(Integer cityId) {
|
||||
return getOne(
|
||||
new LambdaQueryWrapper<User>()
|
||||
.eq(User::getCityId, cityId)
|
||||
.eq(User::getUserLevel, 1)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getCityLevel2(Integer cityId) {
|
||||
return getOne(
|
||||
new LambdaQueryWrapper<User>()
|
||||
.eq(User::getCityId, cityId)
|
||||
.eq(User::getUserLevel, 2)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量查询用户的角色
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user