chao %!s(int64=4) %!d(string=hai) anos
pai
achega
31fe04e27e

+ 5 - 0
src/main/java/com/caimei365/user/service/impl/LoginServiceImpl.java

@@ -612,6 +612,10 @@ public class LoginServiceImpl implements LoginService {
         if (result != null) {
             // 查询使用该手机号的运营人员或用户
             UserLoginVo dbUser = loginMapper.getLoginUserByMobile(mobile);
+            if (mobile.equals(dbUser.getBindMobile())) {
+                // 联系人作为运营人员,放行
+                return null;
+            }
             boolean offlineClub = false;
             boolean offlineShop = false;
             if (null != dbUser){
@@ -623,6 +627,7 @@ public class LoginServiceImpl implements LoginService {
             if (offlineClub || offlineShop) {
                 // 解绑已下线的运营人员
                 unbindOperation(dbUser.getOperationId());
+                return null;
             } else {
                 return result;
             }

+ 22 - 3
src/main/resources/mapper/ClubMapper.xml

@@ -7,18 +7,37 @@
         where userID = #{userId}
     </update>
     <update id="updateClubByUpdateInfo">
-        update club set name = #{name}, sname = #{shortName}, contractEmail1 = #{contractEmail},
+        update club set
+        <if test="name != null">
+            name = #{name},
+        </if>
+        <if test="shortName != null">
+            sname = #{shortName},
+        </if>
+        <if test="contractEmail != null">
+            contractEmail1 = #{contractEmail},
+        </if>
         <if test="contractPhone != null">
             contractPhone = #{contractPhone},
         </if>
         <if test="linkMan != null">
             linkMan = #{linkMan},
         </if>
-        provinceID = #{provinceId}, cityID = #{cityId}, townID = #{townId}, address = #{address},
+        <if test="provinceId != null">
+            provinceID = #{provinceId}, cityID = #{cityId}, townID = #{townId}, address = #{address},
+        </if>
         <if test="shopPhoto != null  and shopPhoto != 'null'  and shopPhoto != ''">
             headpic = #{shopPhoto},
         </if>
-        businessLicenseImage = #{businessLicense}, socialCreditCode = #{socialCreditCode}, firstClubType = #{firstClubType},
+        <if test="businessLicense != null">
+            businessLicenseImage = #{businessLicense},
+        </if>
+        <if test="socialCreditCode != null">
+            socialCreditCode = #{socialCreditCode},
+        </if>
+        <if test="firstClubType != null">
+            firstClubType = #{firstClubType},
+        </if>
         <if test="firstClubType == 1">
             secondClubType = #{secondClubType}, department = #{department}, medicalPracticeLicenseImg = #{medicalPracticeLicense},
         </if>