chao hace 4 años
padre
commit
19fa6ae60a

+ 5 - 6
src/main/java/com/caimei365/user/service/impl/ClubServiceImpl.java

@@ -127,18 +127,17 @@ public class ClubServiceImpl implements ClubService {
             }
         }
         UserPo user = new UserPo();
-        // 邮箱
-        user.setEmail(club.getContractEmail());
         // 用户Id
         user.setUserId(club.getUserId());
         // 用户名
         user.setUserName(club.getLinkMan());
-        // 组织名称
+        // 邮箱
+        if (StringUtils.isNotBlank(club.getContractEmail())) {
+            user.setEmail(club.getContractEmail());
+        }
+        // 机构名称
         if (StringUtils.isNotBlank(club.getName())){
             user.setName(club.getName());
-        } else {
-            // 用户名
-            user.setName(club.getLinkMan());
         }
         // 更新机构用户信息
         clubMapper.updateClubUserByUpdateInfo(user);

+ 2 - 2
src/main/java/com/caimei365/user/service/impl/RegisterServiceImpl.java

@@ -136,7 +136,7 @@ public class RegisterServiceImpl implements RegisterService{
         // 采美默认组织机构0
         user.setOrganizeId(0);
         // 用户名
-        // user.setName(clubRegisterDto.getUserName());
+        user.setName(clubRegisterDto.getUserName());
         user.setUserName(clubRegisterDto.getUserName());
         // 绑定手机号
         user.setBindMobile(clubRegisterDto.getBindMobile());
@@ -171,7 +171,7 @@ public class RegisterServiceImpl implements RegisterService{
          */
         ClubPo club = new ClubPo();
         // 机构名称
-        // club.setName(user.getUserName());
+        club.setName(user.getUserName());
         // 联系手机
         club.setContractMobile(user.getBindMobile());
         // 联系人

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -9,5 +9,5 @@ spring:
     config:                             # Config客户端配置
       profile: @activatedProperties@    # 启用配置后缀名称
       label: master                     # 分支名称
-      uri: http://47.119.112.46:18001       # 配置中心地址
+      uri: http://47.119.112.46:18001   # 配置中心地址
       name: user                        # 配置文件名称

+ 16 - 16
src/main/resources/mapper/ClubMapper.xml

@@ -4,57 +4,57 @@
 
     <update id="updateClubUserByUpdateInfo">
         update user set
-        <if test="name != null">
+        <if test="name != null and name != ''">
             name = #{name},
         </if>
-        <if test="name != null">
+        <if test="email != null and email != ''">
             email = #{email},
         </if>
-        userName = #{userName}
+            userName = #{userName}
         where userID = #{userId}
     </update>
     <update id="updateClubByUpdateInfo">
         update club set
-        <if test="name != null">
+        <if test="name != null and name != ''">
             name = #{name},
         </if>
-        <if test="shortName != null">
+        <if test="shortName != null and shortName != ''">
             sname = #{shortName},
         </if>
-        <if test="contractEmail != null">
+        <if test="contractEmail != null and contractEmail != ''">
             contractEmail1 = #{contractEmail},
         </if>
-        <if test="contractPhone != null">
+        <if test="contractPhone != null and contractPhone != ''">
             contractPhone = #{contractPhone},
         </if>
-        <if test="linkMan != null">
+        <if test="linkMan != null and linkMan != ''">
             linkMan = #{linkMan},
         </if>
-        <if test="provinceId != null">
+        <if test="townId != null and townId != ''">
             provinceID = #{provinceId}, cityID = #{cityId}, townID = #{townId}, address = #{address},
         </if>
-        <if test="shopPhoto != null  and shopPhoto != 'null'  and shopPhoto != ''">
+        <if test="shopPhoto != null and shopPhoto != 'null' and shopPhoto != ''">
             headpic = #{shopPhoto},
         </if>
-        <if test="businessLicense != null">
+        <if test="businessLicense != null and businessLicense != ''">
             businessLicenseImage = #{businessLicense},
         </if>
-        <if test="socialCreditCode != null">
+        <if test="socialCreditCode != null and socialCreditCode != ''">
             socialCreditCode = #{socialCreditCode},
         </if>
-        <if test="firstClubType != null">
+        <if test="firstClubType != null and firstClubType != ''">
             firstClubType = #{firstClubType},
         </if>
         <if test="firstClubType == 1">
             secondClubType = #{secondClubType}, department = #{department}, medicalPracticeLicenseImg = #{medicalPracticeLicense},
         </if>
-        <if test="mainProduct != null">
+        <if test="mainProduct != null and mainProduct != ''">
             mainpro = #{mainProduct},
         </if>
-        <if test="fax != null">
+        <if test="fax != null and fax != ''">
             fax = #{fax},
         </if>
-        <if test="profile != null">
+        <if test="profile != null and profile != ''">
             info = #{profile},
         </if>
         lastModify = NOW()

+ 4 - 4
src/main/resources/mapper/OperationMapper.xml

@@ -29,11 +29,11 @@
             nickName = #{nickName},
             headimgurl = #{avatarUrl},
             status = #{status},
-            <if test="clubId != null">
+            <if test="clubId != null and clubId != ''">
                 clubId = #{clubId},
                 shopId = null,
             </if>
-            <if test="shopId != null">
+            <if test="shopId != null and shopId != ''">
                 shopId = #{shopId},
                 clubId = null,
             </if>
@@ -49,11 +49,11 @@
             updateTime = #{updateTime},
             status = #{status},
             userType = #{userType},
-            <if test="clubId != null">
+            <if test="clubId != null and clubId != ''">
                 clubId = #{clubId},
                 shopId = null,
             </if>
-            <if test="shopId != null">
+            <if test="shopId != null and shopId != ''">
                 shopId = #{shopId},
                 clubId = null,
             </if>

+ 16 - 25
src/main/resources/mapper/RegisterMapper.xml

@@ -40,17 +40,17 @@
     </update>
     <update id="updateShopUserByApply">
         update user set userName = #{userName}, name = #{name}, manufacturerStatus = #{manufacturerStatus}
-            <if test="email != null">
+            <if test="email != null and email != ''">
                 , email = #{email}
             </if>
         where userID = #{userId}
     </update>
     <update id="updateClubByUpgrade">
         update club set userID = #{userId}, name = #{name}, sname = #{shortName}, contractEmail1 = #{contractEmail},
-            <if test="contractPhone != null">
+            <if test="contractPhone != null and contractPhone != ''">
                 contractPhone = #{contractPhone},
             </if>
-            <if test="linkMan != null">
+            <if test="linkMan != null and linkMan != ''">
                 linkMan = #{linkMan},
             </if>
             provinceID = #{provinceId}, cityID = #{cityId}, townID = #{townId}, address = #{address},
@@ -61,13 +61,13 @@
             <if test="firstClubType == 1">
                 secondClubType = #{secondClubType}, department = #{department}, medicalPracticeLicenseImg = #{medicalPracticeLicense},
             </if>
-            <if test="mainProduct != null">
+            <if test="mainProduct != null and mainProduct != ''">
                 mainpro = #{mainProduct},
             </if>
-            <if test="fax != null">
+            <if test="fax != null and fax != ''">
                 fax = #{fax},
             </if>
-            <if test="profile != null">
+            <if test="profile != null and profile != ''">
                 info = #{profile},
             </if>
             status = #{status}
@@ -75,40 +75,31 @@
     </update>
     <update id="updateShopInfoByApply">
         update shop set userID = #{userId}, name = #{name},
-            <if test="shortName != null">
+            <if test="shortName != null and shortName != ''">
                 sname = #{shortName},
             </if>
-            <if test="email != null">
+            <if test="email != null and email != ''">
                 contractEmail1 = #{email},
             </if>
-            <if test="linkMan != null">
+            <if test="linkMan != null and linkMan != ''">
                 linkMan = #{linkMan},
             </if>
-            <if test="provinceId != null">
-                provinceID = #{provinceId},
+            <if test="townId != null and townId != ''">
+                provinceID = #{provinceId},cityID = #{cityId},townID = #{townId},address = #{address},
             </if>
-            <if test="cityId != null">
-                cityID = #{cityId},
-            </if>
-            <if test="townId != null">
-                townID = #{townId},
-            </if>
-            <if test="address != null">
-                address = #{address},
-            </if>
-            <if test="socialCreditCode != null">
+            <if test="socialCreditCode != null and socialCreditCode != ''">
                 socialCreditCode = #{socialCreditCode},
             </if>
-            <if test="businessLicense != null">
+            <if test="businessLicense != null and businessLicense != ''">
                 businessLicenseImage = #{businessLicense},
             </if>
-            <if test="firstShopType != null">
+            <if test="firstShopType != null and firstShopType != ''">
                 firstShopType = #{firstShopType},
             </if>
-            <if test="secondShopType != null">
+            <if test="secondShopType != null and secondShopType != ''">
                 secondShopType = #{secondShopType},
             </if>
-            <if test="mainProduct != null">
+            <if test="mainProduct != null and mainProduct != ''">
                 mainpro = #{mainProduct},
             </if>
             status = #{status}

+ 21 - 30
src/main/resources/mapper/ShopMapper.xml

@@ -17,73 +17,64 @@
     <update id="updateShopByUpdateInfo">
         update shop
         <set>
-            <if test="shortName != null">
+            <if test="shortName != null and shortName != ''">
                 sname = #{shortName},
             </if>
-            <if test="email != null">
+            <if test="email != null and email != ''">
                 contractEmail1 = #{email},
             </if>
-            <if test="contractPhone != null">
+            <if test="contractPhone != null and contractPhone != ''">
                 contractPhone = #{contractPhone},
             </if>
-            <if test="linkMan != null">
+            <if test="linkMan != null and linkMan != ''">
                 linkMan = #{linkMan},
             </if>
-            <if test="provinceId != null">
-                provinceID = #{provinceId},
+            <if test="townId != null and townId != ''">
+                provinceID = #{provinceId}, cityID = #{cityId}, townID = #{townId},address = #{address},
             </if>
-            <if test="cityId != null">
-                cityID = #{cityId},
-            </if>
-            <if test="townId != null">
-                townID = #{townId},
-            </if>
-            <if test="address != null">
-                address = #{address},
-            </if>
-            <if test="socialCreditCode != null">
+            <if test="socialCreditCode != null and socialCreditCode != ''">
                 socialCreditCode = #{socialCreditCode},
             </if>
-            <if test="businessLicense != null">
+            <if test="businessLicense != null and businessLicense != ''">
                 businessLicenseImage = #{businessLicense},
             </if>
-            <if test="firstShopType != null">
+            <if test="firstShopType != null and firstShopType != ''">
                 firstShopType = #{firstShopType},
             </if>
-            <if test="secondShopType != null">
+            <if test="secondShopType != null and secondShopType != ''">
                 secondShopType = #{secondShopType},
             </if>
-            <if test="mainProduct != null">
+            <if test="mainProduct != null and mainProduct != ''">
                 mainpro = #{mainProduct},
             </if>
-            <if test="mainProductDesc != null">
+            <if test="mainProductDesc != null and mainProductDesc != ''">
                 productDesc = #{mainProductDesc},
             </if>
-            <if test="legalPerson != null">
+            <if test="legalPerson != null and legalPerson != ''">
                 legalPerson = #{legalPerson},
             </if>
-            <if test="registeredCapital != null">
+            <if test="registeredCapital != null and registeredCapital != ''">
                 registeredCapital = #{registeredCapital},
             </if>
-            <if test="faxNumber != null">
+            <if test="faxNumber != null and faxNumber != ''">
                 fax = #{faxNumber},
             </if>
-            <if test="companyNature != null">
+            <if test="companyNature != null and companyNature != ''">
                 nature = #{companyNature},
             </if>
-            <if test="turnover != null">
+            <if test="turnover != null and turnover != ''">
                 turnover = #{turnover},
             </if>
-            <if test="medicalPracticeLicense != null">
+            <if test="medicalPracticeLicense != null and medicalPracticeLicense != ''">
                 medicalPracticeLicenseImg1 = #{medicalPracticeLicense},
             </if>
-            <if test="shopDesc != null">
+            <if test="shopDesc != null and shopDesc != ''">
                 info = #{shopDesc},
             </if>
-            <if test="businessScope != null">
+            <if test="businessScope != null and businessScope != ''">
                 businessScope = #{businessScope},
             </if>
-            <if test="logo != null">
+            <if test="logo != null and logo != ''">
                 logo = #{logo},
             </if>
             name = #{name}