Browse Source

fix 修改配置

DYH2020 1 year ago
parent
commit
25ad15289c
18 changed files with 55 additions and 2231 deletions
  1. 4 0
      ywt-platform-outpatient-common/pom.xml
  2. 10 6
      ywt-platform-outpatient-common/src/main/java/com/ywt/outpatient/config/db/Datasources.java
  3. 41 35
      ywt-platform-outpatient-common/src/main/java/com/ywt/outpatient/config/db/Ywtcenter.java
  4. 0 167
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/DictType.java
  5. 0 38
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/DictTypeRepository.java
  6. 0 38
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GlassesSequenceRepository.java
  7. 0 357
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/Goods.java
  8. 0 609
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GoodsOrders.java
  9. 0 359
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GoodsOrdersDetail.java
  10. 0 31
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GoodsOrdersDetailRepository.java
  11. 0 37
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GoodsOrdersRepository.java
  12. 0 22
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GoodsRepository.java
  13. 0 230
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/PostAddress.java
  14. 0 17
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/PostAddressRepository.java
  15. 0 205
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/Shop.java
  16. 0 8
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/ShopRepository.java
  17. 0 64
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/SysSequence.java
  18. 0 8
      ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/SysSequenceRepository.java

+ 4 - 0
ywt-platform-outpatient-common/pom.xml

@@ -105,6 +105,10 @@
             <groupId>com.auth0</groupId>
             <groupId>com.auth0</groupId>
             <artifactId>java-jwt</artifactId>
             <artifactId>java-jwt</artifactId>
         </dependency>
         </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
     </dependencies>
     </dependencies>
 
 
     <properties>
     <properties>

+ 10 - 6
ywt-platform-outpatient-common/src/main/java/com/ywt/outpatient/config/db/Datasources.java

@@ -1,11 +1,12 @@
 package com.ywt.outpatient.config.db;
 package com.ywt.outpatient.config.db;
 
 
+import com.zaxxer.hikari.HikariDataSource;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.jdbc.DataSourceBuilder;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Primary;
 import org.springframework.context.annotation.Primary;
+import org.springframework.jdbc.core.JdbcTemplate;
 
 
 import javax.sql.DataSource;
 import javax.sql.DataSource;
 
 
@@ -14,13 +15,16 @@ import javax.sql.DataSource;
  */
  */
 @Configuration
 @Configuration
 public class Datasources {
 public class Datasources {
-    @Bean(name = "glassesDataSource")
-    @Qualifier("glassesDataSource")
-    @ConfigurationProperties(prefix="spring.datasource.glasses")
+    @Bean(name = "ywtCenterDataSource")
+    @ConfigurationProperties(prefix="spring.datasource.ywtcenter")
     @Primary
     @Primary
     public DataSource ywtCenterDataSource(){
     public DataSource ywtCenterDataSource(){
-        return DataSourceBuilder.create().build();
+        return new HikariDataSource();
     }
     }
 
 
-
+    @Bean(name = "ywtCenterJdbcTemplate")
+    public JdbcTemplate ywtCenterJdbcTemplate(
+            @Qualifier("ywtCenterDataSource") DataSource dataSource) {
+        return new JdbcTemplate(dataSource);
+    }
 }
 }

+ 41 - 35
ywt-platform-outpatient-common/src/main/java/com/ywt/outpatient/config/db/Ywtcenter.java

@@ -1,11 +1,11 @@
 package com.ywt.outpatient.config.db;
 package com.ywt.outpatient.config.db;
 
 
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateSettings;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateSettings;
 import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
 import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
-import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
 import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Configuration;
@@ -16,55 +16,61 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
 import org.springframework.transaction.PlatformTransactionManager;
 import org.springframework.transaction.PlatformTransactionManager;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 
-import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
 import javax.sql.DataSource;
 import javax.sql.DataSource;
+import java.util.Map;
+
 
 
-/**
- * Created by huangguoping.
- */
 @Configuration
 @Configuration
 @EnableTransactionManagement
 @EnableTransactionManagement
 @EnableJpaRepositories(
 @EnableJpaRepositories(
-        entityManagerFactoryRef = "entityManagerFactory",
-        transactionManagerRef = "transactionManager",
-        basePackages = {"com.ywt.outpatient.domain.entity.glasses"}
+        entityManagerFactoryRef = "entityManagerFactoryCenter",
+        transactionManagerRef = "transactionManagerCenter",
+        basePackages = {"com.ywt.outpatient.domain.entity.center"}
 )
 )
+@Slf4j
 public class Ywtcenter {
 public class Ywtcenter {
     @Autowired
     @Autowired
-    @Qualifier("glassesDataSource")
+    @Qualifier("ywtCenterDataSource")
     private DataSource ywtCenterDataSource;
     private DataSource ywtCenterDataSource;
 
 
-    @Primary
-    @Bean(name = "entityManager")
-    public EntityManager entityManager(EntityManagerFactoryBuilder builder,@Qualifier("ywtLogJpaProperties") JpaProperties jpaProperties) {
-        return entityManagerFactory(builder,jpaProperties).getObject().createEntityManager();
-    }
+    @Autowired
+    private JpaProperties jpaProperties;
 
 
-    @Primary
-    @Bean(name = "entityManagerFactory")
-    public LocalContainerEntityManagerFactoryBean entityManagerFactory (EntityManagerFactoryBuilder builder, @Qualifier("ywtLogJpaProperties") JpaProperties jpaProperties) {
-        return builder
-                .dataSource(ywtCenterDataSource)
-                .properties(jpaProperties.getProperties())
-                .properties(new HibernateProperties()
-                        .determineHibernateProperties(
-                                jpaProperties.getProperties(), new HibernateSettings()))
-                .packages("com.ywt.outpatient.domain.entity.glasses") //设置实体类所在位置
-                .persistenceUnit("ywtGlassesPersistenceUnit")
-                .build();
-    }
+    @Autowired
+    private HibernateProperties hibernateProperties;
 
 
-    @Bean(name = "ywtGlassesJpaProperties")
-    @ConfigurationProperties(prefix = "spring.jpa.glasses")
-    public JpaProperties jpaProperties() {
-        return new JpaProperties();
+    /*
+     * 通过LocalContainerEntityManagerFactoryBean来获取EntityManagerFactory实例
+     */
+    @Bean(name = "entityManagerFactoryBeanCenter")
+    public LocalContainerEntityManagerFactoryBean entityManagerFactoryBean(
+            EntityManagerFactoryBuilder builder) {
+        Map<String, Object> properties = hibernateProperties.determineHibernateProperties(
+                jpaProperties.getProperties(), new HibernateSettings());
+        return builder.dataSource(ywtCenterDataSource).properties(properties)
+                .packages("com.ywt.outpatient.domain.entity.center").build();
     }
     }
 
 
+    /*
+     * EntityManagerFactory类似于Hibernate的SessionFactory,mybatis的SqlSessionFactory
+     * 总之,在执行操作之前,我们总要获取一个EntityManager,这就类似于Hibernate的Session,
+     * mybatis的sqlSession.
+     */
+    @Bean(name = "entityManagerFactoryCenter")
+    @Primary
+    public EntityManagerFactory entityManagerFactory(EntityManagerFactoryBuilder builder) {
+        log.info("创建ywt—center 的EntityManagerFactory");
+        return this.entityManagerFactoryBean(builder).getObject();
+    }
 
 
-
+    /*
+     * 配置事务管理器
+     */
+    @Bean(name = "transactionManagerCenter")
     @Primary
     @Primary
-    @Bean(name = "transactionManager")
-    public PlatformTransactionManager transactionManager(EntityManagerFactoryBuilder builder,@Qualifier("ywtLogJpaProperties") JpaProperties jpaProperties) {
-        return new JpaTransactionManager(entityManagerFactory(builder,jpaProperties).getObject());
+    public PlatformTransactionManager transactionManager(EntityManagerFactoryBuilder builder) {
+        log.info("创建db1TransactionManager");
+        return new JpaTransactionManager(this.entityManagerFactory(builder));
     }
     }
 }
 }

