浏览代码

mysql、redis配置修改;轮播图修改;pc商家修改

wwl 4 年之前
父节点
当前提交
1dcda910d4
共有 17 个文件被更改,包括 254 次插入31 次删除
  1. 41 0
      zzjs-admin/src/main/java/com/miaxis/app/controller/carousel/AppletCarouselChartInfoController.java
  2. 0 1
      zzjs-admin/src/main/java/com/miaxis/app/controller/product/AppletProductTypeInfoController.java
  3. 14 4
      zzjs-admin/src/main/java/com/miaxis/pc/controller/carousel/CarouselChartInfoController.java
  4. 3 14
      zzjs-admin/src/main/java/com/miaxis/pc/controller/customer/CustomerInfoController.java
  5. 4 2
      zzjs-admin/src/main/resources/application-dev.yml
  6. 4 4
      zzjs-admin/src/main/resources/application-prod.yml
  7. 5 0
      zzjs-common/src/main/java/com/miaxis/common/constant/Constants.java
  8. 8 0
      zzjs-service/src/main/java/com/miaxis/carousel/domain/CarouselChartInfo.java
  9. 23 0
      zzjs-service/src/main/java/com/miaxis/carousel/service/ICarouselChartInfoService.java
  10. 94 0
      zzjs-service/src/main/java/com/miaxis/carousel/service/impl/CarouselChartInfoServiceImpl.java
  11. 9 0
      zzjs-service/src/main/java/com/miaxis/carousel/vo/CarouselChartInfoVo.java
  12. 1 1
      zzjs-service/src/main/java/com/miaxis/customer/mapper/CustomerInfoMapper.java
  13. 1 1
      zzjs-service/src/main/java/com/miaxis/customer/service/ICustomerInfoService.java
  14. 1 1
      zzjs-service/src/main/java/com/miaxis/customer/service/impl/CustomerInfoServiceImpl.java
  15. 3 0
      zzjs-service/src/main/java/com/miaxis/customer/vo/CustomerInfoVo.java
  16. 6 1
      zzjs-service/src/main/resources/mapper/carousel/CarouselChartInfoMapper.xml
  17. 37 2
      zzjs-service/src/main/resources/mapper/customer/CustomerInfoMapper.xml

+ 41 - 0
zzjs-admin/src/main/java/com/miaxis/app/controller/carousel/AppletCarouselChartInfoController.java

@@ -0,0 +1,41 @@
+package com.miaxis.app.controller.carousel;
+
+import com.miaxis.carousel.service.ICarouselChartInfoService;
+import com.miaxis.carousel.vo.CarouselChartInfoVo;
+import com.miaxis.common.constant.Constants;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.core.page.ResponsePageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 【小程序-轮播图】Controller
+ * @author wwl
+ * @version 1.0
+ * @date 2021/4/16 16:13
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping(Constants.STUDENT_PREFIX+"/applet/carousel")
+@Api(tags = {"【小程序-轮播图】"})
+public class AppletCarouselChartInfoController extends BaseController {
+
+    private final ICarouselChartInfoService carouselChartInfoService;
+
+    /**
+     * 查询轮播图列表
+     */
+    @GetMapping(value = "/getCarouselChartList")
+    @ApiOperation("查询轮播图列表")
+    public ResponsePageInfo<CarouselChartInfoVo> getCarouselChartList() {
+        List<CarouselChartInfoVo> list = carouselChartInfoService.getCarouselChartList();
+        return toResponsePageInfo(list);
+    }
+
+}

+ 0 - 1
zzjs-admin/src/main/java/com/miaxis/app/controller/product/AppletProductTypeInfoController.java

