离线数据上传入库

This commit is contained in:
guofeihu
2024-07-31 08:47:12 +08:00
parent 777abc0824
commit fde625de7e
7 changed files with 187 additions and 13 deletions

View File

@@ -6,6 +6,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.csharmonic.param.CsEventUserQueryParam;
import com.njcn.csharmonic.pojo.po.CsEventPO;
import com.njcn.csharmonic.pojo.vo.CsEventVO;
import com.njcn.csharmonic.pojo.vo.EventDetailVO;
import com.njcn.csharmonic.service.CsEventPOService;
@@ -66,7 +67,13 @@ public class EventController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, eventVO, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@GetMapping("/saveBatchEventList")
@ApiOperation("批量新增事件")
@ApiImplicitParam(name = "csEventPOS", value = "事件集合", required = true)
public HttpResult<String> saveBatchEventList(@RequestBody List<CsEventPO> csEventPOS) {
String methodDescribe = getMethodDescribe("saveBatchEventList");
csEventPOService.saveBatchEventList(csEventPOS);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
}

View File

@@ -39,4 +39,6 @@ public interface CsEventPOService extends IService<CsEventPO>{
CsEventVO getWavePics(String eventId, int i);
List<EventDetailVO> queryEventList(CsEventUserQueryParam csEventUserQueryParam);
void saveBatchEventList(List<CsEventPO> csEventPOS);
}

View File

@@ -35,6 +35,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.csharmonic.mapper.CsEventPOMapper;
import com.njcn.csharmonic.pojo.po.CsEventPO;
import com.njcn.csharmonic.service.CsEventPOService;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
@@ -110,6 +111,12 @@ public class CsEventPOServiceImpl extends ServiceImpl<CsEventPOMapper, CsEventPO
return list;
}
@Override
@Transactional
public void saveBatchEventList(List<CsEventPO> csEventPOS) {
this.saveBatch(csEventPOS);
}
/**
* @return WaveDataDTO