异常处理

version1
admin 2 years ago
parent cd0f947aba
commit bc51eb494d

@ -12,7 +12,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.glxp.sale.admin.annotation.Log;
import com.glxp.sale.admin.idc.dao.DbDao;
import com.glxp.sale.admin.idc.service.IdcService;
import com.glxp.sale.common.res.BaseResponse;
@ -28,7 +27,7 @@ public class IdcController {
@Resource
DbDao dbDao;
/*通用上传接口*/
@Log("中继服务数据接收,下级往上级上传")
//@Log("中继服务数据接收,下级往上级上传")
@RequestMapping(value = "/spssync/common/upload")
public BaseResponse upload(HttpServletRequest request,
@RequestParam("content") String content,
@ -37,7 +36,7 @@ public class IdcController {
return idcService.receive("U",request, content, files);
}
/*通用下发接口*/
@Log("中继服务数据接收,上级往下级下发")
//@Log("中继服务数据接收,上级往下级下发")
@RequestMapping(value = "/spssync/common/issued")
public BaseResponse issued(HttpServletRequest request,
@RequestParam("content") String content,
@ -46,27 +45,27 @@ public class IdcController {
return idcService.receive("I",request, content, files);
}
@Log("数据同步测试")
//@Log("数据同步测试")
@RequestMapping(value = "/spssync/common/test")
public BaseResponse test(HttpServletRequest request,@RequestBody Map<String, Object> params) {
//
return idcService.send(params);
}
@Log("数据同步任务列表拉取")
//@Log("数据同步任务列表拉取")
@RequestMapping(value = "/spssync/common/list")
public BaseResponse list(HttpServletRequest request,@RequestBody(required = false) Map<String, Object> params) {
return idcService.taskList(request,params);
}
@Log("数据同步任务根据任务ID下载数据")
//@Log("数据同步任务根据任务ID下载数据")
@RequestMapping(value = "/spssync/common/download")
@ResponseBody
public BaseResponse download(HttpServletRequest request,@RequestBody Map<String, Object> params) {
return idcService.download(request,params);
}
@Log("数据同步任务根据任务ID,返回下载成功标记")
//@Log("数据同步任务根据任务ID,返回下载成功标记")
@RequestMapping(value = "/spssync/common/success")
@ResponseBody
public BaseResponse success(HttpServletRequest request,@RequestBody Map<String, Object> params) {

@ -303,12 +303,20 @@ public class IdcServiceImpl implements IdcService {
/*数据同步,从数据库获取数据下发或上传下级中继服务*/
@Override
public BaseResponse send(Map<String,Object> params) {
return send(params.get("messageType").toString(),params.get("tableName").toString(),params);
return send(params.get("messageType").toString(),params.get("tableName").toString(),params);
}
@Override
public BaseResponse send(String messageType,String tableName,Map<String,Object> params) {
try
{
if(sendOnPage(messageType,tableName,params))
return ResultVOUtils.success();
} catch (Exception ex) {
logger.error(ex.getMessage());
}
return ResultVOUtils.error(9999, "");
}

Loading…
Cancel
Save