WechatUserServiceImpl.java 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package jnpf.message.service.impl;
  2. import jnpf.base.service.SuperServiceImpl;
  3. import jnpf.message.entity.WechatUserEntity;
  4. import jnpf.message.mapper.WechatUserMapper;
  5. import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  6. import jnpf.message.service.WechatUserService;
  7. import jnpf.permission.service.AuthorizeService;
  8. import org.springframework.stereotype.Service;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  11. import jnpf.util.*;
  12. import java.security.MessageDigest;
  13. import java.util.*;
  14. /**
  15. * 消息模板(新)
  16. * 版本: V3.2.0
  17. * 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
  18. * 作者: JNPF开发平台组
  19. * 日期: 2022-08-18
  20. */
  21. @Service
  22. public class WechatUserServiceImpl extends SuperServiceImpl<WechatUserMapper, WechatUserEntity> implements WechatUserService {
  23. @Override
  24. public WechatUserEntity getInfoByGzhId(String userId,String gzhId){
  25. QueryWrapper<WechatUserEntity> queryWrapper = new QueryWrapper<>();
  26. queryWrapper.lambda().eq(WechatUserEntity::getUserId,userId);
  27. queryWrapper.lambda().eq(WechatUserEntity::getGzhId,gzhId);
  28. queryWrapper.lambda().eq(WechatUserEntity::getCloseMark,1);
  29. return this.getOne(queryWrapper);
  30. }
  31. @Override
  32. public void create(WechatUserEntity entity) {
  33. this.save(entity);
  34. }
  35. @Override
  36. public boolean update(String id, WechatUserEntity entity) {
  37. entity.setId(id);
  38. return this.updateById(entity);
  39. }
  40. @Override
  41. public void delete(WechatUserEntity entity) {
  42. if (entity != null) {
  43. this.removeById(entity.getId());
  44. }
  45. }
  46. }