Преглед изворни кода

Merge remote-tracking branch 'origin/master'

wuzhiqiang пре 5 година
родитељ
комит
9589ffe232

+ 19 - 17
src/main/java/com/yc/education/controller/ProviderSearchController.java

@@ -313,7 +313,7 @@ public class ProviderSearchController extends BaseController {
 
             // 生成小程序二维码
 
-
+            //个人信息 查询 展示
             // lc 2019.9.20 店铺是否认证
             UserInfo userinfo = getUserInfo(token);
             Provider providerInfo = providerMapper.getProviderByUserId(userinfo.getId(), null);
@@ -357,7 +357,7 @@ public class ProviderSearchController extends BaseController {
             if (myCollection != null) {
                 pVo.setIsCollection("1");
             }
-
+            //个人信息 查询 展示 --  end
             //商家信息
             Provider provider = providerMapper.selectByPrimaryKey(StoreId);
 
@@ -455,21 +455,23 @@ public class ProviderSearchController extends BaseController {
                 }
             } else {
                 // 经销商
-                String paramType = providerInfo.getParamType();
-                if (StringUtils.isNotBlank(paramType)) {
-                    Long storeId = provider.getId();
-                    List<Product> productListType = iProductService.getListByGroupsName(storeId);
-                    if (CollectionUtils.isNotEmpty(productListType)) {
-                        Product product = new Product();
-                        product.setName("全部");
-                        product.setfName("全部");
-                        product.setsName("全部");
-                        productListType.add(0, product);
-                        pVo.setServieItemType(productListType.toArray());
-                    }
-                    List<Product> productList = iProductService.getListByfNamedAndsName(storeId, null, null);
-                    if (CollectionUtils.isNotEmpty(productList)) {
-                        pVo.setServiceItemDetail(productList.toArray());
+                if(provider != null){
+                    String paramType = provider.getParamType();
+                    if (StringUtils.isNotBlank(paramType)) {
+                        Long storeId = provider.getId();
+                        List<Product> productListType = iProductService.getListByGroupsName(storeId);
+                        if (CollectionUtils.isNotEmpty(productListType)) {
+                            Product product = new Product();
+                            product.setName("全部");
+                            product.setfName("全部");
+                            product.setsName("全部");
+                            productListType.add(0, product);
+                            pVo.setServieItemType(productListType.toArray());
+                        }
+                        List<Product> productList = iProductService.getListByfNamedAndsName(storeId, null, null);
+                        if (CollectionUtils.isNotEmpty(productList)) {
+                            pVo.setServiceItemDetail(productList.toArray());
+                        }
                     }
                 }
             }

+ 32 - 4
src/main/java/com/yc/education/model/Provider.java

@@ -251,14 +251,14 @@ public class Provider implements Serializable {
      * 在线状态 (0下线  1 在线)
      */
     @Column(name = "is_line")
-     private String isLine;
+    private String isLine;
 
     /*                            添加字段        wzq  2019/10/15                          */
     /**
      * 五个大类型(维修保养,美容洗车,4s店deng)
      */
     @Column(name = "five_type")
-    private  String fiveType;
+    private String fiveType;
     /**
      * 维修
      */
@@ -290,13 +290,13 @@ public class Provider implements Serializable {
     /**
      * 企业类型
      */
-    @Column(name="company_type")
+    @Column(name = "company_type")
     private String companyType;
 
     /**
      * 主营品牌
      */
-    @Column(name="main_brand")
+    @Column(name = "main_brand")
     private String mainBrand;
     /**
      * 经营资质
@@ -306,6 +306,18 @@ public class Provider implements Serializable {
      * 经营范围
      */
     private String scale;
+
+
+    /**
+     * 是否是导入数据(0否,1是)
+     */
+    private String isImport;
+
+    /**
+     * 导入父类  主营信息
+     */
+    private String pMainBusiness;
+
     /**
      * 获取主键id
      *
@@ -1095,4 +1107,20 @@ public class Provider implements Serializable {
     public void setScale(String scale) {
         this.scale = scale;
     }
+
+    public String getIsImport() {
+        return isImport;
+    }
+
+    public void setIsImport(String isImport) {
+        this.isImport = isImport;
+    }
+
+    public String getpMainBusiness() {
+        return pMainBusiness;
+    }
+
+    public void setpMainBusiness(String pMainBusiness) {
+        this.pMainBusiness = pMainBusiness;
+    }
 }

+ 20 - 17
src/main/resources/mapper/ProviderMapper.xml

@@ -44,17 +44,20 @@
         <result column="is_use" property="isUse" jdbcType="CHAR"/> <!--店铺状态-->
         <result column="is_line" property="isLine" jdbcType="CHAR"/> <!--在线状态-->
         <!--新增  2019、10、15-->
-        <result column="five_type" property="fiveType" jdbcType="VARCHAR" />
-        <result column="repair" property="repair" jdbcType="VARCHAR" />
-        <result column="maintain" property="maintain" jdbcType="VARCHAR" />
-        <result column="consmetology" property="consmetology" jdbcType="VARCHAR" />
-        <result column="wash_car" property="washCar" jdbcType="VARCHAR" />
-        <result column="refit" property="refit" jdbcType="VARCHAR" />
-        <result column="road_rescue" property="roadRescue" jdbcType="VARCHAR" />
-        <result column="company_type" property="companyType" jdbcType="VARCHAR" />
-        <result column="intelligence" property="intelligence" jdbcType="VARCHAR" />
-        <result column="scale" property="scale" jdbcType="VARCHAR" />
-        <result column="main_brand" property="mainBrand" jdbcType="VARCHAR" />
+        <result column="five_type" property="fiveType" jdbcType="VARCHAR"/>
+        <result column="repair" property="repair" jdbcType="VARCHAR"/>
+        <result column="maintain" property="maintain" jdbcType="VARCHAR"/>
+        <result column="consmetology" property="consmetology" jdbcType="VARCHAR"/>
+        <result column="wash_car" property="washCar" jdbcType="VARCHAR"/>
+        <result column="refit" property="refit" jdbcType="VARCHAR"/>
+        <result column="road_rescue" property="roadRescue" jdbcType="VARCHAR"/>
+        <result column="company_type" property="companyType" jdbcType="VARCHAR"/>
+        <result column="intelligence" property="intelligence" jdbcType="VARCHAR"/>
+        <result column="scale" property="scale" jdbcType="VARCHAR"/>
+        <result column="main_brand" property="mainBrand" jdbcType="VARCHAR"/>
+
+        <result column="is_import" property="isImport" jdbcType="VARCHAR"/>
+        <result column="p_main_business" property="pMainBusiness" jdbcType="VARCHAR"/>
 
     </resultMap>
 
@@ -107,7 +110,7 @@
         </where>
 
     </select>
-<!--查询所有商家信息-->
+    <!--查询所有商家信息-->
     <select id="listAllBusinessInfo" resultMap="BaseResultMap">
         select * from provider
         <where>
@@ -118,19 +121,19 @@
                 and city = #{city}
             </if>
             <if test="district != null and '' !=district">
-               and  district = #{district}
+                and district = #{district}
             </if>
             <if test="role != null and '' !=role">
-                and  role_type = #{role}
+                and role_type = #{role}
             </if>
             <if test="name != null and '' !=name">
-                and  `name` like concat ('%',#{name},'%')
+                and `name` like concat ('%',#{name},'%')
             </if>
             <if test="id != null and '' !=id">
-                and  id = #{id}
+                and id = #{id}
             </if>
             <if test="phone != null and '' !=phone">
-                and  auth_phone = #{phone}
+                and auth_phone = #{phone}
             </if>
         </where>
         order by status desc,enter_date desc