//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("/unifiedOrderGoodsAppraise")
//public class UnifiedOrderGoodsAppraiseController extends BaseController {
//
//	@Autowired
//	private UnifiedOrderGoodsAppraiseDubboConsumerService unifiedOrderGoodsAppraiseDubboConsumerService;
//
//
//	@ApiOperation(value = "xxx-xxx-op列表")
//	@RequestMapping(value = "list", method = RequestMethod.POST)
//	@ResponseBody
//	public R<List<UnifiedOrderGoodsAppraiseListItemVo>> pageQueryGenericParam(
//			@RequestBody UnifiedOrderGoodsAppraiseQueryCriteria queryCriteria) {
//
//		log.info("pageQueryUnifiedOrderGoodsAppraise:\n{}", JsonUtils.toJson(queryCriteria));
//
//		// TODO 参数合法性判定
//
//		R<List<UnifiedOrderGoodsAppraiseListItemVo>> result = new R<>();
//		result = unifiedOrderGoodsAppraiseDubboConsumerService.pageQueryGenericParam(queryCriteria, getToken());
//
//		return result;
//	}
//
//	@ApiOperation(value = "xxx-xxx-op页头")
//	@RequestMapping(value = "head", method = RequestMethod.POST)
//	public R<UnifiedOrderGoodsAppraiseHeadVo> pageQueryHeadGenericParam(
//			@RequestBody UnifiedOrderGoodsAppraiseQueryCriteria queryCriteria) {
//
//		return ResponseResultOuterUtils.createSuccesResult("",
//					unifiedOrderGoodsAppraiseDubboConsumerService
//						.queryHeadGenericParam(
//								queryCriteria,
//								getToken()
//						)
//		);
//	}
//
//	@ApiOperation(value = "xxx-xxx-op列表-op按id查询")
//	@RequestMapping(value = "{id}", method = RequestMethod.GET)
//	@ResponseBody
//	public R<UnifiedOrderGoodsAppraiseListItemVo> getById(@PathVariable("id") long id) {
//
//		return ResponseResultOuterUtils.createSuccesResult("",
//				unifiedOrderGoodsAppraiseDubboConsumerService
//						.findListItemVoById(
//								id,
//								getToken()
//						)
//		);
//	}
//
//	@ApiOperation(value = "xxx-xxx-op列表-op新增-op提交")
//	@RequestMapping(value = "add", method = RequestMethod.POST)
//	@ResponseBody
//	public R<String> addUnifiedOrderGoodsAppraise(@RequestBody UnifiedOrderGoodsAppraiseParam param) {
//
//		log.info("addUnifiedOrderGoodsAppraise:\n{}", JsonUtils.toJson(param));
//
//		// TODO 参数合法性判定
//
//		int ret = unifiedOrderGoodsAppraiseDubboConsumerService.addUnifiedOrderGoodsAppraise(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> updateUnifiedOrderGoodsAppraise(@RequestBody UnifiedOrderGoodsAppraiseParam param) {
//
//		log.info("updateUnifiedOrderGoodsAppraise:\n{}", JsonUtils.toJson(param));
//
//		int ret = unifiedOrderGoodsAppraiseDubboConsumerService.updateUnifiedOrderGoodsAppraise(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> deleteUnifiedOrderGoodsAppraise(@PathVariable("id") long id) {
//
//		// TODO 参数合法性判定
//
//		int ret = unifiedOrderGoodsAppraiseDubboConsumerService.deleteUnifiedOrderGoodsAppraise(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> deleteIdsUnifiedOrderGoodsAppraise(@RequestParam(value = "ids") long[] ids) {
//
//		log.info(JsonUtils.toJson(ids));
//
//		int ret = 0;
//
//		for (long id : ids) {
//			ret = unifiedOrderGoodsAppraiseDubboConsumerService.deleteUnifiedOrderGoodsAppraise(id, getToken());
//		}
//
//		if (ret == 0) {
//			return ResponseResultOuterUtils.createErrorResult("500", "操作失败");
//		} else {
//			return ResponseResultOuterUtils.createSuccesResult("操作成功");
//		}
//
//	}
//
//
//}
