Просмотр исходного кода

[会员][修复]:修改会员绑车牌查询方法

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
aa3d45b6e3
9 измененных файлов: 22 добавлений и 55 удалений
  1. +3
    -6
      mallinkAdmin/src/main/java/com/iformall/controller/WxUserStructureController.java
  2. +0
    -3
      mallinkService/src/main/java/com/iformall/mapper/WxCUserBasicInfoMapper.java
  3. +2
    -1
      mallinkService/src/main/java/com/iformall/mapper/WxCUserCarMapper.java
  4. +0
    -7
      mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java
  5. +3
    -2
      mallinkService/src/main/java/com/iformall/service/WxCUserCarService.java
  6. +0
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java
  7. +3
    -9
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserCarServiceImpl.java
  8. +0
    -12
      mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml
  9. +11
    -9
      mallinkService/src/main/resources/mapper/WxCUserCarMapper.xml

+ 3
- 6
mallinkAdmin/src/main/java/com/iformall/controller/WxUserStructureController.java Просмотреть файл

@@ -138,19 +138,16 @@ public class WxUserStructureController extends BaseController {
dto.setTenantId(getTenantId());
dto.setStartTime(startTime);
dto.setEndTime(endTime);
List<Long> idList = wxCUserBasicInfoService.findIdList(dto);
long total = wxCUserBasicInfoService.findCount(dto);

WxCUserCar wxCUserCar = new WxCUserCar();

wxCUserCar.setTenantId(getTenantId());
wxCUserCar.setIds(idList); //注:countUser接口通过ids传递user_id list.
long userCountWithCar = wxCUserCarService.countUser(wxCUserCar);
long userCountWithCar = wxCUserCarService.countUser(dto);
Map userWithCar = new HashMap();
userWithCar.put("title","已绑定车牌");
userWithCar.put("count",userCountWithCar);


long userCountWithoutCar = idList.size()-userCountWithCar;
long userCountWithoutCar = total-userCountWithCar;

Map userWithoutCar = new HashMap();
userWithoutCar.put("title","未绑定车牌");


+ 0
- 3
mallinkService/src/main/java/com/iformall/mapper/WxCUserBasicInfoMapper.java Просмотреть файл

@@ -22,7 +22,4 @@ public interface WxCUserBasicInfoMapper extends CommonMapper<WxCUserBasicInfo, S
long findCountByScore(WxCUserBasicInfoDto dto);

long findCount(WxCUserBasicInfoDto dto);

List<Long> findIdList(WxCUserBasicInfoDto dto);

}

+ 2
- 1
mallinkService/src/main/java/com/iformall/mapper/WxCUserCarMapper.java Просмотреть файл

@@ -2,11 +2,12 @@ package com.iformall.mapper;

import java.util.*;
import com.iformall.common.CommonMapper;
import com.iformall.domain.dto.WxCUserBasicInfoDto;
import com.iformall.domain.po.WxCUserCar;

public interface WxCUserCarMapper extends CommonMapper<WxCUserCar, Long> {

List<WxCUserCar> findList(WxCUserCar wxCUserCar);
Integer countList(WxCUserCar wxCUserCar);
Integer countUser(WxCUserCar wxCUserCar);
Integer countUser(WxCUserBasicInfoDto dto);
}

+ 0
- 7
mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java Просмотреть файл

@@ -98,13 +98,6 @@ public interface WxCUserBasicInfoService {
*/
long findCountByScore(WxCUserBasicInfoDto dto);

/**
* 查找id列表
*
* @param dto
* @return
*/
List<Long> findIdList(WxCUserBasicInfoDto dto);

void exportData(HttpServletRequest request, HttpServletResponse response, String tenantId);



+ 3
- 2
mallinkService/src/main/java/com/iformall/service/WxCUserCarService.java Просмотреть файл

@@ -1,6 +1,7 @@
package com.iformall.service;

import com.github.pagehelper.PageInfo;
import com.iformall.domain.dto.WxCUserBasicInfoDto;
import com.iformall.domain.po.WxCUserCar;

import java.util.List;
@@ -36,10 +37,10 @@ public interface WxCUserCarService {
/**
* 根据实体查询count
*
* @param record
* @param dto
* @return
*/
Integer countUser(WxCUserCar record);
Integer countUser(WxCUserBasicInfoDto dto);
/**
* 根据实体查询
*


+ 0
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java Просмотреть файл

@@ -143,12 +143,6 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService {
return wxCUserBasicInfoMapper.findCountByScore(dto);
}

@Override
public List<Long> findIdList(WxCUserBasicInfoDto dto)
{
return wxCUserBasicInfoMapper.findIdList(dto);
}


@Override
public void exportData(HttpServletRequest request, HttpServletResponse response, String tenantId) {


+ 3
- 9
mallinkService/src/main/java/com/iformall/service/impl/WxCUserCarServiceImpl.java Просмотреть файл

@@ -3,6 +3,7 @@ package com.iformall.service.impl;
import java.util.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.dto.WxCUserBasicInfoDto;
import com.iformall.domain.po.WxCUserCar;
import com.iformall.mapper.WxCUserCarMapper;
import com.iformall.service.WxCUserCarService;
@@ -36,8 +37,8 @@ public class WxCUserCarServiceImpl implements WxCUserCarService {
}

@Override
public Integer countUser(WxCUserCar record) {
return wxCUserCarMapper.countUser(record);
public Integer countUser(WxCUserBasicInfoDto dto) {
return wxCUserCarMapper.countUser(dto);
}

@Override
@@ -87,11 +88,4 @@ public class WxCUserCarServiceImpl implements WxCUserCarService {
wxCUserCarMapper.delete(record);
}
}

+ 0
- 12
mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml Просмотреть файл

@@ -194,16 +194,4 @@
</if>
</select>

<select id="findIdList" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long">
select id from wx_c_user_basic_info where 1=1
<if test=" null != startTime ">
and create_date &gt;= #{startTime}
</if>
<if test=" null != endTime">
and create_date &lt; #{endTime}
</if>
<if test="null != tenantId">
and tenant_id =#{tenantId}
</if>
</select>
</mapper>

+ 11
- 9
mallinkService/src/main/resources/mapper/WxCUserCarMapper.xml Просмотреть файл

@@ -77,17 +77,19 @@
<include refid="dynamicWhereConditions" />
</select>

<select id="countUser" parameterType="com.iformall.domain.po.WxCUserCar" resultType="java.lang.Integer">
select count(DISTINCT c_user_id) from wx_c_user_car
where 1=1
<select id="countUser" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Integer">
select count(DISTINCT uc.c_user_id) from wx_c_user_car uc, wx_c_user_basic_info ubi
where uc.c_user_id = ubi.id
<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
and uc.tenant_id = #{tenantId}
and ubi.tenant_id = #{tenantId}
</if>
<if test=" null != ids ">
and c_user_id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
<if test=" null != startTime ">
and ubi.create_date &gt;= #{startTime}
</if>
<if test=" null != endTime">
and ubi.create_date &lt; #{endTime}
</if>

</select>
</mapper>

Загрузка…
Отмена
Сохранить