Jelajahi Sumber

http://192.168.0.21/index.php?m=bug&f=view&bugID=25782

lyhzzz 3 tahun lalu
induk
melakukan
bf3452db3b

+ 7 - 0
platform-shop/src/main/java/com/platform/controller/BrandController.java

@@ -25,6 +25,7 @@ import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.bouncycastle.jcajce.provider.symmetric.DES;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -214,6 +215,9 @@ public class BrandController extends AbstractController{
             }
             // 生成直播间地址
             String liveRoomUrl = jsonObject.getString("webSite").replaceAll("smobile.html", "shop.html");
+            if(getCompanyId() == null && jsonObject.get("companyId") !=null  ){
+                brand.setCreateUserDeptId(jsonObject.getLong("companyId"));
+            }
             brand.setLiveRoomUrl(liveRoomUrl);
 
             brandService.save(brand,true);
@@ -264,6 +268,9 @@ public class BrandController extends AbstractController{
             // 生成直播间地址
             String liveRoomUrl = jsonObject.getString("webSite").replaceAll("smobile.html", "shop.html");
             brand.setLiveRoomUrl(liveRoomUrl);
+            if(getCompanyId() == null && jsonObject.get("companyId") !=null  ){
+                brand.setCreateUserDeptId(jsonObject.getLong("companyId"));
+            }
         }
 
         brand.setAppListPicUrl(brand.getAppListPicUrl());

+ 2 - 1
platform-shop/src/main/resources/com/platform/dao/BrandDao.xml

@@ -157,7 +157,8 @@
             <if test="contractPhone != null">`contract_phone` = #{contractPhone},</if>
             <if test="updateUserId != null">`update_user_id` = #{updateUserId},</if>
             <if test="livestreamStatus != null">`livestream_status` = #{livestreamStatus},</if>
-            <if test="liveRoomUrl != null">`live_room_url` = #{liveRoomUrl}</if>
+            <if test="liveRoomUrl != null">`live_room_url` = #{liveRoomUrl},</if>
+            <if test="createUserDeptId != null">`create_user_dept_id` = #{createUserDeptId}</if>
         </set>
         where id = #{id}
     </update>