資源簡介
JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫 ,源碼的架構為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?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-04-13?00:40??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\
?????文件?????????661??2016-04-29?13:27??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\.classpath
?????文件????????1043??2016-02-29?15:53??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\.project
?????目錄???????????0??2018-04-08?11:51??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\.settings\
?????文件?????????503??2016-02-29?15:53??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\.settings\.jsdtscope
?????文件?????????364??2016-02-29?15:53??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\.settings\org.eclipse.jdt.core.prefs
?????文件?????????482??2016-03-03?14:17??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\.settings\org.eclipse.wst.common.component
?????文件?????????345??2016-02-29?15:53??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件??????????49??2016-02-29?15:53??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2016-02-29?15:53??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件??????597074??2018-04-12?20:51??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\JAVA?微商城參數(shù)修改說明.docx
?????目錄???????????0??2018-04-08?11:51??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\
?????目錄???????????0??2018-04-08?11:51??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\me
?????文件??????????39??2016-02-29?15:53??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\me
?????目錄???????????0??2018-04-08?11:51??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\
?????目錄???????????0??2018-04-08?11:51??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\
?????文件????????4467??2016-02-24?13:34??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\aopalliance-1.0.jar
?????文件??????116039??2016-02-24?13:34??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\aspectjrt-1.6.5.jar
?????文件?????1907848??2016-02-24?13:33??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\aspectjweaver.jar
?????文件??????188671??2016-02-24?13:34??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\commons-beanutils-1.7.0.jar
?????文件??????188671??2014-11-21?21:04??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\commons-beanutils.jar
?????文件??????575389??2016-02-24?13:34??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\commons-collections-3.2.1.jar
?????文件??????148817??2016-02-24?13:34??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\commons-dbcp-1.3.jar
?????文件???????57779??2014-09-16?20:06??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\commons-fileupload-1.2.1.jar
?????文件??????305001??2014-12-10?14:41??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\commons-httpclient-3.1.jar
?????文件??????182650??2014-09-12?20:35??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\commons-io-2.3.jar
?????文件??????279193??2016-02-24?13:34??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\commons-lang-2.5.jar
?????文件??????412740??2014-11-03?11:18??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\commons-lang3-3.3.2.jar
?????文件???????60686??2016-02-24?13:34??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\commons-logging-1.1.1.jar
?????文件??????100193??2016-02-24?13:34??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\commons-pool-1.5.5.jar
?????文件??????313898??2014-10-10?16:23??JAVA微商城平臺系統(tǒng)源碼帶數(shù)據(jù)庫\WebContent\WEB-INF\lib\dom4j-1.6.1.jar
............此處省略1882個文件信息
評論
共有 條評論