Quellcode durchsuchen

直播数据报表 导入功能——删除改变状态

zhaoxian vor 3 Jahren
Ursprung
Commit
16d448ff50

+ 2 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/live/controller/LiveDataAccountsController.java

@@ -146,7 +146,8 @@ public class LiveDataAccountsController {
             if (!Check.isNull(accounts)) {
                 accounts.setState("0");
                 liveDataAccountsService.updateById(accounts);
-                //TODO 其他7个表 修改状态,页面不可查看
+                //删除账户,其他报表的数据状态设为无效 0
+                liveDataAccountsService.updateOtherReport(liveAccountId);
                 recordService.addImportRecord(accounts.getLiveAccountId(), 102, userId);
             }
         } catch (Exception e) {

+ 14 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/live/mapper/LiveDataAccountsMapper.java

@@ -2,6 +2,7 @@ package cn.com.ctop.kuaishou.modules.live.mapper;
 
 import cn.com.ctop.kuaishou.modules.live.entity.LiveDataAccounts;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 直播数据——操作记录表
@@ -12,4 +13,17 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface LiveDataAccountsMapper extends BaseMapper<LiveDataAccounts> {
 
+    void updateAdState(@Param("accountId") String accountId);
+
+    void updateAgeState(@Param("accountId") String accountId);
+
+    void updateGenderState(@Param("accountId") String accountId);
+
+    void updateMaterialState(@Param("accountId") String accountId);
+
+    void updatePriceState(@Param("accountId") String accountId);
+
+    void updateProvinceState(@Param("accountId") String accountId);
+
+    void updateTouchState(@Param("accountId") String accountId);
 }

+ 42 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/live/mapper/xml/LiveDataAccountsMapper.xml

@@ -2,4 +2,46 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.ctop.kuaishou.modules.live.mapper.LiveDataAccountsMapper">
 
+    <update id="updateAdState">
+        UPDATE ctop_live_data_ad
+        SET state = 0
+        WHERE account_id = #{accountId}
+    </update>
+
+    <update id="updateAgeState">
+        UPDATE ctop_live_data_age
+        SET state = 0
+        WHERE account_id = #{accountId}
+    </update>
+
+    <update id="updateGenderState">
+        UPDATE ctop_live_data_gender
+        SET state = 0
+        WHERE account_id = #{accountId}
+    </update>
+
+    <update id="updateMaterialState">
+        UPDATE ctop_live_data_material
+        SET state = 0
+        WHERE account_id = #{accountId}
+    </update>
+
+    <update id="updatePriceState">
+        UPDATE ctop_live_data_price
+        SET state = 0
+        WHERE account_id = #{accountId}
+    </update>
+
+    <update id="updateProvinceState">
+        UPDATE ctop_live_data_province
+        SET state = 0
+        WHERE account_id = #{accountId}
+    </update>
+
+    <update id="updateTouchState">
+        UPDATE ctop_live_data_touch
+        SET state = 0
+        WHERE account_id = #{accountId}
+    </update>
+
 </mapper>

+ 1 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/live/service/ILiveDataAccountsService.java

@@ -12,4 +12,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface ILiveDataAccountsService extends IService<LiveDataAccounts> {
 
+    void updateOtherReport(String liveAccountId);
 }

+ 10 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/live/service/impl/LiveDataAccountsServiceImpl.java

@@ -16,4 +16,14 @@ import org.springframework.stereotype.Service;
 @Service
 public class LiveDataAccountsServiceImpl extends ServiceImpl<LiveDataAccountsMapper, LiveDataAccounts> implements ILiveDataAccountsService {
 
+    @Override
+    public void updateOtherReport(String accountId) {
+        baseMapper.updateAdState(accountId);
+        baseMapper.updateAgeState(accountId);
+        baseMapper.updateGenderState(accountId);
+        baseMapper.updateMaterialState(accountId);
+        baseMapper.updatePriceState(accountId);
+        baseMapper.updateProvinceState(accountId);
+        baseMapper.updateTouchState(accountId);
+    }
 }