




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
將首頁.html<%@pagelanguage="java"<%@pagelanguage="java"contentType="text/html;charset=UTF-8"pageEncoding="UTF-8"<%@<%@taglibprefix="c" /jsp/jstl/core"<%@taglibprefix="fmt" /jsp/jstl/fmt"<c:setvar="ctx"<mvc:resourceslocation="/WEB-INF/static/"="/**"<bean<propertyname="prefix"value="/WEB-<propertyname="suffix"、批量修改jsp中資源文件路css/替換為${ctx}/css/js/替換為$(ctx)/js/images/替換為、ego-manager-pojo中GoodsCategoryGoodsCategoryExampleego-rpc-pojoGoodsCategoryVopackageimportimportpublicclassGoodsCategoryVoimplementsSerializableprivateList<GoodsCategoryVo>*idprivateShort*商品分類名稱privateStringpublicList<GoodsCategoryVo>getChildren()return}publicvoidsetChildren(List<GoodsCategoryVo>children)this.children=}publicShortgetId()return}publicvoidsetId(Shortid)this.id=}publicStringgetName()return}publicvoidsetName(Stringname)=}publicStringtoString()return"GoodsCategoryVo{"+"children="+children+",id="+id+",name='"+name+'\''}}、ego-manager-mapperGoodsCategoryMapper.java、ego-rpc-mapperpackagepackageimportimport@version(版本號@author(創(chuàng)建人@since:JDKpublicinterfaceGoodsCategoryServiceI*List<GoodsCategoryVo>}ego-rpc-serviceImpl中packageimportimportimportcom.ego.pojo.GoodsCategoryExample;importcom.ego.vo.GoodsCategoryVo;importimportimportimport@version(版本號@author(創(chuàng)建人@since:JDKpublicclassGoodsCategoryServiceImplimplementsGoodsCategoryServiceIprivateGoodsCategoryMapper*publicList<GoodsCategoryVo>selectCategoryListFroPortal()return}GoodsCategoryExampleexample=newwhere0,List<GoodsCategory>gcList1=List<GoodsCategoryVo>gcvList1=newfor(GoodsCategorygc1:gcList1)GoodsCategoryVogcv1=new //重新指定where條件parentId,2List<GoodsCategory>gcList2=goodsCategoryMapper.selectByExample(example);List<GoodsCategoryVo>gcvList2=newfor(GoodsCategorygc2:gcList2)GoodsCategoryVogcv2=new //重新指定where條件parentId,3List<GoodsCategory>gcList3=goodsCategoryMapper.selectByExample(example);List<GoodsCategoryVo>gcvList3=newfor(GoodsCategorygc3:gcList3)GoodsCategoryVogcv3=new }}}<?xml<?xmlversion="1.0"encoding="UTF-<beans "" return}}<?xmlversion="1.0"<?xmlversion="1.0"encoding="UTF-<beans "" <dubbo:registryprotocol="zookeeper" <dubbo:protocolname="dubbo"port="${dubbo.port}"<bean oService" <beanid="goodsCategoryService" oServiceI" 中 <dubbo:registryprotocol="zookeeper" oService" oServiceI"packagepackageimportimportcom.ego.util.JsonUtil;importorg.junit.Test;importimportimportimportimport@version(版本號@author(創(chuàng)建人@since:JDK@ContextConfiguration(locations="classpath:spring/applicationContext-*.xml")publicclassGoodsCategoryServiceITest{privateGoodsCategoryServiceIpublicvoidtestSelectCategoryListFroPortal()List<GoodsCategoryVogcvListgoodsCategoryService.selectCategoryListFroPortal();System.out.println("結(jié)果:"+JsonUtil.object2JsonStr(gcvList));}}}springdataredis<?xmlversion="1.0"encoding="UTF-<beans <beanid="jedisPoolConfig" 最大連接數(shù)<propertyname="maxTotal"<propertyname="maxIdle"<propertyname="maxWaitMillis"<propertyname="testOnBorrow"<bean p:use-pool="true"p:host-name="0"p:port="6379" <constructor-argname="poolConfig" <bean te" <property<bean<property<bean<property<bean<property<bean、修改ego-rpc-serviceImpl的packageimportimportimportcom.ego.pojo.GoodsCategoryExample;importcom.ego.util.JsonUtil;importimportimportimport importimport@version(版本號@author(創(chuàng)建人@since:JDKpublicclassGoodsCategoryServiceImplimplementsGoodsCategoryServiceIprivate te<String,Object> privateGoodsCategoryMapper**publicList<GoodsCategoryVo>selectCategoryListFroPortal()List<GoodsCategoryVo>list=null;StringredisKey="goodsCategory:list";StringgoodsJson=(String)redisTem if(null!=goodsJson)returnJsonUtil.jsonToList(goodsJson,list=if(list!=null&&list.size()> return}*publicList<GoodsCategoryVo>selectCategoryListFroViewNormal()GoodsCategoryExampleexample=newwhere00).andLevelEqualTo((byte)1);List<GoodsCategory>gcList1=List<GoodsCategoryVo>gcvList1=newfor(GoodsCategorygc1:gcList1)GoodsCategoryVogcv1=new List<GoodsCategory>gcList2=List<GoodsCategoryVo>gcvList2=newfor(GoodsCategorygc2:gcList2)GoodsCategoryVogcv2=newList<GoodsCategory>gcList3=List<GoodsCategoryVo>gcvList3=newfor(GoodsCategorygc3:gcList3)GoodsCategoryVogcv3=new }}}return}}、packageimportpackageimportimportimportimportimport importimport@version(版本號@author(創(chuàng)建人@since:JDK publicclassGoodsCategoryControllerprivateGoodsCategoryServiceI publicList<GoodsCategoryVo>goodsCategoryList()return}}li<script<scripttype="text/javascript"<script te" {{for(vari=0;i<it.length;i++){<li<h4class="cat_tit"><ahref="#"class="cat_tit_link">{{=it[i].name}}</a><span<div<div{{for(j=0;j<it[i].children.length;j++){<dl<dt><a{{for(k=0;k<it[i].children[j].children.length;k++){<liclass="first"><a{{}{{}<div<li><ahref="#">奧利奧<li><ahref="#">光明<li><a <li><a <li><ahref="#">康師傅<li><ahref="#">蒙牛<li><a<li><a<li><a<li><a<li><a
<li><ahref="#">清新水果季全 {{}<script$(function()data:"",typetype:success:function(result)vartempl= $('.cat_item').mousemove(function()$('.cat_item').mouseleave(function() error:function()}Redisprivateprivate te<String,Object> privateStringpublicBaseResultcategotySave(GoodsCategorygoodsCategory)intresult=if(result>0)redis returnBaseResult.success();}return//returnresult>0?BaseResult.success():}*@parampublicBaseResultcategoryDelete(Shortid)intresult=goodsCategoryMapper.deleteByPrimaryKey(id);if(result>0){//刪除成功后清除redis緩存returnBaseResult.success();}return//returnresult>0?BaseResult.success():}@parampublicBaseResultcategoryListDelete(Short[]ids)intresult=goodsCategoryMapper.deleteBatchByPrimaryKey(ids);if(result>0){returnBaseR
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025標準二手房買賣合同范本協(xié)議
- 廉租房買房合同范本
- 2025xy裝修合同協(xié)議書樣本
- 英文大米購銷合同范本
- 2025短期雇傭退休人員的合同
- 2025租房簡單合同范本
- 農(nóng)業(yè)用地合同范本
- 托管股份轉(zhuǎn)讓合同范例
- 建筑施工工程安全生產(chǎn)協(xié)議二零二五年
- 醫(yī)藥試劑購銷合同范本
- 2024年地理中考模擬考試地理(江蘇泰州卷)(A4考試版)
- 乳腺癌診治指南與規(guī)范(2025年版)解讀
- 2024年上海嘉定區(qū)區(qū)屬國有企業(yè)招聘真題
- 基于核心素養(yǎng)的初中歷史跨學科教學策略研究
- 有理數(shù)的加法說課課件2024-2025學年人教版數(shù)學七年級上冊
- GB/T 18655-2025車輛、船和內(nèi)燃機無線電騷擾特性用于保護車載接收機的限值和測量方法
- 2025年江蘇南通蘇北七市高三二模語文作文分析
- 吉林省吉林市2024-2025學年高三下學期3月三模試題 生物 含答案
- 遼寧省協(xié)作校2024-2025學年度下學期高三第一次模擬考試語文+答案
- 2025年03月中央社會工作部所屬事業(yè)單位公開招聘11人筆試歷年參考題庫考點剖析附解題思路及答案詳解
- 2025年中高端女裝市場趨勢與前景深度分析
評論
0/150
提交評論