@@ -35,7 +35,6 @@ public class AppletProductTypeInfoController extends BaseController{
     @GetMapping("/list")
     @ApiOperation("查询品类列表")
     public ResponsePageInfo<AppletProductTypeInfoVo> list(){
-        startPage();
         List<AppletProductTypeInfoVo> list = productTypeInfoService.selectAppletProductTypeInfoList();
         return toResponsePageInfo(list);
     }

+ 14 - 4
zzjs-admin/src/main/java/com/miaxis/pc/controller/carousel/CarouselChartInfoController.java

@@ -14,7 +14,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * 【轮播图】Controller
@@ -54,9 +53,20 @@ public class CarouselChartInfoController extends BaseController{
     @Log(title = "轮播图", businessType = BusinessTypeEnum.INSERT)
     @PostMapping
     @ApiOperation("新增轮播图")
-    public Response<Integer> add(@RequestBody List<CarouselChartInfo> carouselChartInfo){
-        List<CarouselChartInfo> collect = carouselChartInfo.stream().filter(c -> c.getId() == null).collect(Collectors.toList());
-        return toResponse(carouselChartInfoService.saveBatch(collect) ? 1 : 0);
+    public Response add(@RequestBody CarouselChartInfo carouselChartInfo){
+
+        return carouselChartInfoService.saveCarouselChartInfo(carouselChartInfo);
+    }
+
+    /**
+     * 修改轮播图
+     */
+    @PreAuthorize("@ss.hasPermi('carousel:carousel:edit')")
+    @Log(title = "轮播图", businessType = BusinessTypeEnum.UPDATE)
+    @PutMapping
+    @ApiOperation("修改轮播图")
+    public Response<Integer> edit(@RequestBody CarouselChartInfo carouselChartInfo) {
+        return carouselChartInfoService.updateCarouselChartInfoById(carouselChartInfo);
     }
 
 

+ 3 - 14
zzjs-admin/src/main/java/com/miaxis/pc/controller/customer/CustomerInfoController.java

@@ -9,6 +9,7 @@ import com.miaxis.common.utils.poi.ExcelUtil;
 import com.miaxis.customer.domain.CustomerInfo;
 import com.miaxis.customer.service.ICustomerInfoService;
 import com.miaxis.customer.vo.CustomerInfoVo;
+import com.miaxis.customer.vo.ExhibitionCustomerInfoVo;
 import io.swagger.annotations.*;
 import lombok.RequiredArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -41,24 +42,12 @@ public class CustomerInfoController extends BaseController {
             @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
             @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
     })
-    public ResponsePageInfo<CustomerInfo> list(@ModelAttribute CustomerInfo customerInfo) {
+    public ResponsePageInfo<CustomerInfoVo> list(@ModelAttribute CustomerInfo customerInfo) {
         startPage();
-        List<CustomerInfo> list = customerInfoService.selectCustomerInfoList(customerInfo);
+        List<CustomerInfoVo> list = customerInfoService.selectCustomerInfoList(customerInfo);
         return toResponsePageInfo(list);
     }
 
-    /**
-     * 导出客户信息列表
-     */
-    @PreAuthorize("@ss.hasPermi('customer:customer:export')")
-    @Log(title = "客户信息", businessType = BusinessTypeEnum.EXPORT)
-    @GetMapping("/export")
-    @ApiOperation("导出客户信息列表Excel")
-    public Response<String> export(@ModelAttribute CustomerInfo customerInfo) {
-        List<CustomerInfo> list = customerInfoService.selectCustomerInfoList(customerInfo);
-        ExcelUtil<CustomerInfo> util = new ExcelUtil<CustomerInfo>(CustomerInfo.class);
-        return util.exportExcel(list, "customer");
-    }
 
     /**
      * 获取客户信息详细信息

+ 4 - 2
zzjs-admin/src/main/resources/application-dev.yml

@@ -58,11 +58,11 @@ spring:
     # redis 配置
     redis:
         # 地址
-        host: 192.168.8.213
+        host: 1.15.29.64
         # 端口,默认为6379
         port: 6379
         # 密码
-        password:
+        password: miaxis110
         # 连接超时时间
         timeout: 10s
         lettuce:
@@ -75,3 +75,5 @@ spring:
                 max-active: 8
                 # #连接池最大阻塞等待时间(使用负值表示没有限制)
                 max-wait: -1ms
+        # Redis数据库索引(默认为0)
+        database: 3

+ 4 - 4
zzjs-admin/src/main/resources/application-prod.yml

@@ -6,9 +6,9 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://47.96.83.13:3306/zzjs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
+                url: jdbc:mysql://sh-cdb-2y9n2832.sql.tencentcdb.com:60123/zzjs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
                 username: root
-                password: miaxis110
+                password: Miaxis@2020
             # 从库数据源
             newgzpt:
                 # 从数据源开关/默认关闭
@@ -58,11 +58,11 @@ spring:
     # redis 配置
     redis:
         # 地址
-        host: 47.96.83.13
+        host: 1.15.29.64
         # 端口,默认为6379
         port: 6379
         # 密码
-        password:
+        password: miaxis110
         # 连接超时时间
         timeout: 10s
         lettuce:

+ 5 - 0
zzjs-common/src/main/java/com/miaxis/common/constant/Constants.java

@@ -137,6 +137,11 @@ public class Constants
      */
     public static final String BROWSE_RECORD_KEY = "browse_record:";
 
+    /**
+     * 轮播图 cache key
+     */
+    public static final String CAROUSEL_CHART_KEY = "carousel_chart:";
+
     /**
      * 资源映射路径 前缀
      */

+ 8 - 0
zzjs-service/src/main/java/com/miaxis/carousel/domain/CarouselChartInfo.java

@@ -39,6 +39,14 @@ public class CarouselChartInfo extends BaseBusinessEntity{
     @ApiModelProperty(value = "图片id--对应file_info的id")
     private Long fileId;
 
+    @TableField("jump_url")
+    @ApiModelProperty(value = "跳转url")
+    private String jumpUrl;
+
+    @TableField("jump_url_type")
+    @ApiModelProperty(value = "跳转url类型  goMiniApp:小程序 、goPage:小程序页面、goWebView: h5")
+    private String jumpUrlType;
+
     /** 状态  0:有效(默认)、1:失效 (伪删除) */
     @Excel(name = "状态  0:有效(默认)、1:失效 (伪删除)", readConverterExp = "伪=删除")
     @TableField("status")

+ 23 - 0
zzjs-service/src/main/java/com/miaxis/carousel/service/ICarouselChartInfoService.java

@@ -13,6 +13,7 @@ import com.miaxis.common.core.domain.Response;
  * @date 2021-03-11
  */
 public interface ICarouselChartInfoService extends IService<CarouselChartInfo>{
+
     /**
      * 查询轮播图列表
      *
@@ -21,10 +22,32 @@ public interface ICarouselChartInfoService extends IService<CarouselChartInfo>{
      */
     List<CarouselChartInfoVo> selectCarouselChartInfoList(CarouselChartInfo carouselChartInfo);
 
+    /**
+     * 新增轮播图
+     * @param carouselChartInfo
+     * @return
+     */
+    Response saveCarouselChartInfo(CarouselChartInfo carouselChartInfo);
+
+    /**
+     * 修改轮播图
+     * @param carouselChartInfo
+     * @return
+     */
+    Response<Integer> updateCarouselChartInfoById(CarouselChartInfo carouselChartInfo);
+
     /**
      * 删除轮播图(伪删除)
      * @param ids
      * @return
      */
     Response<Integer> removeCarouselByIds(Long[] ids);
+
+    /**
+     * applet
+     * 获取轮播图列表
+     * @return
+     */
+    List<CarouselChartInfoVo> getCarouselChartList();
+
 }

+ 94 - 0
zzjs-service/src/main/java/com/miaxis/carousel/service/impl/CarouselChartInfoServiceImpl.java

@@ -1,18 +1,27 @@
 package com.miaxis.carousel.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.miaxis.carousel.domain.CarouselChartInfo;
 import com.miaxis.carousel.mapper.CarouselChartInfoMapper;
 import com.miaxis.carousel.service.ICarouselChartInfoService;
 import com.miaxis.carousel.vo.CarouselChartInfoVo;
+import com.miaxis.common.constant.Constants;
 import com.miaxis.common.core.domain.Response;
+import com.miaxis.common.exception.CustomException;
+import com.miaxis.common.utils.bean.BeanUtils;
+import com.miaxis.file.domain.FileInfo;
+import com.miaxis.file.service.IFileInfoService;
 import lombok.RequiredArgsConstructor;
 import lombok.SneakyThrows;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Set;
 
 /**
  * 轮播图Service业务层处理
@@ -26,6 +35,10 @@ public class CarouselChartInfoServiceImpl extends ServiceImpl<CarouselChartInfoM
 
     private final CarouselChartInfoMapper carouselChartInfoMapper;
 
+    private final RedisTemplate redisTemplate;
+
+    private final IFileInfoService fileInfoService;
+
     /**
      * 查询轮播图列表
      *
@@ -37,6 +50,44 @@ public class CarouselChartInfoServiceImpl extends ServiceImpl<CarouselChartInfoM
         return carouselChartInfoMapper.selectCarouselChartInfoList(carouselChartInfo);
     }
 
+    /**
+     * 新增轮播图
+     * @param carouselChartInfo
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Response saveCarouselChartInfo(CarouselChartInfo carouselChartInfo) {
+        try{
+            CarouselChartInfo chartInfo = new CarouselChartInfo();
+            BeanUtils.copyProperties(carouselChartInfo,chartInfo);
+            carouselChartInfoMapper.insert(chartInfo);
+            //更新缓存
+            updateCarouselChartRedis(chartInfo);
+            return Response.success();
+        }catch (Exception e){
+            throw new CustomException("系统异常");
+        }
+    }
+
+    /**
+     * 修改轮播图
+     * @param carouselChartInfo
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Response<Integer> updateCarouselChartInfoById(CarouselChartInfo carouselChartInfo) {
+        try {
+            carouselChartInfoMapper.updateById(carouselChartInfo);
+            //更新缓存
+            updateCarouselChartRedis(carouselChartInfo);
+            return Response.success();
+        }catch (Exception e){
+            throw new CustomException("系统异常");
+        }
+    }
+
     /**
      * 删除轮播图(伪删除)
      * @param ids
@@ -48,8 +99,51 @@ public class CarouselChartInfoServiceImpl extends ServiceImpl<CarouselChartInfoM
     public Response removeCarouselByIds(Long[] ids) {
         for (Long id : ids) {
             this.update(new UpdateWrapper<CarouselChartInfo>().set("status",1).eq("id",id));
+            //删除缓存
+            redisTemplate.delete(Constants.CAROUSEL_CHART_KEY + id);
         }
         return Response.success();
     }
 
+
+    /**
+     * applet
+     * 获取轮播图列表
+     * @return
+     */
+    @Override
+    public List<CarouselChartInfoVo> getCarouselChartList() {
+        List<CarouselChartInfoVo> infoVos = new ArrayList<>();
+        //从缓存获取
+        Set keys = redisTemplate.keys(Constants.CAROUSEL_CHART_KEY + "*");
+        if (!keys.isEmpty()){
+            for (Object key : keys) {
+                String jsonStr = (String) redisTemplate.opsForValue().get(key);
+                CarouselChartInfoVo carouselChartInfoVo = JSONObject.parseObject(jsonStr).toJavaObject(CarouselChartInfoVo.class);
+                infoVos.add(carouselChartInfoVo);
+            }
+        }else {
+        //数据库获取(此处可不做查询,防止缓存挂掉)
+        CarouselChartInfo carouselChartInfo = new CarouselChartInfo();
+        carouselChartInfo.setStatus(0);//启用状态
+        infoVos = carouselChartInfoMapper.selectCarouselChartInfoList(carouselChartInfo);
+        }
+        return infoVos;
+    }
+
+
+    /**
+     * 更新轮播图缓存
+     * @param carouselChartInfo
+     */
+    private void updateCarouselChartRedis(CarouselChartInfo carouselChartInfo){
+        //更新缓存
+        FileInfo fileInfo = fileInfoService.getById(carouselChartInfo.getFileId());
+        JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(carouselChartInfo));
+        jsonObject.put("fileUrl",fileInfo.getFileUrl());
+        //同时更新缓存
+        redisTemplate.opsForValue().set(Constants.CAROUSEL_CHART_KEY + carouselChartInfo.getId(),JSONObject.toJSONString(jsonObject));
+    }
+
+
 }

+ 9 - 0
zzjs-service/src/main/java/com/miaxis/carousel/vo/CarouselChartInfoVo.java

@@ -28,10 +28,19 @@ public class CarouselChartInfoVo{
     @ApiModelProperty(value = "图片名称")
     private String pictureName;
 
+    @ApiModelProperty(value = "图片id")
+    private String fileId;
+
     /** 图片id--对应file_info的id */
     @ApiModelProperty(value = "图片访问地址")
     private String fileUrl;
 
+    @ApiModelProperty(value = "跳转url")
+    private String jumpUrl;
+
+    @ApiModelProperty(value = "跳转url类型  goMiniApp:小程序 、goPage:小程序页面 、goWebView: h5")
+    private String jumpUrlType;
+
     /** 状态  0:有效(默认)、1:失效 (伪删除) */
     @ApiModelProperty(value = "状态  0:有效(默认)、1:失效 (伪删除)")
     private Integer status;

+ 1 - 1
zzjs-service/src/main/java/com/miaxis/customer/mapper/CustomerInfoMapper.java

@@ -24,7 +24,7 @@ public interface CustomerInfoMapper extends BaseMapper<CustomerInfo> {
      * @param customerInfo 客户信息
      * @return 客户信息集合
      */
-    List<CustomerInfo> selectCustomerInfoList(CustomerInfo customerInfo);
+    List<CustomerInfoVo> selectCustomerInfoList(CustomerInfo customerInfo);
 
     /**
      * 获取客户信息详细信息

+ 1 - 1
zzjs-service/src/main/java/com/miaxis/customer/service/ICustomerInfoService.java

@@ -22,7 +22,7 @@ public interface ICustomerInfoService extends IService<CustomerInfo>{
      * @param customerInfo 客户信息
      * @return 客户信息集合
      */
-    List<CustomerInfo> selectCustomerInfoList(CustomerInfo customerInfo);
+    List<CustomerInfoVo> selectCustomerInfoList(CustomerInfo customerInfo);
 
     /**
      * 更新 0:上架 / 1:下架

+ 1 - 1
zzjs-service/src/main/java/com/miaxis/customer/service/impl/CustomerInfoServiceImpl.java

@@ -44,7 +44,7 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
      * @return 客户信息
      */
     @Override
-    public List<CustomerInfo> selectCustomerInfoList(CustomerInfo customerInfo){
+    public List<CustomerInfoVo> selectCustomerInfoList(CustomerInfo customerInfo){
         return customerInfoMapper.selectCustomerInfoList(customerInfo);
     }
 

+ 3 - 0
zzjs-service/src/main/java/com/miaxis/customer/vo/CustomerInfoVo.java

@@ -127,6 +127,9 @@ public class CustomerInfoVo extends BaseBusinessEntity{
     @ApiModelProperty(value = "上架状态  0:已上架、1:未上架")
     private Integer shelfStatus;
 
+    @ApiModelProperty(value = "收藏数量")
+    private Integer collectionCount;
+
     @TableField("status")
     @ApiModelProperty(value = "状态  0:有效(默认)、1:失效 (伪删除)")
     private Integer status;

+ 6 - 1
zzjs-service/src/main/resources/mapper/carousel/CarouselChartInfoMapper.xml

@@ -8,19 +8,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="pictureName"    column="picture_name"    />
         <result property="fileId"    column="file_id"    />
+        <result property="jump_url"    column="jumpUrl"    />
+        <result property="jump_url_type"    column="jumpUrlType"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
         <result property="status"    column="status"    />
     </resultMap>
 
     <sql id="selectCarouselChartInfoVo">
-        select id, picture_name, file_id, create_time, update_time, status from carousel_chart_info
+        select id, picture_name, file_id ,jump_url, jump_url_type, create_time, update_time, status from carousel_chart_info
     </sql>
 
     <select id="selectCarouselChartInfoList" resultType="com.miaxis.carousel.vo.CarouselChartInfoVo">
         select
         ci.id,
+        ci.file_id as fileId,
         ci.picture_name as pictureName,
+        ci.jump_url as jumpUrl,
+        ci.jump_url_type as jumpUrlType,
         f.file_url as fileUrl,
         ci.status
         from carousel_chart_info ci

+ 37 - 2
zzjs-service/src/main/resources/mapper/customer/CustomerInfoMapper.xml

@@ -39,8 +39,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select id, corporate_name, business_type, corporate_logo, customer_source, city_code,area_code, attributed_personnel, detailed_address, industry_type, corporate_phone, corporate_contacts, phone, customer_star, enterprise_tax_number, invoice_title, bank_of_deposit, bank_account, finance_phone, fax_number, applet_address, applet_logo, applet_qr_code, applet_introduce, shelf_status, create_time, update_time, status from customer_info
     </sql>
 
-    <select id="selectCustomerInfoList" parameterType="CustomerInfo" resultMap="CustomerInfoResult">
-        <include refid="selectCustomerInfoVo"/>
+    <select id="selectCustomerInfoList" resultType="com.miaxis.customer.vo.CustomerInfoVo">
+        select
+        ci.id,
+        ci.business_type,
+        ci.corporate_logo,
+        ci.customer_source,
+        ci.city_code,
+        ci.area_code,
+        ci.attributed_personnel,
+        ci.detailed_address,
+        ci.industry_type,
+        ci.corporate_phone,
+        ci.corporate_contacts,
+        ci.phone,
+        ci.customer_star,
+        ci.enterprise_tax_number,
+        ci.invoice_title,
+        ci.bank_of_deposit,
+        ci.bank_account,
+        ci.finance_phone,
+        ci.fax_number,
+        ci.shelf_status,
+        ci.corporate_name,
+        f1.file_url as corporateLogoFileUrl,
+        ci.applet_address,
+        f2.file_url as appletLogoFileUrl,
+        f3.file_url as appletQrCodeFileUrl,
+        ci.applet_introduce,
+        ci.create_time,
+        ci.update_time,
+        (select COUNT(1) from collection_info coi where coi.customer_id = ci.id) as collectionCount,
+        ci.status
+        from customer_info ci
+        LEFT JOIN file_info f1 on f1.file_id = ci.corporate_logo
+        LEFT JOIN file_info f2 on f2.file_id = ci.applet_logo
+        LEFT JOIN file_info f3 on f3.file_id = ci.applet_qr_code
         <where>
             <if test="corporateName != null  and corporateName != ''"> and corporate_name like concat('%', #{corporateName}, '%')</if>
             <if test="businessType != null "> and business_type = #{businessType}</if>
@@ -94,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         f2.file_url as appletLogoFileUrl,
         ci.applet_qr_code,
         f3.file_url as appletQrCodeFileUrl,
+        (select COUNT(1) from collection_info coi where coi.customer_id = ci.id) as collectionCount,
         ci.applet_introduce,
         ci.shelf_status,
         ci.create_time,