Browse Source

非空判断,样式

wuzhiqiang 5 years ago
parent
commit
a923ebebf0

+ 8 - 2
src/main/java/com/yc/education/controller/admin/AddressCorrectionController.java

@@ -57,10 +57,16 @@ public class AddressCorrectionController {
         for (AddressCorrection addressCorrection : listAllInfo){
 
             Provider provider = iProviderService.selectByKey(addressCorrection.getStoreId());
-            addressCorrection.setStoreName(provider.getName());  //设置店铺名称
+            if (provider != null){
+                addressCorrection.setStoreName(provider.getName());  //设置店铺名称
+            }
+
 
             UserInfo  userInfo = iUserInfoService.selectByKey(addressCorrection.getSubUserId());
-            addressCorrection.setNickName(userInfo.getNickName());//设置用户昵称
+            if (userInfo != null){
+                addressCorrection.setNickName(userInfo.getNickName());//设置用户昵称
+            }
+
         }
 
         mav.addObject("pageInfo",new PageInfo<AddressCorrection>(listAllInfo));

+ 4 - 1
src/main/java/com/yc/education/controller/admin/AuthenticationAdminController.java

@@ -58,7 +58,10 @@ public class AuthenticationAdminController {
 
             UserInfo userInfo =  iUserInfoService.selectByKey(authentication.getUserId());
 
-            authentication.setNickName(userInfo.getNickName()); //设置用户昵称
+            if (userInfo != null ){
+                authentication.setNickName(userInfo.getNickName()); //设置用户昵称
+            }
+
         }
         mav.addObject("pageInfo",new PageInfo<Authentication>(listAuthenticationInfo));
 

+ 4 - 1
src/main/java/com/yc/education/controller/admin/ProviderAdminController.java

@@ -87,7 +87,10 @@ public class ProviderAdminController {
             if (provider.getUserId()!=null){
 
                 UserInfo userInfo =  iUserInfoService.selectByKey(provider.getUserId());
-                provider.setNickName(userInfo.getNickName());//设置用户昵称
+                if (userInfo != null){
+                    provider.setNickName(userInfo.getNickName());//设置用户昵称
+                }
+
             }
 
         }

+ 4 - 1
src/main/java/com/yc/education/controller/admin/SupplierAdminController.java

@@ -86,7 +86,10 @@ public class SupplierAdminController {
             if (provider.getUserId()!=null){   /*如果userId不为空就查出用户昵称赋值给nickname*/
 
                 UserInfo userInfo =  iUserInfoService.selectByKey(provider.getUserId());
-                provider.setNickName(userInfo.getNickName());//设置用户昵称
+                if (userInfo != null){
+                    provider.setNickName(userInfo.getNickName());//设置用户昵称
+                }
+
 
             }else {                           /*如果 userId查出为空 根据电话号码查出用户昵称 给nickname赋值 */
                 UserInfo userInfo = iUserInfoService.listInfoByTelphone(provider.getAuthPhone());

+ 2 - 2
src/main/webapp/WEB-INF/jsp/admin/supplierList.jsp

@@ -76,7 +76,7 @@
 			<span class="l">
                 <a class="btn btn-danger radius"  href="javascript:;"  id="delete"    ><i class="Hui-iconfont">&#xe6e2;</i>批量删除</a>
                 <a class="btn btn-primary radius" href="supplierAdd.html"><i
-                        class="Hui-iconfont">&#xe600;</i> 添加服务</a>
+                        class="Hui-iconfont">&#xe600;</i> 添加商家</a>
 			</span>
         <span class="r">共有数据:<strong>${pageInfo.total}</strong> 条</span>
     </div>
@@ -103,7 +103,7 @@
                 <th width="90">店铺电话</th>
                 <th width="60">浏览量</th>
                 <th width="70">入住时间</th>
-                <th width="90">营业日期</th>
+                <%--<th width="90">营业日期</th>--%>
                 <th width="90">营业时间</th>
 
                 <th width="70">操作</th>