Ejemplo n.º 1
0
 /**
  * 【三】
  *
  * @author Rexsen 对终端信息进行备份 【机会】 【t_sale_chance】 【chance_id】
  */
 @Override
 public int addChance(ChanceView cv) {
   // TODO Auto-generated method stub
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("majorId", cv.getChanceId());
   params.put("majorKey", "chance_id");
   params.put("tab", "t_sale_chance");
   params.put("userId", cv.getUserId());
   int insOrupResult = clientmapper.selCenter(params);
   int result = 0;
   if (insOrupResult > 0) {
     result = clientmapper.upChance(cv);
   } else {
     result = clientmapper.addChance(cv);
   }
   return result;
 }