From c6c5a8ce0f42d46ea2fe0312c9eda67a49fd3917 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 01 二月 2021 18:58:21 +0800
Subject: [PATCH] 完善根据IP屏蔽广告,创建会员实体

---
 src/main/java/com/yeshi/buwan/service/imp/UserService.java |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/yeshi/buwan/service/imp/UserService.java b/src/main/java/com/yeshi/buwan/service/imp/UserService.java
index ed37600..467f3f8 100644
--- a/src/main/java/com/yeshi/buwan/service/imp/UserService.java
+++ b/src/main/java/com/yeshi/buwan/service/imp/UserService.java
@@ -12,9 +12,9 @@
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import com.yeshi.buwan.dao.LoginUserDao;
+import com.yeshi.buwan.dao.user.LoginUserDao;
 import com.yeshi.buwan.dao.UserDao;
-import com.yeshi.buwan.domain.LoginUser;
+import com.yeshi.buwan.domain.user.LoginUser;
 import com.yeshi.buwan.domain.SystemInfo;
 import com.yeshi.buwan.domain.UserData;
 import com.yeshi.buwan.domain.UserInfo;
@@ -153,6 +153,17 @@
         return data;
     }
 
+
+    /**
+     *
+     * @param openid
+     * @param detailSystem
+     * @param type 1-QQ 2-寰俊
+     * @param portrait
+     * @param name
+     * @param ipInfo
+     * @return
+     */
     @SuppressWarnings("unchecked")
     public LoginUser getLoginUser(final String openid, final String detailSystem, final int type, final String portrait,
                                   final String name, final String ipInfo) {
@@ -175,6 +186,7 @@
                         lu.setOpenid(openid);
                         lu.setPortrait(portrait);
                         lu.setIpinfo(ipInfo);
+                        lu.setState(LoginUser.STATE_NORMAL);
                         session.save(lu);
                         session.flush();
                         session.getTransaction().commit();
@@ -230,6 +242,7 @@
                 if (list != null && list.size() > 0)
                     return "璇ラ偖绠卞凡娉ㄥ唽";
                 try {
+                    user.setState(LoginUser.STATE_NORMAL);
                     session.getTransaction().begin();
                     session.save(user);
                     session.flush();

--
Gitblit v1.8.0