张延森 3 anos atrás
pai
commit
b7bb6b7da7

+ 1
- 1
pom.xml Ver arquivo

@@ -10,7 +10,7 @@
10 10
 	</parent>
11 11
 	<groupId>com.yunzhi</groupId>
12 12
 	<artifactId>marketing</artifactId>
13
-	<version>v1.0.9</version>
13
+	<version>v1.0.12</version>
14 14
 	<name>marketing-cloud</name>
15 15
 	<description>新联康营销云</description>
16 16
 

+ 7
- 6
src/main/java/com/yunzhi/marketing/service/impl/TaBuildingServiceImpl.java Ver arquivo

@@ -621,13 +621,14 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
621 621
             tdCityMapper.updateById(city);
622 622
         }
623 623
 
624
+        // 新联康不需要这个逻辑了
624 625
         //新建项目以后自动授权给当前用户
625
-        TaUser taUser = taUserMapper.selectById(userId);
626
-        TaPersonBuilding taPersonBuilding = new TaPersonBuilding();
627
-        taPersonBuilding.setBuildingId(building.getBuildingId());
628
-        taPersonBuilding.setUserId(taUser.getUserId());
629
-        taPersonBuilding.setCreateDate(LocalDateTime.now());
630
-        taPersonBuildingMapper.insert(taPersonBuilding);
626
+//        TaUser taUser = taUserMapper.selectById(userId);
627
+//        TaPersonBuilding taPersonBuilding = new TaPersonBuilding();
628
+//        taPersonBuilding.setBuildingId(building.getBuildingId());
629
+//        taPersonBuilding.setUserId(taUser.getUserId());
630
+//        taPersonBuilding.setCreateDate(LocalDateTime.now());
631
+//        taPersonBuildingMapper.insert(taPersonBuilding);
631 632
 
632 633
         // 项目主图
633 634
         String imgStr = object.getString("img");

+ 8
- 1
src/main/java/com/yunzhi/marketing/xlk/controller/BrandController.java Ver arquivo

@@ -29,7 +29,9 @@ import org.springframework.web.bind.annotation.RestController;
29 29
 
30 30
 import javax.servlet.http.HttpServletRequest;
31 31
 import java.time.LocalDateTime;
32
+import java.util.HashMap;
32 33
 import java.util.List;
34
+import java.util.Map;
33 35
 
34 36
 /**
35 37
  * <p>
@@ -93,7 +95,12 @@ public class BrandController extends BaseController {
93 95
     public ResponseBean wxBrandList(@RequestParam(value ="brandName",required = false) String brandName,
94 96
                                   @RequestParam(value ="cityId",required = false) Integer cityId,
95 97
                                   @RequestHeader("authorization") String token,HttpServletRequest request){
96
-        return iBrandService.getWxBrandList(cityId,brandName,getOrgId(request));
98
+        List<Brand> brandList = iBrandService.getWxBrandList(cityId, brandName, getOrgId(request));
99
+
100
+        Map<String, Object> result = new HashMap<>();
101
+        result.put("records", brandList);
102
+
103
+        return ResponseBean.success(result);
97 104
     }
98 105
 
99 106
     /**

+ 3
- 1
src/main/java/com/yunzhi/marketing/xlk/mapper/BrandMapper.java Ver arquivo

@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6 6
 import org.apache.ibatis.annotations.Mapper;
7 7
 import org.apache.ibatis.annotations.Param;
8 8
 
9
+import java.util.List;
10
+
9 11
 /**
10 12
  * <p>
11 13
  * 品牌开发商表  Mapper 接口
@@ -23,5 +25,5 @@ public interface BrandMapper extends BaseMapper<Brand> {
23 25
      * @param brandName
24 26
      * @return
25 27
      */
26
-    ResponseBean getWxBrandList(Integer cityId, String brandName,Integer orgId);
28
+    List<Brand> getWxBrandList(Integer cityId, String brandName, Integer orgId);
27 29
 }

