在线商城javaweb项目


这是一个完整的商城,基本功能基本完成,剩下的一些小细节自行完善。 该商城采用SSH框架,主要分为前台(面向用户),后台(面向商家),内含数据库的sql文件,运行即可使用,和其他在线商城类似,不过没那么强大,原来当毕设的话需要完善一下,充当课程设计那是完全没问题的,多多下载哦!
资源截图
代码片段和文件信息
package com.baidu.ueditor;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.baidu.ueditor.define.ActionMap;
import com.baidu.ueditor.define.AppInfo;
import com.baidu.ueditor.define.baseState;
import com.baidu.ueditor.define.State;
import com.baidu.ueditor.hunter.FileManager;
import com.baidu.ueditor.hunter.ImageHunter;
import com.baidu.ueditor.upload.Uploader;

public class ActionEnter {

private HttpServletRequest request = null;

private String rootPath = null;
private String contextPath = null;

private String actionType = null;

private ConfigManager configManager = null;

public ActionEnter ( HttpServletRequest request String rootPath ) {

this.request = request;
this.rootPath = rootPath;
this.actionType = request.getParameter( “action“ );
this.contextPath = request.getContextPath();
this.configManager = ConfigManager.getInstance( this.rootPath this.contextPath request.getRequestURI() );

}

public String exec () {

String callbackName = this.request.getParameter(“callback“);

if ( callbackName != null ) {

if ( !validCallbackName( callbackName ) ) {
return new baseState( false AppInfo.ILLEGAL ).toJSONString();
}

return callbackName+“(“+this.invoke()+“);“;

} else {
return this.invoke();
}

}

public String invoke() {

if ( actionType == null || !ActionMap.mapping.containsKey( actionType ) ) {
return new baseState( false AppInfo.INVALID_ACTION ).toJSONString();
}

if ( this.configManager == null || !this.configManager.valid() ) {
return new baseState( false AppInfo.CONFIG_ERROR ).toJSONString();
}

State state = null;

int actionCode = ActionMap.getType( this.actionType );

Mapject> conf = null;

switch ( actionCode ) {

case ActionMap.CONFIG:
return this.configManager.getAllConfig().toString();

case ActionMap.UPLOAD_IMAGE:
case ActionMap.UPLOAD_SCRAWL:
case ActionMap.UPLOAD_VIDEO:
case ActionMap.UPLOAD_FILE:
conf = this.configManager.getConfig( actionCode );
state = new Uploader( request conf ).doExec();
break;

case ActionMap.CATCH_IMAGE:
conf = configManager.getConfig( actionCode );
String[] list = this.request.getParameterValues( (String)conf.get( “fieldName“ ) );
state = new ImageHunter( conf ).capture( list );
break;

case ActionMap.LIST_IMAGE:
case ActionMap.LIST_FILE:
conf = configManager.getConfig( actionCode );
int start = this.getStartIndex();
state = new FileManager( conf ).listFile( start );
break;

}

return state.toJSONString();

}

public int getStartIndex () {

String start = this.request.getParameter( “start“ );

try {
return Integer.parseInt( start );
} catch ( Exception e ) {
return 0;
}

}

/**
 * callback参数验证
 */
public boolean valid

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-12-10 18:54  商城
     文件      281110  2018-12-10 18:54  商城forage.sql
     目录           0  2018-12-10 18:54  商城foragePro
     目录           0  2018-12-10 18:53  商城foragePro.git
     文件          16  2018-12-08 17:30  商城foragePro.gitCOMMIT_EDITMSG
     文件          93  2018-12-08 11:36  商城foragePro.gitFETCH_HEAD
     文件          23  2018-12-03 16:11  商城foragePro.gitHEAD
     文件          41  2018-12-08 11:36  商城foragePro.gitORIG_HEAD
     文件         399  2018-12-03 16:10  商城foragePro.gitconfig
     文件          73  2018-11-27 13:53  商城foragePro.gitdescription
     目录           0  2018-12-10 18:53  商城foragePro.githooks
     文件         478  2018-11-27 13:53  商城foragePro.githooksapplypatch-msg.sample
     文件         896  2018-11-27 13:53  商城foragePro.githookscommit-msg.sample
     文件        3327  2018-11-27 13:53  商城foragePro.githooksfsmonitor-watchman.sample
     文件         189  2018-11-27 13:53  商城foragePro.githookspost-update.sample
     文件         424  2018-11-27 13:53  商城foragePro.githookspre-applypatch.sample
     文件        1642  2018-11-27 13:53  商城foragePro.githookspre-commit.sample
     文件        1348  2018-11-27 13:53  商城foragePro.githookspre-push.sample
     文件        4898  2018-11-27 13:53  商城foragePro.githookspre-rebase.sample
     文件         544  2018-11-27 13:53  商城foragePro.githookspre-receive.sample
     文件        1492  2018-11-27 13:53  商城foragePro.githooksprepare-commit-msg.sample
     文件        3610  2018-11-27 13:53  商城foragePro.githooksupdate.sample
     文件      200683  2018-12-10 08:27  商城foragePro.gitindex
     目录           0  2018-12-10 18:53  商城foragePro.gitinfo
     文件         240  2018-11-27 13:53  商城foragePro.gitinfoexclude
     目录           0  2018-12-10 18:53  商城foragePro.gitlogs
     文件        6844  2018-12-08 17:30  商城foragePro.gitlogsHEAD
     目录           0  2018-12-10 18:53  商城foragePro.gitlogs
efs
     目录           0  2018-12-10 18:53  商城foragePro.gitlogs
efsheads
     文件         947  2018-11-28 15:30  商城foragePro.gitlogs
efsheadscsj
     文件        3781  2018-12-08 17:30  商城foragePro.gitlogs
efsheadsmaster
............此处省略6672个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)