//package cn.superdesk.uniorder.controller.order.base;
//
//import cn.hutool.core.collection.CollUtil;
//import cn.hutool.core.util.ObjectUtil;
//import cn.hutool.json.JSONUtil;
//import cn.superdesk.libs.common.json.JsonUtils;
//import cn.superdesk.uniorder.common.rest.response.R;
//import cn.superdesk.uniorder.common.rest.response.ResponseResultOuterUtils;
//import cn.superdesk.uniorder.controller.base.BaseController;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.ArrayList;
//import java.util.List;
//
//
///**
// * @Description:
// * @Author:         linjinyu
// * @Email  			linjinyu@avic-s.com
// * @CreateDate:     2022-07-13 14:07:41
// * @UpdateUser:     linjinyu
// * @UpdateDate:     2022-07-13 14:07:41
// * @UpdateRemark:   修改内容
// * @Version:        1.0
// */
//@Api(value = "xxx-xxx", tags = {"xxx-xxx"})
//@Slf4j
//@RestController
//@RequestMapping("/unifiedOrderReturnCredit")
//public class UnifiedOrderReturnCreditController extends BaseController {
//
//	@Autowired
//	private UnifiedOrderReturnCreditDubboConsumerService unifiedOrderReturnCreditDubboConsumerService;
//
//
//	@ApiOperation(value = "xxx-xxx-op列表")
//	@RequestMapping(value = "list", method = RequestMethod.POST)
//	@ResponseBody
//	public R<List<UnifiedOrderReturnCreditListItemVo>> pageQueryGenericParam(
//			@RequestBody UnifiedOrderReturnCreditQueryCriteria queryCriteria) {
//
//		log.info("pageQueryUnifiedOrderReturnCredit:\n{}", JsonUtils.toJson(queryCriteria));
//
//		// TODO 参数合法性判定
//
//		R<List<UnifiedOrderReturnCreditListItemVo>> result = new R<>();
//		result = unifiedOrderReturnCreditDubboConsumerService.pageQueryGenericParam(queryCriteria, getToken());
//
//		return result;
//	}
//
//	@ApiOperation(value = "xxx-xxx-op页头")
//	@RequestMapping(value = "head", method = RequestMethod.POST)
//	public R<UnifiedOrderReturnCreditHeadVo> pageQueryHeadGenericParam(
//			@RequestBody UnifiedOrderReturnCreditQueryCriteria queryCriteria) {
//
//		return ResponseResultOuterUtils.createSuccesResult("",
//					unifiedOrderReturnCreditDubboConsumerService
//						.queryHeadGenericParam(
//								queryCriteria,
//								getToken()
//						)
//		);
//	}
//
//	@ApiOperation(value = "xxx-xxx-op列表-op按id查询")
//	@RequestMapping(value = "{id}", method = RequestMethod.GET)
//	@ResponseBody
//	public R<UnifiedOrderReturnCreditListItemVo> getById(@PathVariable("id") long id) {
//
//		return ResponseResultOuterUtils.createSuccesResult("",
//				unifiedOrderReturnCreditDubboConsumerService
//						.findListItemVoById(
//								id,
//								getToken()
//						)
//		);
//	}
//
//	@ApiOperation(value = "xxx-xxx-op列表-op新增-op提交")
//	@RequestMapping(value = "add", method = RequestMethod.POST)
//	@ResponseBody
//	public R<String> addUnifiedOrderReturnCredit(@RequestBody UnifiedOrderReturnCreditParam param) {
//
//		log.info("addUnifiedOrderReturnCredit:\n{}", JsonUtils.toJson(param));
//
//		// TODO 参数合法性判定
//
//		int ret = unifiedOrderReturnCreditDubboConsumerService.addUnifiedOrderReturnCredit(param, getToken());
//
//		if (ret == 0) {
//			return ResponseResultOuterUtils.createErrorResult("500", "操作失败");
//		} else {
//			return ResponseResultOuterUtils.createSuccesResult("操作成功");
//		}
//	}
//
//	@ApiOperation(value = "xxx-xxx-op列表-op编辑-op提交")
//	@RequestMapping(value = "update", method = RequestMethod.POST)
//	@ResponseBody
//	public R<String> updateUnifiedOrderReturnCredit(@RequestBody UnifiedOrderReturnCreditParam param) {
//
//		log.info("updateUnifiedOrderReturnCredit:\n{}", JsonUtils.toJson(param));
//
//		int ret = unifiedOrderReturnCreditDubboConsumerService.updateUnifiedOrderReturnCredit(param, getToken());
//
//		if (ret == 0) {
//			return ResponseResultOuterUtils.createErrorResult("500", "操作失败");
//		} else {
//			return ResponseResultOuterUtils.createSuccesResult("操作成功");
//		}
//	}
//
//	@ApiOperation(value = "xxx-xxx-op列表-op删除")
//	@RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
//	@ResponseBody
//	public R<String> deleteUnifiedOrderReturnCredit(@PathVariable("id") long id) {
//
//		// TODO 参数合法性判定
//
//		int ret = unifiedOrderReturnCreditDubboConsumerService.deleteUnifiedOrderReturnCredit(id, getToken());
//
//		if (ret == 0) {
//			return ResponseResultOuterUtils.createErrorResult("500", "操作失败");
//		} else {
//			return ResponseResultOuterUtils.createSuccesResult("操作成功");
//		}
//	}
//
//	@ApiOperation(value = "xxx-xxx-op列表-op批量删除")
//	@RequestMapping(value = "delete_ids", method = RequestMethod.POST)
//	@ResponseBody
//	public R<String> deleteIdsUnifiedOrderReturnCredit(@RequestParam(value = "ids") long[] ids) {
//
//		log.info(JsonUtils.toJson(ids));
//
//		int ret = 0;
//
//		for (long id : ids) {
//			ret = unifiedOrderReturnCreditDubboConsumerService.deleteUnifiedOrderReturnCredit(id, getToken());
//		}
//
//		if (ret == 0) {
//			return ResponseResultOuterUtils.createErrorResult("500", "操作失败");
//		} else {
//			return ResponseResultOuterUtils.createSuccesResult("操作成功");
//		}
//
//	}
//
//
//}
