|
@@ -48,6 +48,8 @@ public class ShopServiceImpl implements ShopService {
|
|
|
@Resource
|
|
|
private ShopMapper shopMapper;
|
|
|
@Resource
|
|
|
+ private LoginMapper loginMapper;
|
|
|
+ @Resource
|
|
|
private ArticleMapper articleMapper;
|
|
|
@Resource
|
|
|
private BaikeProductMapper baikeProductMapper;
|
|
@@ -57,6 +59,54 @@ public class ShopServiceImpl implements ShopService {
|
|
|
private String active;
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 供应商快捷登录
|
|
|
+ *
|
|
|
+ * @param userId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public ResponseJson<UserLoginVo> shortcutLogin(Integer userId) {
|
|
|
+ UserLoginVo userLoginVo = shopMapper.getShopByUserId(userId);
|
|
|
+ if (null != userLoginVo) {
|
|
|
+ if (null != userLoginVo.getShopId()) {
|
|
|
+ if (null != userLoginVo.getShopStatus() && null != userLoginVo.getUserIdentity() && 3 == userLoginVo.getUserIdentity()) {
|
|
|
+
|
|
|
+ if (3 == userLoginVo.getShopStatus()) {
|
|
|
+ return ResponseJson.error(-1, "您的企业账号正在加速审核中,审核通过后即可登录", userLoginVo);
|
|
|
+ }
|
|
|
+ if (91 == userLoginVo.getShopStatus()) {
|
|
|
+ return ResponseJson.error(-1, "您的企业账号已被冻结,请联系客服处理", userLoginVo);
|
|
|
+ }
|
|
|
+ if (92 == userLoginVo.getShopStatus()) {
|
|
|
+ return ResponseJson.error(-3, "您的企业账号审核未通过", userLoginVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 是否可为机构下单
|
|
|
+ boolean flag = false;
|
|
|
+ // 供应商商品上架平台信息
|
|
|
+ List<String> shopProductList = loginMapper.getShopProductGroudMall(userLoginVo.getShopId());
|
|
|
+ if (null != shopProductList) {
|
|
|
+ for(String product : shopProductList ) {
|
|
|
+ if (StringUtils.isNotBlank(product)) {
|
|
|
+ if (product.contains("4")) {
|
|
|
+ flag = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
+ userLoginVo.setShopIsOrder(flag);
|
|
|
+ } else {
|
|
|
+ return ResponseJson.error(-1, "该账号未成为供应商", null);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return ResponseJson.error(-1, "用户数据异常", null);
|
|
|
+ }
|
|
|
+ return ResponseJson.success("登录成功", userLoginVo);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 根据用户Id查询供应商资料
|
|
|
*
|