Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
a8d45a8843
|
|
@ -472,6 +472,9 @@ public class TbProductServiceImpl implements TbProductService {
|
||||||
}
|
}
|
||||||
//保存到sku_result
|
//保存到sku_result
|
||||||
if ("sku".equals(resources.getTypeEnum())) {
|
if ("sku".equals(resources.getTypeEnum())) {
|
||||||
|
if (StringUtils.isNotBlank(resources.getSkuSnap())) {
|
||||||
|
resources.setSkuSnap(resources.getSkuSnap().replace("label", "name"));
|
||||||
|
}
|
||||||
TbProductSkuResult productSkuResult = new TbProductSkuResult();
|
TbProductSkuResult productSkuResult = new TbProductSkuResult();
|
||||||
productSkuResult.setCreatedAt(Instant.now().toEpochMilli());
|
productSkuResult.setCreatedAt(Instant.now().toEpochMilli());
|
||||||
productSkuResult.setUpdatedAt(Instant.now().toEpochMilli());
|
productSkuResult.setUpdatedAt(Instant.now().toEpochMilli());
|
||||||
|
|
@ -526,7 +529,7 @@ public class TbProductServiceImpl implements TbProductService {
|
||||||
if (!"group".equals(product.getTypeEnum())) {
|
if (!"group".equals(product.getTypeEnum())) {
|
||||||
if (resources.getCategoryId() == null) throw new BadRequestException("商品分类不可为空");
|
if (resources.getCategoryId() == null) throw new BadRequestException("商品分类不可为空");
|
||||||
product.setGroupSnap(null);
|
product.setGroupSnap(null);
|
||||||
if (resources.getNotices() != null && resources.getNotices().getId() != null) {
|
if (resources.getNotices() != null && resources.getNotices().getId() != null && resources.getNotices().getId() > 0) {
|
||||||
noticeRepository.deleteById(resources.getNotices().getId());
|
noticeRepository.deleteById(resources.getNotices().getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -573,6 +576,9 @@ public class TbProductServiceImpl implements TbProductService {
|
||||||
}
|
}
|
||||||
//保存到sku_result
|
//保存到sku_result
|
||||||
if ("sku".equals(resources.getTypeEnum())) {
|
if ("sku".equals(resources.getTypeEnum())) {
|
||||||
|
if (StringUtils.isNotBlank(resources.getSkuSnap())) {
|
||||||
|
resources.setSkuSnap(resources.getSkuSnap().replace("label", "name"));
|
||||||
|
}
|
||||||
TbProductSkuResult productSkuResult = new TbProductSkuResult();
|
TbProductSkuResult productSkuResult = new TbProductSkuResult();
|
||||||
productSkuResult.setCreatedAt(Instant.now().toEpochMilli());
|
productSkuResult.setCreatedAt(Instant.now().toEpochMilli());
|
||||||
productSkuResult.setUpdatedAt(Instant.now().toEpochMilli());
|
productSkuResult.setUpdatedAt(Instant.now().toEpochMilli());
|
||||||
|
|
@ -857,6 +863,8 @@ public class TbProductServiceImpl implements TbProductService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
String str="[{\"label\":\"温度\",\"value\":\"热,冰,少冰\"}]";
|
||||||
|
str=str.replace("label", "name");
|
||||||
|
System.out.println(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
|
|
||||||
package cn.ysk.cashier.system.domain;
|
package cn.ysk.cashier.system.domain;
|
||||||
|
|
||||||
|
import cn.ysk.cashier.base.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.models.auth.In;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import cn.ysk.cashier.base.BaseEntity;
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Zheng Jie
|
* @author Zheng Jie
|
||||||
|
|
@ -29,7 +28,7 @@ public class DictDetail extends BaseEntity implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@JoinColumn(name = "dict_id")
|
@JoinColumn(name = "dict_id")
|
||||||
@ManyToOne(fetch=FetchType.LAZY)
|
@ManyToOne(fetch=FetchType.EAGER)
|
||||||
@ApiModelProperty(value = "字典", hidden = true)
|
@ApiModelProperty(value = "字典", hidden = true)
|
||||||
private Dict dict;
|
private Dict dict;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
package cn.ysk.cashier.system.domain;
|
package cn.ysk.cashier.system.domain;
|
||||||
|
|
||||||
|
import cn.ysk.cashier.base.BaseEntity;
|
||||||
|
import cn.ysk.cashier.utils.enums.DataScopeEnum;
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import cn.ysk.cashier.base.BaseEntity;
|
|
||||||
import cn.ysk.cashier.utils.enums.DataScopeEnum;
|
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
@ -45,7 +45,7 @@ public class Role extends BaseEntity implements Serializable {
|
||||||
@ApiModelProperty(value = "菜单", hidden = true)
|
@ApiModelProperty(value = "菜单", hidden = true)
|
||||||
private Set<Menu> menus;
|
private Set<Menu> menus;
|
||||||
|
|
||||||
@ManyToMany
|
@ManyToMany(fetch = FetchType.EAGER)
|
||||||
@JoinTable(name = "sys_roles_depts",
|
@JoinTable(name = "sys_roles_depts",
|
||||||
joinColumns = {@JoinColumn(name = "role_id",referencedColumnName = "role_id")},
|
joinColumns = {@JoinColumn(name = "role_id",referencedColumnName = "role_id")},
|
||||||
inverseJoinColumns = {@JoinColumn(name = "dept_id",referencedColumnName = "dept_id")})
|
inverseJoinColumns = {@JoinColumn(name = "dept_id",referencedColumnName = "dept_id")})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue