package com.sp2p.dao.admin; import java.sql.Connection; import java.sql.SQLException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.shove.data.DataException; import com.sp2p.database.Dao; public class UserAdminDao { public static Log log =LogFactory.getLog(UserAdminDao.class); /**后台管理员更改资料 * @param conn * @param realName * @param cellPhone * @param sex * @param birthday * @param highestEdu * @param eduStartDay * @param school * @param maritalStatus * @param hasChild * @param hasHourse * @param hasHousrseLoan * @param hasCar * @param hasCarLoan * @param nativePlacePro * @param nativePlaceCity * @param registedPlacePro * @param registedPlaceCity * @param address * @param telephone * @param personalHead * @param userId * @param idNo * @return * @throws SQLException * @throws DataException */ public Long updateUserBaseData(Connection conn, String realName, String cellPhone, String sex, String birthday, String highestEdu, String eduStartDay, String school, String maritalStatus, String hasChild, String hasHourse, String hasHousrseLoan, String hasCar, String hasCarLoan, Long nativePlacePro, Long nativePlaceCity, Long registedPlacePro, Long registedPlaceCity, String address, String telephone, String personalHead, Long userId, String idNo) throws SQLException, DataException { Dao.Tables.t_person person = new Dao().new Tables().new t_person(); person.realName.setValue(realName); person.cellPhone.setValue(cellPhone); person.sex.setValue(sex); person.birthday.setValue(birthday); person.highestEdu.setValue(highestEdu); person.eduStartDay.setValue(eduStartDay); person.school.setValue(school); person.maritalStatus.setValue(maritalStatus); person.hasChild.setValue(hasChild); person.hasHourse.setValue(hasHourse); person.hasHousrseLoan.setValue(hasHousrseLoan); person.hasCar.setValue(hasCar); person.hasCarLoan.setValue(hasCarLoan); person.nativePlacePro.setValue(nativePlacePro); person.nativePlaceCity.setValue(nativePlaceCity); person.registedPlacePro.setValue(registedPlacePro); person.registedPlaceCity.setValue(registedPlaceCity); person.address.setValue(address); person.telephone.setValue(telephone); person.userId.setValue(userId); person.idNo.setValue(idNo); person.personalHead.setValue(personalHead); return person.update(conn, "userId = " + userId); } /** * 保存工作信息 * @param conn * @param orgName * @param occStatus * @param workPro * @param workCity * @param companyType * @param companyLine * @param companyScale * @param job * @param monthlyIncome * @param workYear * @param companyTel * @param workEmail * @param companyAddress * @param directedName * @param directedRelation * @param directedTel * @param otherName * @param otherRelation * @param otherTel * @param moredName * @param moredRelation * @param moredTel * @param userId * @return * @throws SQLException * @throws DataException */ public Long updateUserWorkData(Connection conn, String orgName, String occStatus, Long workPro, Long workCity, String companyType, String companyLine, String companyScale, String job, String monthlyIncome, String workYear, String companyTel, String workEmail, String companyAddress, String directedName, String directedRelation, String directedTel, String otherName, String otherRelation, String otherTel, String moredName, String moredRelation, String moredTel, Long userId) throws SQLException, DataException { Dao.Tables.t_workauth workauth = new Dao().new Tables().new t_workauth(); workauth.orgName.setValue(orgName); workauth.occStatus.setValue(occStatus); workauth.workPro.setValue(workPro); workauth.workCity.setValue(workCity); workauth.companyType.setValue(companyType); workauth.companyLine.setValue(companyLine); workauth.companyScale.setValue(companyScale); workauth.job.setValue(job); workauth.monthlyIncome.setValue(monthlyIncome); workauth.workYear.setValue(workYear); workauth.companyTel.setValue(companyTel); workauth.workEmail.setValue(workEmail); workauth.companyAddress.setValue(companyAddress); workauth.directedName.setValue(directedName); workauth.directedRelation.setValue(directedRelation); workauth.directedTel.setValue(directedTel); workauth.otherName.setValue(otherName); workauth.otherRelation.setValue(otherName); workauth.otherTel.setValue(otherTel); workauth.moredName.setValue(moredName); workauth.moredRelation.setValue(moredRelation); workauth.moredTel.setValue(moredTel); return workauth.update(conn, "userId = " + userId); } }