一元購項(xiàng)目框架_第1頁
一元購項(xiàng)目框架_第2頁
一元購項(xiàng)目框架_第3頁
一元購項(xiàng)目框架_第4頁
一元購項(xiàng)目框架_第5頁
已閱讀5頁,還剩44頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、name=mapperInterfacename=sqlSessionFactorypropertyref=sqlSessionFactory !- id=houseMappername=mapperInterfacename=sqlSessionFactory!- !- serviceid=tNewsServiceclass=com.ziyan.yyg.service.impl.TNewsServiceimpl !- -ControllerRequestMapping(/view)public class ViewController Resourceprivate ShowService

2、showService;Resourceprivate TRoottypeService tRoottypeService;/ 類型業(yè)務(wù)類Resourceprivate TPeriodsService tPeriodsService;/ 期數(shù)業(yè)務(wù)類public void Type(Model model)/ 獲得主要類型集合List btRoottypeList=tRoottypeService.getbTRoottype();/ 獲得子類型集合List stRoottypesList=tRoottypeService.getsTRoottype();model.addAttribute(bt

3、RoottypeList,btRoottypeList); model.addAttribute(stRoottypeList,stRoottypesList);/ 曬單分享RequestMapping(currentPageNo/shareShow)public String shareShow(PathVariable Integer currentPageNo,Model model) int pageSize = 20;pageSize);PageSupport page = showService.getShowluckPage(currentPageNo, page.setCurr

4、entPageNo(currentPageNo);page.setPageSize(pageSize);List list = page.getList();for (Object object : list) TShowluck ts = (TShowluck)object;String uimg = ts.gettUser().getUimg();System.out.println(before+uimg);if(null=uimg|=uimg)ts.gettUser().setUimg(defaultUserFace.png);page.setList(list);ts.gettPer

5、iod().getGid();this.Type(model);model.addAttribute(page, page);return view/new20;/ 曬單分享詳細(xì)頁面RequestMapping(/showid/shareDetail)public String shareDetail(PathVariable Integer showid,Model model) TShowluck showluck = showService.findShowluckBy(showid); List showlucks = showService.getShowluckList();if(

6、null=showluck.gettUser().getUimg()|=showluck.gettUser().getUimg()showluck.gettUser().setUimg(defaultUserFace.png);TPeriods nowTperiods=tPeriodsService.findNowPeriods(showluck.gettPeriod().getGid();model.addAttribute(nowTperiods, nowTperiods);model.addAttribute(showlucks, showlucks);model.addAttribut

7、e(showluck, showluck);this.Type(model);model.addAttribute(url, Url.url);return view/shareShow;/ 用戶個(gè)人主頁面RequestMapping(/sphone/userInfo)sphone,Modelpublic String userInfo(PathVariable String model,HttpServletRequest request)List ods = showService.getOrderdetailListBy(sphone);String message = TA 還沒有購買

8、任何商品 ;TUser user = showService.getUserBy(sphone);if(null=user.getUimg()|=user.getUimg()user.setUimg(defaultUserFace.png);String userPhone = user.getSphone();String trueName = user.getTrueName();String uimg = user.getUimg();model.addAttribute(userPhone, userPhone); model.addAttribute(trueName, trueNa

9、me); model.addAttribute(uimg, uimg);if(ods.size()0)model.addAttribute(ods, ods);elsemodel.addAttribute(message, message);this.Type(model);model.addAttribute(url, Url.url);return user/user;/ 用戶購買記錄頁面RequestMapping(/sphone/userBuy)sphone,Modelpublic String userBuy(PathVariable String model,HttpServlet

10、Request request)List ods = showService.getOrderdetailListBy(sphone); for (TOrderdetails tOrder : ods) System.out.println(tOrder.gettPeriods().getUid();TUser winner showService.findUserBy(tOrder.gettPeriods().getUid();tOrder.gettPeriods().settUser(winner);String message = TA 還沒有購買任何商品 ;TUser user = s

11、howService.getUserBy(sphone); if(null=user.getUimg()|=user.getUimg() user.setUimg(defaultUserFace.png);String userPhone = user.getSphone();String trueName = user.getTrueName();String uimg = user.getUimg(); model.addAttribute(userPhone, userPhone); model.addAttribute(trueName, trueName); model.addAtt

12、ribute(uimg, uimg);if(ods.size()0)model.addAttribute(ods, ods);elsemodel.addAttribute(message, message);this.Type(model);model.addAttribute(url, Url.url);return user/userBuy;/ 用戶獲獎記錄 userRaffle 頁面 RequestMapping(/sphone/userRaffle) public String userRaffle(PathVariable String model,HttpServletReques

13、t request)TUser winner = showService.getUserBy(sphone);System.out.println(+winner.getTrueName()+ +winner.getUid();List periods = showService.getUserPrizeBy(winner.getUid(); for (TPeriods tp : periods) System.out.println(+tp.gettGood().getPics().get(0).getPicUr l()+ +tp.getPic()+ +tp.getPeriods();Str

14、ing message = TA 還沒有獲得任何商品 ; TUser user = showService.getUserBy(sphone); if(null=user.getUimg()|=user.getUimg() user.setUimg(defaultUserFace.png);String userPhone = user.getSphone();String trueName = user.getTrueName();String uimg = user.getUimg(); model.addAttribute(userPhone, userPhone); model.add

15、Attribute(trueName, trueName); model.addAttribute(uimg, uimg);if(periods.size()0) model.addAttribute(periods, periods);else model.addAttribute(message, message); this.Type(model); model.addAttribute(url, Url.url); return user/userRaffle;/ 用戶曬單頁面RequestMapping(/sphone/userPost) public String userPost

16、(PathVariable String model,HttpServletRequest request)List tShows = showService.findShowluckListBy(sphone); String message = TA 還沒有曬單哦 ;sphone,Modelsphone,ModelTUser user = showService.getUserBy(sphone); if(null=user.getUimg()|=user.getUimg()user.setUimg(defaultUserFace.png);String userPhone = user.

17、getSphone();String trueName = user.getTrueName();String uimg = user.getUimg(); model.addAttribute(userPhone, userPhone); model.addAttribute(trueName, trueName); model.addAttribute(uimg, uimg); if(tShows.size()0) model.addAttribute(tShows, tShows);else model.addAttribute(message, message);this.Type(m

18、odel);return user/userPost;/ 最新購買記錄RequestMapping(/newRecord)public String newRecord(Model model)List newRecords = showService.getNewOrderList();List buyCounts = showService.getBuyCounts();int totalCount = 0;for (Integer count : buyCounts) totalCount = totalCount + count;this.Type(model);model.addAt

19、tribute(totalCount, totalCount);model.addAttribute(newRecords, newRecords);return view/getNewRecord;/ 新手指南頁面RequestMapping(/help)public String help(Model model)this.Type(model);return help/help; RequestMapping(/lottery/currentPageNo) public String lottery(PathVariable Integer currentPageNo,Model mod

20、el)TPeriodsQuery tPQuery=new TPeriodsQuery(); tPQuery.setPageNow(currentPageNo); tPQuery.setPageSize(12);PageSupport page = showService.getAnnouncePage(tPQuery); List list = page.getList();this.Type(model);model.addAttribute(page, page); model.addAttribute(url, Url.url); return view/lottery;/ 最新揭曉Re

21、questMapping(/announce)ResponseBodypublic PageSupport announce(RequestParam Integer currentPageNo,Model model) TPeriodsQuery tPQuery=new TPeriodsQuery(); tPQuery.setPageNow(currentPageNo);tPQuery.setPageSize(12);PageSupport page = showService.getAnnouncePage(tPQuery);List list = page.getList(); this

22、.Type(model); model.addAttribute(page, page); model.addAttribute(url, Url.url); return page;/ 進(jìn)入邀請好友頁面RequestMapping(value=/referAuth)public String referAuth(HttpServletRequest request,Model model)throws ExceptionTUser user=(TUser)request.getSession().getAttribute(user);/TUser user=userService.getUs

23、erBy(1); if(user=null)return redirect:/view/noLoginReferAuth;request.getSession().setAttribute(user, user); this.Type(model);return /user/loginReferAuth;/ 未登錄進(jìn)入邀請頁面 RequestMapping(/noLoginReferAuth) public String noLoginReferAuth(Model model)this.Type(model);return user/referAuth;public interface ShowMapper / 獲取曬單public List findShowluckList(Param(currentPageNo)Integer currentPageNo,Param(pageSize)Integer pageSize);p

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論