Browse Source

平台端新增黑名单查询客户过滤所属商家

multiwx
dy-hu 6 months ago
parent
commit
2c7a5989e1
  1. 2
      cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/buyer/CereBuyerUserDAO.java
  2. 9
      cereshop-admin/src/main/java/com/shop/cereshop/admin/service/buyer/impl/CereBuyerUserServiceImpl.java
  3. 4
      cereshop-admin/src/main/resources/mybatis/mapper/buyer/CereBuyerUserDAO.xml

2
cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/buyer/CereBuyerUserDAO.java

@ -65,4 +65,6 @@ public interface CereBuyerUserDAO extends BaseMapper<CereBuyerUser> {
List<CerePlatformLabel> getUserLabels(BuyerGetLabelsParam param); List<CerePlatformLabel> getUserLabels(BuyerGetLabelsParam param);
int increaseCredit(@Param("buyerUserId") long buyerUserId, @Param("credit") Integer credit); int increaseCredit(@Param("buyerUserId") long buyerUserId, @Param("credit") Integer credit);
List<CereBuyerUser> getBuyerUserBySearch(String searchContent);
} }

9
cereshop-admin/src/main/java/com/shop/cereshop/admin/service/buyer/impl/CereBuyerUserServiceImpl.java

@ -240,15 +240,16 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService {
@Override @Override
public Page<CereBuyerUser> searchUser(UserSearchParam param) { public Page<CereBuyerUser> searchUser(UserSearchParam param) {
PageHelper.startPage(param.getPage(),param.getPageSize()); PageHelper.startPage(param.getPage(),param.getPageSize());
LambdaQueryWrapper<CereBuyerUser> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CereBuyerUser::getBuyerUserId, param.getSearchKey())
/* LambdaQueryWrapper<CereBuyerUser> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CereBuyerUser::getProject, "0")
.eq(CereBuyerUser::getBuyerUserId, param.getSearchKey())
.or() .or()
.eq(CereBuyerUser::getWechatOpenId, param.getSearchKey()) .eq(CereBuyerUser::getWechatOpenId, param.getSearchKey())
.or() .or()
.like(CereBuyerUser::getName, param.getSearchKey()) .like(CereBuyerUser::getName, param.getSearchKey())
.or() .or()
.eq(CereBuyerUser::getPhone, param.getSearchKey());
List<CereBuyerUser> userList = cereBuyerUserDAO.selectList(wrapper);
.eq(CereBuyerUser::getPhone, param.getSearchKey());*/
List<CereBuyerUser> userList = cereBuyerUserDAO.getBuyerUserBySearch(param.getSearchKey());
PageInfo<CereBuyerUser> pageInfo=new PageInfo<>(userList); PageInfo<CereBuyerUser> pageInfo=new PageInfo<>(userList);
Page page=new Page(pageInfo.getList(),pageInfo.getTotal()); Page page=new Page(pageInfo.getList(),pageInfo.getTotal());
return page; return page;

4
cereshop-admin/src/main/resources/mybatis/mapper/buyer/CereBuyerUserDAO.xml

@ -341,4 +341,8 @@
LEFT JOIN cere_platform_label b ON a.buyer_label_id=b.buyer_label_id LEFT JOIN cere_platform_label b ON a.buyer_label_id=b.buyer_label_id
where a.buyer_user_id=#{buyerUserId} where a.buyer_user_id=#{buyerUserId}
</select> </select>
<select id="getBuyerUserBySearch" parameterType="java.lang.Object" resultType="com.shop.cereshop.commons.domain.buyer.CereBuyerUser">
SELECT * FROM cere_buyer_user where project=0 and concat(buyer_user_id,ifnull(wechat_open_id, ''),ifnull(name, ''),ifnull(phone, '')) like concat('%',#{searchContent},'%')
</select>
</mapper> </mapper>
Loading…
Cancel
Save