+ 3
- 1
src/main/java/com/yunzhi/marketing/xlk/service/IBrandService.java Ver arquivo

@@ -4,6 +4,8 @@ import com.yunzhi.marketing.base.ResponseBean;
4 4
 import com.yunzhi.marketing.xlk.entity.Brand;
5 5
 import com.baomidou.mybatisplus.extension.service.IService;
6 6
 
7
+import java.util.List;
8
+
7 9
 /**
8 10
  * <p>
9 11
  * 品牌开发商表  服务类
@@ -20,5 +22,5 @@ public interface IBrandService extends IService<Brand> {
20 22
      * @param brandName
21 23
      * @return
22 24
      */
23
-    ResponseBean getWxBrandList(Integer cityId, String brandName, Integer orgId);
25
+    List<Brand> getWxBrandList(Integer cityId, String brandName, Integer orgId);
24 26
 }

+ 4
- 2
src/main/java/com/yunzhi/marketing/xlk/service/impl/BrandServiceImpl.java Ver arquivo

@@ -7,6 +7,8 @@ import com.yunzhi.marketing.xlk.service.IBrandService;
7 7
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
8 8
 import org.springframework.stereotype.Service;
9 9
 
10
+import java.util.List;
11
+
10 12
 /**
11 13
  * <p>
12 14
  * 品牌开发商表  服务实现类
@@ -26,7 +28,7 @@ public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements
26 28
      * @return
27 29
      */
28 30
     @Override
29
-    public ResponseBean getWxBrandList(Integer cityId, String brandName,Integer orgId) {
30
-        return this.baseMapper.getWxBrandList(cityId, brandName,orgId);
31
+    public List<Brand> getWxBrandList(Integer cityId, String brandName,Integer orgId) {
32
+        return this.baseMapper.getWxBrandList(cityId, brandName, orgId);
31 33
     }
32 34
 }

+ 1
- 1
src/main/resources/application-prod.yml Ver arquivo

@@ -6,7 +6,7 @@ spring:
6 6
   datasource:
7 7
     username: marketing
8 8
     password: u@cSFJ5*kS9hGP7a
9
-    url: jdbc:mysql://localhost:3306/marketing-cloud?useUnicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true&zeroDateTimeBehavior=convertToNull
9
+    url: jdbc:mysql://210.13.107.60:3306/marketing-cloud?useUnicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true&zeroDateTimeBehavior=convertToNull
10 10
     driver-class-name: com.mysql.cj.jdbc.Driver
11 11
     initial-size: 10 # 初始化连接数
12 12
     max-active: 20 # 最大连接数

+ 1
- 1
src/main/resources/application.yml Ver arquivo

@@ -28,7 +28,7 @@ ali:
28 28
   oss:
29 29
     endpoint: oss-cn-shanghai.aliyuncs.com
30 30
     bucketName: xlk-assets
31
-    bucketURL: https://xlk-assets.oss-accelerate.aliyuncs.com
31
+    bucketURL: https://xlk-assets.oss-cn-shanghai.aliyuncs.com
32 32
 
33 33
 # file path
34 34
 file:

+ 2
- 2
src/main/resources/mapper/xlk/BrandMapper.xml Ver arquivo

@@ -2,7 +2,7 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.yunzhi.marketing.xlk.mapper.BrandMapper">
4 4
 
5
-    <select id="getWxBrandList" resultType="com.yunzhi.marketing.base.ResponseBean">
5
+    <select id="getWxBrandList" resultType="com.yunzhi.marketing.xlk.entity.Brand">
6 6
         SELECT
7 7
             b.*
8 8
         FROM
@@ -15,7 +15,7 @@
15 15
                 ta_building t
16 16
             WHERE
17 17
                 t.org_id = #{orgId}
18
-            <if test="cityId != null and cityId != ''">
18
+            <if test="cityId != null">
19 19
                 AND t.city_id = #{cityId}
20 20
             </if>
21 21
             GROUP BY