package cn.superdesk.uniorder.dto.receive.consumer.superdeskmall.score.refund;

import cn.superdesk.uniorder.common.json.deserializer.DateTimeConvertDeserializer;
import cn.superdesk.uniorder.common.json.serializer.DateTimeConvertSerializer;
import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description: 侨城汇 退单
 * @Author: linjinyu
 * @CreateDate: 2021/10/9 上午11:40
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021/10/9 上午11:40
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Data
public class ScoreOrderRefundOrderReceiveParam implements Serializable {
	/**
	 * ordersn : ME20200722150905822211
	 * project_id : 0
	 * parentid : 47808
	 * integralCredit : [{"enterprise_id":"4","member_id":"8542","credit_type":"1","batchs":"JF20200721155729831","balance":"10.00","orderid":"47809","goodsid":"2479969","createtime":"1595403735","pay_status":"1","pay_type":"1","credit_name":"福利积分","daily_account_type":"3"},{"enterprise_id":"4","member_id":"8542","credit_type":"0","batchs":"wechat","balance":"10.19","orderid":"47809","goodsid":"2479969","createtime":"1595403735","pay_status":"1","pay_type":"2","credit_name":null,"daily_account_type":"3"}]
	 * refundno  : SR20200722153451040481
	 * amount :
	 * complet_state : 1
	 */
	@ApiModelProperty("订单号")
	@JsonProperty("ordersn")
	private String orderSn;

	@ApiModelProperty("退单编号")
	@JsonProperty("refundno")
	private String refundNo;

	/****************************************** 与智鹏协商后 20220120 改名 start ******************************************/

//	@ApiModelProperty("项目Id")
//	@JsonProperty("project_id")
//	private Long projectId;


	@JsonProperty("organization_id")
	private Long   organizationId;
	@JsonProperty("organization_name")
	private String organizationName;

	/****************************************** 与智鹏协商后 20220120 改名   end ******************************************/

//	"departmentName": "文滇置业",
	@ApiModelProperty("departmentName mark by linjinyu at 20211021 商城改了又没通知")
	@JsonProperty("departmentName")
	private String purchaseDepartmentName;


//	refundOrderEntity.setProjectId(refundOrderReceiveParam.getProjectId());

	/****************************************** 以下信息没传 start ******************************************/

//		refundOrderEntity.setProjectName(refundOrderReceiveParam.getProjectName());

//		refundOrderEntity.setPurchaseVirtId(refundOrderReceiveParam.getPurchaseVirtId());
//		refundOrderEntity.setPurchaseVirtName(refundOrderReceiveParam.getPurchaseVirtName());
//
//		refundOrderEntity.setPurchaseDepartmentName(refundOrderReceiveParam.getPurchaseDepartmentName());
//
//		refundOrderEntity.setPurchaseUserId(refundOrderReceiveParam.getPurchaseUserId());
//		refundOrderEntity.setPurchaseUserName(refundOrderReceiveParam.getPurchaseUserName());
//		refundOrderEntity.setPurchasePhone(refundOrderReceiveParam.getPurchasePhone());

	/****************************************** 以下信息没传   end ******************************************/


	@ApiModelProperty("没作用的吧？")
	@JsonProperty("parentid")
	private Long parentId;

	@ApiModelProperty("退单金额")
	@JsonProperty("amount")
	private BigDecimal amount;

	@ApiModelProperty("退单状态 订单状态 必须 eg:-1-已取消")
	private Integer orderState;

	@ApiModelProperty("退单状态名 订单状态名称 必须")
	private String orderStateName;

	@ApiModelProperty("订单完成状态 必须 业务方归类订单状态推送完成状态:1-已完成;2-未完成;3-已取消/已作废")
	@JsonProperty("complet_state")
	private Integer completState;

	@ApiModelProperty("退运费")
	@JsonProperty("dispatchprice")
	private BigDecimal dispatchPrice;

	@ApiModelProperty("退单创建时间 必须")
	@JsonSerialize(using = DateTimeConvertSerializer.class)
	@JsonDeserialize(using = DateTimeConvertDeserializer.class)
	private Date createTime;
	@ApiModelProperty("退单支付时间 非必须")
	@JsonSerialize(using = DateTimeConvertSerializer.class)
	@JsonDeserialize(using = DateTimeConvertDeserializer.class)
	private Date payTime;
	@ApiModelProperty("退单发货时间 非必须")
	@JsonSerialize(using = DateTimeConvertSerializer.class)
	@JsonDeserialize(using = DateTimeConvertDeserializer.class)
	private Date sendTime;
	@ApiModelProperty("退单完成时间 非必须")
	@JsonSerialize(using = DateTimeConvertSerializer.class)
	@JsonDeserialize(using = DateTimeConvertDeserializer.class)
	private Date finishTime;

	/**************************************** mark by linjinyu at 2022-07-25 10:34:44 - start ****************************************/

	//"expresscom": "顺丰",		//快递名称     例子://京东快递        //韵达快运
//(如果选择其他快递的选项,expresscom和express这两项是空的)
//"expresssn": "23243243",	//物流单号	 //122922808445     //4306630124619
//"express": "shunfeng",		//快递拼音简写    // jd			  //yunda

	@JSONField(name = "expresssn")
	@JsonProperty("expresssn")
	private String expressSn;
	@JSONField(name = "express")
	@JsonProperty("express")
	private String express;
	@JSONField(name = "expresscom")
	@JsonProperty("expresscom")
	private String expressCompany;

	/**************************************** mark by linjinyu at 2022-07-25 10:34:44 -   end ****************************************/


	@ApiModelProperty("退单流水信息")
	private List<ScoreOrderRefundOrderIntegralCreditReceiveParam> integralCredit;


}