+ 0 - 167
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/DictType.java

@@ -1,167 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 字典表
- */
-@Table(name = "dict_type")
-@Entity
-public class DictType implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "id", insertable = false, nullable = false)
-    private Integer id;
-
-    @Column(name = "shop_id")
-    private Integer shopId;
-
-
-    @Column(name = "type_code")
-    private String typeCode;
-
-    @Column(name = "value")
-    private Integer value;
-
-    @Column(name = "item_name")
-    private String itemName;
-
-    /**
-     * 权重越大,越靠前
-     */
-    @Column(name = "weight")
-    private Integer weight = 0;
-
-    /**
-     * 备注
-     */
-    @Column(name = "remark")
-    private String remark = "";
-
-    /**
-     * 是否删除
-     */
-    @Column(name = "deleted", nullable = false)
-    private Integer deleted = 0;
-
-    @Column(name = "creat_time", nullable = false)
-    private Date creatTime;
-
-    @Column(name = "update_time")
-    private Date updateTime;
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getTypeCode() {
-        return typeCode;
-    }
-
-    public void setTypeCode(String typeCode) {
-        this.typeCode = typeCode;
-    }
-
-    public Integer getValue() {
-        return value;
-    }
-
-    public void setValue(Integer value) {
-        this.value = value;
-    }
-
-    public String getItemName() {
-        return itemName;
-    }
-
-    public void setItemName(String itemName) {
-        this.itemName = itemName;
-    }
-
-    public Integer getShopId() {
-        return shopId;
-    }
-
-    public void setShopId(Integer shopId) {
-        this.shopId = shopId;
-    }
-
-    /**
-     * 权重越大,越靠前
-     */
-    public Integer getWeight() {
-        return weight;
-    }
-
-    /**
-     * 权重越大,越靠前
-     */
-    public void setWeight(Integer weight) {
-        this.weight = weight;
-    }
-
-    /**
-     * 备注
-     */
-    public String getRemark() {
-        return remark;
-    }
-
-    /**
-     * 备注
-     */
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    /**
-     * 是否删除
-     */
-    public Integer getDeleted() {
-        return deleted;
-    }
-
-    /**
-     * 是否删除
-     */
-    public void setDeleted(Integer deleted) {
-        this.deleted = deleted;
-    }
-
-    public Date getCreatTime() {
-        return creatTime;
-    }
-
-    public void setCreatTime(Date creatTime) {
-        this.creatTime = creatTime;
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    public String toString() {
-        return "DictType{id=" + id +
-                ", typeCode=" + typeCode +
-                ", value=" + value +
-                ", itemName=" + itemName +
-                ", weight=" + weight +
-                ", remark=" + remark +
-                ", deleted=" + deleted +
-                ", creatTime=" + creatTime +
-                ", updateTime=" + updateTime +
-                "}";
-    }
-}

+ 0 - 38
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/DictTypeRepository.java

@@ -1,38 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Query;
-
-import java.util.List;
-
-public interface DictTypeRepository extends JpaRepository<DictType, Integer>, JpaSpecificationExecutor<DictType> {
-
-    @Query(value = "select * from dict_type where deleted = 0 and type_code = ? order by weight desc, id desc;", nativeQuery = true)
-    List<DictType> getDictType(String typeCode);
-
-
-    @Query(value = "select * from dict_type where deleted = 0 and type_code = ? and shop_id = ? order by weight desc, id desc;", nativeQuery = true)
-    List<DictType> getDictType(String typeCode, int shopId);
-
-    @Query(value = "select * from dict_type where deleted = 0 and  id =? and type_code = ? and shop_id = ? order by weight desc, id desc;", nativeQuery = true)
-    public DictType checkTypeById(int id, String typeCode, int shopId);
-
-    @Query(value = "select * from dict_type where deleted = 0 and id =? and type_code = ? and shop_id = 0 order by weight desc, id desc;", nativeQuery = true)
-    public DictType checkDictTypeById(int id, String typeCode);
-
-    @Query(value = "select * from dict_type where deleted = 0 and type_code = 'TYPE_COMMON' and shop_id = ? order by weight desc, id desc;", nativeQuery = true)
-    public List<DictType> showDictTypeList (int shopId);
-
-    @Query(value = "SELECT COUNT(1) FROM  dict_type WHERE  item_name = ? AND  id != ? and  shop_id = ? and deleted = 0 ", nativeQuery = true)
-    public int checkItemNameById(String itemName, int id, int shopId);
-
-    @Query(value = "SELECT COUNT(1) FROM  dict_type WHERE  item_name = ? AND  id != ? and  shop_id = 0 and deleted = 0 ", nativeQuery = true)
-    public int checkItemNameById(String itemName, int id);
-
-    @Query(value = "SELECT COUNT(1) FROM  dict_type WHERE  item_name = ? and shop_id = ? and deleted = 0 ", nativeQuery = true)
-    public int checkItemName(String itemName, int shopId);
-
-    @Query(value = "SELECT COUNT(1) FROM  dict_type WHERE  item_name = ? and shop_id = 0 and deleted = 0 ", nativeQuery = true)
-    public int checkItemName(String itemName);
-}

+ 0 - 38
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GlassesSequenceRepository.java

@@ -1,38 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Service;
-
-import javax.persistence.EntityManager;
-import javax.persistence.ParameterMode;
-import javax.persistence.StoredProcedureQuery;
-
-/**
- * Created by dyh2020
- */
-@Service
-public class GlassesSequenceRepository {
-    // 默认 glasses 数据库
-    @Autowired
-    @Qualifier("entityManager")
-    EntityManager entityManager;
-
-    public Integer gen(String tabName) {
-        StoredProcedureQuery storedProcedureQuery = entityManager.createStoredProcedureQuery("get_sequence")
-                .registerStoredProcedureParameter("flag_name", String.class, ParameterMode.IN)
-                .registerStoredProcedureParameter("seq_id", Integer.class, ParameterMode.OUT)
-                .setParameter("flag_name", tabName);
-        storedProcedureQuery.execute();
-        return (Integer) storedProcedureQuery.getOutputParameterValue("seq_id");
-    }
-
-    public Integer generateSn(String tag) {
-        StoredProcedureQuery storedProcedureQuery = entityManager.createStoredProcedureQuery("generate_sn")
-                .registerStoredProcedureParameter("flag_name", String.class, ParameterMode.IN)
-                .registerStoredProcedureParameter("seq_id", Integer.class, ParameterMode.OUT)
-                .setParameter("flag_name", tag);
-        storedProcedureQuery.execute();
-        return (Integer) storedProcedureQuery.getOutputParameterValue("seq_id");
-    }
-}

