版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
第Java實(shí)戰(zhàn)寵物醫(yī)院預(yù)約掛號(hào)系統(tǒng)的實(shí)現(xiàn)流程@RequestMapping(value=/feiyi_videoList)
publicStringfeiyi_VideoList(Modelmodel,Videovideo,@RequestParam(value=page,defaultValue=1)Integerpage){
PageInfoVideopageInfo=videoService.selectPageList(video,page,size);
model.addAttribute(videoList,pageInfo.getList());
model.addAttribute(pageInfo,pageInfo);
if(video.getTitle()!=null){
model.addAttribute(title,video.getTitle());
returnbehind/admin/feiyi_videoList
*//**
*非遺講堂-刪除
*//*
@RequestMapping(/videoDelete)
publicStringvideoDelete(Modelmodel,Integerid){
if(id!=null){
//Stringfp=filePath.substring(filePath.indexOf(/)+1);//文件的真實(shí)路徑
Videovideo=videoService.selectByPrimaryKey(id);
Stringurlsrls=video.getUrls();
Stringname=urlsrls.substring(urlsrls.indexOf(s)+2);//獲取文件名
Filefile=newFile(filePath+name);
if(file.exists()){
file.delete();
videoService.deleteByPrimaryKey(id);
returnredirect:/admin/feiyi_videoList
*//**
*管理員-人物列表
*//*
@RequestMapping(/personList)
publicStringpersonList(Modelmodel,Personperson,@RequestParam(value=page,defaultValue=1)Integerpage,Stringsou){
PageInfoPersonpageInfo=personService.selectPageList(person,page,size);
ListPersonlist=pageInfo.getList();
ListPersonlist2=newArrayListPerson
//默認(rèn)顯示第一張圖片
for(inti=0;ilist.size();i++){
Personsh=list.get(i);
String[]img=sh.getImg().split(,
if(img.length0){
sh.setImg(img[0]);
list.set(i,sh);
if(sou!=null!.equals(sou)){
charsz=sou.charAt(0);
//判斷是否是大寫(xiě)
if(Character.isUpperCase(sz)){
sz=StringRandom.toLower(sz);//大寫(xiě)轉(zhuǎn)小寫(xiě)
for(inti=0;ilist.size();i++){
Personsh=list.get(i);
if(sh.getName()!=null){
charnames=StringRandom.getPinYinHeadChar(sh.getName());//名字的首字母
if(names==sz){
list2.add(sh);
model.addAttribute(personList,list2);
}else{
model.addAttribute(personList,list);
model.addAttribute(sou,sou);
model.addAttribute(pageInfo,pageInfo);
model.addAttribute(person,person);
returnbehind/admin/feiyi_personList
*//**
*人物刪除
*@parammodel
*@return
*//*
@RequestMapping(/personDelete)
publicStringpersonDelete(Modelmodel,Integerid){
if(id!=null){
Personperson=personService.selectByPrimaryKey(id);
//刪除人物的圖片
//Stringfp=filePath.substring(filePath.indexOf(/)+1);//文件的真實(shí)路徑
Stringname=person.getImg().substring(person.getImg().indexOf(s)+2);//獲取文件名
Filefile=newFile(filePath+name);
if(file.exists()){
file.delete();
personService.deleteByPrimaryKey(id);
returnredirect:/admin/personList
*//**
*管理員
*//*
@RequestMapping(/feiyisList)
publicStringzuopinList(Modelmodel,Feiyisfeiyis,@RequestParam(value=page,defaultValue=1)Integerpage,Stringsou){
feiyis.setState(0);//0為正常1是管理員下架的
PageInfoFeiyispageInfo=feiyisService.selectFeiyis(feiyis,page,size);
model.addAttribute(feiyiList,pageInfo.getList());
model.addAttribute(pageInfo,pageInfo);
model.addAttribute(feiyis,feiyis);
returnbehind/admin/feiyisList
*//**
*非遺視界刪除
*@parammodel
*@return
*//*
@RequestMapping(/feiyisDelete)
publicStringfeiyisDelete(Modelmodel,Integerid,Integertype){
if(id!=null){
Feiyisfeiyis=feiyisService.selectByPrimaryKey(id);
//刪除圖片
//Stringfp=filePath.substring(filePath.indexOf(/)+1);//文件的真實(shí)路徑
if(feiyis.getImg()!=null){
Stringname=feiyis.getImg().substring(feiyis.getImg().indexOf(s)+2);//獲取文件
Filefile=newFile(filePath+name);
if(file.exists()){
file.delete();
feiyisService.deleteByPrimaryKey(id);
returnredirect:/admin/feiyisListtype=+type;
*//**
*后臺(tái)主頁(yè)
*@return
*//*
@RequestMapping(/index)
publicStringindex(Modelmodel){
//圖表信息
intzixun=zixunService.countByExample(null);
intvideo=videoService.countByExample(null);
intperson=personService.countByExample(null);
intzuocount=feiyisService.countByExamples(1);
inthuocount=feiyisService.countByExamples(2);
intzoucount=feiyisService.countByExamples(3);
intfacount=feiyisService.countByExamples(4);
model.addAttribute(zixun,zixun);
model.addAttribute(video,video);
model.addAttribute(person,person);
model.addAttribute(zuocount,zuocount);
model.addAttribute(huocount,huocount);
model.addAttribute(zoucount,zoucount);
model.addAttribute(facount,facount);
//總評(píng)論數(shù)
intcommentcount=commentService.countByExample(null);
//用戶數(shù)
intusercount=usertService.countByExample(null);
//商品數(shù)量
intshopcount=shopService.countByExample(null);
//資訊數(shù)量
intzixuncount=zixunService.countByExample(null);
model.addAttribute(commentcount,commentcount);
model.addAttribute(usercount,usercount);
model.addAttribute(shopcount,shopcount);
model.addAttribute(zixuncount,zixuncount);
returnbehind/admin/index
*//**
*資訊列表
*@parammodel
*@return
*//*
@RequestMapping(/zixunList)
publicStringzixunList(Modelmodel,Zixunzixun,@RequestParam(value=page,defaultValue=1)Integerpage,Stringsou){
if(zixun==null){
zixun=newZixun();
zixun.setState(0);//0是正常1被下架的
PageInfoZixunpageInfo=zixunService.selectZixunList(zixun,page,size);
model.addAttribute(zixunList,pageInfo.getList());
model.addAttribute(pageInfo,pageInfo);
model.addAttribute(zixun,zixun);
returnbehind/admin/zixunList
*//**
*資訊下架
*@parammodel
*@return
*//*
@RequestMapping(/zixunUptate)
publicStringzixunUptate(Modelmodel,Integerid){
if(id!=null){
Zixunzixun=newZixun();
zixun.setId(id);
zixun.setState(1);//1是下架
zixunService.updateByPrimaryKeySelective(zixun);
returnredirect:/admin/zixunList
*//**
*管理評(píng)論
*@return
*//*
@RequestMapping(/commentList)
publicStringcommentList(Modelmodel,Integertype){
if(type!=null){
Commentcomment=newComment();
comment.setType(type);//商品評(píng)論
comment.setReport(1);//1為舉報(bào)的
ListCommentcommentsList=commentService.selectComment(comment);
model.addAttribute(commentsList,commentsList);
returnbehind/admin/commentList
*//**
*評(píng)論刪除
*@return
*//*
@RequestMapping(/commentDel)
publicStringcommentDel(Modelmodel,Integerid){
if(id!=null){
commentService.deleteByPrimaryKey(id);
returnredirect:/admin/commentList
*//**
*@return
*//*
@RequestMapping(/merchantList)
publicStringmerchantList(Modelmodel,Integerid){
Merchantmerchant=newMerchant();
merchant.setState(0);
ListMerchantmerchantlist=merchantService.selectMerchant(merchant);
model.addAttribute(merchantlist,merchantlist);
returnbehind/admin/merchantList
*//**
*@return
*//*
@RequestMapping(/merchanUpate)
publicStringmerchanUpate(Modelmodel,Integerid){
Merchantmerchant=newMerchant();
if(id!=null){
merchant.setId(id);
merchant.setState(1);
merchantService.updateByPrimaryKeySelective(merchant);
returnredirect:/admin/merchantList
*//**
*未通過(guò)
*@return
*//*
@RequestMapping(/merchanDel)
publicStringmerchanDel(Modelmodel,Integerid){
if(id!=null){
merchantService.deleteByPrimaryKey(id);
returnredirect:/admin/merchantList
*//**
*用戶列表
*@return
*//*
@RequestMapping(
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 高級(jí)保育員考試題庫(kù)及答案
- 2025年全國(guó)大學(xué)生525心理知識(shí)競(jìng)賽題庫(kù)及答案
- 安全教育培訓(xùn)考核試題(項(xiàng)目經(jīng)理、管理人員、安全員)附答案
- 銀行金融考試題庫(kù)及答案
- 登高操作考試題庫(kù)及答案
- 大二營(yíng)養(yǎng)學(xué)考試題及答案
- 未來(lái)五年小米企業(yè)縣域市場(chǎng)拓展與下沉戰(zhàn)略分析研究報(bào)告
- 2026順義區(qū)大孫各莊社區(qū)衛(wèi)生服務(wù)中心第一次編外招聘4人備考題庫(kù)附答案
- 臨汾市2025年度市級(jí)機(jī)關(guān)公開(kāi)遴選公務(wù)員參考題庫(kù)必考題
- 內(nèi)江市第六人民醫(yī)院2025年員額人員招聘(14人)考試備考題庫(kù)附答案
- 2026年吉林大學(xué)附屬中學(xué)公開(kāi)招聘教師備考題庫(kù)(4人)及參考答案詳解
- 2026中國(guó)電信四川公用信息產(chǎn)業(yè)有限責(zé)任公司社會(huì)成熟人才招聘?jìng)淇碱}庫(kù)參考答案詳解
- 2025年大學(xué)旅游管理(旅游服務(wù)質(zhì)量管理)試題及答案
- 打捆機(jī)培訓(xùn)課件
- 清真生產(chǎn)過(guò)程管控制度
- 2026年淺二度燒傷處理
- 北京通州產(chǎn)業(yè)服務(wù)有限公司招聘考試備考題庫(kù)及答案解析
- 河北省NT名校聯(lián)合體2025-2026學(xué)年高三上學(xué)期1月月考英語(yǔ)(含答案)
- 2025-2026學(xué)年滬科版八年級(jí)數(shù)學(xué)上冊(cè)期末測(cè)試卷(含答案)
- 途虎養(yǎng)車安全培訓(xùn)課件
- 衛(wèi)生管理研究論文
評(píng)論
0/150
提交評(píng)論