记得上下班打卡 | git大法好,push需谨慎

Commit 765cf204 authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/dev' into dev

parents db52897e 564f076d
package com.liquidnet.service.kylin.dto.vo.mongo;
import com.liquidnet.service.kylin.entity.KylinCheckUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -9,7 +10,7 @@ import java.time.LocalDateTime;
@ApiModel
@Data
public class KylinOrderRefundEntitiesVo {
public class KylinOrderRefundEntitiesVo implements Cloneable {
private Integer mid;
private String orderRefundsEntitiesId;
private String orderRefundsId;
......@@ -17,4 +18,13 @@ public class KylinOrderRefundEntitiesVo {
private BigDecimal refundPrice;
private String createdAt;
private String updatedAt;
private static final KylinOrderRefundEntitiesVo obj = new KylinOrderRefundEntitiesVo();
public static KylinOrderRefundEntitiesVo getNew() {
try {
return (KylinOrderRefundEntitiesVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderRefundEntitiesVo();
}
}
}
......@@ -26,7 +26,7 @@ import java.util.List;
@Data
@ApiModel
public class KylinOrderRefundsVo implements Serializable {
public class KylinOrderRefundsVo implements Serializable,Cloneable {
@ApiModelProperty(value = "主键ID")
private String orderRefundsId;
......@@ -162,4 +162,13 @@ public class KylinOrderRefundsVo implements Serializable {
}
}
private static final KylinOrderRefundsVo obj = new KylinOrderRefundsVo();
public static KylinOrderRefundsVo getNew() {
try {
return (KylinOrderRefundsVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderRefundsVo();
}
}
}
......@@ -22,4 +22,13 @@ public class KylinOrderTicketEntitiesPreRefundVo implements Serializable, Clonea
private BigDecimal priceCanRefund;
private String ticketTitle;
private Integer isPayment;
private static final KylinOrderTicketEntitiesPreRefundVo obj = new KylinOrderTicketEntitiesPreRefundVo();
public static KylinOrderTicketEntitiesPreRefundVo getNew() {
try {
return (KylinOrderTicketEntitiesPreRefundVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderTicketEntitiesPreRefundVo();
}
}
}
......@@ -16,7 +16,7 @@ import java.util.List;
@ApiModel(value = "KylinOrderTicketVo", description = "订单数据")
@Data
public class KylinOrderTicketPreVo implements Serializable {
public class KylinOrderTicketPreVo implements Serializable,Cloneable{
private Integer mid;
private static final long serialVersionUID = 5325511589667456213L;
@ApiModelProperty(position = 10, value = "ID")
......@@ -51,4 +51,13 @@ public class KylinOrderTicketPreVo implements Serializable {
private String fieldName;
private Integer isTrueName;
private List<KylinOrderTicketEntitiesPreRefundVo> entitiesPreRefundVos;
private static final KylinOrderTicketPreVo obj = new KylinOrderTicketPreVo();
public static KylinOrderTicketPreVo getNew() {
try {
return (KylinOrderTicketPreVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderTicketPreVo();
}
}
}
package com.liquidnet.service.kylin.dto.vo.returns;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketVo;
import com.liquidnet.service.kylin.entity.KylinFields;
import lombok.Data;
import java.util.List;
@Data
public class OrderDetailsVo {
public class OrderDetailsVo implements Cloneable{
private KylinOrderTicketVo orderTicketVo;
private String enterDescribe;
private Integer expressStatus;
private Long restTime;
private Integer isCanRefund;
private List<KylinOrderRefundsOrderCodeVo> orderRefundsVoList;
private static final OrderDetailsVo obj = new OrderDetailsVo();
public static OrderDetailsVo getNew() {
try {
return (OrderDetailsVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new OrderDetailsVo();
}
}
}
......@@ -5,10 +5,19 @@ import lombok.Data;
import java.math.BigDecimal;
@Data
public class OrderRefundListVo {
public class OrderRefundListVo implements Cloneable{
private String orderRefundsId;
private String orderRefundCode;
private Integer status;
private BigDecimal price;
private Integer isMine;
private static final OrderRefundListVo obj = new OrderRefundListVo();
public static OrderRefundListVo getNew() {
try {
return (OrderRefundListVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new OrderRefundListVo();
}
}
}
......@@ -4,7 +4,16 @@ import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketVo;
import lombok.Data;
@Data
public class OrderRefundVo {
public class OrderRefundVo implements Cloneable{
private KylinOrderTicketVo orderTicketVo;
private KylinOrderRefundsVo kylinOrderRefundsVoBaseList;
private static final OrderRefundVo obj = new OrderRefundVo();
public static OrderRefundVo getNew() {
try {
return (OrderRefundVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new OrderRefundVo();
}
}
}
......@@ -16,7 +16,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class AdminUpush implements Serializable {
public class AdminUpush implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -127,4 +127,12 @@ public class AdminUpush implements Serializable {
private String updatedAt;
private static final AdminUpush obj = new AdminUpush();
public static AdminUpush getNew() {
try {
return (AdminUpush) obj.clone();
} catch (CloneNotSupportedException e) {
return new AdminUpush();
}
}
}
......@@ -19,7 +19,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinBanners implements Serializable {
public class KylinBanners implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -104,5 +104,12 @@ public class KylinBanners implements Serializable {
*/
private String updatedAt;
private static final KylinBanners obj = new KylinBanners();
public static KylinBanners getNew() {
try {
return (KylinBanners) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinBanners();
}
}
}
......@@ -17,7 +17,7 @@ import java.io.Serializable;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinBannersRelations implements Serializable {
public class KylinBannersRelations implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -55,4 +55,12 @@ public class KylinBannersRelations implements Serializable {
*/
private String updatedAt;
private static final KylinBannersRelations obj = new KylinBannersRelations();
public static KylinBannersRelations getNew() {
try {
return (KylinBannersRelations) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinBannersRelations();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinBuyNotice implements Serializable {
public class KylinBuyNotice implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -64,5 +64,13 @@ public class KylinBuyNotice implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinBuyNotice obj = new KylinBuyNotice();
public static KylinBuyNotice getNew() {
try {
return (KylinBuyNotice) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinBuyNotice();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinCheckUser implements Serializable {
public class KylinCheckUser implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -64,5 +64,12 @@ public class KylinCheckUser implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinCheckUser obj = new KylinCheckUser();
public static KylinCheckUser getNew() {
try {
return (KylinCheckUser) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinCheckUser();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinCheckUserPerformances implements Serializable {
public class KylinCheckUserPerformances implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -59,5 +59,12 @@ public class KylinCheckUserPerformances implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinCheckUserPerformances obj = new KylinCheckUserPerformances();
public static KylinCheckUserPerformances getNew() {
try {
return (KylinCheckUserPerformances) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinCheckUserPerformances();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinFieldRelations implements Serializable {
public class KylinFieldRelations implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -44,5 +44,12 @@ public class KylinFieldRelations implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinFieldRelations obj = new KylinFieldRelations();
public static KylinFieldRelations getNew() {
try {
return (KylinFieldRelations) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinFieldRelations();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinFieldStatus implements Serializable {
public class KylinFieldStatus implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -64,5 +64,12 @@ public class KylinFieldStatus implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinFieldStatus obj = new KylinFieldStatus();
public static KylinFieldStatus getNew() {
try {
return (KylinFieldStatus) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinFieldStatus();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinFields implements Serializable {
public class KylinFields implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -124,5 +124,13 @@ public class KylinFields implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinFields obj = new KylinFields();
public static KylinFields getNew() {
try {
return (KylinFields) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinFields();
}
}
}
......@@ -10,7 +10,7 @@ import java.time.LocalDateTime;
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinLackRegisters implements Serializable {
public class KylinLackRegisters implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -77,4 +77,13 @@ public class KylinLackRegisters implements Serializable {
lackRegistersId, performanceId, ticketId,userId,userName,userMobile,0,ipAddress,createdAt
};
}
private static final KylinLackRegisters obj = new KylinLackRegisters();
public static KylinLackRegisters getNew() {
try {
return (KylinLackRegisters) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinLackRegisters();
}
}
}
......@@ -18,7 +18,7 @@ import java.math.BigDecimal;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderExpress implements Serializable {
public class KylinOrderExpress implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -85,5 +85,12 @@ public class KylinOrderExpress implements Serializable {
*/
private String updatedAt;
private static final KylinOrderExpress obj = new KylinOrderExpress();
public static KylinOrderExpress getNew() {
try {
return (KylinOrderExpress) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderExpress();
}
}
}
......@@ -18,7 +18,7 @@ import java.math.BigDecimal;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderExpressFeeInfo implements Serializable {
public class KylinOrderExpressFeeInfo implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -41,5 +41,12 @@ public class KylinOrderExpressFeeInfo implements Serializable {
*/
private String updatedAt;
private static final KylinOrderExpressFeeInfo obj = new KylinOrderExpressFeeInfo();
public static KylinOrderExpressFeeInfo getNew() {
try {
return (KylinOrderExpressFeeInfo) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderExpressFeeInfo();
}
}
}
......@@ -17,7 +17,7 @@ import java.io.Serializable;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderExpressPerformances implements Serializable {
public class KylinOrderExpressPerformances implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -41,5 +41,12 @@ public class KylinOrderExpressPerformances implements Serializable {
*/
private String updatedAt;
private static final KylinOrderExpressPerformances obj = new KylinOrderExpressPerformances();
public static KylinOrderExpressPerformances getNew() {
try {
return (KylinOrderExpressPerformances) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderExpressPerformances();
}
}
}
......@@ -17,7 +17,7 @@ import java.io.Serializable;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderExpressRoute implements Serializable {
public class KylinOrderExpressRoute implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -43,5 +43,12 @@ public class KylinOrderExpressRoute implements Serializable {
*/
private String updatedAt;
private static final KylinOrderExpressRoute obj = new KylinOrderExpressRoute();
public static KylinOrderExpressRoute getNew() {
try {
return (KylinOrderExpressRoute) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderExpressRoute();
}
}
}
......@@ -17,7 +17,7 @@ import java.io.Serializable;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderExpressStatus implements Serializable {
public class KylinOrderExpressStatus implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -46,5 +46,12 @@ public class KylinOrderExpressStatus implements Serializable {
*/
private String updatedAt;
private static final KylinOrderExpressStatus obj = new KylinOrderExpressStatus();
public static KylinOrderExpressStatus getNew() {
try {
return (KylinOrderExpressStatus) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderExpressStatus();
}
}
}
......@@ -19,7 +19,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderRefundBatches implements Serializable {
public class KylinOrderRefundBatches implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -49,5 +49,12 @@ public class KylinOrderRefundBatches implements Serializable {
private LocalDateTime updatedAt;
private static final KylinOrderRefundBatches obj = new KylinOrderRefundBatches();
public static KylinOrderRefundBatches getNew() {
try {
return (KylinOrderRefundBatches) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderRefundBatches();
}
}
}
......@@ -19,7 +19,7 @@ import java.time.LocalDateTime;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderRefundEntities implements Serializable {
public class KylinOrderRefundEntities implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -38,5 +38,12 @@ public class KylinOrderRefundEntities implements Serializable {
private LocalDateTime updatedAt;
private static final KylinOrderRefundEntities obj = new KylinOrderRefundEntities();
public static KylinOrderRefundEntities getNew() {
try {
return (KylinOrderRefundEntities) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderRefundEntities();
}
}
}
......@@ -18,7 +18,7 @@ import java.time.LocalDateTime;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderRefundPic implements Serializable {
public class KylinOrderRefundPic implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -50,5 +50,12 @@ public class KylinOrderRefundPic implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinOrderRefundPic obj = new KylinOrderRefundPic();
public static KylinOrderRefundPic getNew() {
try {
return (KylinOrderRefundPic) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderRefundPic();
}
}
}
......@@ -151,5 +151,12 @@ public class KylinOrderRefunds implements Serializable {
private LocalDateTime updatedAt;
private static final KylinOrderRefunds obj = new KylinOrderRefunds();
public static KylinOrderRefunds getNew() {
try {
return (KylinOrderRefunds) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderRefunds();
}
}
}
......@@ -20,7 +20,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderTicketEntities implements Serializable {
public class KylinOrderTicketEntities implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......
......@@ -19,7 +19,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderTicketRelations implements Serializable {
public class KylinOrderTicketRelations implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinPerformanceRelations implements Serializable {
public class KylinPerformanceRelations implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -74,5 +74,12 @@ public class KylinPerformanceRelations implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinPerformanceRelations obj = new KylinPerformanceRelations();
public static KylinPerformanceRelations getNew() {
try {
return (KylinPerformanceRelations) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinPerformanceRelations();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinPerformanceStatus implements Serializable {
public class KylinPerformanceStatus implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -119,5 +119,12 @@ public class KylinPerformanceStatus implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinPerformanceStatus obj = new KylinPerformanceStatus();
public static KylinPerformanceStatus getNew() {
try {
return (KylinPerformanceStatus) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinPerformanceStatus();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinPerformances implements Serializable {
public class KylinPerformances implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -164,5 +164,12 @@ public class KylinPerformances implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinPerformances obj = new KylinPerformances();
public static KylinPerformances getNew() {
try {
return (KylinPerformances) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinPerformances();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinRoadShows implements Serializable {
public class KylinRoadShows implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -59,5 +59,12 @@ public class KylinRoadShows implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinRoadShows obj = new KylinRoadShows();
public static KylinRoadShows getNew() {
try {
return (KylinRoadShows) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinRoadShows();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinTicketRelations implements Serializable {
public class KylinTicketRelations implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -49,5 +49,12 @@ public class KylinTicketRelations implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinTicketRelations obj = new KylinTicketRelations();
public static KylinTicketRelations getNew() {
try {
return (KylinTicketRelations) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinTicketRelations();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinTicketStatus implements Serializable {
public class KylinTicketStatus implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -154,5 +154,12 @@ public class KylinTicketStatus implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinTicketStatus obj = new KylinTicketStatus();
public static KylinTicketStatus getNew() {
try {
return (KylinTicketStatus) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinTicketStatus();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinTicketTimeRelation implements Serializable {
public class KylinTicketTimeRelation implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -49,5 +49,12 @@ public class KylinTicketTimeRelation implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinTicketTimeRelation obj = new KylinTicketTimeRelation();
public static KylinTicketTimeRelation getNew() {
try {
return (KylinTicketTimeRelation) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinTicketTimeRelation();
}
}
}
......@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinTicketTimes implements Serializable {
public class KylinTicketTimes implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -69,5 +69,12 @@ public class KylinTicketTimes implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinTicketTimes obj = new KylinTicketTimes();
public static KylinTicketTimes getNew() {
try {
return (KylinTicketTimes) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinTicketTimes();
}
}
}
......@@ -18,7 +18,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinTickets implements Serializable {
public class KylinTickets implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
......@@ -130,5 +130,12 @@ public class KylinTickets implements Serializable {
*/
private LocalDateTime updatedAt;
private static final KylinTickets obj = new KylinTickets();
public static KylinTickets getNew() {
try {
return (KylinTickets) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinTickets();
}
}
}
......@@ -17,7 +17,7 @@ import java.io.Serializable;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinZhengzaiAppVersions implements Serializable {
public class KylinZhengzaiAppVersions implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -52,5 +52,12 @@ public class KylinZhengzaiAppVersions implements Serializable {
*/
private String updatedAt;
private static final KylinZhengzaiAppVersions obj = new KylinZhengzaiAppVersions();
public static KylinZhengzaiAppVersions getNew() {
try {
return (KylinZhengzaiAppVersions) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinZhengzaiAppVersions();
}
}
}
......@@ -17,7 +17,7 @@ import java.io.Serializable;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class PlatformOssFiles implements Serializable {
public class PlatformOssFiles implements Serializable ,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -44,5 +44,12 @@ public class PlatformOssFiles implements Serializable {
*/
private String updatedAt;
private static final PlatformOssFiles obj = new PlatformOssFiles();
public static PlatformOssFiles getNew() {
try {
return (PlatformOssFiles) obj.clone();
} catch (CloneNotSupportedException e) {
return new PlatformOssFiles();
}
}
}
......@@ -26,9 +26,9 @@ public class KylinLackRegistersServiceImpl implements IKylinLackRegistersService
@Override
public ResponseDto<String> addLackRegister(String performanceId, String ticketId) {
try {
KylinLackRegisters lackRegisters = new KylinLackRegisters();
KylinLackRegisters lackRegisters = KylinLackRegisters.getNew();
Map token = CurrentUtil.getTokenClaims();
lackRegisters.setLackRegistersId(IDGenerator.nextSnowId().toString());
lackRegisters.setLackRegistersId(IDGenerator.nextSnowId());
lackRegisters.setPerformanceId(performanceId);
lackRegisters.setTicketId(ticketId);
lackRegisters.setUserId(CurrentUtil.getCurrentUid());
......
......@@ -116,7 +116,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
@Override
public OrderDetailsVo orderDetails(String orderId) {
Long currentTime = System.currentTimeMillis();
OrderDetailsVo vo = new OrderDetailsVo();
OrderDetailsVo vo = OrderDetailsVo.getNew();
try {
String uid = CurrentUtil.getCurrentUid();
// checkOrderTime(uid);
......@@ -201,14 +201,14 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
log.debug("获取退款详情 -> time:" + (currentTime) + "毫秒");
List<OrderRefundListVo> orderRefundListVos = new ArrayList<>();
BigDecimal lockPrice = new BigDecimal("0.00");
BigDecimal lockPrice = BigDecimal.valueOf(0.00);
for (KylinOrderRefundsVo item : orderRefundsVoList) {
OrderRefundListVo data = new OrderRefundListVo();
OrderRefundListVo data = OrderRefundListVo.getNew();
data.setOrderRefundCode(item.getOrderRefundCode().substring(item.getOrderRefundCode().length() - 10));
data.setOrderRefundsId(item.getOrderRefundsId());
data.setStatus(item.getStatus());
data.setPrice(item.getPrice());
data.setIsMine(uid.equals(item.getApplicantId())?1:0);
data.setIsMine(uid.equals(item.getApplicantId()) ? 1 : 0);
if (item.getStatus().equals(0) || item.getStatus().equals(1) || item.getStatus().equals(7) || item.getStatus().equals(3) || item.getStatus().equals(4)) {
lockPrice = lockPrice.add(item.getPrice());
}
......@@ -273,7 +273,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
@Override
public ResponseDto<KylinOrderTicketPreVo> toOrderRefundDetails(String orderId) {
try {
KylinOrderTicketPreVo vo = new KylinOrderTicketPreVo();
KylinOrderTicketPreVo vo = KylinOrderTicketPreVo.getNew();
String uid = CurrentUtil.getCurrentUid();
KylinOrderTicketVo orderTicketVo = dataUtils.getOrderTicketVo(orderId);
KylinPerformanceVo performanceVo = dataUtils.getPerformanceVo(orderTicketVo.getPerformanceId());
......@@ -285,20 +285,20 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
List<KylinOrderTicketEntitiesPreRefundVo> kylinOrderTicketEntitiesPreRefundVos = new ArrayList<>();
// 数据脱敏
for (KylinOrderTicketEntitiesVo item : kylinOrderTicketEntitiesVoList) {
KylinOrderTicketEntitiesPreRefundVo refundVo = new KylinOrderTicketEntitiesPreRefundVo();
KylinOrderTicketEntitiesPreRefundVo refundVo = KylinOrderTicketEntitiesPreRefundVo.getNew();
if (item.getEnterIdCode().length() == 18) {
item.setEnterIdCode(item.getEnterIdCode().substring(0, 3) + "*************" + item.getEnterIdCode().substring(16));
}
if (item.getEnterMobile().length() == 11) {
item.setEnterMobile(item.getEnterMobile().substring(0, 3) + "****" + item.getEnterMobile().substring(7));
}
item.setPriceActual(orderTicketVo.getPriceActual().subtract(orderTicketVo.getPriceExpress()).divide(new BigDecimal(orderTicketVo.getNumber())));
item.setPriceActual(orderTicketVo.getPriceActual().subtract(orderTicketVo.getPriceExpress()).divide(BigDecimal.valueOf(orderTicketVo.getNumber())));
item.setPriceCanRefund(dataUtils.getCanRefundOrderEntitiesPrice(orderTicketVo, kylinOrderRefundsVoBaseList, item.getOrderTicketEntitiesId()));
BeanUtils.copyProperties(item, refundVo);
kylinOrderTicketEntitiesPreRefundVos.add(refundVo);
}
orderTicketVo.setFieldName(performanceVo.getFieldName());
orderTicketVo.setOrderCode(orderTicketVo.getOrderCode().substring(orderTicketVo.getOrderCode().length()-10));
orderTicketVo.setOrderCode(orderTicketVo.getOrderCode().substring(orderTicketVo.getOrderCode().length() - 10));
BeanUtils.copyProperties(orderTicketVo, vo);
vo.setIsTrueName(performanceVo.getIsTrueName());
......@@ -313,7 +313,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
@Override
public ResponseDto<OrderRefundVo> orderRefundDetails(String orderId, String orderRefundId) {
try {
OrderRefundVo vo = new OrderRefundVo();
OrderRefundVo vo = OrderRefundVo.getNew();
String uid = CurrentUtil.getCurrentUid();
KylinOrderTicketVo orderTicketVo = dataUtils.getOrderTicketVo(orderId);
KylinPerformanceVo performanceVo = dataUtils.getPerformanceVo(orderTicketVo.getPerformanceId());
......@@ -322,9 +322,9 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
return ResponseDto.failure(ErrorMapping.get("20003"));
}
orderTicketVo.setFieldName(performanceVo.getFieldName());
orderTicketVo.setOrderCode(orderTicketVo.getOrderCode().substring(orderTicketVo.getOrderCode().length()-10));
orderTicketVo.setOrderCode(orderTicketVo.getOrderCode().substring(orderTicketVo.getOrderCode().length() - 10));
KylinOrderRefundsVo kylinOrderRefundsVoBase = dataUtils.getOrderRefundVo(orderRefundId);
kylinOrderRefundsVoBase.setOrderRefundCode(kylinOrderRefundsVoBase.getOrderRefundCode().substring(kylinOrderRefundsVoBase.getOrderRefundCode().length()-10));
kylinOrderRefundsVoBase.setOrderRefundCode(kylinOrderRefundsVoBase.getOrderRefundCode().substring(kylinOrderRefundsVoBase.getOrderRefundCode().length() - 10));
vo.setKylinOrderRefundsVoBaseList(kylinOrderRefundsVoBase);
vo.setOrderTicketVo(orderTicketVo);
return ResponseDto.success(vo);
......@@ -446,14 +446,14 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
}
}
KylinOrderTicketStatus orderStatusTable = new KylinOrderTicketStatus();
KylinOrderTicketStatus orderStatusTable = KylinOrderTicketStatus.getNew();
orderStatusTable.setStatus(newStatus);
orderStatusTable.setUpdatedAt(time);
sqlsDataA.add(new Object[]{
orderStatusTable.getStatus(), orderStatusTable.getUpdatedAt(), orderTicketsId, orderTicketVo.getChangeDate(), orderTicketVo.getChangeDate()
});
KylinOrderTicketVo kylinOrderTicketVo = new KylinOrderTicketVo();
KylinOrderTicketVo kylinOrderTicketVo = KylinOrderTicketVo.getNew();
kylinOrderTicketVo.setStatus(newStatus);
kylinOrderTicketVo.setUpdatedAt(strTime);
kylinOrderTicketVo.setChangeDate(time);
......@@ -496,7 +496,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
newIsPayment = KylinTableStatusConst.ENTITIES_IS_PAYMENT1;
}
}
KylinOrderTicketEntities entitiesTable = new KylinOrderTicketEntities();
KylinOrderTicketEntities entitiesTable = KylinOrderTicketEntities.getNew();
entitiesTable.setIsPayment(newIsPayment);
entitiesTable.setUpdatedAt(time);
......@@ -504,7 +504,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
entitiesTable.getIsPayment(), entitiesTable.getUpdatedAt(), item.getOrderTicketEntitiesId(), entitiesVo.getChangeDate(), entitiesVo.getChangeDate()
});
KylinOrderTicketEntitiesVo kylinOrderTicketEntitiesVo = new KylinOrderTicketEntitiesVo();
KylinOrderTicketEntitiesVo kylinOrderTicketEntitiesVo = KylinOrderTicketEntitiesVo.getNew();
kylinOrderTicketEntitiesVo.setIsPayment(newIsPayment);
kylinOrderTicketEntitiesVo.setUpdatedAt(strTime);
kylinOrderTicketEntitiesVo.setChangeDate(time);
......@@ -518,7 +518,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
}
// 退款细节取消
KylinOrderRefunds kylinOrderRefunds = new KylinOrderRefunds();
KylinOrderRefunds kylinOrderRefunds = KylinOrderRefunds.getNew();
kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_CANCEL);
kylinOrderRefunds.setUpdatedAt(LocalDateTime.now());
......
......@@ -15,6 +15,7 @@ import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketVo;
import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderRefundsVo;
import com.liquidnet.service.kylin.entity.*;
import com.liquidnet.service.order.utils.DataUtils;
import com.liquidnet.service.order.utils.ObjectUtil;
import com.liquidnet.service.order.utils.OrderUtils;
import com.mongodb.BasicDBObject;
import com.mongodb.client.result.UpdateResult;
......@@ -75,18 +76,15 @@ public class KylinRefundsStatusServiceImpl {
// 订单状态表 和 缓存
LocalDateTime nowTime = LocalDateTime.now();
String nowTimeStr = DateUtil.Formatter.yyyyMMddHHmmss.format(nowTime);
KylinOrderTicketStatus orderStatusTable = new KylinOrderTicketStatus();
KylinOrderTicketStatus orderStatusTable = KylinOrderTicketStatus.getNew();
orderStatusTable.setStatus(KylinTableStatusConst.ORDER_STATUS3);
orderStatusTable.setUpdatedAt(nowTime);
/*kylinOrderTicketStatusMapper.update(orderStatusTable, new UpdateWrapper<KylinOrderTicketStatus>()
.eq("order_id", orderTicketsId));*/
KylinOrderTicketVo kylinOrderTicketVo = new KylinOrderTicketVo();
KylinOrderTicketVo kylinOrderTicketVo = KylinOrderTicketVo.getNew();
kylinOrderTicketVo.setStatus(KylinTableStatusConst.ORDER_STATUS3);
kylinOrderTicketVo.setUpdatedAt(nowTimeStr);
BasicDBObject orderObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(kylinOrderTicketVo)));
UpdateResult orderResult = mongoTemplate.getCollection(KylinOrderTicketVo.class.getSimpleName()).updateOne(
mongoTemplate.getCollection(KylinOrderTicketVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderTicketsId").is(orderTicketsId)).getQueryObject(),
orderObject
);
......@@ -95,24 +93,26 @@ public class KylinRefundsStatusServiceImpl {
// 订单入场人表 和 缓存
KylinOrderTicketEntities entitiesTable = new KylinOrderTicketEntities();
KylinOrderTicketEntities entitiesTable = KylinOrderTicketEntities.getNew();
entitiesTable.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2);
entitiesTable.setUpdatedAt(nowTime);
KylinOrderTicketEntitiesVo kylinOrderTicketEntitiesVo = new KylinOrderTicketEntitiesVo();
KylinOrderTicketEntitiesVo kylinOrderTicketEntitiesVo = KylinOrderTicketEntitiesVo.getNew();
kylinOrderTicketEntitiesVo.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2);
kylinOrderTicketEntitiesVo.setUpdatedAt(nowTimeStr);
BasicDBObject entitiesObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(kylinOrderTicketEntitiesVo)));
LinkedList<Object[]> sqlsDataB = new LinkedList<>();
LinkedList<Object[]> sqlsDataB = ObjectUtil.cloneLinkedListObj();
for (String v : ticketEntityIds) {
sqlsDataB.add(new Object[]{
entitiesTable.getIsPayment(), entitiesTable.getUpdatedAt(), v, orderInfo.getChangeDate(), orderInfo.getChangeDate()
});
/*kylinOrderTicketEntitiesMapper.update(entitiesTable, new UpdateWrapper<KylinOrderTicketEntities>()
.eq("order_ticket_entities_id", v));*/
Object[] objectB = ObjectUtil.cloneObjectsArray();
objectB[0] = entitiesTable.getIsPayment();
objectB[1] = entitiesTable.getUpdatedAt();
objectB[2] = v;
objectB[3] = orderInfo.getChangeDate();
objectB[4] = orderInfo.getChangeDate();
sqlsDataB.add(objectB);
UpdateResult entitiesResult = mongoTemplate.getCollection(KylinOrderTicketEntitiesVo.class.getSimpleName()).updateOne(
mongoTemplate.getCollection(KylinOrderTicketEntitiesVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderTicketEntitiesId").is(v)).getQueryObject(),
entitiesObject
);
......@@ -120,7 +120,7 @@ public class KylinRefundsStatusServiceImpl {
}
// 退款明细
KylinOrderRefunds kylinOrderRefunds = new KylinOrderRefunds();
KylinOrderRefunds kylinOrderRefunds = KylinOrderRefunds.getNew();
String orderRefundsId = IDGenerator.nextSnowId();
kylinOrderRefunds.setOrderRefundsId(orderRefundsId);
kylinOrderRefunds.setOrderTicketsId(orderTicketsId);
......@@ -146,211 +146,71 @@ public class KylinRefundsStatusServiceImpl {
/*int rows = kylinOrderRefundsMapper.insert(kylinOrderRefunds);*/
KylinOrderRefundsVo orderRefundsVo = new KylinOrderRefundsVo();
BeanUtils.copyProperties(kylinOrderRefunds,orderRefundsVo);
KylinOrderRefundsVo orderRefundsVo = KylinOrderRefundsVo.getNew();
BeanUtils.copyProperties(kylinOrderRefunds, orderRefundsVo);
mongoTemplate.insert(orderRefundsVo, KylinOrderRefundsVo.class.getSimpleName());
// 退款入场人表
KylinOrderRefundEntities kylinOrderRefundEntities = new KylinOrderRefundEntities();
KylinOrderRefundEntities kylinOrderRefundEntities = KylinOrderRefundEntities.getNew();
kylinOrderRefundEntities.setOrderRefundsId(orderRefundsId);
kylinOrderRefundEntities.setCreatedAt(LocalDateTime.now());
LinkedList<Object[]> sqlsDataD = new LinkedList<>();
LinkedList<Object[]> sqlsDataD = ObjectUtil.cloneLinkedListObj();
for (int i = 0; i <= ticketEntityIds.size() - 1; i++) {
String orderRefundsEntitiesId = IDGenerator.nextSnowId();
kylinOrderRefundEntities.setOrderRefundsEntitiesId(orderRefundsEntitiesId);
kylinOrderRefundEntities.setRefundPrice(entitiesPrice.get(i));
kylinOrderRefundEntities.setOrderTicketEntitiesId(ticketEntityIds.get(i));
sqlsDataD.add(new Object[]{
kylinOrderRefundEntities.getOrderRefundsEntitiesId(), kylinOrderRefundEntities.getOrderRefundsId(), kylinOrderRefundEntities.getRefundPrice(),
kylinOrderRefundEntities.getOrderTicketEntitiesId(), kylinOrderRefundEntities.getCreatedAt()
});
/*int rowsR = kylinOrderRefundsEntitiesMapper.insert(kylinOrderRefundEntities);*/
KylinOrderRefundEntitiesVo orderRefundEntitiesVo = new KylinOrderRefundEntitiesVo();
BeanUtils.copyProperties(kylinOrderRefundEntities,orderRefundEntitiesVo);
mongoTemplate.insert(orderRefundEntitiesVo,KylinOrderRefundEntitiesVo.class.getSimpleName());
Object[] objectD = ObjectUtil.cloneObjectsArray();
objectD[0]=kylinOrderRefundEntities.getOrderRefundsEntitiesId();
objectD[1]=kylinOrderRefundEntities.getOrderRefundsId();
objectD[2]=kylinOrderRefundEntities.getRefundPrice();
objectD[3]=kylinOrderRefundEntities.getOrderTicketEntitiesId();
objectD[4]=kylinOrderRefundEntities.getCreatedAt();
sqlsDataD.add(objectD);
KylinOrderRefundEntitiesVo orderRefundEntitiesVo = KylinOrderRefundEntitiesVo.getNew();
BeanUtils.copyProperties(kylinOrderRefundEntities, orderRefundEntitiesVo);
mongoTemplate.insert(orderRefundEntitiesVo, KylinOrderRefundEntitiesVo.class.getSimpleName());
}
//mq更改数据库
LinkedList<String> sqls = new LinkedList<>();
LinkedList<Object[]> sqlsDataA = new LinkedList<>();
LinkedList<Object[]> sqlsDataC = new LinkedList<>();
LinkedList<String> sqls = ObjectUtil.cloneLinkedListStr();
LinkedList<Object[]> sqlsDataA = ObjectUtil.cloneLinkedListObj();
LinkedList<Object[]> sqlsDataC = ObjectUtil.cloneLinkedListObj();
sqls.add(SqlMapping.get("kylin_order_ticket_status.overtimeRefund"));
sqls.add(SqlMapping.get("kylin_order_ticket_entities.overtimeRefund"));
sqls.add(SqlMapping.get("kylin_order_refund.overtimeRefund"));
sqls.add(SqlMapping.get("kylin_order_refund_entities.overtimeRefund"));
sqlsDataA.add(new Object[]{
orderStatusTable.getStatus(), orderStatusTable.getUpdatedAt(), orderInfo.getOrderTicketsId(), orderInfo.getChangeDate(), orderInfo.getChangeDate()
});
sqlsDataC.add(new Object[]{
kylinOrderRefunds.getOrderRefundsId(), kylinOrderRefunds.getOrderTicketsId(), kylinOrderRefunds.getOrderRefundCode(),
kylinOrderRefunds.getPrice(), kylinOrderRefunds.getPriceExpress(), kylinOrderRefunds.getStatus(),
kylinOrderRefunds.getType(), kylinOrderRefunds.getApplicantId(), kylinOrderRefunds.getApplicantName(),
kylinOrderRefunds.getApplicantAt(), kylinOrderRefunds.getReason(),
kylinOrderRefunds.getRefundCate(), kylinOrderRefunds.getCreatedAt()
});
Object[] objectA = ObjectUtil.cloneObjectsArray();
objectA[0]=orderStatusTable.getStatus();
objectA[1]=orderStatusTable.getUpdatedAt();
objectA[2]=orderInfo.getOrderTicketsId();
objectA[3]=orderInfo.getChangeDate();
objectA[4]=orderInfo.getChangeDate();
sqlsDataA.add(objectA);
Object[] objectC = ObjectUtil.cloneObjectsArray();
objectC[0]=kylinOrderRefunds.getOrderRefundsId();
objectC[1]=kylinOrderRefunds.getOrderTicketsId();
objectC[2]= kylinOrderRefunds.getOrderRefundCode();
objectC[3]=kylinOrderRefunds.getPrice();
objectC[4]=kylinOrderRefunds.getPriceExpress();
objectC[5]=kylinOrderRefunds.getStatus();
objectC[6]=kylinOrderRefunds.getType();
objectC[7]=kylinOrderRefunds.getApplicantId();
objectC[8]=kylinOrderRefunds.getApplicantName();
objectC[9]=kylinOrderRefunds.getApplicantAt();
objectC[10]=kylinOrderRefunds.getReason();
objectC[11]=kylinOrderRefunds.getRefundCate();
objectC[12]=kylinOrderRefunds.getCreatedAt();
sqlsDataC.add(objectC);
rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_OVERTIME_REFUND, MQConst.ROUTING_KEY_SQL_ORDER_OVERTIME_REFUND,
SqlMapping.gets(sqls, sqlsDataA, sqlsDataB, sqlsDataC, sqlsDataD));
return true;
}
public String userOrderTicketRefunding(
KylinOrderTicketVo orderInfo,
double refundPrice,
String orderEntitiesId,
String reason,
String picList,
String uid,
String username,
int refundCount
) {
try {
LocalDateTime time = LocalDateTime.now();
String strTime = DateUtil.Formatter.yyyyMMddHHmmss.format(time);
// 订单状态表 和 缓存
KylinOrderTicketStatus orderStatusTable = new KylinOrderTicketStatus();
orderStatusTable.setStatus(KylinTableStatusConst.ORDER_STATUS3);
orderStatusTable.setUpdatedAt(time);
KylinOrderTicketVo kylinOrderTicketVo = new KylinOrderTicketVo();
kylinOrderTicketVo.setStatus(KylinTableStatusConst.ORDER_STATUS3);
kylinOrderTicketVo.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(time));
BasicDBObject orderObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(kylinOrderTicketVo)));
mongoTemplate.getCollection(KylinOrderTicketVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderTicketsId").is(orderInfo.getOrderTicketsId())).getQueryObject(),
orderObject
);
dataUtils.delOrderTicketRedis(orderInfo.getOrderTicketsId());
orderUtils.resetOrderListVo(orderInfo.getUserId(), 2, orderInfo.getOrderTicketsId(), null);
// 订单入场人表 和 缓存
KylinOrderTicketEntities entitiesTable = new KylinOrderTicketEntities();
entitiesTable.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2);
entitiesTable.setUpdatedAt(time);
KylinOrderTicketEntitiesVo kylinOrderTicketEntitiesVo = new KylinOrderTicketEntitiesVo();
kylinOrderTicketEntitiesVo.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2);
kylinOrderTicketEntitiesVo.setUpdatedAt(strTime);
BasicDBObject entitiesObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(kylinOrderTicketEntitiesVo)));
mongoTemplate.getCollection(KylinOrderTicketEntitiesVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderTicketEntitiesId").is(orderEntitiesId)).getQueryObject(),
entitiesObject
);
dataUtils.delOrderTicketEntitiesRedis(orderEntitiesId);
// 退款明细
KylinOrderRefunds kylinOrderRefunds = new KylinOrderRefunds();
String orderRefundsId = IDGenerator.nextSnowId();
kylinOrderRefunds.setOrderRefundsId(orderRefundsId);
kylinOrderRefunds.setOrderTicketsId(orderInfo.getOrderTicketsId());
String orderRefundCode = orderInfo.getOrderCode();
String codeNum = StringUtils.leftPad(String.valueOf(refundCount), 3, "0");
kylinOrderRefunds.setOrderRefundCode(orderRefundCode.concat(codeNum));
kylinOrderRefunds.setPrice(BigDecimal.valueOf(refundPrice));
kylinOrderRefunds.setPriceExpress(orderInfo.getPriceExpress());
kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY);
kylinOrderRefunds.setType(KylinTableStatusConst.ORDER_REFUND_TYPE_APPLY);
kylinOrderRefunds.setApplicantId(uid);
kylinOrderRefunds.setApplicantName(username);
kylinOrderRefunds.setApplicantAt(time);
kylinOrderRefunds.setReason(reason);
if (orderInfo.getPriceExpress().doubleValue() > 0 && refundPrice > 0) {
kylinOrderRefunds.setRefundCate(KylinTableStatusConst.ORDER_REFUND_CATE3);
} else if (orderInfo.getPriceExpress().doubleValue() > 0) {
kylinOrderRefunds.setRefundCate(KylinTableStatusConst.ORDER_REFUND_CATE2);
} else if (refundPrice > 0) {
kylinOrderRefunds.setRefundCate(KylinTableStatusConst.ORDER_REFUND_CATE1);
}
kylinOrderRefunds.setCreatedAt(time);
KylinOrderRefundsVo orderRefundsVo = new KylinOrderRefundsVo();
BeanUtils.copyProperties(kylinOrderRefunds,orderRefundsVo);
orderRefundsVo.setCreatedAt(time);
orderRefundsVo.setApplicantAt(time);
mongoTemplate.insert(orderRefundsVo, KylinOrderRefundsVo.class.getSimpleName());
// 退款入场人表
KylinOrderRefundEntities kylinOrderRefundEntities = new KylinOrderRefundEntities();
String orderRefundsEntitiesId = IDGenerator.nextSnowId();
kylinOrderRefundEntities.setOrderRefundsEntitiesId(orderRefundsEntitiesId);
kylinOrderRefundEntities.setOrderRefundsId(orderRefundsId);
kylinOrderRefundEntities.setRefundPrice(BigDecimal.valueOf(refundPrice));
kylinOrderRefundEntities.setOrderTicketEntitiesId(orderEntitiesId);
kylinOrderRefundEntities.setCreatedAt(time);
KylinOrderRefundEntitiesVo orderRefundEntitiesVo = new KylinOrderRefundEntitiesVo();
BeanUtils.copyProperties(kylinOrderRefundEntities,orderRefundEntitiesVo);
orderRefundEntitiesVo.setCreatedAt(strTime);
mongoTemplate.insert(orderRefundEntitiesVo,KylinOrderRefundEntitiesVo.class.getSimpleName());
//退款图片
KylinOrderRefundPic orderRefundPic = new KylinOrderRefundPic();
orderRefundPic.setRefundPicId(IDGenerator.nextSnowId());
orderRefundPic.setOrderRefundsId(kylinOrderRefunds.getOrderRefundsId());
orderRefundPic.setPicUrl(picList);
orderRefundPic.setCreatedAt(time);
KylinOrderRefundPicVo orderRefundPicVo = new KylinOrderRefundPicVo();
BeanUtils.copyProperties(orderRefundPic,orderRefundPicVo);
orderRefundPicVo.setCreatedAt(strTime);
mongoTemplate.insert(orderRefundPicVo,KylinOrderRefundPicVo.class.getSimpleName());
dataUtils.delOrderRefundVoByOrderId(orderInfo.getOrderTicketsId());
//MQ
LinkedList<String> sqls = new LinkedList<>();
LinkedList<Object[]> sqlsDataA = new LinkedList<>();
LinkedList<Object[]> sqlsDataB = new LinkedList<>();
LinkedList<Object[]> sqlsDataC = new LinkedList<>();
LinkedList<Object[]> sqlsDataD = new LinkedList<>();
LinkedList <Object[]> sqlsDataE = new LinkedList<>();
sqls.add(SqlMapping.get("kylin_order_ticket_status.refund"));
sqls.add(SqlMapping.get("kylin_order_ticket_entities.refund"));
sqls.add(SqlMapping.get("kylin_order_refund.refund"));
sqls.add(SqlMapping.get("kylin_order_refund_entities.refund"));
sqls.add(SqlMapping.get("kylin_order_refund_pic.refund"));
sqlsDataA.add(new Object[]{
orderStatusTable.getStatus(), orderStatusTable.getUpdatedAt(), orderInfo.getOrderTicketsId(), orderInfo.getChangeDate(), orderInfo.getChangeDate()
});
sqlsDataB.add(new Object[]{
entitiesTable.getIsPayment(), entitiesTable.getUpdatedAt(), orderEntitiesId, orderInfo.getChangeDate(), orderInfo.getChangeDate()
});
sqlsDataC.add(new Object[]{
kylinOrderRefunds.getOrderRefundsId(), kylinOrderRefunds.getOrderTicketsId(), kylinOrderRefunds.getOrderRefundCode(),
kylinOrderRefunds.getPrice(), kylinOrderRefunds.getPriceExpress(), kylinOrderRefunds.getStatus(),
kylinOrderRefunds.getType(), kylinOrderRefunds.getApplicantId(), kylinOrderRefunds.getApplicantName(),
kylinOrderRefunds.getApplicantAt(), kylinOrderRefunds.getReason(),
kylinOrderRefunds.getRefundCate(), kylinOrderRefunds.getCreatedAt()
});
sqlsDataD.add(new Object[]{
kylinOrderRefundEntities.getOrderRefundsEntitiesId(), kylinOrderRefundEntities.getOrderRefundsId(), kylinOrderRefundEntities.getRefundPrice(),
kylinOrderRefundEntities.getOrderTicketEntitiesId(), kylinOrderRefundEntities.getCreatedAt()
});
sqlsDataE.add(new Object[]{
orderRefundPic.getOrderRefundsId(), orderRefundPic.getOrderRefundsId(), orderRefundPic.getPicUrl(), orderRefundPic.getCreatedAt()
});
//TODO 生成新QUERY
rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_REFUND, MQConst.ROUTING_KEY_SQL_ORDER_REFUND,
SqlMapping.gets(sqls, sqlsDataA, sqlsDataB, sqlsDataC, sqlsDataD, sqlsDataE));
return kylinOrderRefunds.getOrderRefundsId();
}catch (Exception e){
e.printStackTrace();
return "";
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment