判断用户是否存在的接口

This commit is contained in:
wangxiaopeng
2024-03-21 15:25:48 +08:00
parent 9a0b6df295
commit b35836ae2d
6 changed files with 50 additions and 2 deletions

View File

@@ -37,4 +37,12 @@ public class LineInfoDAO {
}
return lineInfoMapper.updateByPrimaryKeySelective(param);
}
public LineInfoDO getByPartnerId(String partnerId) {
LineInfoDO lineInfo = lineInfoMapper.getByPartnerId(partnerId);
if(Objects.nonNull(lineInfo) && !lineInfo.getDeleted()){
return lineInfo;
}
return null;
}
}

View File

@@ -1,7 +1,9 @@
package com.cool.store.mapper;
import com.cool.store.entity.LineInfoDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
public interface LineInfoMapper extends Mapper<LineInfoDO> {
LineInfoDO getByPartnerId(@Param("partnerId") String partnerId);
}

View File

@@ -30,4 +30,9 @@
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
<result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap>
<select id="getByPartnerId" resultMap="BaseResultMap">
select * from xfsg_line_info where partner_id = #{partnerId} and deleted = 0
</select>
</mapper>