| package com.xzx.gc.pay.service; | 
|   | 
| import com.xzx.gc.common.constant.Constants; | 
| import com.xzx.gc.entity.OtherUserInfo; | 
| import com.xzx.gc.pay.mapper.OtherUserMapper; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.stereotype.Service; | 
| import org.springframework.transaction.annotation.Transactional; | 
|   | 
| import java.util.List; | 
|   | 
| @Service | 
| @Transactional | 
| public class OtherUserService { | 
|   | 
|     @Autowired | 
|     private OtherUserMapper otherUserMapper; | 
|   | 
|   | 
|     public List<OtherUserInfo> findByUserType(String userType) { | 
|         OtherUserInfo otherUserInfo=new OtherUserInfo(); | 
|         otherUserInfo.setDelFlag(0); | 
|         otherUserInfo.setIsProhibit(false); | 
|         otherUserInfo.setUserType(userType); | 
|         List<OtherUserInfo> select = otherUserMapper.select(otherUserInfo); | 
|         return  select; | 
|     } | 
|   | 
|     public List<OtherUserInfo> findByMobile(String mobile) { | 
|         OtherUserInfo otherUserInfo=new OtherUserInfo(); | 
|         otherUserInfo.setDelFlag(Constants.DEL_NOT_FLAG); | 
|         otherUserInfo.setIsProhibit(false); | 
|         otherUserInfo.setMobilePhone(mobile); | 
|         List<OtherUserInfo> select = otherUserMapper.select(otherUserInfo); | 
|         return  select; | 
|     } | 
|   | 
|   | 
|     public OtherUserInfo findByMobileAndUserType(String mobile, String userType) { | 
|         OtherUserInfo otherUserInfo=new OtherUserInfo(); | 
|         otherUserInfo.setDelFlag(0); | 
|         otherUserInfo.setIsProhibit(false); | 
|         otherUserInfo.setUserType(userType); | 
|         otherUserInfo.setMobilePhone(mobile); | 
|         OtherUserInfo select = otherUserMapper.selectOne(otherUserInfo); | 
|         return  select; | 
|     } | 
|   | 
|     public void add(OtherUserInfo otherUserInfo) { | 
|         otherUserMapper.insertSelective(otherUserInfo); | 
|     } | 
|   | 
|     public OtherUserInfo findById(String userId) { | 
|         return otherUserMapper.selectByPrimaryKey(userId); | 
|     } | 
|   | 
|     public OtherUserInfo findByIdByNotDel(String userId) { | 
|         OtherUserInfo otherUserInfo=new OtherUserInfo(); | 
|         otherUserInfo.setDelFlag(0); | 
|         otherUserInfo.setUserId(userId); | 
|         OtherUserInfo select = otherUserMapper.selectOne(otherUserInfo); | 
|         return  select; | 
|     } | 
|   | 
|   | 
|     public List<OtherUserInfo> findByPartnerId(String partnerId) { | 
|         OtherUserInfo otherUserInfo=new OtherUserInfo(); | 
|         otherUserInfo.setDelFlag(0); | 
|         otherUserInfo.setIsProhibit(false); | 
|         otherUserInfo.setPartnerId(partnerId); | 
|         return otherUserMapper.select(otherUserInfo); | 
|     } | 
|   | 
|     public  void update(OtherUserInfo otherUserInfo){ | 
|         otherUserMapper.updateByPrimaryKeySelective(otherUserInfo); | 
|     } | 
|   | 
| } |