|
@@ -4,15 +4,15 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
|
+import org.jeecg.modules.bytedance.common.entity.BytedanceOperationLog;
|
|
import org.jeecg.modules.bytedance.common.entity.MaterialInfo;
|
|
import org.jeecg.modules.bytedance.common.entity.MaterialInfo;
|
|
|
|
+import org.jeecg.modules.bytedance.common.mapper.BytedanceOperationLogMapper;
|
|
import org.jeecg.modules.bytedance.common.mapper.MaterialInfoMapper;
|
|
import org.jeecg.modules.bytedance.common.mapper.MaterialInfoMapper;
|
|
import org.jeecg.modules.bytedance.common.service.IMaterialInfoService;
|
|
import org.jeecg.modules.bytedance.common.service.IMaterialInfoService;
|
|
import org.jeecg.modules.bytedance.common.utils.Check;
|
|
import org.jeecg.modules.bytedance.common.utils.Check;
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
-import java.util.Arrays;
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -29,6 +29,9 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
@Resource
|
|
@Resource
|
|
private MaterialInfoMapper materialInfoMapper;
|
|
private MaterialInfoMapper materialInfoMapper;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private BytedanceOperationLogMapper bytedanceOperationLogMapper;
|
|
|
|
+
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public MaterialInfo getParams(String signature, Integer status,Long projectId) {
|
|
public MaterialInfo getParams(String signature, Integer status,Long projectId) {
|
|
@@ -56,10 +59,18 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
* @author: zianY
|
|
* @author: zianY
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public Result updMaterialOfflineById(List<String> ids, Integer offlineFlag){
|
|
|
|
|
|
+ public Result updMaterialOfflineById(List<String> ids, Integer offlineFlag,String userId){
|
|
ids.forEach(id ->{
|
|
ids.forEach(id ->{
|
|
materialInfoMapper.updMaterialOfflineById(id,offlineFlag);
|
|
materialInfoMapper.updMaterialOfflineById(id,offlineFlag);
|
|
});
|
|
});
|
|
|
|
+ //添加操作记录
|
|
|
|
+ BytedanceOperationLog operationLog = new BytedanceOperationLog();
|
|
|
|
+ operationLog.setNewData(ids.toString());
|
|
|
|
+ operationLog.setOldData(ids.toString());
|
|
|
|
+ operationLog.setOperationType("素材下线");
|
|
|
|
+ operationLog.setOperationContent(userId+"操作素材【"+ids+"】下线");
|
|
|
|
+ operationLog.setCreateById(userId);
|
|
|
|
+ bytedanceOperationLogMapper.insert(operationLog);
|
|
return Result.successMsg("素材下线成功。", null);
|
|
return Result.successMsg("素材下线成功。", null);
|
|
}
|
|
}
|
|
|
|
|