+ 0 - 357
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/Goods.java

@@ -1,357 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 商品表
- */
-@Table(name = "goods")
-@Entity
-public class Goods implements Serializable {
-  private static final long serialVersionUID = 1L;
-
-  /**
-   * 主键id
-   */
-  @Id
-  @GeneratedValue(strategy = GenerationType.IDENTITY)
-  @Column(name = "id", insertable = false, nullable = false)
-  private Integer id;
-
-
-  /**
-   * 标题
-   */
-  @Column(name = "name", nullable = false)
-  private String name = "";
-
-
-  /**
-   * 店铺id
-   */
-  @Column(name = "shop_id", nullable = false)
-  private  Integer shopId = 1;
-
-  /**
-   * 品牌名称
-   */
-  @Column(name = "brand_name", nullable = false)
-  private String brandName = "";
-
-  /**
-   * 类型ID,对应dict_type表主键id
-   */
-  @Column(name = "type_id", nullable = false)
-  private Integer typeId;
-
-  /**
-   * 类型名称
-   */
-  @Column(name = "type_name", nullable = false)
-  private String typeName = "";
-
-  /**
-   * 规格
-   */
-  @Column(name = "spec")
-  private String spec = "";
-
-  /**
-   * 单位ID,对应dict_type表主键id
-   */
-  @Column(name = "unit_id", nullable = false)
-  private Integer unitId;
-
-  /**
-   * 单位名称
-   */
-  @Column(name = "unit_name", nullable = false)
-  private String unitName = "";
-
-  /**
-   * 单价,单位:分
-   */
-  @Column(name = "unit_price", nullable = false)
-  private Integer unitPrice = 0;
-
-  /**
-   * 库存,只能为整数
-   */
-  @Column(name = "inventory", nullable = false)
-  private Integer inventory = 0;
-
-  /**
-   * 权重,权重越大越靠前
-   */
-  @Column(name = "weight", nullable = false)
-  private Integer weight = 0;
-
-  /**
-   * 图片
-   */
-  @Column(name = "pic")
-  private String pic;
-
-  /**
-   * 状态,1-正常,0-禁用
-   */
-  @Column(name = "status")
-  private Integer status;
-
-  /**
-   * 是否删除
-   */
-  @Column(name = "deleted", nullable = false)
-  private Integer deleted = 0;
-
-  @Column(name = "create_time", nullable = false)
-  private Date createTime;
-
-  @Column(name = "update_time")
-  private Date updateTime;
-
-  /**
-   * 主键id
-   */
-  public Integer getId() {
-    return id;
-  }
-
-  /**
-   * 主键id
-   */
-  public void setId(Integer id) {
-    this.id = id;
-  }
-
-
-  /**
-   * 店铺id
-   */
-  public Integer getShopId() {
-    return shopId;
-  }
-
-  public void setShopId(Integer shopId) {
-    this.shopId = shopId;
-  }
-
-  /**
-   * 标题
-   */
-  public String getName() {
-    return name;
-  }
-
-  /**
-   * 标题
-   */
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  /**
-   * 品牌名称
-   */
-  public String getBrandName() {
-    return brandName;
-  }
-
-  /**
-   * 品牌名称
-   */
-  public void setBrandName(String brandName) {
-    this.brandName = brandName;
-  }
-
-  /**
-   * 类型ID,对应dict_type表主键id
-   */
-  public Integer getTypeId() {
-    return typeId;
-  }
-
-  /**
-   * 类型ID,对应dict_type表主键id
-   */
-  public void setTypeId(Integer typeId) {
-    this.typeId = typeId;
-  }
-
-  /**
-   * 类型名称
-   */
-  public String getTypeName() {
-    return typeName;
-  }
-
-  /**
-   * 类型名称
-   */
-  public void setTypeName(String typeName) {
-    this.typeName = typeName;
-  }
-
-  /**
-   * 规格
-   */
-  public String getSpec() {
-    return spec;
-  }
-
-  /**
-   * 规格
-   */
-  public void setSpec(String spec) {
-    this.spec = spec;
-  }
-
-  /**
-   * 单位ID,对应dict_type表主键id
-   */
-  public Integer getUnitId() {
-    return unitId;
-  }
-
-  /**
-   * 单位ID,对应dict_type表主键id
-   */
-  public void setUnitId(Integer unitId) {
-    this.unitId = unitId;
-  }
-
-  /**
-   * 单位名称
-   */
-  public String getUnitName() {
-    return unitName;
-  }
-
-  /**
-   * 单位名称
-   */
-  public void setUnitName(String unitName) {
-    this.unitName = unitName;
-  }
-
-  /**
-   * 单价,单位:分
-   */
-  public Integer getUnitPrice() {
-    return unitPrice;
-  }
-
-  /**
-   * 单价,单位:分
-   */
-  public void setUnitPrice(Integer unitPrice) {
-    this.unitPrice = unitPrice;
-  }
-
-  /**
-   * 库存,只能为整数
-   */
-  public Integer getInventory() {
-    return inventory;
-  }
-
-  /**
-   * 库存,只能为整数
-   */
-  public void setInventory(Integer inventory) {
-    this.inventory = inventory;
-  }
-
-
-
-  /**
-   * 权重,权重越大越靠前
-   */
-  public Integer getWeight() {
-    return weight;
-  }
-
-  public void setWeight(Integer weight) {
-    this.weight = weight;
-  }
-
-  /**
-   * 图片
-   */
-  public String getPic() {
-    return pic;
-  }
-
-  /**
-   * 图片
-   */
-  public void setPic(String pic) {
-    this.pic = pic;
-  }
-
-  /**
-   * 状态,1-正常,0-禁用
-   */
-  public Integer getStatus() {
-    return status;
-  }
-
-  /**
-   * 状态,1-正常,0-禁用
-   */
-  public void setStatus(Integer status) {
-    this.status = status;
-  }
-
-  /**
-   * 是否删除
-   */
-  public Integer getDeleted() {
-    return deleted;
-  }
-
-  /**
-   * 是否删除
-   */
-  public void setDeleted(Integer deleted) {
-    this.deleted = deleted;
-  }
-
-  public Date getCreateTime() {
-    return createTime;
-  }
-
-  public void setCreateTime(Date createTime) {
-    this.createTime = createTime;
-  }
-
-  public Date getUpdateTime() {
-    return updateTime;
-  }
-
-  public void setUpdateTime(Date updateTime) {
-    this.updateTime = updateTime;
-  }
-
-  public String toString() {
-    return "Goods{id=" + id + 
-      ", name=" + name + 
-      ", brandName=" + brandName + 
-      ", typeId=" + typeId + 
-      ", typeName=" + typeName + 
-      ", spec=" + spec + 
-      ", unitId=" + unitId + 
-      ", unitName=" + unitName + 
-      ", unitPrice=" + unitPrice + 
-      ", inventory=" + inventory + 
-      ", wight=" + weight +
-      ", pic=" + pic + 
-      ", status=" + status + 
-      ", deleted=" + deleted + 
-      ", createTime=" + createTime + 
-      ", updateTime=" + updateTime + 
-      "}";
-  }
-}

