// Path: server/src/main/java/com/cloudwise/sap/niping/common/vo/User.java
// @Data
// @Builder
// @AllArgsConstructor
// public class User {
// 	protected String userId;
// 	protected String accountId;
// 	protected String name;
// 	protected String loginName;
// 	private String password;
// 	private String passwordSalt;
// }
// 
// Path: server/src/main/java/com/cloudwise/sap/niping/dao/mapper/UserMapper.java
// public class UserMapper  implements ResultSetMapper<User> {
// 
//     @Override
//     public User map(int index, ResultSet r, StatementContext ctx) throws SQLException {
//         return User.builder()
//                 .userId(r.getString("USER_ID"))
//                 .accountId(r.getString("ACCOUNT_ID"))
//                 .loginName(r.getString("LOGIN_NAME"))
//                 .name(r.getString("NAME"))
//                 .password(r.getString("PASSWORD"))
//                 .passwordSalt(r.getString("PASSWORD_SALT"))
//                 .build();
//     }
// }


import com.cloudwise.sap.niping.common.vo.User;
import com.cloudwise.sap.niping.dao.mapper.UserMapper;
import org.skife.jdbi.v2.sqlobject.Bind;
import org.skife.jdbi.v2.sqlobject.SqlQuery;
import org.skife.jdbi.v2.sqlobject.customizers.RegisterMapper;
package com.cloudwise.sap.niping.dao;


public interface UserDao {

    @SqlQuery("SELECT USER_ID, ACCOUNT_ID, NAME, PASSWORD, PASSWORD_SALT, LOGIN_NAME FROM SNM_USER " +
            " WHERE LOGIN_NAME = :loginName AND STATUS = :status")
    @RegisterMapper(UserMapper.class)
// Path: server/src/main/java/com/cloudwise/sap/niping/common/vo/User.java
// @Data
// @Builder
// @AllArgsConstructor
// public class User {
// 	protected String userId;
// 	protected String accountId;
// 	protected String name;
// 	protected String loginName;
// 	private String password;
// 	private String passwordSalt;
// }
// 
// Path: server/src/main/java/com/cloudwise/sap/niping/dao/mapper/UserMapper.java
// public class UserMapper  implements ResultSetMapper<User> {
// 
//     @Override
//     public User map(int index, ResultSet r, StatementContext ctx) throws SQLException {
//         return User.builder()
//                 .userId(r.getString("USER_ID"))
//                 .accountId(r.getString("ACCOUNT_ID"))
//                 .loginName(r.getString("LOGIN_NAME"))
//                 .name(r.getString("NAME"))
//                 .password(r.getString("PASSWORD"))
//                 .passwordSalt(r.getString("PASSWORD_SALT"))
//                 .build();
//     }
// }


// Path: server/src/main/java/com/cloudwise/sap/niping/dao/UserDao.java
import com.cloudwise.sap.niping.common.vo.User;
import com.cloudwise.sap.niping.dao.mapper.UserMapper;
import org.skife.jdbi.v2.sqlobject.Bind;
import org.skife.jdbi.v2.sqlobject.SqlQuery;
import org.skife.jdbi.v2.sqlobject.customizers.RegisterMapper;

package com.cloudwise.sap.niping.dao;


public interface UserDao {

    @SqlQuery("SELECT USER_ID, ACCOUNT_ID, NAME, PASSWORD, PASSWORD_SALT, LOGIN_NAME FROM SNM_USER " +
            " WHERE LOGIN_NAME = :loginName AND STATUS = :status")
    @RegisterMapper(UserMapper.class)
    public User getUser(@Bind("loginName") String loginName, @Bind("status") int status);