/**
  * 更新商品类型
  *
  * @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";
 }