+ 0 - 609
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GoodsOrders.java

@@ -1,609 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 商品订单表
- */
-@Table(name = "goods_orders")
-@Entity
-public class GoodsOrders implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @Column(name = "id", insertable = false, nullable = false)
-    private Integer id;
-
-
-    /**
-     * 店铺 id,shop 表主键
-     */
-    @Column(name = "shop_id", nullable = false)
-    private Integer shopId;
-
-    /**
-     * 医院 id,hospital 表主键
-     */
-    @Column(name = "hospital_id", nullable = false)
-    private Integer hospitalId;
-
-    /**
-     * 镜片参数
-     */
-    @Column(name = "glasses_param")
-    private String glassesParam = "";
-
-    /**
-     * 订单 id,订单表主键
-     */
-    @Column(name = "order_id")
-    private Integer orderId;
-
-    /**
-     * 订单号
-     */
-    @Column(name = "order_no")
-    private String orderNo;
-
-    /**
-     * 患者用户 id
-     */
-    @Column(name = "user_id", nullable = false)
-    private Integer userId;
-
-    /**
-     * 患者姓名
-     */
-    @Column(name = "patient_name", nullable = false)
-    private String patientName;
-
-    /**
-     * 年龄
-     */
-    @Column(name = "age", nullable = false)
-    private Integer age;
-
-    /**
-     * 性别,1-男,2-女,0-未知
-     */
-    @Column(name = "sex", nullable = false)
-    private Integer sex = 0;
-
-    /**
-     * 手机号
-     */
-    @Column(name = "mobile", nullable = false)
-    private String mobile;
-
-    /**
-     * 支付时间
-     */
-    @Column(name = "payment_time")
-    private Date paymentTime;
-
-    /**
-     * 支付状态:0-待支付;1-支付处理中;2-支付成功;3-支付失败;
-     */
-    @Column(name = "payment_status", nullable = false)
-    private Integer paymentStatus = 0;
-
-    /**
-     * 支付流水号
-     */
-    @Column(name = "payment_no")
-    private String paymentNo;
-
-    /**
-     * 支付方式:1-微信,2-支付宝,3-现金,4-诊疗卡,5-pos机,6-无须支付,7-医保,8-...
-     */
-    @Column(name = "payment_channel")
-    private Integer paymentChannel;
-
-    /**
-     * 退费时间
-     */
-    @Column(name = "refund_time")
-    private Date refundTime;
-
-    /**
-     * 退款状态: 0:处理中,1: 退款成功,2: 退款异常,3: 退款关闭
-     */
-    @Column(name = "refund_status")
-    private Integer refundStatus;
-
-    /**
-     * 退款流水号
-     */
-    @Column(name = "refund_no")
-    private String refundNo;
-
-    /**
-     * 支付金额,单位:分
-     */
-    @Column(name = "pay_amount")
-    private Integer payAmount;
-
-    /**
-     * 订单状态:0-待支付;1-已支付;2-已退款
-     */
-    @Column(name = "status", nullable = false)
-    private Integer status;
-
-    /**
-     * 取货方式:0-自取,1邮寄
-     */
-    @Column(name = "get_channel")
-    private Integer getChannel;
-
-    /**
-     * 邮寄地址id,对应 glasses_address 主键ID
-     */
-    @Column(name = "address_id", nullable = false)
-    private Integer addressId = 0;
-
-    /**
-     * 备注
-     */
-    @Column(name = "remark")
-    private String remark;
-
-    /**
-     * 是否删除
-     */
-    @Column(name = "deleted", nullable = false)
-    private Integer deleted = 0;
-
-    /**
-     * 创建时间
-     */
-    @Column(name = "create_time", nullable = false)
-    private Date createTime;
-
-    /**
-     * 更新时间
-     */
-    @Column(name = "update_time", nullable = false)
-    private Date updateTime;
-
-    /**
-     * 操作人,对应mg_admin表的account
-     */
-    @Column(name = "op_by")
-    private String opBy;
-
-    /**
-     * 退款备注
-     */
-    @Column(name = "refund_remark")
-    private String refundRemark;
-
-    /**
-     * 退款操作人,对应mg_admin表的account
-     */
-    @Column(name = "refund_op_by")
-    private String refundOpBy;
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public Integer getShopId() {
-        return shopId;
-    }
-
-    public void setShopId(Integer shopId) {
-        this.shopId = shopId;
-    }
-
-    public Integer getHospitalId() {
-        return hospitalId;
-    }
-
-    public void setHospitalId(Integer hospitalId) {
-        this.hospitalId = hospitalId;
-    }
-
-    /**
-     * 镜片参数
-     */
-    public String getGlassesParam() {
-        return glassesParam;
-    }
-
-    /**
-     * 镜片参数
-     */
-    public void setGlassesParam(String glassesParam) {
-        this.glassesParam = glassesParam;
-    }
-
-    /**
-     * 订单 id,订单表主键
-     */
-    public Integer getOrderId() {
-        return orderId;
-    }
-
-    /**
-     * 订单 id,订单表主键
-     */
-    public void setOrderId(Integer orderId) {
-        this.orderId = orderId;
-    }
-
-    /**
-     * 订单号
-     */
-    public String getOrderNo() {
-        return orderNo;
-    }
-
-    /**
-     * 订单号
-     */
-    public void setOrderNo(String orderNo) {
-        this.orderNo = orderNo;
-    }
-
-    /**
-     * 患者用户 id
-     */
-    public Integer getUserId() {
-        return userId;
-    }
-
-    /**
-     * 患者用户 id
-     */
-    public void setUserId(Integer userId) {
-        this.userId = userId;
-    }
-
-    /**
-     * 患者姓名
-     */
-    public String getPatientName() {
-        return patientName;
-    }
-
-    /**
-     * 患者姓名
-     */
-    public void setPatientName(String patientName) {
-        this.patientName = patientName;
-    }
-
-    /**
-     * 年龄
-     */
-    public Integer getAge() {
-        return age;
-    }
-
-    /**
-     * 年龄
-     */
-    public void setAge(Integer age) {
-        this.age = age;
-    }
-
-    /**
-     * 性别,1-男,2-女,0-未知
-     */
-    public Integer getSex() {
-        return sex;
-    }
-
-    /**
-     * 性别,1-男,2-女,0-未知
-     */
-    public void setSex(Integer sex) {
-        this.sex = sex;
-    }
-
-    /**
-     * 手机号
-     */
-    public String getMobile() {
-        return mobile;
-    }
-
-    /**
-     * 手机号
-     */
-    public void setMobile(String mobile) {
-        this.mobile = mobile;
-    }
-
-    /**
-     * 支付时间
-     */
-    public Date getPaymentTime() {
-        return paymentTime;
-    }
-
-    /**
-     * 支付时间
-     */
-    public void setPaymentTime(Date paymentTime) {
-        this.paymentTime = paymentTime;
-    }
-
-    /**
-     * 支付状态:0-待支付;1-支付处理中;2-支付成功;3-支付失败;
-     */
-    public Integer getPaymentStatus() {
-        return paymentStatus;
-    }
-
-    /**
-     * 支付状态:0-待支付;1-支付处理中;2-支付成功;3-支付失败;
-     */
-    public void setPaymentStatus(Integer paymentStatus) {
-        this.paymentStatus = paymentStatus;
-    }
-
-    /**
-     * 支付流水号
-     */
-    public String getPaymentNo() {
-        return paymentNo;
-    }
-
-    /**
-     * 支付流水号
-     */
-    public void setPaymentNo(String paymentNo) {
-        this.paymentNo = paymentNo;
-    }
-
-    /**
-     * 支付方式:1-微信,2-支付宝,3-现金,4-诊疗卡,5-pos机,6-无须支付,7-医保,8-...
-     */
-    public Integer getPaymentChannel() {
-        return paymentChannel;
-    }
-
-    /**
-     * 支付方式:1-微信,2-支付宝,3-现金,4-诊疗卡,5-pos机,6-无须支付,7-医保,8-...
-     */
-    public void setPaymentChannel(Integer paymentChannel) {
-        this.paymentChannel = paymentChannel;
-    }
-
-    /**
-     * 退费时间
-     */
-    public Date getRefundTime() {
-        return refundTime;
-    }
-
-    /**
-     * 退费时间
-     */
-    public void setRefundTime(Date refundTime) {
-        this.refundTime = refundTime;
-    }
-
-    /**
-     * 退款状态: 0:处理中,1: 退款成功,2: 退款异常,3: 退款关闭
-     */
-    public Integer getRefundStatus() {
-        return refundStatus;
-    }
-
-    /**
-     * 退款状态: 0:处理中,1: 退款成功,2: 退款异常,3: 退款关闭
-     */
-    public void setRefundStatus(Integer refundStatus) {
-        this.refundStatus = refundStatus;
-    }
-
-    /**
-     * 退款流水号
-     */
-    public String getRefundNo() {
-        return refundNo;
-    }
-
-    /**
-     * 退款流水号
-     */
-    public void setRefundNo(String refundNo) {
-        this.refundNo = refundNo;
-    }
-
-    /**
-     * 支付金额,单位:分
-     */
-    public Integer getPayAmount() {
-        return payAmount;
-    }
-
-    /**
-     * 支付金额,单位:分
-     */
-    public void setPayAmount(Integer payAmount) {
-        this.payAmount = payAmount;
-    }
-
-    /**
-     * 订单状态:0-待支付;1-已支付;2-已退款
-     */
-    public Integer getStatus() {
-        return status;
-    }
-
-    /**
-     * 订单状态:0-待支付;1-已支付;2-已退款
-     */
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-    /**
-     * 取货方式:0-自取,1邮寄
-     */
-    public Integer getGetChannel() {
-        return getChannel;
-    }
-
-    /**
-     * 取货方式:0-自取,1邮寄
-     */
-    public void setGetChannel(Integer getChannel) {
-        this.getChannel = getChannel;
-    }
-
-    /**
-     * 邮寄地址id,对应 glasses_address 主键ID
-     */
-    public Integer getAddressId() {
-        return addressId;
-    }
-
-    /**
-     * 邮寄地址id,对应 glasses_address 主键ID
-     */
-    public void setAddressId(Integer addressId) {
-        this.addressId = addressId;
-    }
-
-    /**
-     * 备注
-     */
-    public String getRemark() {
-        return remark;
-    }
-
-    /**
-     * 备注
-     */
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    /**
-     * 是否删除
-     */
-    public Integer getDeleted() {
-        return deleted;
-    }
-
-    /**
-     * 是否删除
-     */
-    public void setDeleted(Integer deleted) {
-        this.deleted = deleted;
-    }
-
-    /**
-     * 创建时间
-     */
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    /**
-     * 创建时间
-     */
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    /**
-     * 更新时间
-     */
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    /**
-     * 更新时间
-     */
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    /**
-     * 操作人,对应mg_admin表的account
-     */
-    public String getOpBy() {
-        return opBy;
-    }
-
-    /**
-     * 操作人,对应mg_admin表的account
-     */
-    public void setOpBy(String opBy) {
-        this.opBy = opBy;
-    }
-
-    /**
-     * 退款备注
-     */
-    public String getRefundRemark() {
-        return refundRemark;
-    }
-
-    /**
-     * 退款备注
-     */
-    public void setRefundRemark(String refundRemark) {
-        this.refundRemark = refundRemark;
-    }
-
-    /**
-     * 退款操作人,对应mg_admin表的account
-     */
-    public String getRefundOpBy() {
-        return refundOpBy;
-    }
-
-    /**
-     * 退款操作人,对应mg_admin表的account
-     */
-    public void setRefundOpBy(String refundOpBy) {
-        this.refundOpBy = refundOpBy;
-    }
-
-    public String toString() {
-        return "GoodsOrders{id=" + id +
-                ", glassesParam=" + glassesParam +
-                ", orderId=" + orderId +
-                ", orderNo=" + orderNo +
-                ", userId=" + userId +
-                ", patientName=" + patientName +
-                ", age=" + age +
-                ", sex=" + sex +
-                ", mobile=" + mobile +
-                ", paymentTime=" + paymentTime +
-                ", paymentStatus=" + paymentStatus +
-                ", paymentNo=" + paymentNo +
-                ", paymentChannel=" + paymentChannel +
-                ", refundTime=" + refundTime +
-                ", refundStatus=" + refundStatus +
-                ", refundNo=" + refundNo +
-                ", payAmount=" + payAmount +
-                ", status=" + status +
-                ", getChannel=" + getChannel +
-                ", addressId=" + addressId +
-                ", remark=" + remark +
-                ", deleted=" + deleted +
-                ", createTime=" + createTime +
-                ", updateTime=" + updateTime +
-                ", opBy=" + opBy +
-                ", refundRemark=" + refundRemark +
-                ", refundOpBy=" + refundOpBy +
-                "}";
-    }
-}

