ccj 3 years ago
parent
commit
04fbfb66a3

+ 1 - 1
winsea-haixin-platform-backend/src/main/resources/application-prod.yml

@@ -22,7 +22,7 @@ spring:
     timeout: 200
   servlet:
     multipart:
-      max-file-size: 15MB
+      max-file-size: 50MB
       max-request-size: 120MB
 
 auth:

+ 5 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/SettledCompanyInfo.java

@@ -177,7 +177,11 @@ public class SettledCompanyInfo extends BaseModel<SettledCompanyInfo> {
      */
     @TableField(exist = false)
     private String userName;
-
+    /**
+     * 定位地点(城市)
+     */
+    @TableField(exist = false)
+    private String location;
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SettledCompanyInfoServiceImpl.java

@@ -149,6 +149,7 @@ public class SettledCompanyInfoServiceImpl extends ServiceImpl<SettledCompanyInf
         pageView.put("searchType", settledCompanyInfo.getSearchType());
         pageView.put("pageSize", settledCompanyInfo.getPageSize());
         pageView.put("currentPage", settledCompanyInfo.getCurrentPage());
+        pageView.put("location", settledCompanyInfo.getLocation());
         // 查询总数
         Integer dataCount = baseMapper.getCountByCondition(pageView);
         List<SettledCompanyInfo> dataList = baseMapper.getListByCondition(pageView);

+ 2 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/IdentityAuthenticationInfoMapper.xml

@@ -18,7 +18,8 @@
         a.cover ,
         a.customer_number_card as customerNumberCard,
         a.payee_address_url as payeeAddressUrl,
-        a.card_address_url as cardAddressUrl
+        a.card_address_url as cardAddressUrl,
+        a.comp_id as compId
         FROM identity_authentication_info a
         left join
         common_company_identity b

+ 23 - 12
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/SettledCompanyInfoMapper.xml

@@ -55,25 +55,32 @@
     <select id="getListByCondition" parameterType="Map"
             resultType="com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyInfo">
         SELECT
+        *
+        FROM
+        (
+        SELECT
         id,
-        comp_name as compName,
-        create_phone as createPhone,
-        main_business_type as mainBusinessType,
+        comp_name AS compName,
+        create_phone AS createPhone,
+        main_business_type AS mainBusinessType,
         title,
-        company_profile as companyProfile,
+        company_profile AS companyProfile,
         longitude,
         latitude,
         province,
         city,
         area,
-        detailed_address as detailedAddress,
-        attachment_address as attachmentAddress,
-        status,
-        status_flag as statusFlag,
-        show_flag as showFlag,
-        update_date as updateDate
-        FROM settled_company_info
-        WHERE delete_flag = '0'
+        detailed_address AS detailedAddress,
+        attachment_address AS attachmentAddress,
+        STATUS,
+        status_flag AS statusFlag,
+        show_flag AS showFlag,
+        update_date AS updateDate,
+        case when city like CONCAT('%',#{location},'%')) then 1 else 0 end AS flag
+        FROM
+        settled_company_info a
+        WHERE
+        delete_flag = '0'
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(comp_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(create_phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
@@ -114,9 +121,13 @@
             AND (lower(main_business_type) like lower(CONCAT('%',#{mainBusinessType},'%')))
         </if>
         ORDER BY status_flag asc , update_date DESC
+        ) b
+        ORDER BY
+        b.flag desc
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
         </if>
+
     </select>