Ejemplo n.º 1
0
 private void findGoodsTypeTNByParams() {
   int currentPage = page;
   int lineSize = rp;
   String qs =
       "select count(*) from GoodsTypeTN  where "
           + this.getQtype()
           + " like '%"
           + this.getQuery().trim()
           + "%' ";
   total = this.getGoodsTypeTNService().countsortAllGoodsTypeTN(qs);
   if (Validate.StrNotNull(getSortname()) && Validate.StrNotNull(getSortorder())) {
     String queryString =
         "from GoodsTypeTN as gtn where gtn."
             + this.getQtype()
             + " like '%"
             + this.getQuery().trim()
             + "%' order by "
             + getSortname()
             + " "
             + getSortorder()
             + "";
     List<GoodsTypeTN> list =
         this.getGoodsTypeTNService().sortAllGoodsTypeTN(currentPage, lineSize, queryString);
     this.ProcessGoodsTypeTNList(list);
   }
 }
Ejemplo n.º 2
0
 public void findDefaultAllGoodsTypeTN() {
   int currentPage = page;
   int lineSize = rp;
   total = this.getGoodsTypeTNService().countfindAllGoodsTypeTN();
   if (Validate.StrNotNull(getSortname()) && Validate.StrNotNull(getSortorder())) {
     String queryString =
         "from GoodsTypeTN  order by " + getSortname() + " " + getSortorder() + "";
     List<GoodsTypeTN> list =
         this.getGoodsTypeTNService().sortAllGoodsTypeTN(currentPage, lineSize, queryString);
     this.ProcessGoodsTypeTNList(list);
   }
 }
Ejemplo n.º 3
0
 /**
  * 加入购物车前查询出商品信息
  *
  * @return
  */
 public GoodsGroupT GetGoodsGroupTForGroupCart() {
   if (Validate.StrNotNull(this.getGroupid())) {
     GoodsGroupT ggt = this.getGoodsGroupTService().findGoodsGroupById(this.getGroupid());
     if (ggt != null) {
       return ggt;
     }
   }
   return null;
 }
Ejemplo n.º 4
0
 /**
  * 根据模块id查询对应功能列表
  *
  * @return
  */
 @Action(
     value = "findAllFunctionMBymoduleid",
     results = {@Result(name = "json", type = "json")})
 public String findAllFunctionMBymoduleid() {
   if (Validate.StrNotNull(this.getModuleid())) {
     this.findDefaultAllFunctionMBymoduleid();
   } else {
     this.findAllFunctionM();
   }
   return "json";
 }
Ejemplo n.º 5
0
 /**
  * 删除商品类型
  *
  * @return
  */
 @Action(
     value = "delGoodsTypeTN",
     results = {@Result(name = "json", type = "json")})
 public String delGoodsTypeTN() {
   if (Validate.StrNotNull(this.getGoodsTypeId())) {
     String[] list = this.getGoodsTypeId().trim().split(",");
     int i = this.getGoodsTypeTNService().delGoodsTypeTN(list);
     return "json";
   }
   return "json";
 }
 public void findDefaultAllSiteNavigation() {
   int currentPage = page;
   int lineSize = rp;
   total = this.getSiteNavigationTService().countfindAllSiteNavigationT(BaseTools.adminCreateId());
   if (Validate.StrNotNull(getSortname()) && Validate.StrNotNull(getSortorder())) {
     String queryString =
         "from SiteNavigationT as st where st.creatorid=:creatorid order by "
             + getSortname()
             + " "
             + getSortorder()
             + "";
     List<SiteNavigationT> list =
         this.getSiteNavigationTService()
             .sortAllSiteNavigationT(
                 currentPage, lineSize, BaseTools.adminCreateId(), queryString);
     if (list != null) {
       this.ProcessSiteNavigationList(list);
     }
   }
 }
Ejemplo n.º 7
0
  /**
   * 删除商品参数
   *
   * @return
   */
  @Action(
      value = "delGoodsAttributeT",
      results = {@Result(name = "json", type = "json")})
  public String delGoodsAttributeT() {

    if (Validate.StrNotNull(this.getGoodsattributeid())) {
      String[] list = StringUtils.split(this.getGoodsattributeid(), ",");
      this.getGoodsAttributeTService().delGoodsAttributeT(list);
      this.setSucflag(true);
      return "json";
    }
    this.setSucflag(false);
    return "json";
  }
Ejemplo n.º 8
0
 /**
  * 更新评论或者回复的显示状态
  *
  * @return
  */
 @Action(
     value = "updateGoodsCommentorReplyByState",
     results = {@Result(name = "json", type = "json")})
 public String updateGoodsCommentorReplyByState() {
   if (Validate.StrNotNull(this.getCommentid())) {
     String[] strs = StringUtils.split(this.getCommentid().trim(), ',');
     String state = this.getState().trim();
     this.getGoodsCommentTService().updateGoodsCommentorReplyByState(state, strs);
     this.setSucflag(true);
     return "json";
   }
   this.setSucflag(false);
   return "json";
 }
Ejemplo n.º 9
0
  /**
   * 删除模板文件和系统内容设定
   *
   * @return
   */
  @Action(
      value = "delTemplatesetT",
      results = {@Result(name = "json", type = "json")})
  public String delTemplatesetT() {

    if (Validate.StrNotNull(this.getTsid())) {
      String[] strs = this.getTsid().split(",");
      this.getTemplatesetTService().delTemplatesetT(strs);
      this.setSucflag(true);
      return "json";
    }
    this.setSucflag(false);
    return "json";
  }
