|
|
|
package com.glxp.api.controller.thrsys;
|
|
|
|
|
|
|
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
|
|
|
import com.glxp.api.common.enums.ResultEnum;
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
import com.glxp.api.entity.system.SyncUploadDataSetEntity;
|
|
|
|
import com.glxp.api.service.system.SyncUploadDataSetService;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
public class ThirdUploadSetController {
|
|
|
|
@Resource
|
|
|
|
SyncUploadDataSetService syncUploadDataSetService;
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("system/third/syncData/config")
|
|
|
|
@GetMapping("/system/third/syncData/config")
|
|
|
|
public BaseResponse list() {
|
|
|
|
SyncUploadDataSetEntity syncDataSetResponse = syncUploadDataSetService.selectSet();
|
|
|
|
return ResultVOUtils.success(syncDataSetResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("system/third/syncData/save")
|
|
|
|
@PostMapping("/system/third/syncData/save")
|
|
|
|
public BaseResponse save(@RequestBody @Valid SyncUploadDataSetEntity syncUploadDataSetEntity
|
|
|
|
) {
|
|
|
|
boolean b = syncUploadDataSetService.insert(syncUploadDataSetEntity);
|
|
|
|
if (!b) {
|
|
|
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
|
|
|
}
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|