Commit ac6441f3 by 丁伟峰

根据数据库表作修改

1 parent ded29626
...@@ -14,17 +14,17 @@ import javax.persistence.*; ...@@ -14,17 +14,17 @@ import javax.persistence.*;
@Entity @Entity
@Data @Data
@Table(name="product_category") @Table(name="product_category")
public class ProductCategoryEntity implements Serializable { public class ProductCategoryEntity {
private static final long serialVersionUID = 1L;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
/** /**
* 小组id * 小组id
*/ */
@Column(name="product_service_id") @Column(name="product_category_id")
private Long productServiceId; private String productCategoryId;
/** /**
* 品牌 * 品牌
......
...@@ -36,7 +36,7 @@ public class ProductServiceImpl implements ProductService { ...@@ -36,7 +36,7 @@ public class ProductServiceImpl implements ProductService {
for (ProductCategoryEntity e : productCategoryDao.findAll()) { for (ProductCategoryEntity e : productCategoryDao.findAll()) {
String brand = e.getBrand(); String brand = e.getBrand();
String text = String.format("%s-%s", e.getType(), e.getSkill()); String text = String.format("%s-%s", e.getType(), e.getSkill());
KeyValueDTO categoryDto = new KeyValueDTO().setLabel(text).setValue(e.getProductServiceId().toString()); KeyValueDTO categoryDto = new KeyValueDTO().setLabel(text).setValue(e.getProductCategoryId());
if (brandMap.containsKey(brand)) { if (brandMap.containsKey(brand)) {
brandMap.get(brand).getCategories().add(categoryDto); brandMap.get(brand).getCategories().add(categoryDto);
} else { } else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!