示例#1
0
 /**
  * @description 获得店铺需要审核的商品分类
  * @detail <方法详细描述>
  * @author <a href="*****@*****.**">肖湘</a>
  * @version 1.0.0
  * @data 2015-6-10
  * @param data
  * @return
  */
 public Object getShopGoodsCat(Object data) {
   HeadObject head = new HeadObject();
   List<CompanyCheckCat> list = null;
   list = companyCheckCatMapper.getShopGoodsCat((Integer) data);
   head.setRetCode(ErrorCode.SUCCESS);
   return new ResultObject(head, list);
 }
示例#2
0
 /**
  * @description 更新店铺商品是否需要审核开关
  * @detail <方法详细描述>
  * @author <a href="*****@*****.**">肖湘</a>
  * @version 1.0.0
  * @data 2015-6-10
  * @param data
  * @return
  */
 public Object updateShopGoodCheck(Object data) {
   HeadObject head = new HeadObject();
   Map<String, Object> shopMap = new HashMap<String, Object>();
   @SuppressWarnings("unchecked")
   Map<String, Object> map = (Map<String, Object>) data;
   Integer[] goodCategory = (Integer[]) map.get("goodCategory");
   Integer companyId = (Integer) map.get("companyId");
   // 1.先删除,再添加
   companyCheckCatMapper.deleteByCompanyId(companyId);
   shopMap.put("companyId", companyId);
   if (goodCategory != null) {
     Map<String, Object> cmap = new HashMap<String, Object>();
     cmap.put("companyId", companyId);
     cmap.put("goodCategory", goodCategory);
     companyCheckCatMapper.save(cmap);
     shopMap.put("isCheck", GlobalStatic.SHOP_CHECK_IN_GOODS);
   } else {
     shopMap.put("isCheck", GlobalStatic.SHOP_CHECK_OUT_GOODS);
   }
   companyMapper.updateShopGoodCheck(shopMap); // 更新店铺的状态
   head.setRetCode(ErrorCode.SUCCESS);
   return new ResultObject(head);
 }