Explorar el Código

fix:商城商品批量修改报错

ct hace 1 día
padre
commit
e0e2f0f6f3

+ 2 - 0
fs-service/src/main/java/com/fs/statis/dto/ModifyMoreDTO.java

@@ -26,4 +26,6 @@ public class ModifyMoreDTO implements Serializable {
      * 公司id
      */
     private String companyIds;
+
+    private String isAudit;
 }

+ 18 - 15
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -404,21 +404,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where product_id = #{productId}
     </update>
     <update id="batchModify">
-        <foreach collection="productId" separator=";" item="item">
-            update fs_store_product_scrm set
-                    <if test="goodsStatus != null">
-                        is_show = #{goodsStatus},
-                    </if>
-                    <if test="goodsIsShow != null">
-                        is_display = #{goodsIsShow},
-                    </if>
-                    <if test="companyIds != null and companyIds != ''">
-                        company_ids = #{companyIds}
-                    </if>
-                    <if test="isAudit != null and isAudit != ''">
-                        is_audit = #{isAudit}
-                    </if>
-            where product_id = #{item}
+        update fs_store_product_scrm
+        <set>
+            <if test="goodsStatus != null">
+                is_show = #{goodsStatus},
+            </if>
+            <if test="goodsIsShow != null">
+                is_display = #{goodsIsShow},
+            </if>
+            <if test="companyIds != null and companyIds != ''">
+                company_ids = #{companyIds},
+            </if>
+            <if test="isAudit != null and isAudit != ''">
+                is_audit = #{isAudit}
+            </if>
+        </set>
+        where product_id in
+        <foreach collection="productId" item="item" open="(" close=")" separator=",">
+            #{item}
         </foreach>
     </update>
 

+ 1 - 2
fs-user-app/src/main/java/com/fs/app/controller/store/IndexScrmController.java

@@ -72,8 +72,7 @@ public class IndexScrmController extends AppBaseController {
 	@ApiOperation("读取菜单数据")
 	@GetMapping("/getMenu")
 	@Cacheable("menu")
-	public R getMenu(HttpServletRequest request){
-		FsMenuScrm map=new FsMenuScrm();
+	public R getMenu(FsMenuScrm map){
 		map.setIsShow(1);
 		map.setMenuType(1);
 		List<FsMenuScrm> list=menuService.selectFsMenuList(map);