Ejemplo n.º 1
0
 /**
  * 【二】
  *
  * @author Rexsen 对终端信息进行备份 【联系人】 【t_sale_contacts】 【contacts_id】
  */
 @Override
 public int addContacts(ContactsView cv) {
   // TODO Auto-generated method stub
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("majorId", cv.getContactsId());
   params.put("majorKey", "contacts_id");
   params.put("tab", "t_sale_contacts");
   params.put("userId", cv.getUserId());
   int insOrupResult = clientmapper.selCenter(params);
   int result = 0;
   if (insOrupResult > 0) {
     result = clientmapper.upContacts(cv);
   } else {
     result = clientmapper.addContacts(cv);
   }
   return result;
 }