我的好友列表接口
parent
0edba6660d
commit
69f7f08995
@ -0,0 +1,51 @@
|
|||||||
|
package com.kiisoo.ic.customer.bean;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: FriendDTO
|
||||||
|
* @Description:
|
||||||
|
* @Auther: yechenhao
|
||||||
|
* @Date: 2020/4/20 0008 16:46
|
||||||
|
* @Version:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FriendDTO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户id
|
||||||
|
*/
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户名
|
||||||
|
*/
|
||||||
|
private String customerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户电话
|
||||||
|
*/
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请的导购名
|
||||||
|
*/
|
||||||
|
private String inviteSellerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请的导购id
|
||||||
|
*/
|
||||||
|
private String inviteSellerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加时间
|
||||||
|
*/
|
||||||
|
private Date addTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员类型
|
||||||
|
*/
|
||||||
|
private String vipType;
|
||||||
|
}
|
@ -1,13 +1,29 @@
|
|||||||
package com.kiisoo.ic.customer.mapper;
|
package com.kiisoo.ic.customer.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.kiisoo.ic.customer.bean.FriendDTO;
|
||||||
import com.kiisoo.ic.customer.entity.OpSellerCustomerRelation;
|
import com.kiisoo.ic.customer.entity.OpSellerCustomerRelation;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导购客户
|
* 导购客户
|
||||||
*/
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public interface OpSellerCustomerRelationDOMapper extends BaseMapper<OpSellerCustomerRelation> {
|
public interface OpSellerCustomerRelationDOMapper extends BaseMapper<OpSellerCustomerRelation> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户
|
||||||
|
* @param shopId
|
||||||
|
* @param sellerId
|
||||||
|
* @param search
|
||||||
|
* @param startDate
|
||||||
|
* @param endDate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<FriendDTO> selectShopListByDate(@Param("shopId") Long shopId, @Param("userId")Long userId, @Param("sellerId")Long sellerId,
|
||||||
|
@Param("search")String search, @Param("startDate")Date startDate, @Param("endDate")Date endDate);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.kiisoo.ic.customer.mapper.OpSellerCustomerRelationDOMapper">
|
||||||
|
<select id="selectShopListByDate" resultType="com.kiisoo.ic.customer.bean.FriendDTO">
|
||||||
|
select t2.name as customerName,t2.id as customerId,t2.phone as mobile,t5.name as inviteSellerName,t4.id as inviteSellerId,t1.create_time as addTime
|
||||||
|
from op_seller_customer_relation t1,op_customer t2,poi_store_staff t4,privilage_user t5
|
||||||
|
where t1.customer_id = t2.id
|
||||||
|
and t1.user_id = t5.userId
|
||||||
|
and t1.user_id = t4.user_id
|
||||||
|
and t1.store_id = t4.store_id
|
||||||
|
<if test="userId != null">
|
||||||
|
t1.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
<if test="shopId != null">
|
||||||
|
t1.store_id = #{shopId}
|
||||||
|
</if>
|
||||||
|
<if test="sellerId != null">
|
||||||
|
t4.id = #{sellerId}
|
||||||
|
</if>
|
||||||
|
<if test="search != null and search !=''">
|
||||||
|
and
|
||||||
|
CONCAT(IFNULL(t2.name,''),IFNULL(t2.phone,''))
|
||||||
|
LIKE CONCAT('%',#{search},'%')
|
||||||
|
</if>
|
||||||
|
<if test="startDate != null">
|
||||||
|
DATE_FORMAT(t1.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{startDate},'%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
<if test="endDate != null">
|
||||||
|
DATE_FORMAT(t1.create_time,'%Y-%m-%d') <= DATE_FORMAT(#{endDate},'%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue