根据Excel某列模糊修改对应数据库里的列

根据Excel某列模糊修改对应数据库里的列

根据某个模糊参数修改

 

 

//JSONObject ipParagraph = ipAdminService.updateDescriptionByIpParagraph(user.get("ipParagraph").toString(), user.get("description").toString());

// user.get("ipParagraph").toString()

/* businessIpParagraph.setUserId(user.get("ipParagraph").toString());

businessIpParagraph.setIpParagraph(user.get("description").toString());*/

 

/*if (c == 0) {

row.getCell(1).setCellType(Cell.CELL_TYPE_STRING);

map.put("ipParagraph", cell.getStringCellValue());

} else if (c == 1) {

row.getCell(1).setCellType(Cell.CELL_TYPE_STRING);

map.put("description",cell.getStringCellValue());

}

}*/

 

/**

* ÐÞ¸Ädescription

* @param description

* @param ipParagraph

* @return

*/

JSONObject updateDescriptionByIpParagraph(String description, String ipParagraph);

 

 

/* @Override

public JSONObject updateDescriptionByIpParagraph(String ipParagraph, String description) {

HashMap<String, String> args = new HashMap<String, String>();

args.put("ipParagraph",ipParagraph);

args.put("description",description);

String[] strings = ipParagraph.split("\\.");

String str1=strings[0]+"."+strings[1];

if(str1.equals("119.254") || str1.equals("10.17") || str1.equals("117.107")) {

if(!com.sinnet.crm.util.string.StringUtils.isEmpty(description)) {

JSONObject requestByPost = WebServiceHelper.requestByPost("ip_service", "IpParagraph", "saveIpP", args);

return requestByPost;

}

}

return null;

}*/

 

@RequestMapping(value="/updateBusinessIpParagraph",method={RequestMethod.POST})

@ResponseBody

public Map<String,Object> updateDescriptionByIpParagraph(String description, String ipParagraph,HttpServletRequest request) throws Exception{

Map<String, Object> map = new HashMap<String, Object>();

try {

int model_r = ipPService.updateDescriptionByIpParagraph(description,ipParagraph);

map.put("state", "success");

map.put("message", "²Ù×÷³É¹¦");

map.put("data", model_r);

} catch (Exception e) {

e.printStackTrace();

map.put("state", "error");

map.put("message", "Êý¾Ý·þÎñÒì³£");

map.put("detail", e.getMessage());

}

return map;

}

 

 

 

/*

* ¸ù¾ÝipParagraph ÐÞ¸Ädescription

* µ¥¶ÀµÄʵÏÖ, String ipParagraph

*/

public int updateDescriptionByIpParagraph(String description, String ipParagraph) {

StringBuffer sb = new StringBuffer();

sb.append(" update business_ip_paragraph_copy set description=? where 1=1 and ipParagraph=?");

return jdbcTemplate.update(sb.toString(), description,ipParagraph);

}

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值