public void ProcessGoodsTypeTNList(List<GoodsTypeTN> list) {
   for (Iterator<GoodsTypeTN> it = list.iterator(); it.hasNext(); ) {
     GoodsTypeTN gtn = (GoodsTypeTN) it.next();
     Map<String, Object> cellMap = new HashMap<String, Object>();
     cellMap.put("id", gtn.getGoodsTypeId());
     cellMap.put(
         "cell",
         new Object[] {
           gtn.getName(),
           BaseTools.formateDbDate(gtn.getCreatetime()),
           "<a id='editegoodstypetn' name='editegoodstypetn' href='goodstypetn.jsp?operate=edit&folder=goods&goodsTypeId="
               + gtn.getGoodsTypeId()
               + "'>[编辑]</a>"
         });
     rows.add(cellMap);
   }
 }
 @Action(
     value = "findGoodsTypeTNForSelect",
     results = {@Result(name = "json", type = "json")})
 public String findGoodsTypeTNForSelect() {
   this.setGoodstypetnlist("");
   List<GoodsTypeTN> list = this.getGoodsTypeTNService().findAllGoodsTypeTNNopage();
   if (list != null) {
     this.setGoodstypetnlist("<option value='0'>---请选择---</option>");
     for (Iterator<GoodsTypeTN> it = list.iterator(); it.hasNext(); ) {
       GoodsTypeTN gtn = (GoodsTypeTN) it.next();
       this.goodstypetnlist +=
           "<option value='" + gtn.getGoodsTypeId() + "'>" + gtn.getName() + "</option>";
     }
     this.setGoodstypetnlist(goodstypetnlist);
     return "json";
   }
   this.setGoodstypetnlist("");
   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 = "updateGoodsTypeTN",
     results = {@Result(name = "json", type = "json")})
 public String updateGoodsTypeTN() {
   GoodsTypeTN gtn = new GoodsTypeTN();
   gtn.setGoodsTypeId(this.getGoodsTypeId().trim());
   gtn.setName(this.getName());
   gtn.setCreatetime(BaseTools.systemtime());
   gtn.setCreatorid(BaseTools.adminCreateId());
   gtn.setGoodsParameter(this.getGoodsParameter());
   @SuppressWarnings("unused")
   int i = this.getGoodsTypeTNService().updateGoodsTypeTN(gtn);
   this.setSucflag(true);
   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";
 }