/** * 查询所有导航 * * @return */ @Action( value = "findAllSiteNavigationT", results = {@Result(name = "json", type = "json")}) public String findAllSiteNavigationT() { if (StaticKey.SC.equals(this.getQtype())) { this.findDefaultAllSiteNavigation(); } else { if (Validate.StrisNull(this.getQuery())) { return "json"; } else { return "json"; } } return "json"; }
/** * 查询所有模板文件和系统内容设定 * * @return */ @Action( value = "findAllTemplatesetT", results = {@Result(name = "json", type = "json")}) public String findAllTemplatesetT() { if ("sc".equals(this.getQtype())) { this.findDefaultAllTemplateset(); } else { if (Validate.StrisNull(this.getQuery())) { return "json"; } else { return "json"; } } return "json"; }
/** 获取所有商品参数 */ @Action( value = "findAllGoodsAttributeT", results = {@Result(name = "json", type = "json")}) public String findAllGoodsAttributeT() { if (StaticKey.SC.equals(this.getQtype())) { this.findDefaultAllGoodsAttributeT(); } else { if (Validate.StrisNull(this.getQuery())) { return "json"; } else { if (this.getQtype().equals("goodsTypeName")) { findGoodsAttributeByParams(); } return "json"; } } return "json"; }
/** * 增加商品类型参数 * * @return */ @Action( value = "addgoodsParameter", results = {@Result(name = "json", type = "json")}) public String addgoodsParameter() { if (Validate.StrisNull(this.getName())) { this.setSucflag(true); return "json"; } List<GoodsTypeTN> list = this.getGoodsTypeTNService().findGoodsTypeTNByName(this.getName()); if (!list.isEmpty()) { GoodsTypeTN gtn = new GoodsTypeTN(); gtn = list.get(0); gtn.setGoodsParameter(this.getGoodsParameter()); if (this.getGoodsTypeTNService().updateGoodsTypeTN(gtn) > 0) { this.setSucflag(true); return "json"; } } return "json"; }
/** * 增加商品类型 * * @return */ @Action( value = "addGoodsTypeTN", results = {@Result(name = "json", type = "json")}) public String addGoodsTypeTN() { if (Validate.StrisNull(this.getName())) { this.setSucflag(true); return "json"; } List<GoodsTypeTN> list = this.getGoodsTypeTNService().findGoodsTypeTNByName(this.getName()); if (list.isEmpty()) { GoodsTypeTN gtn = new GoodsTypeTN(); gtn.setGoodsTypeId(this.getSerial().Serialid(Serial.GOODSTYPE)); gtn.setName(this.getName().trim()); gtn.setCreatetime(BaseTools.systemtime()); gtn.setCreatorid(BaseTools.adminCreateId()); gtn.setGoodsParameter(this.getGoodsParameter()); this.getGoodsTypeTNService().save(gtn); this.setSucflag(true); return "json"; } return "json"; }