liujc 7 months ago
parent
commit
96c3c7bf64

+ 2 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/MusicSheetDao.java

@@ -223,4 +223,6 @@ public interface MusicSheetDao extends BaseMapper<MusicSheet> {
     void tenantInsert(@Param("item") CbsMusicSheetApplicationExtendWrapper.MusicSheetApplicationExtend extend);
 
     void platformInsert(@Param("item") CbsMusicSheetApplicationExtendWrapper.MusicSheetApplicationExtend extend);
+
+    void updateState(@Param("ids") String ids);
 }

+ 1 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CbsMusicSheetServiceImpl.java

@@ -128,6 +128,7 @@ public class CbsMusicSheetServiceImpl implements CbsMusicSheetService {
             musicSheetService.getDao().batchEnable(updateMusicSheet.getIds(),updateMusicSheet.getStatus(),true);
         } else {
             musicSheetService.getDao().batchEnable(updateMusicSheet.getIds(),updateMusicSheet.getStatus(),false);
+            musicSheetService.getDao().updateState(updateMusicSheet.getIds());
         }
         return true;
     }

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/MusicSheetServiceImpl.java

@@ -310,7 +310,7 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
         CbsMusicSheetWrapper.MusicSheetApplication musicSheetApplication = rows.get(0);
         CbsMusicSheetApplicationExtendClientWrapper.MusicSheetApplicationExtendStatus extendStatus = new CbsMusicSheetApplicationExtendClientWrapper.MusicSheetApplicationExtendStatus();
         extendStatus.setIds(musicSheetApplication.getApplicationExtendId().toString());
-        extendStatus.setStatus(musicSheet.getState()!=YesOrNoEnum.YES);
+        extendStatus.setStatus(!musicSheet.getClientState());
         R<JSONObject> jsonObjectR = musicFeignClientService.musicSheetApplicationExtendStatus(extendStatus);
         if (jsonObjectR.getCode() != 200) {
             throw new BizException("修改曲目状态失败,{}", jsonObjectR.getMessage());

+ 6 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/MusicSheetMapper.xml

@@ -1000,7 +1000,6 @@
                 tenant_state_ = #{status},
             </if>
             <if test="tenantFlag == 0">
-                state_ = #{status},
                 client_state_ = #{status}
             </if>
         </set>
@@ -1285,5 +1284,11 @@
         now()
         )
     </insert>
+
+    <update id="updateState">
+        update music_sheet
+        set state_ = client_state_ and platform_state_
+        where FIND_IN_SET(cbs_music_sheet_id_,#{ids})
+    </update>
     <!--单曲专辑数量统计-->
 </mapper>