+ 0 - 359
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GoodsOrdersDetail.java

@@ -1,359 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 订单详情表
- */
-@Table(name = "goods_orders_detail")
-@Entity
-public class GoodsOrdersDetail implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @Column(name = "id", insertable = false, nullable = false)
-    private Integer id;
-
-    /**
-     * 对应 goods 表主键ID
-     */
-    @Column(name = "goods_id")
-    private Integer goodsId;
-
-    /**
-     * 对应 goods_orders 表主键ID
-     */
-    @Column(name = "goods_orders_id")
-    private Integer goodsOrdersId;
-
-    /**
-     * 眼镜名称,商品表name
-     */
-    @Column(name = "goods_name", nullable = false)
-    private String goodsName;
-
-    /**
-     * 购买该眼镜的数量
-     */
-    @Column(name = "goods_number")
-    private Integer goodsNumber;
-
-    /**
-     * 单价,单价 * 折扣 /100.0,单位:分
-     */
-    @Column(name = "goods_price")
-    private Integer goodsPrice;
-
-    /**
-     * 商品图片
-     */
-    @Column(name = "goods_pic")
-    private String goodsPic;
-
-    /**
-     * 商品规格
-     */
-    @Column(name = "goods_spec")
-    private String goodsSpec;
-
-    /**
-     * 原购买价格,单位:分
-     */
-    @Column(name = "old_price")
-    private Integer oldPrice;
-
-    /**
-     * 折扣,单位: % || 0
-     */
-    @Column(name = "discount")
-    private Integer discount;
-
-    /**
-     * 真正购买价格,单价* 数量 *折扣/100.0,单位:分
-     */
-    @Column(name = "pay_amount")
-    private Integer payAmount;
-
-    /**
-     * 类型ID,对应dict_type表主键id
-     */
-    @Column(name = "type_id", nullable = false)
-    private Integer typeId;
-
-    /**
-     * 类型名称
-     */
-    @Column(name = "type_name", nullable = false)
-    private String typeName = "";
-
-    /**
-     * 是否删除
-     */
-    @Column(name = "deleted", nullable = false)
-    private Integer deleted = 0;
-
-    /**
-     * 创建时间
-     */
-    @Column(name = "create_time", nullable = false)
-    private Date createTime;
-
-    /**
-     * 更新时间
-     */
-    @Column(name = "update_time", nullable = false)
-    private Date updateTime;
-
-
-    /**
-     * 商品注意事项
-     */
-    @Column(name = "remark")
-    private String remark;
-
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    /**
-     * 对应 goods 表主键ID
-     */
-    public Integer getGoodsId() {
-        return goodsId;
-    }
-
-    /**
-     * 对应 goods 表主键ID
-     */
-    public void setGoodsId(Integer goodsId) {
-        this.goodsId = goodsId;
-    }
-
-    /**
-     * 对应 goods_orders 表主键ID
-     */
-    public Integer getGoodsOrdersId() {
-        return goodsOrdersId;
-    }
-
-    /**
-     * 对应 goods_orders 表主键ID
-     */
-    public void setGoodsOrdersId(Integer goodsOrdersId) {
-        this.goodsOrdersId = goodsOrdersId;
-    }
-
-    /**
-     * 眼镜名称,眼镜表name
-     */
-    public String getGoodsName() {
-        return goodsName;
-    }
-
-    /**
-     * 眼镜名称,眼镜表name
-     */
-    public void setGoodsName(String goodsName) {
-        this.goodsName = goodsName;
-    }
-
-    /**
-     * 购买该眼镜的数量
-     */
-    public Integer getGoodsNumber() {
-        return goodsNumber;
-    }
-
-    /**
-     * 购买该眼镜的数量
-     */
-    public void setGoodsNumber(Integer goodsNumber) {
-        this.goodsNumber = goodsNumber;
-    }
-
-    /**
-     * 单价,单位:分
-     */
-    public Integer getGoodsPrice() {
-        return goodsPrice;
-    }
-
-    /**
-     * 单价,单位:分
-     */
-    public void setGoodsPrice(Integer goodsPrice) {
-        this.goodsPrice = goodsPrice;
-    }
-
-    /**
-     * 商品图片
-     */
-    public String getGoodsPic() {
-        return goodsPic;
-    }
-
-    /**
-     * 商品图片
-     */
-    public void setGoodsPic(String goodsPic) {
-        this.goodsPic = goodsPic;
-    }
-
-    public String getGoodsSpec() {
-        return goodsSpec;
-    }
-
-    public void setGoodsSpec(String goodsSpec) {
-        this.goodsSpec = goodsSpec;
-    }
-
-    /**
-     * 原购买价格,单位:分
-     */
-    public Integer getOldPrice() {
-        return oldPrice;
-    }
-
-    /**
-     * 原购买价格,单位:分
-     */
-    public void setOldPrice(Integer oldPrice) {
-        this.oldPrice = oldPrice;
-    }
-
-    /**
-     * 折扣,单位: % || 0
-     */
-    public Integer getDiscount() {
-        return discount;
-    }
-
-    /**
-     * 折扣,单位: % || 0
-     */
-    public void setDiscount(Integer discount) {
-        this.discount = discount;
-    }
-
-    /**
-     * 真正购买价格,单价* 数量 *折扣/100.0,单位:分
-     */
-    public Integer getPayAmount() {
-        return payAmount;
-    }
-
-    /**
-     * 真正购买价格,单价* 数量 *折扣/100.0,单位:分
-     */
-    public void setPayAmount(Integer payAmount) {
-        this.payAmount = payAmount;
-    }
-
-    /**
-     * 类型ID,对应dict_type表主键id
-     */
-    public Integer getTypeId() {
-        return typeId;
-    }
-
-    /**
-     * 类型ID,对应dict_type表主键id
-     */
-    public void setTypeId(Integer typeId) {
-        this.typeId = typeId;
-    }
-
-    /**
-     * 类型名称
-     */
-    public String getTypeName() {
-        return typeName;
-    }
-
-    /**
-     * 类型名称
-     */
-    public void setTypeName(String typeName) {
-        this.typeName = typeName;
-    }
-
-    /**
-     * 是否删除
-     */
-    public Integer getDeleted() {
-        return deleted;
-    }
-
-    /**
-     * 是否删除
-     */
-    public void setDeleted(Integer deleted) {
-        this.deleted = deleted;
-    }
-
-    /**
-     * 创建时间
-     */
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    /**
-     * 创建时间
-     */
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    /**
-     * 更新时间
-     */
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    /**
-     * 更新时间
-     */
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    public String toString() {
-        return "GoodsOrdersDetail{id=" + id +
-                ", goodsId=" + goodsId +
-                ", goodsOrdersId=" + goodsOrdersId +
-                ", goodsName=" + goodsName +
-                ", goodsNumber=" + goodsNumber +
-                ", goodsPrice=" + goodsPrice +
-                ", goodsPic=" + goodsPic +
-                ", oldPrice=" + oldPrice +
-                ", discount=" + discount +
-                ", payAmount=" + payAmount +
-                ", typeId=" + typeId +
-                ", typeName=" + typeName +
-                ", deleted=" + deleted +
-                ", createTime=" + createTime +
-                ", updateTime=" + updateTime +
-                "}";
-    }
-}

