Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -136,23 +136,48 @@ public class UserRefereeController extends BaseController {
|
|||||||
@ApiOperation("查询推荐人信息")
|
@ApiOperation("查询推荐人信息")
|
||||||
@GetMapping("/getReferee/{id}")
|
@GetMapping("/getReferee/{id}")
|
||||||
public ApiResult<User> getReferee(@PathVariable("id") Integer id) {
|
public ApiResult<User> getReferee(@PathVariable("id") Integer id) {
|
||||||
if(id == null){
|
if (id == null) {
|
||||||
return fail("参数错误",null);
|
return fail("参数错误", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
final UserReferee referee = userRefereeService.getOne(new LambdaQueryWrapper<UserReferee>()
|
final UserReferee referee = userRefereeService.getOne(new LambdaQueryWrapper<UserReferee>()
|
||||||
.eq(UserReferee::getUserId, id)
|
.eq(UserReferee::getUserId, id)
|
||||||
.eq(UserReferee::getDeleted,0));
|
.eq(UserReferee::getDeleted, 0));
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(referee)) {
|
if (ObjectUtil.isEmpty(referee)) {
|
||||||
return fail("查询失败",null);
|
return fail("查询失败", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
final User user = userService.getByIdRel(referee.getDealerId());
|
final User user = userService.getByIdRel(referee.getDealerId());
|
||||||
if (ObjectUtil.isNotEmpty(user)) {
|
if (ObjectUtil.isNotEmpty(user)) {
|
||||||
return success(user);
|
return success(user);
|
||||||
}
|
}
|
||||||
return fail("查询失败",null);
|
return fail("查询失败", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询推荐人列表")
|
||||||
|
@GetMapping("/getRefereeList/{id}")
|
||||||
|
public ApiResult<List<User>> getRefereeList(@PathVariable("id") Integer id) {
|
||||||
|
if (id == null) {
|
||||||
|
return fail("参数错误", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
final List<UserReferee> refereeList = userRefereeService.list(new LambdaQueryWrapper<UserReferee>()
|
||||||
|
.eq(UserReferee::getUserId, id)
|
||||||
|
.eq(UserReferee::getDeleted, 0));
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(refereeList)) {
|
||||||
|
return fail("查询失败", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
final List<User> users = userService.list(
|
||||||
|
new LambdaQueryWrapper<User>()
|
||||||
|
.in(User::getUserId, refereeList.stream().map(UserReferee::getDealerId).toList())
|
||||||
|
);
|
||||||
|
if (ObjectUtil.isNotEmpty(users)) {
|
||||||
|
return success(users);
|
||||||
|
}
|
||||||
|
return fail("查询失败", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ public class WxLoginController extends BaseController {
|
|||||||
private RedisUtil redisUtil;
|
private RedisUtil redisUtil;
|
||||||
@Resource
|
@Resource
|
||||||
private ConfigProperties config;
|
private ConfigProperties config;
|
||||||
|
@Resource
|
||||||
|
private UserRefereeService userRefereeService;
|
||||||
|
|
||||||
public WxLoginController(StringRedisTemplate redisTemplate) {
|
public WxLoginController(StringRedisTemplate redisTemplate) {
|
||||||
this.redisTemplate = redisTemplate;
|
this.redisTemplate = redisTemplate;
|
||||||
@@ -94,7 +96,7 @@ public class WxLoginController extends BaseController {
|
|||||||
public ApiResult<LoginResult> loginByMpWxPhone(@RequestBody UserParam userParam, HttpServletRequest request) {
|
public ApiResult<LoginResult> loginByMpWxPhone(@RequestBody UserParam userParam, HttpServletRequest request) {
|
||||||
// 获取手机号码
|
// 获取手机号码
|
||||||
String phone = getPhoneByCode(userParam);
|
String phone = getPhoneByCode(userParam);
|
||||||
if(phone == null){
|
if (phone == null) {
|
||||||
String key = ACCESS_TOKEN_KEY.concat(":").concat(getTenantId().toString());
|
String key = ACCESS_TOKEN_KEY.concat(":").concat(getTenantId().toString());
|
||||||
redisTemplate.delete(key);
|
redisTemplate.delete(key);
|
||||||
throw new BusinessException("授权失败,请重试");
|
throw new BusinessException("授权失败,请重试");
|
||||||
@@ -127,7 +129,7 @@ public class WxLoginController extends BaseController {
|
|||||||
if (user != null && phone != null) {
|
if (user != null && phone != null) {
|
||||||
user.setPhone(phone);
|
user.setPhone(phone);
|
||||||
userService.updateUser(user);
|
userService.updateUser(user);
|
||||||
return success("更新成功",phone);
|
return success("更新成功", phone);
|
||||||
}
|
}
|
||||||
return fail("更新失败");
|
return fail("更新失败");
|
||||||
}
|
}
|
||||||
@@ -143,16 +145,16 @@ public class WxLoginController extends BaseController {
|
|||||||
addUser.setNickname("微信用户");
|
addUser.setNickname("微信用户");
|
||||||
addUser.setPlatform(MP_WEIXIN);
|
addUser.setPlatform(MP_WEIXIN);
|
||||||
addUser.setGradeId(2);
|
addUser.setGradeId(2);
|
||||||
if(userParam.getGradeId() != null){
|
if (userParam.getGradeId() != null) {
|
||||||
addUser.setGradeId(userParam.getGradeId());
|
addUser.setGradeId(userParam.getGradeId());
|
||||||
}
|
}
|
||||||
if(userParam.getPhone() != null){
|
if (userParam.getPhone() != null) {
|
||||||
addUser.setPhone(userParam.getPhone());
|
addUser.setPhone(userParam.getPhone());
|
||||||
}
|
}
|
||||||
if(StrUtil.isNotBlank(userParam.getOpenid())){
|
if (StrUtil.isNotBlank(userParam.getOpenid())) {
|
||||||
addUser.setOpenid(userParam.getOpenid());
|
addUser.setOpenid(userParam.getOpenid());
|
||||||
}
|
}
|
||||||
if(StrUtil.isNotBlank(userParam.getUnionid())){
|
if (StrUtil.isNotBlank(userParam.getUnionid())) {
|
||||||
addUser.setUnionid(userParam.getUnionid());
|
addUser.setUnionid(userParam.getUnionid());
|
||||||
}
|
}
|
||||||
addUser.setPassword(userService.encodePassword(CommonUtil.randomUUID16()));
|
addUser.setPassword(userService.encodePassword(CommonUtil.randomUUID16()));
|
||||||
@@ -168,6 +170,16 @@ public class WxLoginController extends BaseController {
|
|||||||
userRole.setRoleId(addUser.getRoleId());
|
userRole.setRoleId(addUser.getRoleId());
|
||||||
userRoleService.save(userRole);
|
userRoleService.save(userRole);
|
||||||
}
|
}
|
||||||
|
// 绑定关系
|
||||||
|
if (userParam.getSceneType() != null && userParam.getSceneType().equals("save_referee") && userParam.getRefereeId() != null) {
|
||||||
|
UserReferee check = userRefereeService.check(addUser.getUserId(), userParam.getRefereeId());
|
||||||
|
if (check == null) {
|
||||||
|
UserReferee userReferee = new UserReferee();
|
||||||
|
userReferee.setDealerId(addUser.getUserId());
|
||||||
|
userReferee.setUserId(userParam.getRefereeId());
|
||||||
|
userRefereeService.save(userReferee);
|
||||||
|
}
|
||||||
|
}
|
||||||
return addUser;
|
return addUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,7 +216,7 @@ public class WxLoginController extends BaseController {
|
|||||||
// 微信用户的手机号码
|
// 微信用户的手机号码
|
||||||
final String phoneNumber = phoneInfo.getString("phoneNumber");
|
final String phoneNumber = phoneInfo.getString("phoneNumber");
|
||||||
// 验证手机号码
|
// 验证手机号码
|
||||||
if(userParam.getNotVerifyPhone() == null && !Validator.isMobile(phoneNumber)){
|
if (userParam.getNotVerifyPhone() == null && !Validator.isMobile(phoneNumber)) {
|
||||||
String key = ACCESS_TOKEN_KEY.concat(":").concat(getTenantId().toString());
|
String key = ACCESS_TOKEN_KEY.concat(":").concat(getTenantId().toString());
|
||||||
redisTemplate.delete(key);
|
redisTemplate.delete(key);
|
||||||
throw new BusinessException("手机号码格式不正确");
|
throw new BusinessException("手机号码格式不正确");
|
||||||
@@ -231,7 +243,7 @@ public class WxLoginController extends BaseController {
|
|||||||
String key = ACCESS_TOKEN_KEY.concat(":").concat(getTenantId().toString());
|
String key = ACCESS_TOKEN_KEY.concat(":").concat(getTenantId().toString());
|
||||||
// 获取微信小程序配置信息
|
// 获取微信小程序配置信息
|
||||||
JSONObject setting = settingService.getBySettingKey("mp-weixin");
|
JSONObject setting = settingService.getBySettingKey("mp-weixin");
|
||||||
if(setting == null){
|
if (setting == null) {
|
||||||
throw new BusinessException("请先配置小程序");
|
throw new BusinessException("请先配置小程序");
|
||||||
}
|
}
|
||||||
// 从缓存获取access_token
|
// 从缓存获取access_token
|
||||||
@@ -252,7 +264,7 @@ public class WxLoginController extends BaseController {
|
|||||||
JSONObject response = JSON.parseObject(result);
|
JSONObject response = JSON.parseObject(result);
|
||||||
if (response.getString("access_token") != null) {
|
if (response.getString("access_token") != null) {
|
||||||
// 存入缓存
|
// 存入缓存
|
||||||
redisTemplate.opsForValue().set(key, result,7000L, TimeUnit.SECONDS);
|
redisTemplate.opsForValue().set(key, result, 7000L, TimeUnit.SECONDS);
|
||||||
return response.getString("access_token");
|
return response.getString("access_token");
|
||||||
}
|
}
|
||||||
throw new BusinessException("小程序配置不正确");
|
throw new BusinessException("小程序配置不正确");
|
||||||
@@ -262,11 +274,11 @@ public class WxLoginController extends BaseController {
|
|||||||
@PostMapping("/getWxOpenId")
|
@PostMapping("/getWxOpenId")
|
||||||
public ApiResult<?> getWxOpenId(@RequestBody UserParam userParam) {
|
public ApiResult<?> getWxOpenId(@RequestBody UserParam userParam) {
|
||||||
final User loginUser = getLoginUser();
|
final User loginUser = getLoginUser();
|
||||||
if(loginUser == null){
|
if (loginUser == null) {
|
||||||
return fail("请先登录");
|
return fail("请先登录");
|
||||||
}
|
}
|
||||||
// 已存在直接返回
|
// 已存在直接返回
|
||||||
if(StrUtil.isNotBlank(loginUser.getOpenid())){
|
if (StrUtil.isNotBlank(loginUser.getOpenid())) {
|
||||||
return success(loginUser);
|
return success(loginUser);
|
||||||
}
|
}
|
||||||
// 请求微信接口获取openid
|
// 请求微信接口获取openid
|
||||||
@@ -275,22 +287,22 @@ public class WxLoginController extends BaseController {
|
|||||||
final JSONObject setting = settingService.getBySettingKey("mp-weixin");
|
final JSONObject setting = settingService.getBySettingKey("mp-weixin");
|
||||||
final String appId = setting.getString("appId");
|
final String appId = setting.getString("appId");
|
||||||
final String appSecret = setting.getString("appSecret");
|
final String appSecret = setting.getString("appSecret");
|
||||||
map.put("appid",appId);
|
map.put("appid", appId);
|
||||||
map.put("secret",appSecret);
|
map.put("secret", appSecret);
|
||||||
map.put("js_code",userParam.getCode());
|
map.put("js_code", userParam.getCode());
|
||||||
map.put("grant_type","authorization_code");
|
map.put("grant_type", "authorization_code");
|
||||||
final String response = HttpUtil.get(apiUrl,map);
|
final String response = HttpUtil.get(apiUrl, map);
|
||||||
final JSONObject jsonObject = JSONObject.parseObject(response);
|
final JSONObject jsonObject = JSONObject.parseObject(response);
|
||||||
String openid = jsonObject.getString("openid");
|
String openid = jsonObject.getString("openid");
|
||||||
String sessionKey = jsonObject.getString("session_key");
|
String sessionKey = jsonObject.getString("session_key");
|
||||||
String unionid = jsonObject.getString("unionid");
|
String unionid = jsonObject.getString("unionid");
|
||||||
// 保存openID
|
// 保存openID
|
||||||
if(loginUser.getOpenid() == null || StrUtil.isBlank(loginUser.getOpenid())){
|
if (loginUser.getOpenid() == null || StrUtil.isBlank(loginUser.getOpenid())) {
|
||||||
loginUser.setOpenid(openid);
|
loginUser.setOpenid(openid);
|
||||||
loginUser.setUnionid(unionid);
|
loginUser.setUnionid(unionid);
|
||||||
userService.updateById(loginUser);
|
userService.updateById(loginUser);
|
||||||
}
|
}
|
||||||
return success("获取成功",jsonObject);
|
return success("获取成功", jsonObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取微信小程序码-用户ID")
|
@ApiOperation("获取微信小程序码-用户ID")
|
||||||
@@ -298,7 +310,7 @@ public class WxLoginController extends BaseController {
|
|||||||
public ApiResult<?> getQRCode() {
|
public ApiResult<?> getQRCode() {
|
||||||
String apiUrl = "https://api.weixin.qq.com/wxa/getwxacode?access_token=" + getAccessToken();
|
String apiUrl = "https://api.weixin.qq.com/wxa/getwxacode?access_token=" + getAccessToken();
|
||||||
final HashMap<String, Object> map = new HashMap<>();
|
final HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("path","/package/user/qrcode?user_id="+getLoginUserId());
|
map.put("path", "/package/user/qrcode?user_id=" + getLoginUserId());
|
||||||
// map.put("env_version","trial");
|
// map.put("env_version","trial");
|
||||||
// 获取图片 Buffer
|
// 获取图片 Buffer
|
||||||
byte[] qrCode = HttpRequest.post(apiUrl)
|
byte[] qrCode = HttpRequest.post(apiUrl)
|
||||||
@@ -310,10 +322,10 @@ public class WxLoginController extends BaseController {
|
|||||||
// 保存路径
|
// 保存路径
|
||||||
String filePath = getUploadDir().concat("qrcode/") + fileName;
|
String filePath = getUploadDir().concat("qrcode/") + fileName;
|
||||||
File file = FileUtil.writeBytes(qrCode, filePath);
|
File file = FileUtil.writeBytes(qrCode, filePath);
|
||||||
if(file != null){
|
if (file != null) {
|
||||||
return success(config.getFileServer().concat("/qrcode/").concat(fileName));
|
return success(config.getFileServer().concat("/qrcode/").concat(fileName));
|
||||||
}
|
}
|
||||||
return fail("获取失败",null);
|
return fail("获取失败", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取微信小程序码-订单核销码")
|
@ApiOperation("获取微信小程序码-订单核销码")
|
||||||
@@ -321,8 +333,8 @@ public class WxLoginController extends BaseController {
|
|||||||
public ApiResult<?> getOrderQRCode(@PathVariable("orderNo") String orderNo) {
|
public ApiResult<?> getOrderQRCode(@PathVariable("orderNo") String orderNo) {
|
||||||
String apiUrl = "https://api.weixin.qq.com/wxa/getwxacode?access_token=" + getAccessToken();
|
String apiUrl = "https://api.weixin.qq.com/wxa/getwxacode?access_token=" + getAccessToken();
|
||||||
final HashMap<String, Object> map = new HashMap<>();
|
final HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("path","/package/admin/order-scan?orderNo=".concat(orderNo));
|
map.put("path", "/package/admin/order-scan?orderNo=".concat(orderNo));
|
||||||
map.put("env_version","trial");
|
map.put("env_version", "trial");
|
||||||
// 获取图片 Buffer
|
// 获取图片 Buffer
|
||||||
byte[] qrCode = HttpRequest.post(apiUrl)
|
byte[] qrCode = HttpRequest.post(apiUrl)
|
||||||
.body(JSON.toJSONString(map))
|
.body(JSON.toJSONString(map))
|
||||||
@@ -333,10 +345,10 @@ public class WxLoginController extends BaseController {
|
|||||||
// 保存路径
|
// 保存路径
|
||||||
String filePath = getUploadDir().concat("qrcode/") + fileName;
|
String filePath = getUploadDir().concat("qrcode/") + fileName;
|
||||||
File file = FileUtil.writeBytes(qrCode, filePath);
|
File file = FileUtil.writeBytes(qrCode, filePath);
|
||||||
if(file != null){
|
if (file != null) {
|
||||||
return success(config.getFileServer().concat("/qrcode/").concat(fileName));
|
return success(config.getFileServer().concat("/qrcode/").concat(fileName));
|
||||||
}
|
}
|
||||||
return fail("获取失败",null);
|
return fail("获取失败", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取微信小程序码-订单核销码-数量极多的业务场景")
|
@ApiOperation("获取微信小程序码-订单核销码-数量极多的业务场景")
|
||||||
@@ -344,9 +356,9 @@ public class WxLoginController extends BaseController {
|
|||||||
public ApiResult<?> getOrderQRCodeUnlimited(@PathVariable("orderNo") String orderNo) {
|
public ApiResult<?> getOrderQRCodeUnlimited(@PathVariable("orderNo") String orderNo) {
|
||||||
String apiUrl = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + getAccessToken();
|
String apiUrl = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + getAccessToken();
|
||||||
final HashMap<String, Object> map = new HashMap<>();
|
final HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("scene","orderNo=".concat(orderNo));
|
map.put("scene", "orderNo=".concat(orderNo));
|
||||||
map.put("page","package/admin/order-scan");
|
map.put("page", "package/admin/order-scan");
|
||||||
map.put("env_version","trial");
|
map.put("env_version", "trial");
|
||||||
// 获取图片 Buffer
|
// 获取图片 Buffer
|
||||||
byte[] qrCode = HttpRequest.post(apiUrl)
|
byte[] qrCode = HttpRequest.post(apiUrl)
|
||||||
.body(JSON.toJSONString(map))
|
.body(JSON.toJSONString(map))
|
||||||
@@ -358,10 +370,10 @@ public class WxLoginController extends BaseController {
|
|||||||
// 保存路径
|
// 保存路径
|
||||||
String filePath = getUploadDir().concat("qrcode/") + fileName;
|
String filePath = getUploadDir().concat("qrcode/") + fileName;
|
||||||
File file = FileUtil.writeBytes(qrCode, filePath);
|
File file = FileUtil.writeBytes(qrCode, filePath);
|
||||||
if(file != null){
|
if (file != null) {
|
||||||
return success(config.getFileServer().concat("/qrcode/").concat(fileName));
|
return success(config.getFileServer().concat("/qrcode/").concat(fileName));
|
||||||
}
|
}
|
||||||
return fail("获取失败",null);
|
return fail("获取失败", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -377,11 +389,11 @@ public class WxLoginController extends BaseController {
|
|||||||
// 请求微信接口获取openid
|
// 请求微信接口获取openid
|
||||||
String apiUrl = "https://api.weixin.qq.com/sns/jscode2session";
|
String apiUrl = "https://api.weixin.qq.com/sns/jscode2session";
|
||||||
final HashMap<String, Object> map = new HashMap<>();
|
final HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("appid",AppId);
|
map.put("appid", AppId);
|
||||||
map.put("secret",AppSecret);
|
map.put("secret", AppSecret);
|
||||||
map.put("js_code",mp.getCode());
|
map.put("js_code", mp.getCode());
|
||||||
map.put("grant_type","authorization_code");
|
map.put("grant_type", "authorization_code");
|
||||||
final String response = HttpUtil.get(apiUrl,map);
|
final String response = HttpUtil.get(apiUrl, map);
|
||||||
final JSONObject jsonObject = JSONObject.parseObject(response);
|
final JSONObject jsonObject = JSONObject.parseObject(response);
|
||||||
String openid = jsonObject.getString("openid");
|
String openid = jsonObject.getString("openid");
|
||||||
String sessionKey = jsonObject.getString("session_key");
|
String sessionKey = jsonObject.getString("session_key");
|
||||||
@@ -391,10 +403,10 @@ public class WxLoginController extends BaseController {
|
|||||||
|
|
||||||
if (StrUtil.isNotBlank(openid)) {
|
if (StrUtil.isNotBlank(openid)) {
|
||||||
User user = userService.getOne(new LambdaQueryWrapper<User>().eq(User::getOpenid, openid).last("limit 1"));
|
User user = userService.getOne(new LambdaQueryWrapper<User>().eq(User::getOpenid, openid).last("limit 1"));
|
||||||
if(ObjectUtil.isNotEmpty(user)){
|
if (ObjectUtil.isNotEmpty(user)) {
|
||||||
return success("登录成功", user);
|
return success("登录成功", user);
|
||||||
}
|
}
|
||||||
return fail("用户未注册",openid);
|
return fail("用户未注册", openid);
|
||||||
}
|
}
|
||||||
return fail("openId获取失败");
|
return fail("openId获取失败");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,6 +86,9 @@ public class Organization implements Serializable {
|
|||||||
@ApiModelProperty(value = "所属行业")
|
@ApiModelProperty(value = "所属行业")
|
||||||
private String industry;
|
private String industry;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所属产业")
|
||||||
|
private String estate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "负责人id")
|
@ApiModelProperty(value = "负责人id")
|
||||||
private Integer leaderId;
|
private Integer leaderId;
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,9 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="param.leaderId != null">
|
<if test="param.leaderId != null">
|
||||||
AND a.leader_id = #{param.leaderId}
|
AND a.leader_id = #{param.leaderId}
|
||||||
|
</if>
|
||||||
|
<if test="param.estateOnly != null">
|
||||||
|
AND a.estate IS NOT null
|
||||||
</if>
|
</if>
|
||||||
<if test="param.comments != null">
|
<if test="param.comments != null">
|
||||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
|||||||
@@ -137,6 +137,12 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.organizationIds != null">
|
||||||
|
AND a.organization_id IN
|
||||||
|
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="param.phones != null">
|
<if test="param.phones != null">
|
||||||
AND a.phone IN
|
AND a.phone IN
|
||||||
<foreach collection="param.phones" item="item" separator="," open="(" close=")">
|
<foreach collection="param.phones" item="item" separator="," open="(" close=")">
|
||||||
|
|||||||
@@ -66,6 +66,10 @@ public class OrganizationParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private String park;
|
private String park;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "有所属产业的企业")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Boolean estateOnly;
|
||||||
|
|
||||||
@ApiModelProperty(value = "机构图片")
|
@ApiModelProperty(value = "机构图片")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private String image;
|
private String image;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -86,6 +87,10 @@ public class UserParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer organizationId;
|
private Integer organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("机构id合集")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Set<Integer> organizationIds;
|
||||||
|
|
||||||
@ApiModelProperty("用户分组ID")
|
@ApiModelProperty("用户分组ID")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer groupId;
|
private Integer groupId;
|
||||||
|
|||||||
@@ -39,4 +39,5 @@ public interface UserRefereeService extends IService<UserReferee> {
|
|||||||
*/
|
*/
|
||||||
UserReferee getByIdRel(Integer id);
|
UserReferee getByIdRel(Integer id);
|
||||||
|
|
||||||
|
UserReferee check(Integer dealerId, Integer userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.gxwebsoft.common.system.service.impl;
|
package com.gxwebsoft.common.system.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.gxwebsoft.common.system.mapper.UserRefereeMapper;
|
import com.gxwebsoft.common.system.mapper.UserRefereeMapper;
|
||||||
import com.gxwebsoft.common.system.service.UserRefereeService;
|
import com.gxwebsoft.common.system.service.UserRefereeService;
|
||||||
@@ -44,4 +45,13 @@ public class UserRefereeServiceImpl extends ServiceImpl<UserRefereeMapper, UserR
|
|||||||
return param.getOne(baseMapper.selectListRel(param));
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserReferee check(Integer dealerId, Integer userId) {
|
||||||
|
return getOne(
|
||||||
|
new LambdaQueryWrapper<UserReferee>()
|
||||||
|
.eq(UserReferee::getDealerId, dealerId)
|
||||||
|
.eq(UserReferee::getUserId, userId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user