|
|
@@ -2,6 +2,8 @@ package com.uas.platform.b2c.prod.store.model;
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
+import com.uas.platform.b2c.common.account.model.Enterprise;
|
|
|
+import com.uas.platform.b2c.common.account.model.UserBaseInfo;
|
|
|
import com.uas.platform.b2c.core.utils.JacksonUtils;
|
|
|
import com.uas.platform.b2c.prod.commodity.model.Goods;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
@@ -119,6 +121,10 @@ public class StoreIn implements Serializable {
|
|
|
@Column(name = "st_enuu")
|
|
|
private Long enUU;
|
|
|
|
|
|
+ @OneToOne(cascade = { CascadeType.REFRESH })
|
|
|
+ @JoinColumn(name = "st_enuu", insertable = false, updatable = false)
|
|
|
+ private Enterprise enterpriseInfo;
|
|
|
+
|
|
|
/**
|
|
|
* 企业信息JSON
|
|
|
*/
|
|
|
@@ -174,6 +180,14 @@ public class StoreIn implements Serializable {
|
|
|
@Transient
|
|
|
private List<Goods> goodses;
|
|
|
|
|
|
+ public Enterprise getEnterpriseInfo() {
|
|
|
+ return enterpriseInfo;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setEnterpriseInfo(Enterprise enterpriseInfo) {
|
|
|
+ this.enterpriseInfo = enterpriseInfo;
|
|
|
+ }
|
|
|
+
|
|
|
public StoreIn() {
|
|
|
}
|
|
|
|
|
|
@@ -291,7 +305,9 @@ public class StoreIn implements Serializable {
|
|
|
|
|
|
public EnterpriseSimple getEnterprise() {
|
|
|
try {
|
|
|
- return StringUtils.hasText(this.enterpriseJson) ? JacksonUtils.fromJson(this.enterpriseJson, EnterpriseSimple.class) : null;
|
|
|
+ this.enterprise = StringUtils.hasText(this.enterpriseJson) ? JacksonUtils.fromJson(this.enterpriseJson, EnterpriseSimple.class) : null;
|
|
|
+ this.enterprise.setDescription(this.enterpriseInfo.getDescription());
|
|
|
+ return this.enterprise;
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return new EnterpriseSimple();
|