資源簡介
JAVA微商城平臺系統(tǒng)源碼 帶數(shù)據(jù)庫 數(shù)據(jù)庫及微信配置說明 運(yùn)行環(huán)境: JAVA 源碼詳細(xì): JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫 源碼描述: 一、源碼介紹 1、JAVA微商城 為項(xiàng)目源碼,數(shù)據(jù)庫及微信配置說明在源碼文件中 2、upload為圖片文件夾,放在項(xiàng)目同級目錄,如 tomcat/webapps根目錄 3、聲明:數(shù)據(jù)庫文件數(shù)據(jù)為測試數(shù)據(jù),商品分類等需要根據(jù)自身營銷作出相應(yīng)更改 二、注意事項(xiàng) 1、源碼的架構(gòu)為springmvc+spring+mybatis+mysql,開發(fā)環(huán)境為eclipse+jdk7+tomcat7
代碼片段和文件信息
package?com.weixin.controller;
import?java.text.SimpleDateFormat;
import?java.util.ArrayList;
import?java.util.Date;
import?java.util.HashMap;
import?java.util.List;
import?java.util.Map;
import?org.springframework.beans.factory.annotation.Autowired;
import?org.springframework.stereotype.Controller;
import?org.springframework.web.bind.annotation.RequestMapping;
import?org.springframework.web.bind.annotation.ResponseBody;
import?org.springframework.web.servlet.ModelAndView;
import?com.google.gson.Gson;
import?com.weixin.entity.Button;
import?com.weixin.entity.ViewButton;
import?com.weixin.service.ButtonService;
import?com.weixin.util.MenuUtil;
@Controller
@RequestMapping
public?class?ButtonController?{
@Autowired
private?ButtonService?buttonService?;
// private?Button?button;
private?Mapject>?map?=?new?HashMapject>();
Gson?gson?=?new?Gson();
@ResponseBody
@RequestMapping(value=“/main/buttonInsert.html“)
public?String?insert(Button?button){
SimpleDateFormat?sf?=?new?SimpleDateFormat(“yyyy-MM-dd?HH:mm:ss“);
String?id?=Long.toString(new?Date().getTime());
String?message=““;
int?rs??=0;
button.setId(id);
int?count=0;
if(button.getLevel()==1){
button.setSuper_id(null);
count?= buttonService.selectCount(button);
if(count>=3){
message=“button?is?already?>=?3“;
}
else{
button.setSuper_id(id);
button.setAdd_time(sf.format(new?Date()));
rs??= buttonService.insert(button);
}
}else{
//button.setSuper_id(id);
count?= buttonService.selectCount(button);
if(count>=5){
message=“button?is?already?>=?5“;
}else{
button.setAdd_time(sf.format(new?Date()));
rs??= buttonService.insert(button);
}
}
if(rs==-1){
message=“insert?button?error!“;
}
map.put(“rs“rs);
map.put(“message“message);
return?gson.toJson(map);
}
@ResponseBody
@RequestMapping(value=“/main/buttonUpdate.html“)
public?String?update(Button?button){
int??rs??= buttonService.updateByPrimaryKeySelective(button);
if(rs==-1){
map.put(“message““update?button?is?error!“);
}
map.put(“rs“rs);
return?gson.toJson(map);
}
@ResponseBody
@RequestMapping(value=“/main/buttonSort.html“)
public?String?sort(Button?button){
int??rs??= buttonService.sort(button);
if(rs==-1){
map.put(“message““sort?is?error!“);
}
map.put(“rs“rs);
return?gson.toJson(map);
}
@ResponseBody
@RequestMapping(value=“/main/buttonDelete.html“)
public?String?delete(Button?button){
int??rs??=?0?;
String?message=““;
if(button.getLevel()==1){
button.setLevel(2);
button.setSuper_id(button.getId());
if(buttonService.selectCount(button)>0){
rs?=?-5?;
message?=?“此主菜單下有子菜單,請先刪除該下子菜單!“;
}else{
rs??= buttonService.deleteByPrimaryKey(button.getId());
}
}else{
rs??= buttonService.deleteByPrimaryKey(button.getId());
}
if(rs==-1){
message?=?“sort?
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-11-07?13:01??shoppingmall\
?????文件??????599243??2017-12-04?15:49??shoppingmall\寰晢鍩庡弬鏁頒慨鏀硅鏄?docx
?????目錄???????????0??2018-11-07?13:01??__MACOSX\
?????目錄???????????0??2018-11-07?13:01??__MACOSX\shoppingmall\
?????文件?????????230??2017-12-04?15:49??__MACOSX\shoppingmall\._寰晢鍩庡弬鏁頒慨鏀硅鏄?docx
?????文件?????????204??2017-12-08?15:35??shoppingmall\婧愮爜璇存槑.txt
?????文件?????????317??2017-12-08?15:35??__MACOSX\shoppingmall\._婧愮爜璇存槑.txt
?????文件?????????618??2018-11-07?13:00??shoppingmall\JAVA寰晢鍩庡墠鍚庡彴婧愮爜.md
?????文件?????????423??2018-11-07?13:00??__MACOSX\shoppingmall\._JAVA寰晢鍩庡墠鍚庡彴婧愮爜.md
?????文件???????27538??2017-03-25?22:36??shoppingmall\蹇€掑叕鍙哥紪鐮?xlsx
?????文件?????????174??2017-03-25?22:36??__MACOSX\shoppingmall\._蹇€掑叕鍙哥紪鐮?xlsx
?????文件??????404645??2017-06-23?22:20??shoppingmall\鏁版嵁搴?sql
?????文件?????????174??2017-06-23?22:20??__MACOSX\shoppingmall\._鏁版嵁搴?sql
?????目錄???????????0??2018-05-18?15:06??shoppingmall\shopmall\
?????目錄???????????0??2017-12-08?15:36??shoppingmall\shopmall\WebContent\
?????目錄???????????0??2017-03-26?00:59??shoppingmall\shopmall\WebContent\page\
?????文件????????3411??2016-05-24?17:39??shoppingmall\shopmall\WebContent\page\test.jsp
?????目錄???????????0??2018-11-07?13:01??__MACOSX\shoppingmall\shopmall\
?????目錄???????????0??2018-11-07?13:01??__MACOSX\shoppingmall\shopmall\WebContent\
?????目錄???????????0??2018-11-07?13:01??__MACOSX\shoppingmall\shopmall\WebContent\page\
?????文件?????????174??2016-05-24?17:39??__MACOSX\shoppingmall\shopmall\WebContent\page\._test.jsp
?????文件???????12580??2017-04-06?20:34??shoppingmall\shopmall\WebContent\page\goods-order-sure.jsp
?????文件?????????174??2017-04-06?20:34??__MACOSX\shoppingmall\shopmall\WebContent\page\._goods-order-sure.jsp
?????文件????????1156??2016-05-16?15:34??shoppingmall\shopmall\WebContent\page\error.jsp
?????文件?????????174??2016-05-16?15:34??__MACOSX\shoppingmall\shopmall\WebContent\page\._error.jsp
?????文件????????2548??2016-10-31?11:42??shoppingmall\shopmall\WebContent\page\center.jsp
?????文件?????????174??2016-10-31?11:42??__MACOSX\shoppingmall\shopmall\WebContent\page\._center.jsp
?????文件????????1494??2016-05-16?15:33??shoppingmall\shopmall\WebContent\page\coupons-list.jsp
?????文件?????????174??2016-05-16?15:33??__MACOSX\shoppingmall\shopmall\WebContent\page\._coupons-list.jsp
?????文件????????2683??2016-06-15?10:42??shoppingmall\shopmall\WebContent\page\index.html
?????文件?????????174??2016-06-15?10:42??__MACOSX\shoppingmall\shopmall\WebContent\page\._index.html
............此處省略4012個文件信息
評論
共有 條評論