+ 0 - 31
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GoodsOrdersDetailRepository.java

@@ -1,31 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Query;
-
-import java.util.List;
-
-public interface GoodsOrdersDetailRepository extends JpaRepository<GoodsOrdersDetail, Integer>, JpaSpecificationExecutor<GoodsOrdersDetail> {
-
-    /**
-     * 根据商品订单表主键ID找到对应的订单详情记录
-     *
-     * @param goodsOrdersId 商品订单表主键ID
-     * @return {@link List< GoodsOrdersDetail >}
-     */
-    @Query(value = "select * from goods_orders_detail where deleted = 0 and goods_orders_id = ? ;", nativeQuery = true)
-    List<GoodsOrdersDetail> findByGoodsOrdersId(int goodsOrdersId);
-
-    /**
-     * 根据订单ID找到对应的订单详情记录
-     *
-     * @param orderId 订单表ID
-     * @return {@link List< GoodsOrdersDetail >}
-     */
-    @Query(value = "select * from goods_orders_detail where deleted = 0 and order_id = ? ;", nativeQuery = true)
-    List<GoodsOrdersDetail> findByOrderId(int orderId);
-
-    @Query(value = "select * from goods_orders_detail where deleted = 0 and id = ? and goods_orders_id = ? limit 1 ;", nativeQuery = true)
-    GoodsOrdersDetail findByIdAndOrderId(int id, int orderId);
-}

