|
@@ -1,8 +1,9 @@
|
|
package com.caimei365.user.service.impl;
|
|
package com.caimei365.user.service.impl;
|
|
|
|
|
|
import com.caimei365.user.components.RedisService;
|
|
import com.caimei365.user.components.RedisService;
|
|
|
|
+import com.caimei365.user.mapper.BaseMapper;
|
|
import com.caimei365.user.mapper.LoginMapper;
|
|
import com.caimei365.user.mapper.LoginMapper;
|
|
-import com.caimei365.user.mapper.RegisterUserDao;
|
|
|
|
|
|
+import com.caimei365.user.mapper.RegisterMapper;
|
|
import com.caimei365.user.model.JsonModel;
|
|
import com.caimei365.user.model.JsonModel;
|
|
import com.caimei365.user.model.ShopPo;
|
|
import com.caimei365.user.model.ShopPo;
|
|
import com.caimei365.user.model.UserPo;
|
|
import com.caimei365.user.model.UserPo;
|
|
@@ -32,9 +33,9 @@ public class ShopServiceImpl implements ShopService {
|
|
@Resource
|
|
@Resource
|
|
private RedisService redisService;
|
|
private RedisService redisService;
|
|
@Resource
|
|
@Resource
|
|
- private LoginMapper loginMapper;
|
|
|
|
|
|
+ private BaseMapper baseMapper;
|
|
@Resource
|
|
@Resource
|
|
- private RegisterUserDao registerUserDao;
|
|
|
|
|
|
+ private RegisterMapper registerMapper;
|
|
|
|
|
|
/**
|
|
/**
|
|
* PC端供应商注册
|
|
* PC端供应商注册
|
|
@@ -83,12 +84,12 @@ public class ShopServiceImpl implements ShopService {
|
|
return JsonModel.error("请勾选同意协议", null);
|
|
return JsonModel.error("请勾选同意协议", null);
|
|
}
|
|
}
|
|
// 查找用户表是否存在
|
|
// 查找用户表是否存在
|
|
- Integer dbUserId = loginMapper.getUserIdByMobile(bindMobile);
|
|
|
|
|
|
+ Integer dbUserId = baseMapper.getUserIdByMobile(bindMobile);
|
|
if (dbUserId > 0) {
|
|
if (dbUserId > 0) {
|
|
return JsonModel.error("该手机号已被使用", null);
|
|
return JsonModel.error("该手机号已被使用", null);
|
|
}
|
|
}
|
|
// 查找运营人员表是否存在
|
|
// 查找运营人员表是否存在
|
|
- Integer dbOperationId = loginMapper.getOperationIdByMobile(bindMobile);
|
|
|
|
|
|
+ Integer dbOperationId = baseMapper.getOperationIdByMobile(bindMobile);
|
|
if (dbOperationId > 0) {
|
|
if (dbOperationId > 0) {
|
|
return JsonModel.error("您已是机构运营人员,无需再注册机构", null);
|
|
return JsonModel.error("您已是机构运营人员,无需再注册机构", null);
|
|
}
|
|
}
|
|
@@ -97,7 +98,7 @@ public class ShopServiceImpl implements ShopService {
|
|
return JsonModel.error("手机验证码错误", null);
|
|
return JsonModel.error("手机验证码错误", null);
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(email)) {
|
|
if (StringUtils.isNotBlank(email)) {
|
|
- dbUserId = loginMapper.getUserIdByEmail(email);
|
|
|
|
|
|
+ dbUserId = baseMapper.getUserIdByEmail(email);
|
|
if (dbUserId > 0) {
|
|
if (dbUserId > 0) {
|
|
return JsonModel.error("该邮箱已被使用", null);
|
|
return JsonModel.error("该邮箱已被使用", null);
|
|
}
|
|
}
|
|
@@ -136,7 +137,7 @@ public class ShopServiceImpl implements ShopService {
|
|
user.setValidFlag(1);
|
|
user.setValidFlag(1);
|
|
// 同意协议
|
|
// 同意协议
|
|
user.setAgreeFlag(isAgreed);
|
|
user.setAgreeFlag(isAgreed);
|
|
- registerUserDao.insertShopUser(user);
|
|
|
|
|
|
+ registerMapper.insertShopUser(user);
|
|
/*
|
|
/*
|
|
组装供应商数据 shop
|
|
组装供应商数据 shop
|
|
*/
|
|
*/
|
|
@@ -182,14 +183,14 @@ public class ShopServiceImpl implements ShopService {
|
|
/*
|
|
/*
|
|
保存数据库 shop
|
|
保存数据库 shop
|
|
*/
|
|
*/
|
|
- int insertShopFlag = registerUserDao.insertShop(shop);
|
|
|
|
|
|
+ int insertShopFlag = registerMapper.insertShop(shop);
|
|
if (insertShopFlag < 1) {
|
|
if (insertShopFlag < 1) {
|
|
log.info(shop.getUserId() + " 插入数据库异常shop:" + shop.toString());
|
|
log.info(shop.getUserId() + " 插入数据库异常shop:" + shop.toString());
|
|
return JsonModel.error("插入数据库异常", null);
|
|
return JsonModel.error("插入数据库异常", null);
|
|
}
|
|
}
|
|
// user更新shopId
|
|
// user更新shopId
|
|
user.setShopId(shop.getShopId());
|
|
user.setShopId(shop.getShopId());
|
|
- registerUserDao.updateUserShopId(user.getUserId(), shop.getShopId());
|
|
|
|
|
|
+ registerMapper.updateUserShopId(user.getUserId(), shop.getShopId());
|
|
log.info("注册供应商---------userID:" + user.getUserId());
|
|
log.info("注册供应商---------userID:" + user.getUserId());
|
|
return JsonModel.success();
|
|
return JsonModel.success();
|
|
}
|
|
}
|
|
@@ -233,12 +234,12 @@ public class ShopServiceImpl implements ShopService {
|
|
return JsonModel.error("两次输入的密码不一致");
|
|
return JsonModel.error("两次输入的密码不一致");
|
|
}
|
|
}
|
|
// 查找用户表是否存在
|
|
// 查找用户表是否存在
|
|
- Integer dbUserId = loginMapper.getUserIdByMobile(bindMobile);
|
|
|
|
|
|
+ Integer dbUserId = baseMapper.getUserIdByMobile(bindMobile);
|
|
if (dbUserId > 0) {
|
|
if (dbUserId > 0) {
|
|
return JsonModel.error("该手机号已被使用", null);
|
|
return JsonModel.error("该手机号已被使用", null);
|
|
}
|
|
}
|
|
// 查找运营人员表是否存在
|
|
// 查找运营人员表是否存在
|
|
- Integer dbOperationId = loginMapper.getOperationIdByMobile(bindMobile);
|
|
|
|
|
|
+ Integer dbOperationId = baseMapper.getOperationIdByMobile(bindMobile);
|
|
if (dbOperationId > 0) {
|
|
if (dbOperationId > 0) {
|
|
return JsonModel.error("您已是机构运营人员,无需再注册机构", null);
|
|
return JsonModel.error("您已是机构运营人员,无需再注册机构", null);
|
|
}
|
|
}
|
|
@@ -253,7 +254,7 @@ public class ShopServiceImpl implements ShopService {
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(email)) {
|
|
if (StringUtils.isNotBlank(email)) {
|
|
// 查找用户表是否存在相同邮箱
|
|
// 查找用户表是否存在相同邮箱
|
|
- Integer dbUserId = loginMapper.getUserIdByEmail(email);
|
|
|
|
|
|
+ Integer dbUserId = baseMapper.getUserIdByEmail(email);
|
|
if (dbUserId > 0) {
|
|
if (dbUserId > 0) {
|
|
return JsonModel.error("该邮箱已被使用", null);
|
|
return JsonModel.error("该邮箱已被使用", null);
|
|
}
|
|
}
|