|
|
@@ -33,6 +33,8 @@ import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.DigestUtil;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
+import org.springblade.modules.ldt.shop.entity.Shop;
|
|
|
+import org.springblade.modules.ldt.shop.service.IShopService;
|
|
|
import org.springblade.modules.system.entity.User;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -43,6 +45,8 @@ import org.springblade.modules.ldt.appaccount.vo.AppAccountVO;
|
|
|
import org.springblade.modules.ldt.appaccount.service.IAppAccountService;
|
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* 控制器
|
|
|
*
|
|
|
@@ -57,6 +61,7 @@ public class AppAccountController extends BladeController {
|
|
|
|
|
|
private final IAppAccountService appAccountService;
|
|
|
private final RedisTemplate<String,String> redisTemplate;
|
|
|
+ private final IShopService shopService;
|
|
|
private static final String REDIS_KEY_CODE = "sms:code:";
|
|
|
|
|
|
/**
|
|
|
@@ -148,6 +153,16 @@ public class AppAccountController extends BladeController {
|
|
|
.eq(AppAccount::getPhone, appAccount.getPhone()).eq(AppAccount::getType, appAccount.getType())
|
|
|
.eq(AppAccount::getPassword,DigestUtil.hex(appAccount.getPassword())));
|
|
|
if(isExist != null){
|
|
|
+ if(SystemConstant.MALLORSHOP.SHOP.getValue()==appAccount.getType()){
|
|
|
+ //如果是商家登录,先判断有没有通过的商户信息,若没有则返回400
|
|
|
+ List<Shop> shopList = shopService.getBaseMapper().selectList(new QueryWrapper<>(new Shop()).lambda()
|
|
|
+ .eq(Shop::getAuditStatus, SystemConstant.AuditStatus.PASS.getValue())
|
|
|
+ .eq(Shop::getPersonTel, appAccount.getPhone()));
|
|
|
+ if(shopList.size() == 0){
|
|
|
+ return R.data(400,"该商户还未审核通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //根据手机号获取商家列表
|
|
|
return R.status(true);
|
|
|
}
|
|
|
return R.status(false);
|