+ 0 - 37
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GoodsOrdersRepository.java

@@ -1,37 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Query;
-
-import java.util.List;
-
-public interface GoodsOrdersRepository extends JpaRepository<GoodsOrders, Integer>, JpaSpecificationExecutor<GoodsOrders> {
-
-    /**
-     * 根据订单ID找到订单记录
-     *
-     * @param orderId 订单ID
-     * @return {@link GoodsOrders}
-     */
-    @Query(value = "select * from goods_orders where deleted = 0 and order_id = ? limit 1;", nativeQuery = true)
-    GoodsOrders findByOrderId(int orderId);
-    /**
-     * 根据主键ID找到订单记录
-     *
-     * @param id 订单主键ID
-     * @return {@link GoodsOrders}
-     */
-    @Query(value = "select * from goods_orders where deleted = 0 and id = ? limit 1;", nativeQuery = true)
-    GoodsOrders findById(int id);
-
-    @Query(value = "select count(1) from goods_orders where deleted = 0 and user_id = ?;", nativeQuery = true)
-    int getCount(int userId);
-
-    //查询支付方式
-    @Query(value = "select DISTINCT payment_channel from goods_orders where deleted = 0 and payment_channel is not null", nativeQuery = true)
-    List <Integer> findPaymentChannel();
-
-
-}

+ 0 - 22
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/GoodsRepository.java

@@ -1,22 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Query;
-
-import java.util.List;
-
-public interface GoodsRepository extends JpaRepository<Goods, Integer>, JpaSpecificationExecutor<Goods> {
-
-    @Query(value = "SELECT COUNT(1) FROM  goods WHERE  spec = ? AND  id != ? And shop_id = ? and deleted = 0 ", nativeQuery = true)
-    public int checkGoodsSpecById(String spec, int id, int shopId);
-
-    @Query(value = "SELECT COUNT(1) FROM  goods WHERE  spec = ? And shop_id = ? and deleted = 0 ", nativeQuery = true)
-    public int checkGoodsBySpec(String spec, int shopId);
-
-    @Query(value = "SELECT * FROM  goods WHERE  shop_id = ? AND  id = ? and deleted = 0 limit 1 ", nativeQuery = true)
-    public Goods checkGoodsById(int shopId, int id);
-
-    @Query(value = "SELECT * FROM  goods WHERE  shop_id = ? AND type_id = ? and status = 1  and deleted = 0 order by weight desc ", nativeQuery = true)
-    public List<Goods> goodList (int shopId, int typeId);
-}

+ 0 - 230
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/PostAddress.java

@@ -1,230 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 邮寄地址表
- */
-@Table(name = "post_address")
-@Entity
-public class PostAddress implements Serializable {
-  private static final long serialVersionUID = 1L;
-
-  /**
-   * 主键id
-   */
-  @Id
-  @Column(name = "id", insertable = false, nullable = false)
-  private Integer id;
-
-  /**
-   * 姓名
-   */
-  @Column(name = "name", nullable = false)
-  private String name;
-
-  /**
-   * 手机号
-   */
-  @Column(name = "mobile", nullable = false)
-  private String mobile;
-
-
-  /**
-   * 省市区的ids,比如:,省ID,市ID,区ID,
-   */
-  @Column(name = "address_ids")
-  private String addressIds = "";
-
-  /**
-   * 省
-   */
-  @Column(name = "province", nullable = false)
-  private String province = "";
-
-  /**
-   * 市
-   */
-  @Column(name = "city", nullable = false)
-  private String city = "0";
-
-  /**
-   * 区
-   */
-  @Column(name = "area", nullable = false)
-  private String area = "0";
-
-  /**
-   * 详细地址
-   */
-  @Column(name = "address", nullable = false)
-  private String address = "0";
-
-  /**
-   * 是否删除
-   */
-  @Column(name = "deleted", nullable = false)
-  private Integer deleted = 0;
-
-  @Column(name = "creat_time", nullable = false)
-  private Date creatTime;
-
-  @Column(name = "update_time")
-  private Date updateTime;
-
-  /**
-   * 主键id
-   */
-  public Integer getId() {
-    return id;
-  }
-
-  /**
-   * 主键id
-   */
-  public void setId(Integer id) {
-    this.id = id;
-  }
-
-  /**
-   * 姓名
-   */
-  public String getName() {
-    return name;
-  }
-
-  /**
-   * 姓名
-   */
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  /**
-   * 手机号
-   */
-  public String getMobile() {
-    return mobile;
-  }
-
-  /**
-   * 手机号
-   */
-  public void setMobile(String mobile) {
-    this.mobile = mobile;
-  }
-
-
-  public String getAddressIds() {
-    return addressIds;
-  }
-
-  public void setAddressIds(String addressIds) {
-    this.addressIds = addressIds;
-  }
-
-  /**
-   * 省
-   */
-  public String getProvince() {
-    return province;
-  }
-
-  /**
-   * 省
-   */
-  public void setProvince(String province) {
-    this.province = province;
-  }
-
-  /**
-   * 市
-   */
-  public String getCity() {
-    return city;
-  }
-
-  /**
-   * 市
-   */
-  public void setCity(String city) {
-    this.city = city;
-  }
-
-  /**
-   * 区
-   */
-  public String getArea() {
-    return area;
-  }
-
-  /**
-   * 区
-   */
-  public void setArea(String area) {
-    this.area = area;
-  }
-
-  /**
-   * 详细地址
-   */
-  public String getAddress() {
-    return address;
-  }
-
-  /**
-   * 详细地址
-   */
-  public void setAddress(String address) {
-    this.address = address;
-  }
-
-  /**
-   * 是否删除
-   */
-  public Integer getDeleted() {
-    return deleted;
-  }
-
-  /**
-   * 是否删除
-   */
-  public void setDeleted(Integer deleted) {
-    this.deleted = deleted;
-  }
-
-  public Date getCreatTime() {
-    return creatTime;
-  }
-
-  public void setCreatTime(Date creatTime) {
-    this.creatTime = creatTime;
-  }
-
-  public Date getUpdateTime() {
-    return updateTime;
-  }
-
-  public void setUpdateTime(Date updateTime) {
-    this.updateTime = updateTime;
-  }
-
-  public String toString() {
-    return "PostAddress{id=" + id + 
-      ", name=" + name + 
-      ", mobile=" + mobile + 
-      ", province=" + province + 
-      ", city=" + city + 
-      ", area=" + area + 
-      ", address=" + address + 
-      ", deleted=" + deleted + 
-      ", creatTime=" + creatTime + 
-      ", updateTime=" + updateTime + 
-      "}";
-  }
-}