Ejemplo n.º 10
0
 /**
  * 根据id获取商品类型
  *
  * @return
  */
 @Action(
     value = "findGoodsTypeTNById",
     results = {@Result(name = "json", type = "json")})
 public String findGoodsTypeTNById() {
   if (Validate.StrNotNull(this.getGoodsTypeId())) {
     List<GoodsTypeTN> list =
         this.getGoodsTypeTNService().findGoodsTypeTNById(this.getGoodsTypeId().trim());
     if (!list.isEmpty()) {
       bean = new GoodsTypeTN();
       bean = list.get(0);
     }
   }
   return "json";
 }
Ejemplo n.º 11
0
 /**
  * 查询所有导航
  *
  * @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";
 }
Ejemplo n.º 12
0
 /**
  * 查询所有模板文件和系统内容设定
  *
  * @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";
 }
Ejemplo n.º 13
0
 /**
  * 根据id获取功能信息数据
  *
  * @return
  */
 @Action(
     value = "findFunctionMById",
     results = {@Result(name = "json", type = "json")})
 public String findFunctionMById() {
   if (Validate.StrNotNull(this.getId())) {
     bean = this.getFunctionMService().findFunctionMById(this.getId().trim());
     if (bean != null) {
       this.setSucflag(true);
       return "json";
     }
     this.setSucflag(false);
     return "json";
   }
   this.setSucflag(false);
   return "json";
 }
Ejemplo n.º 14
0
 /**
  * 删除系统模块功能
  *
  * @return
  */
 @Action(
     value = "delFunctionM",
     results = {@Result(name = "json", type = "json")})
 public String delFunctionM() {
   if (Validate.StrNotNull(this.getId())) {
     String[] strs = StringUtils.split(this.getId(), ",");
     if (this.getFunctionMService().delFunctionM(strs) > 0) {
       this.setSucflag(true);
       return "json";
     }
     this.setSucflag(false);
     return "json";
   }
   this.setSucflag(false);
   return "json";
 }
Ejemplo n.º 15
0
 /**
  * 更新是否支持关联检索
  *
  * @return
  */
 @Action(
     value = "updateGoodsAttributeissametolinkBygoodsattributeid",
     results = {@Result(name = "json", type = "json")})
 public String updateGoodsAttributeissametolinkBygoodsattributeid() {
   if (Validate.StrNotNull(this.getGoodsattributeid())) {
     String[] strs = StringUtils.split(this.getGoodsattributeid(), ",");
     if (this.getGoodsAttributeTService()
             .updateGoodsAttributeissametolinkBygoodsattributeid(strs, this.getIssametolink())
         > 0) {
       this.setSucflag(true);
       return "json";
     }
     this.setSucflag(false);
     return "json";
   }
   this.setSucflag(false);
   return "json";
 }
Ejemplo n.º 16
0
  /**
   * 根据商品类型来获取对应的商品参数
   *
   * @return
   */
  @Action(
      value = "findGoodsAttributeTByGoodsTypeName",
      results = {@Result(name = "json", type = "json")})
  public String findGoodsAttributeTByGoodsTypeName() {

    if (Validate.StrNotNull(this.getGoodsTypeName())) {
      List<GoodsAttributeT> list =
          this.getGoodsAttributeTService()
              .findGoodsAttributeTByGoodsTypeName(this.getGoodsTypeName().trim());
      if (!list.isEmpty()) {
        beanlist = list;
        this.setSucflag(true);
        return "json";
      }
    }
    this.setSucflag(false);
    return "json";
  }
Ejemplo n.º 17
0
 /** 获取所有商品参数 */
 @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";
 }
Ejemplo n.º 18
0
  /**
   * 根据tsid获取模板文件和系统内容设定值
   *
   * @return
   */
  @Action(
      value = "findTemplatesetTBytsid",
      results = {@Result(name = "json", type = "json")})
  public String findTemplatesetTBytsid() {

    if (Validate.StrNotNull(this.getTsid())) {
      bean = this.getTemplatesetTService().findTemplatesetTBytsid(this.getTsid());
      if (bean != null) {
        this.setSucflag(true);
        return "json";
      } else {
        this.setSucflag(false);
        return "json";
      }
    } else {
      this.setSucflag(false);
      return "json";
    }
  }
Ejemplo n.º 19
0
 /**
  * 后台获取商品的详细评论数据
  *
  * @return
  */
 @Action(
     value = "getGoodscommentDetails",
     results = {@Result(name = "json", type = "json")})
 public String getGoodscommentDetails() {
   if (Validate.StrNotNull(this.getGoodsid())) {
     String goodsid = this.getGoodsid().trim();
     int currentPage = 1;
     int lineSize = 65535;
     List<GoodsCommentT> list =
         this.getGoodsCommentTService().findGoodsCommentByGoodsid(goodsid, currentPage, lineSize);
     if (!list.isEmpty()) {
       this.setBeanlist(list);
       this.setSucflag(true);
       return "json";
     }
   }
   this.setSucflag(false);
   return "json";
 }
Ejemplo n.º 20
0
 /**
  * 增加商品类型参数
  *
  * @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";
 }
Ejemplo n.º 21
0
 /**
  * 增加商品类型
  *
  * @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";
 }