diff --git a/src/main/java/com/jeecg/demo/dao/JeecgMinidaoDao.java b/src/main/java/com/jeecg/demo/dao/JeecgMinidaoDao.java index 62a500ac..953a9add 100644 --- a/src/main/java/com/jeecg/demo/dao/JeecgMinidaoDao.java +++ b/src/main/java/com/jeecg/demo/dao/JeecgMinidaoDao.java @@ -3,6 +3,8 @@ package com.jeecg.demo.dao; import java.util.List; import java.util.Map; +import com.zzjee.ba.entity.BaGoodsCategoryEntity; +import com.zzjee.ba.vo.BaGoodsCategoryVoo; import org.jeecgframework.minidao.annotation.Arguments; import org.jeecgframework.minidao.annotation.MiniDao; import org.jeecgframework.minidao.annotation.ResultType; @@ -13,41 +15,51 @@ import com.jeecg.demo.entity.JeecgLogReport; /** * Minidao例子 - * + * */ @MiniDao public interface JeecgMinidaoDao { - + /** - * @Description + * @Description * @Author xushanchang * @Date 2021/7/411:08 - * @Param + * @Param * @return **/ @Arguments("pid") @Sql("select ID,NAME,PID from t_s_region where pid=:pid order by name_en") List> getProCity(String pid); - + @Sql("select ID,NAME,PID from t_s_region order by name_en") List> getAllRegions(); - - - @Arguments({"jeecgDemo", "page", "rows"}) + + @Sql("select ID,category_name as categoryName,PID from ba_goods_category where pid is null") + List getAllBaGoodsCategorys(); + + @Arguments("pid") + @Sql("select ID,category_name as categoryName,PID from ba_goods_category where pid=:pid") + List getAllBaGoodsCategorys(String pid); + + @Arguments({"jeecgDemo", "page", "rows"}) @ResultType(JeecgDemoEntity.class) public List getAllEntities(JeecgDemoEntity jeecgDemo, int page, int rows); + @Arguments({"baGoodsCategory", "page", "rows"}) + @ResultType(BaGoodsCategoryEntity.class) + public List getAllEntities(BaGoodsCategoryEntity baGoodsCategory, int page, int rows); + @Sql("SELECT count(*) FROM jeecg_demo") Integer getCount(); @Sql("SELECT SUM(salary) FROM jeecg_demo") Integer getSumSalary(); - + @Arguments("id") @ResultType(String.class) @Sql("SELECT org_code FROM t_s_depart where id=:id") public java.lang.String getOrgCode(String id); - + /*@Arguments({"jeecgMinidao", "page", "rows"}) public List getAllEntities(JeecgMinidaoEntity jeecgMinidao, int page, int rows); @@ -58,7 +70,7 @@ public interface JeecgMinidaoDao { //@Arguments("id") //JeecgMinidaoEntity getJeecgMinidao(String id); -/* +/* */ /*@Arguments("jeecgMinidao") @@ -69,11 +81,11 @@ public interface JeecgMinidaoDao { @Arguments("jeecgMinidao") void delete(JeecgMinidaoEntity jeecgMinidao);*/ - + @Arguments("log") @ResultType(JeecgLogReport.class) List getLogReportData(JeecgLogReport log); - + @Arguments("log") List> getLogChartData(JeecgLogReport log); } diff --git a/src/main/java/com/zzjee/ba/controller/BaGoodsCategoryController.java b/src/main/java/com/zzjee/ba/controller/BaGoodsCategoryController.java index 168d353c..99714fe4 100644 --- a/src/main/java/com/zzjee/ba/controller/BaGoodsCategoryController.java +++ b/src/main/java/com/zzjee/ba/controller/BaGoodsCategoryController.java @@ -1,4 +1,5 @@ package com.zzjee.ba.controller; +import com.jeecg.demo.dao.JeecgMinidaoDao; import com.zzjee.ba.entity.BaGoodsCategoryEntity; import com.zzjee.ba.service.BaGoodsCategoryServiceI; import java.util.ArrayList; @@ -7,11 +8,11 @@ import java.text.SimpleDateFormat; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import com.zzjee.ba.vo.BaGoodsCategoryVo; +import com.zzjee.ba.vo.BaGoodsCategoryVoo; import org.apache.log4j.Logger; -import org.jeecgframework.core.common.service.CommonService; +import org.jeecgframework.core.common.model.json.ComboTree; +import org.jeecgframework.tag.vo.easyui.ComboTreeModel; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpMethod; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; @@ -72,7 +73,7 @@ import org.springframework.web.util.UriComponentsBuilder; * @Title: Controller * @Description: 商品类目 * @author onlineGenerator - * @date 2021-08-20 10:29:34 + * @date 2021-08-25 17:16:36 * @version V1.0 * */ @@ -91,8 +92,7 @@ public class BaGoodsCategoryController extends BaseController { @Autowired private Validator validator; @Autowired - private CommonService commonService; - + private JeecgMinidaoDao jeecgMinidaoDao; /** @@ -105,18 +105,131 @@ public class BaGoodsCategoryController extends BaseController { return new ModelAndView("com/zzjee/ba/baGoodsCategoryList"); } + /** + * 父级DEMO下拉菜单 + */ + @RequestMapping(params = "getComboTreeData") + @ResponseBody + public List getComboTreeData(HttpServletRequest request, ComboTree comboTree) { + System.out.println("======================getComboTreeData comboTree:==================="+comboTree); + List balist=new ArrayList(); + balist = jeecgMinidaoDao.getAllBaGoodsCategorys(); + /*for (int i = 0; i < demoList.size(); i++) { + BaGoodsCategoryVoo cat = new BaGoodsCategoryVoo(); + String id=String.valueOf(demoList.get(i).get("id")); + String categoryName=String.valueOf(demoList.get(i).get("categoryName")); +// System.out.println(id+" "+categoryName); + cat.setId(id); + cat.setCategoryName(categoryName); + if (demoList.get(i).get("pid")!=null) { + String pid=String.valueOf(demoList.get(i).get("pid")); + cat.setPid(pid); + } + System.out.println(cat.toString()); + balist.add(cat); + }*/ + for (int i = 0; i allBaGoodsCategorys = jeecgMinidaoDao.getAllBaGoodsCategorys(id); + for (int j = 0; j allBaGoodsCategorys1 = jeecgMinidaoDao.getAllBaGoodsCategorys(id1); + for (int k = 0; k allBaGoodsCategorys2 = jeecgMinidaoDao.getAllBaGoodsCategorys(id2); + allBaGoodsCategorys.get(k).setBaGoodsCategory(allBaGoodsCategorys2); + } + allBaGoodsCategorys.get(j).setBaGoodsCategory(allBaGoodsCategorys1); + } + balist.get(i).setBaGoodsCategory(allBaGoodsCategorys); + } +// +// List comboTrees = new ArrayList(); + ComboTreeModel comboTreeModel = new ComboTreeModel("id", "categoryName", "baGoodsCategory"); + System.out.println("======================getComboTreeData demoList:==================="+balist.size()); + List comboTrees = systemService.ComboTree(balist, comboTreeModel, null, true); + return comboTrees; + } + + /** + * 加载ztree + * + * @param response + * @param request + * @return + */ + /*@RequestMapping(params = "getTreeData", method = {RequestMethod.GET, RequestMethod.POST}) + @ResponseBody + public AjaxJson getTreeData(BaGoodsCategoryEntity baGoodsCategory1, HttpServletResponse response, HttpServletRequest request) { + AjaxJson j = new AjaxJson(); + try { +// List depatrList = new ArrayList(); + StringBuffer hql = new StringBuffer(" from BaGoodsCategoryEntity t"); + //hql.append(" and (parent.id is null or parent.id='')"); + List catList = this.systemService.findHql(hql.toString()); + List> dataList = new ArrayList>(); + Map map = null; + for (BaGoodsCategoryEntity baGoodsCategory : catList) { + String sqls = null; + Object[] paramss = null; + map = new HashMap(); + map.put("id", baGoodsCategory.getId()); + map.put("name", baGoodsCategory.getCategoryName()); + if (baGoodsCategory.getPid() != 0) { + map.put("pId", baGoodsCategory.getPid()); + map.put("open", false); + } else { + map.put("pId", "1"); + map.put("open", false); + } + sqls = "select count(1) from ba_goods_category t where t.pid = ?"; + paramss = new Object[]{baGoodsCategory.getId()}; + long counts = this.systemService.getCountForJdbcParam(sqls, paramss); + if (counts > 0) { + dataList.add(map); + } else { + TSDepart de = this.systemService.get(TSDepart.class, baGoodsCategory.getId()); + if (de != null) { + map.put("id", de.getId()); + map.put("name", de.getDepartname()); + if (baGoodsCategory.getPid() != 0) { + map.put("pId", baGoodsCategory.getPid()); + map.put("open", false); + } else { + map.put("pId", "1"); + map.put("open", false); + } + dataList.add(map); + } else { + map.put("open", false); + dataList.add(map); + } + } + } + j.setObj(dataList); + } catch (Exception e) { + e.printStackTrace(); + } + return j; + }*/ /** * easyui AJAX请求数据 * * @param request * @param response * @param dataGrid - * @param user +// * @param user */ @RequestMapping(params = "datagrid") public void datagrid(BaGoodsCategoryEntity baGoodsCategory,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { CriteriaQuery cq = new CriteriaQuery(BaGoodsCategoryEntity.class, dataGrid); + if(baGoodsCategory.getId()==null){ + cq.isNull("pid"); + }else{ + cq.eq("pid", baGoodsCategory.getId()); + baGoodsCategory.setId(null); + } //查询条件组装器 org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, baGoodsCategory, request.getParameterMap()); try{ @@ -134,7 +247,7 @@ public class BaGoodsCategoryController extends BaseController { } cq.add(); this.baGoodsCategoryService.getDataGridReturn(cq, true); - TagUtil.datagrid(response, dataGrid); + TagUtil.treegrid(response, dataGrid); } /** @@ -193,7 +306,7 @@ public class BaGoodsCategoryController extends BaseController { /** * 添加商品类目 * - * @param ids +// * @param ids * @return */ @RequestMapping(params = "doAdd") @@ -203,6 +316,9 @@ public class BaGoodsCategoryController extends BaseController { AjaxJson j = new AjaxJson(); message = "商品类目添加成功"; try{ + if(baGoodsCategory.getPid()==null){ + baGoodsCategory.setPid(null); + } baGoodsCategoryService.save(baGoodsCategory); systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO); }catch(Exception e){ @@ -217,7 +333,7 @@ public class BaGoodsCategoryController extends BaseController { /** * 更新商品类目 * - * @param ids +// * @param ids * @return */ @RequestMapping(params = "doUpdate") @@ -229,6 +345,9 @@ public class BaGoodsCategoryController extends BaseController { BaGoodsCategoryEntity t = baGoodsCategoryService.get(BaGoodsCategoryEntity.class, baGoodsCategory.getId()); try { MyBeanUtils.copyBeanNotNull2Bean(baGoodsCategory, t); + if(t.getPid()==null){ + t.setPid(null); + } baGoodsCategoryService.saveOrUpdate(t); systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); } catch (Exception e) { @@ -383,7 +502,7 @@ public class BaGoodsCategoryController extends BaseController { return new ResponseEntity(HttpStatus.NO_CONTENT); } //按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象. - int id = baGoodsCategory.getId(); + Integer id = baGoodsCategory.getId(); URI uri = uriBuilder.path("/rest/baGoodsCategoryController/" + id).build().toUri(); HttpHeaders headers = new HttpHeaders(); headers.setLocation(uri); @@ -416,62 +535,4 @@ public class BaGoodsCategoryController extends BaseController { public void delete(@PathVariable("id") String id) { baGoodsCategoryService.deleteEntityById(BaGoodsCategoryEntity.class, id); } - - @RequestMapping(params = "getGoodsTreeList") - @ResponseBody - public AjaxJson getGoodsTreeList(){ - - List treeList = new ArrayList<>(); - List dataList = systemService.findHql("from BaGoodsCategoryEntity order by id"); - - for (BaGoodsCategoryEntity baGoodsCategoryEntity : dataList) { - - BaGoodsCategoryVo baGoodsCategoryVo = new BaGoodsCategoryVo(); - baGoodsCategoryVo.setLabel(baGoodsCategoryEntity.getCategoryName()); - baGoodsCategoryVo.setValue(baGoodsCategoryEntity.getId()); - baGoodsCategoryVo.setPid(baGoodsCategoryEntity.getPid()); - if (baGoodsCategoryVo.getPid() == null){ - System.out.println(); - } - if (baGoodsCategoryVo.getPid() == 0) { - treeList.add(baGoodsCategoryVo); - }else { - BaGoodsCategoryVo parent = findParent(treeList,baGoodsCategoryVo.getPid()); - if(parent!=null){ - if(parent.getChildren()==null){ - parent.setChildren(new ArrayList<>()); - } - parent.getChildren().add(baGoodsCategoryVo); - } else { - treeList.add(baGoodsCategoryVo); - } - } - } - AjaxJson ajaxJson = new AjaxJson(); - ajaxJson.setSuccess(true); - ajaxJson.setMsg("查询成功"); - ajaxJson.setObj(treeList); - - - return ajaxJson; - - } - - private BaGoodsCategoryVo findParent(List treeList, Integer pid) { - BaGoodsCategoryVo find = null; - for(BaGoodsCategoryVo baGoodsCategoryVo:treeList){ - if(baGoodsCategoryVo.getValue().equals(pid)){ - find = baGoodsCategoryVo; - break; - } else if(baGoodsCategoryVo.getChildren()!=null) { - find = findParent(baGoodsCategoryVo.getChildren(),pid); - if(find!=null){ - break; - } - } - } - return find; - } - - } diff --git a/src/main/java/com/zzjee/ba/entity/BaGoodsCategoryEntity.java b/src/main/java/com/zzjee/ba/entity/BaGoodsCategoryEntity.java index 59585164..96b2b440 100644 --- a/src/main/java/com/zzjee/ba/entity/BaGoodsCategoryEntity.java +++ b/src/main/java/com/zzjee/ba/entity/BaGoodsCategoryEntity.java @@ -1,28 +1,27 @@ package com.zzjee.ba.entity; import java.math.BigDecimal; +import java.util.ArrayList; import java.util.Date; import java.lang.String; import java.lang.Double; import java.lang.Integer; import java.math.BigDecimal; +import javax.persistence.*; import javax.xml.soap.Text; import java.sql.Blob; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import java.util.List; + +import com.zzjee.ba.vo.BaGoodsCategoryVoo; import org.hibernate.annotations.GenericGenerator; -import javax.persistence.SequenceGenerator; import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecgframework.web.system.pojo.base.TSDepart; /** * @Title: Entity * @Description: 商品类目 * @author onlineGenerator - * @date 2021-08-20 10:29:34 + * @date 2021-08-25 17:16:36 * @version V1.0 * */ @@ -31,46 +30,54 @@ import org.jeecgframework.poi.excel.annotation.Excel; @SuppressWarnings("serial") public class BaGoodsCategoryEntity implements java.io.Serializable { /**id*/ - @Excel(name="类目id") - private Integer id; + private java.lang.Integer id; /**创建人名称*/ - private String createName; + private java.lang.String createName; /**创建人登录名称*/ - private String createBy; + private java.lang.String createBy; /**创建日期*/ - private Date createTime; + private java.util.Date createTime; /**更新人名称*/ - private String updateName; + private java.lang.String updateName; /**更新人登录名称*/ - private String updateBy; + private java.lang.String updateBy; /**更新日期*/ - private Date updateTime; + private java.util.Date updateTime; /**所属部门*/ - private String sysOrgCode; + private java.lang.String sysOrgCode; /**类目编码*/ @Excel(name="类目编码") - private String categoryCode; + private java.lang.String categoryCode; /**类目名称*/ @Excel(name="类目名称") - private String categoryName; + private java.lang.String categoryName; /**类目级别*/ @Excel(name="类目级别") - private Integer categoryLevel; + private java.lang.Integer categoryLevel; /**父级目录*/ @Excel(name="父级目录") - private Integer pid; + private java.lang.Integer pid; /**是否为顶级目录*/ @Excel(name="是否为顶级目录") - private String topNode; + private java.lang.String topNode; + private List baGoodsCategory; + + public List getBaGoodsCategory() { + return baGoodsCategory; + } + + public void setBaGoodsCategory(List baGoodsCategory) { + this.baGoodsCategory = baGoodsCategory; + } /** *方法: 取得java.lang.Integer *@return: java.lang.Integer id */ @Id @GeneratedValue(strategy = GenerationType.AUTO) - @Column(name ="ID",nullable=false,length=10) - public Integer getId(){ + @Column(name ="ID",length=10) + public java.lang.Integer getId(){ return this.id; } @@ -78,7 +85,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.lang.Integer *@param: java.lang.Integer id */ - public void setId(Integer id){ + public void setId(java.lang.Integer id){ this.id = id; } /** @@ -86,7 +93,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.lang.String 创建人名称 */ @Column(name ="CREATE_NAME",nullable=true,length=50) - public String getCreateName(){ + public java.lang.String getCreateName(){ return this.createName; } @@ -94,7 +101,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.lang.String *@param: java.lang.String 创建人名称 */ - public void setCreateName(String createName){ + public void setCreateName(java.lang.String createName){ this.createName = createName; } /** @@ -102,7 +109,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.lang.String 创建人登录名称 */ @Column(name ="CREATE_BY",nullable=true,length=50) - public String getCreateBy(){ + public java.lang.String getCreateBy(){ return this.createBy; } @@ -110,7 +117,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.lang.String *@param: java.lang.String 创建人登录名称 */ - public void setCreateBy(String createBy){ + public void setCreateBy(java.lang.String createBy){ this.createBy = createBy; } /** @@ -118,7 +125,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.util.Date 创建日期 */ @Column(name ="CREATE_TIME",nullable=true) - public Date getCreateTime(){ + public java.util.Date getCreateTime(){ return this.createTime; } @@ -126,7 +133,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.util.Date *@param: java.util.Date 创建日期 */ - public void setCreateTime(Date createTime){ + public void setCreateTime(java.util.Date createTime){ this.createTime = createTime; } /** @@ -134,7 +141,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.lang.String 更新人名称 */ @Column(name ="UPDATE_NAME",nullable=true,length=50) - public String getUpdateName(){ + public java.lang.String getUpdateName(){ return this.updateName; } @@ -142,7 +149,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.lang.String *@param: java.lang.String 更新人名称 */ - public void setUpdateName(String updateName){ + public void setUpdateName(java.lang.String updateName){ this.updateName = updateName; } /** @@ -150,7 +157,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.lang.String 更新人登录名称 */ @Column(name ="UPDATE_BY",nullable=true,length=50) - public String getUpdateBy(){ + public java.lang.String getUpdateBy(){ return this.updateBy; } @@ -158,7 +165,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.lang.String *@param: java.lang.String 更新人登录名称 */ - public void setUpdateBy(String updateBy){ + public void setUpdateBy(java.lang.String updateBy){ this.updateBy = updateBy; } /** @@ -166,7 +173,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.util.Date 更新日期 */ @Column(name ="UPDATE_TIME",nullable=true) - public Date getUpdateTime(){ + public java.util.Date getUpdateTime(){ return this.updateTime; } @@ -174,7 +181,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.util.Date *@param: java.util.Date 更新日期 */ - public void setUpdateTime(Date updateTime){ + public void setUpdateTime(java.util.Date updateTime){ this.updateTime = updateTime; } /** @@ -182,7 +189,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.lang.String 所属部门 */ @Column(name ="SYS_ORG_CODE",nullable=true,length=50) - public String getSysOrgCode(){ + public java.lang.String getSysOrgCode(){ return this.sysOrgCode; } @@ -190,7 +197,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.lang.String *@param: java.lang.String 所属部门 */ - public void setSysOrgCode(String sysOrgCode){ + public void setSysOrgCode(java.lang.String sysOrgCode){ this.sysOrgCode = sysOrgCode; } /** @@ -198,7 +205,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.lang.String 类目编码 */ @Column(name ="CATEGORY_CODE",nullable=true,length=50) - public String getCategoryCode(){ + public java.lang.String getCategoryCode(){ return this.categoryCode; } @@ -206,7 +213,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.lang.String *@param: java.lang.String 类目编码 */ - public void setCategoryCode(String categoryCode){ + public void setCategoryCode(java.lang.String categoryCode){ this.categoryCode = categoryCode; } /** @@ -214,7 +221,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.lang.String 类目名称 */ @Column(name ="CATEGORY_NAME",nullable=true,length=50) - public String getCategoryName(){ + public java.lang.String getCategoryName(){ return this.categoryName; } @@ -222,7 +229,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.lang.String *@param: java.lang.String 类目名称 */ - public void setCategoryName(String categoryName){ + public void setCategoryName(java.lang.String categoryName){ this.categoryName = categoryName; } /** @@ -230,7 +237,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.lang.Integer 类目级别 */ @Column(name ="CATEGORY_LEVEL",nullable=true,length=10) - public Integer getCategoryLevel(){ + public java.lang.Integer getCategoryLevel(){ return this.categoryLevel; } @@ -238,7 +245,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.lang.Integer *@param: java.lang.Integer 类目级别 */ - public void setCategoryLevel(Integer categoryLevel){ + public void setCategoryLevel(java.lang.Integer categoryLevel){ this.categoryLevel = categoryLevel; } /** @@ -246,7 +253,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.lang.Integer 父级目录 */ @Column(name ="PID",nullable=true,length=10) - public Integer getPid(){ + public java.lang.Integer getPid(){ return this.pid; } @@ -254,7 +261,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.lang.Integer *@param: java.lang.Integer 父级目录 */ - public void setPid(Integer pid){ + public void setPid(java.lang.Integer pid){ this.pid = pid; } /** @@ -262,7 +269,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *@return: java.lang.String 是否为顶级目录 */ @Column(name ="TOP_NODE",nullable=true,length=10) - public String getTopNode(){ + public java.lang.String getTopNode(){ return this.topNode; } @@ -270,7 +277,7 @@ public class BaGoodsCategoryEntity implements java.io.Serializable { *方法: 设置java.lang.String *@param: java.lang.String 是否为顶级目录 */ - public void setTopNode(String topNode){ + public void setTopNode(java.lang.String topNode){ this.topNode = topNode; } } diff --git a/src/main/java/com/zzjee/ba/vo/BaGoodsCategoryVoo.java b/src/main/java/com/zzjee/ba/vo/BaGoodsCategoryVoo.java new file mode 100644 index 00000000..7d6d87cc --- /dev/null +++ b/src/main/java/com/zzjee/ba/vo/BaGoodsCategoryVoo.java @@ -0,0 +1,51 @@ +package com.zzjee.ba.vo; + +import java.util.List; + +/** + * @Package com.zzjee.ba.vo + * @date 2021/8/20 11:38 上午 + * @description + */ +public class BaGoodsCategoryVoo { + + private String categoryName; + + private String id; + + private String pid; + + private List baGoodsCategory; + + public String getCategoryName() { + return categoryName; + } + + public void setCategoryName(String categoryName) { + this.categoryName = categoryName; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public List getBaGoodsCategory() { + return baGoodsCategory; + } + + public void setBaGoodsCategory(List baGoodsCategory) { + this.baGoodsCategory = baGoodsCategory; + } +} diff --git a/src/main/java/com/zzjee/md/controller/MdGoodsController.java b/src/main/java/com/zzjee/md/controller/MdGoodsController.java index ba30be60..2eb82e62 100644 --- a/src/main/java/com/zzjee/md/controller/MdGoodsController.java +++ b/src/main/java/com/zzjee/md/controller/MdGoodsController.java @@ -342,8 +342,7 @@ public class MdGoodsController extends BaseController { @RequestMapping(params = "goAdd") public ModelAndView goAdd(MdGoodsEntity mdGoods, HttpServletRequest req) { if (StringUtil.isNotEmpty(mdGoods.getId())) { - mdGoods = mdGoodsService.getEntity(MdGoodsEntity.class, - mdGoods.getId()); + mdGoods = mdGoodsService.getEntity(MdGoodsEntity.class,mdGoods.getId()); req.setAttribute("mdGoodsPage", mdGoods); } return new ModelAndView("com/zzjee/md/mdGoods-add"); diff --git a/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategory-add.jsp b/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategory-add.jsp index a0c6ab03..8511c6c3 100644 --- a/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategory-add.jsp +++ b/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategory-add.jsp @@ -5,6 +5,54 @@ 商品类目 + + + @@ -72,10 +120,34 @@ - + diff --git a/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategory-update.jsp b/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategory-update.jsp index 1911e3ac..dfddc5ff 100644 --- a/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategory-update.jsp +++ b/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategory-update.jsp @@ -5,6 +5,54 @@ 商品类目 + + + @@ -69,9 +117,37 @@ - + diff --git a/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategoryList.jsp b/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategoryList.jsp index 7d74e426..b58d23cd 100644 --- a/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategoryList.jsp +++ b/src/main/webapp/webpage/com/zzjee/ba/baGoodsCategoryList.jsp @@ -3,9 +3,9 @@
- + - + @@ -13,9 +13,9 @@ - - - + + + @@ -32,6 +32,15 @@ diff --git a/src/main/webapp/webpage/com/zzjee/md/mdGoods-add.jsp b/src/main/webapp/webpage/com/zzjee/md/mdGoods-add.jsp index ae3ee064..67f63abd 100644 --- a/src/main/webapp/webpage/com/zzjee/md/mdGoods-add.jsp +++ b/src/main/webapp/webpage/com/zzjee/md/mdGoods-add.jsp @@ -1,5 +1,6 @@ <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/context/mytags.jsp"%> + @@ -86,6 +87,7 @@ function counttiji(){
+
价格
@@ -152,7 +154,16 @@ function counttiji(){
- +
+
+ 商品类目 +
+
+ + + +
+
@@ -185,7 +196,6 @@ function counttiji(){
-
日文名称
diff --git a/src/main/webapp/webpage/com/zzjee/md/mdGoodsList.jsp b/src/main/webapp/webpage/com/zzjee/md/mdGoodsList.jsp index d4e4bad4..23f2e894 100644 --- a/src/main/webapp/webpage/com/zzjee/md/mdGoodsList.jsp +++ b/src/main/webapp/webpage/com/zzjee/md/mdGoodsList.jsp @@ -29,6 +29,7 @@ +