Web.xml configuration
XML Version = "1.0" Encoding = "UTF-8"?>
/ taglib-uri>
XML Version = "1.0" encoding = "UTF-8"?>
XML Version = "1.0" encoding = "UTF-8"?>
/config/city/delcityInfo.do> entry> / otheropus/otherchapter/Editotherchapter.do "> map> property> bean> /> Print = "addcityInfo" class = "com.highcom.literature.sysconfig.cityInfo.web.controller.addcityInfocontroller> / Bean> Bean id = "addothersort1" class = "com.highcom.literature.indroller.com.addothersort1controller"> ref bean = "adminOthersort1Service" /> property> / bean> / Property> bean> beans> DataAccessContext.xml XML Version = "1.0" encoding = "UTF-8"?> ref bean = "sequenceService" /> property> bean> Bean> com.highcom.jdbc.sortdaojdbcimpl "> PROPS> / Property> bean> / prop> / * Generated by together * / Package com.highcom.literature.account; Import com.highcom.literature.account.domain.account; Public interface accountService {/ ** * Add an account * @Throws UseRexistexception * / void addaccount (Account Account) throws usexistexception; / ** * Delete an account, false delete. * / Void deleteAccount (string username); Void deleteAccount (INT ID); / ** * Modify account * / void modifyAccount (Account Account); / ** * Show all accounts * @Return Accent [] * / account [] getaccount (); / ** * get the specified account according to the user name * @Param Accountid string * @return account * / account getaccount (String username); / ** * acquire the specified account according to user ID * @Param Accountid * @return * / account getaccount int accountID); / ** * disable an account * @param accountID String * / void setDisavailable (String accountID); / ** * verify the user name and password are correct * @param username String * @param password String * @return int 0 through , 1 user disabled, 2 username or password error * / int Authorize (String username, string password);} / * generated by together * / package com.highcom.literature.account; Import com.highcom.dao. *; import com.highcom.literature.account.domain. *; import com.highcom.workflow. *; import com.highcom.workflow.domain.workflowtemplate; public class AccountServiceImpl implements AccountService {private AccountDao accountDao; private WorkflowService workflowService; / ** * add an account * @throws UserExistException * / public void addAccount (Account account) throws UserExistException {WorkflowTemplate workflowT = workflowService.getDefaultWorkflow (); // Set default Workflow template Account.setassess_level (Integer.Parseint ()))); accountdao.addaccount (account);} / ** * Delete an account, false delete. * / Public void deleteAccount (string username) {accountdao.deleteaccount (username);} public void deleteAccount (int id) {accountdao.deleteaccount (ID);} / ** * Modify account * / public void modifyAccount (Account Account) {AccountDao.ModifyAccount (Account);} / ** * Show all accounts * @Return Account [] * / public account [] getaccount () {return ancountdao.getaccount (); / * Get the specified account ** * @param accountID String * @return Account * / public Account getAccount (String username) {return accountDao.getAccount (username);} public Account getAccount (int accountID) {return accountDao.getAccount (accountID) ;} / ** * Disable account * @Param Accountid String * / public void setdisavailable (String Accountid) {} Public void setaccountdao (accountdao accountdao) {this.accountdao = accountdao; Public void setworkflowservice (toolflowservice) {this.workflowservice = workflowservcle; Public Accountdao getaccountdao () {Return Accentdao; Public WorkflowService getWorkflowService () {Return WorkflowService; / ** * Verify that the username password is correct * @Param username string * @param password string * @Return INT 0 passed, 1 user disable, 2 username or password error * / public int authorize (String username, string password) { Return Accentdao.authorize (username, password);}} / * generated by together * / Package com.highcom.literature.account.dao; Import com.highcom.literate.account.userexistexception; import com.highcom.literature.account.domain.account; Public interface accountdao {/ ** * Add an account * @Throws UseRexistexception * / void addaccount (Account Account) throws usexistexception; / ** * Delete an account, false delete. * / Void deleteaccount (string username); void deleteAccount (int ID); / ** * Modify account * / void modifyAccount (Account Account); / ** * Show all accounts * @Return Accent [] * / account [] getaccount (); / ** * Get the designated account * @param accountID String * @return Account * / Account getAccount (String username); Account getAccount (int accountID); / ** * Disable an account * @param accountID String * / void setDisavailable (String accountID ); / ** * Verify that the username password is correct * @Param username string * @param password string * @Return INT 0 passed, 1 user disabled, 2 username or password error * / int Authorize (String username, String password) } / * Generated by together * / package com.highcom.literature.account.dao.jdbc; import com.highcom.literature.account.UserExistException; import com.highcom.literature.account.domain.Account; import com.highcom.literature.account.dao.AccountDao; import org.springframework.jdbc.core.support *.; import java.sql.Types; import com.highcom.seqgen.SequenceService; import org.springframework.jdbc.core.ResultSetExtractor; import org.springframework.dao.DataAccessException; import java.sql.ResultSet; import java.sql.SQLException; / ** @Todo The following method's JDBC operation does not complete * / public class accountdaojdbcimpl extends JDBCDAOSUPPORT IMPLEments Accentdao {Private SequenceService SequenceService; / ** * Add an account * * @throws UserExistException * / public void addAccount (Account account) throws UserExistException {Object obj = this.getJdbcTemplate (). Query ( "select username from t_author_account where username =?", New Object [] {new String (account.getUsername ())}, new int [] {Types.VARCHAR}, new ResultSetExtractor () {public Object extractData (ResultSet rs) throws SQLException, DataAccessException {if (rs.next ()) {Account temp = New Account (); Temp.setUsername (RS.GetString ("UserName")); return null;}}; if (obj! = null) throw new useXistexception ("The user name already exists." ); // Get id string id = sequenceService.getValue ("com.highcom.literature.account"); // Take the current system time java.sql.timestamp date = new java.sql.timestamp (system .currenttimemillis () ); Excount.setjoin_date (Date); this .GetjdbcTemplate () .Update ("INSERT INTO T_AUTHOR_ACCOUNT (Account_ID, Username, Password, Name, SEX, Email," "BIR THDAY, Province, Postcode, Phone, Fax, Mobile, " " Photo, overview, join_date, assess_level) Values (?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?), New object [] {new integer (ID), Accent.getusername (), Account.getPassword (), Account.getName (), new integer (Account.getSex (), Account.GeteMail (), Account.getBIRTHDAY (), Account.getProvince (), Account.getPince (), Account.getCity ), Account.getconfraternity (), account.getaddress (), account.getpostcode (), account.getphone (), Account.getMobile (), Account.getPhone (), Account.getphone (), Account.getoverView (), ACCOUNT.GETOVERVIEW (), Account.getJoin_Date (), new integer (account.getassess_level ())}, new int [] {types.integer, types.varchar, types.varchar, types.varchar, types.integer, types.varchar, types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.TimeStamp, Types.integer}); } / ** * Delete an account, false delete. * / Public void deleteAccount (string username) {} Public void deleteAccount (int ID) {} / ** * Modify account * / public void modifyAccount (Account Account) {} / ** * Show all accounts * * @Return Accent [] * / public account [] getaccount () {Return null;} / ** * Get the designated account * * @param accountID * String * @return Account * / public Account getAccount (String username) {Object obj = this.getJdbcTemplate (). Query ( "select * from t_author_account where username =?", new Object [] {username}, new int [] {Types.VARCHAR}, new ResultSetExtractor () {public Object extractData (ResultSet rs) throws SQLException, DataAccessException {if (rs.next ()) {Account temp = new Account ( ); Temp.setAccount_id (rs.getstring); temp.setusername (RS.GetString ("UserName")); Temp.Setassess_level (Rs.GetInt ("Assess_level"); return temp;} return null ;}}); return (Account) obj;. "? select * from t_author_account where account_id ="} public Account getAccount (int accountID) {Object obj = this.getJdbcTemplate () query (, new Object [] {new String ( Accentid "" "}, new int [] {types.integer}, new resultsetextractor () {public Object ExtractData (ResultSet RS) throws SQLException, DataAccessException {if (rs.next ()) {Account temp = new Account (); temp.setAccount_id (rs.getString ( "account_id")); temp.setUsername (rs.getString ( "username")); Temp.setassess_level (Rs.Getint ("Assess_level")); Return Temp;} Return NULL;}}); Return (Account) Obj;} / ** * Disable account * @Param Accountid * string * / public void setdisavailable (String Accountid) {} / ** * Verify that the username password is correct * * @Param username * string * @Param password * string * @Return INT 0 passed, 1 user disabled, 2 username or password error * / public int authorize (String Username, String password) {Object obj = this .getJdbcTemplate () .query ( "select username from t_author_account where username =? and password =?", new Object [] {username, password}, new int [] {Types.VARCHAR, Types. VARCHAR}, new ResultSetExtractor () {public Object extractData (ResultSet rs) throws SQLException, DataAccessException {if (rs.next ()) {Account temp = new Account (); // temp.setAccount_id (rs.getString ( "account_id" ))); // Temp.setUsername (Rs.getstring ("UserName")); // Temp.setassess_level (Rs.Getint ("Assess_level")); return null;}}}); if (Obj = = NULL) RETURN 2; Else Return 0; PUBLIC VOID SEQUENCESERVICE (SEQUENCESERVICE SEQUENCESERVICE) {this.seq UenceService = sequenceService; Public sequenceService Getsequence () {return sequenceService; }