+ 0 - 17
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/PostAddressRepository.java

@@ -1,17 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Query;
-
-public interface PostAddressRepository extends JpaRepository<PostAddress, Integer>, JpaSpecificationExecutor<PostAddress> {
-
-    /**
-     * 根据主键找到地址
-     *
-     * @param addressId 地址主键ID
-     * @return {@link PostAddress}
-     */
-    @Query(value = "select * from post_address where deleted = 0 and id = ? limit 1;", nativeQuery = true)
-    PostAddress findOneById(int addressId);
-}

+ 0 - 205
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/Shop.java

@@ -1,205 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 商家表
- */
-@Entity
-@Table(name = "shop")
-public class Shop implements Serializable {
-  private static final long serialVersionUID = 1L;
-
-  @Id
-  @Column(name = "id", insertable = false, nullable = false)
-  private Integer id;
-
-  /**
-   * 店铺名称
-   */
-  @Column(name = "name", nullable = false)
-  private String name;
-
-  /**
-   * 联系电话
-   */
-  @Column(name = "mobile")
-  private String mobile;
-
-  /**
-   * 是否营业:0-打烊;1-正常接单
-   */
-  @Column(name = "available", nullable = false)
-  private Integer available = 0;
-
-  /**
-   * 商家地址
-   */
-  @Column(name = "address", nullable = false)
-  private String address;
-
-  /**
-   * 医院 id
-   */
-  @Column(name = "hospital_id", nullable = false)
-  private Integer hospitalId = 12;
-
-  /**
-   * 权重
-   */
-  @Column(name = "weight")
-  private Integer weight = 0;
-
-  @Column(name = "create_time", nullable = false)
-  private Date createTime;
-
-  @Column(name = "update_time", nullable = false)
-  private Date updateTime;
-
-  /**
-   * 删除标识:0-未删除;1-已删除
-   */
-  @Column(name = "deleted", nullable = false)
-  private Integer deleted = 0;
-
-  public Integer getId() {
-    return id;
-  }
-
-  public void setId(Integer id) {
-    this.id = id;
-  }
-
-  /**
-   * 店铺名称
-   */
-  public String getName() {
-    return name;
-  }
-
-  /**
-   * 店铺名称
-   */
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  /**
-   * 联系电话
-   */
-  public String getMobile() {
-    return mobile;
-  }
-
-  /**
-   * 联系电话
-   */
-  public void setMobile(String mobile) {
-    this.mobile = mobile;
-  }
-
-  /**
-   * 是否营业:0-打烊;1-正常接单
-   */
-  public Integer getAvailable() {
-    return available;
-  }
-
-  /**
-   * 是否营业:0-打烊;1-正常接单
-   */
-  public void setAvailable(Integer available) {
-    this.available = available;
-  }
-
-  /**
-   * 商家地址
-   */
-  public String getAddress() {
-    return address;
-  }
-
-  /**
-   * 商家地址
-   */
-  public void setAddress(String address) {
-    this.address = address;
-  }
-
-  /**
-   * 医院 id
-   */
-  public Integer getHospitalId() {
-    return hospitalId;
-  }
-
-  /**
-   * 医院 id
-   */
-  public void setHospitalId(Integer hospitalId) {
-    this.hospitalId = hospitalId;
-  }
-
-  /**
-   * 权重
-   */
-  public Integer getWeight() {
-    return weight;
-  }
-
-  /**
-   * 权重
-   */
-  public void setWeight(Integer weight) {
-    this.weight = weight;
-  }
-
-  public Date getCreateTime() {
-    return createTime;
-  }
-
-  public void setCreateTime(Date createTime) {
-    this.createTime = createTime;
-  }
-
-  public Date getUpdateTime() {
-    return updateTime;
-  }
-
-  public void setUpdateTime(Date updateTime) {
-    this.updateTime = updateTime;
-  }
-
-  /**
-   * 删除标识:0-未删除;1-已删除
-   */
-  public Integer getDeleted() {
-    return deleted;
-  }
-
-  /**
-   * 删除标识:0-未删除;1-已删除
-   */
-  public void setDeleted(Integer deleted) {
-    this.deleted = deleted;
-  }
-
-  public String toString() {
-    return "Shop{id=" + id + 
-      ", name=" + name + 
-      ", mobile=" + mobile + 
-      ", available=" + available + 
-      ", address=" + address + 
-      ", hospitalId=" + hospitalId + 
-      ", weight=" + weight + 
-      ", createTime=" + createTime + 
-      ", updateTime=" + updateTime + 
-      ", deleted=" + deleted + 
-      "}";
-  }
-}

+ 0 - 8
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/ShopRepository.java

@@ -1,8 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-
-public interface ShopRepository extends JpaRepository<Shop, Integer>, JpaSpecificationExecutor<Shop> {
-
-}

+ 0 - 64
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/SysSequence.java

@@ -1,64 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@Entity
-@Table(name = "sys_sequence")
-public class SysSequence implements Serializable {
-  private static final long serialVersionUID = 1L;
-
-  @Id
-  @GeneratedValue(strategy = GenerationType.IDENTITY)
-  @Column(name = "id", insertable = false, nullable = false)
-  private Integer id;
-
-  @Column(name = "flag_name")
-  private String flagName;
-
-  @Column(name = "value")
-  private Integer value;
-
-  @Column(name = "step")
-  private Integer step = 1;
-
-  public Integer getId() {
-    return id;
-  }
-
-  public void setId(Integer id) {
-    this.id = id;
-  }
-
-  public String getFlagName() {
-    return flagName;
-  }
-
-  public void setFlagName(String flagName) {
-    this.flagName = flagName;
-  }
-
-  public Integer getValue() {
-    return value;
-  }
-
-  public void setValue(Integer value) {
-    this.value = value;
-  }
-
-  public Integer getStep() {
-    return step;
-  }
-
-  public void setStep(Integer step) {
-    this.step = step;
-  }
-
-  public String toString() {
-    return "SysSequence{id=" + id + 
-      ", flagName=" + flagName + 
-      ", value=" + value + 
-      ", step=" + step + 
-      "}";
-  }
-}

+ 0 - 8
ywt-platform-outpatient-sdk/src/main/java/com/ywt/outpatient/domain/entity/glasses/SysSequenceRepository.java

@@ -1,8 +0,0 @@
-package com.ywt.outpatient.domain.entity.glasses;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-
-public interface SysSequenceRepository extends JpaRepository<SysSequence, Integer>, JpaSpecificationExecutor<SysSequence> {
-
-}