@RequestMapping(value="/upKeywords", method = { RequestMethod.GET,RequestMethod.POST }, produces = "application/json; charset=utf-8")
public String updateDate(String cdid)
{
if(StringUtils.isNullorEmpty(cdid))
{
return MessageUtils.errorMessages(1);
}else
{
int size = 0;
Map<String,Object> mapsussuccess=new HashMap<String,Object>();
List listnum=new ArrayList();
//String cdids="16384,16385,16386,16387,16388,16392,16393,16394,";
//String substring = cdid.substring(0, cdid.length()-1);
String[] split = cdid.split(",");
int length = split.length;
//Map map=new HashMap();
//map.put("cdid", cdid);
try {
int count=0;
for(int i=0;i<length;i++)
{
String string = split[i];
//System.out.println(string);
for(int j=0;j<string.length();j++)
{//List<CategoryLeafKeywords> findBykeywordId(String ckid);
//List<ComtyinfoDistinct> findByComtyinfoid(String cdid);
List<CategoryLeafKeywords> findByGoodsinfoselectID = clkdao.findBykeywordId(string);
Integer status = findByGoodsinfoselectID.get(j).getSpdier_status();
Integer id = findByGoodsinfoselectID.get(j).getId();
//System.out.println("status--->"+status);
if(status.equals(1)||status==1)
{
listnum.add(id);
size = listnum.size();
//System.out.println("listnum==>"+listnum);
//System.out.println("listnum==>"+size);
for(int z=0;z<size;z++)
{
Object object = listnum.get(z);
//lcygdao.update(object);
//cdao.updateDate(object);
clkdao.updateKeywords(object);
}
}
}
//Integer status = findByGoodsinfoselectID.get(i).getStatus();
//System.out.println("status==>"+status);
//
}
} catch (Exception e) {
// TODO Auto-generated catch block
return MessageUtils.errorMessages(1);
}
//cdao.updateDate(map);
mapsussuccess.put("linage", size);
mapsussuccess.put("code", 200);
mapsussuccess.put("message", "Congratulations, you made it!!!");
return JSON.toJSONString(mapsussuccess);
}
}
public String updateDate(String cdid)
{
if(StringUtils.isNullorEmpty(cdid))
{
return MessageUtils.errorMessages(1);
}else
{
int size = 0;
Map<String,Object> mapsussuccess=new HashMap<String,Object>();
List listnum=new ArrayList();
//String cdids="16384,16385,16386,16387,16388,16392,16393,16394,";
//String substring = cdid.substring(0, cdid.length()-1);
String[] split = cdid.split(",");
int length = split.length;
//Map map=new HashMap();
//map.put("cdid", cdid);
try {
int count=0;
for(int i=0;i<length;i++)
{
String string = split[i];
//System.out.println(string);
for(int j=0;j<string.length();j++)
{//List<CategoryLeafKeywords> findBykeywordId(String ckid);
//List<ComtyinfoDistinct> findByComtyinfoid(String cdid);
List<CategoryLeafKeywords> findByGoodsinfoselectID = clkdao.findBykeywordId(string);
Integer status = findByGoodsinfoselectID.get(j).getSpdier_status();
Integer id = findByGoodsinfoselectID.get(j).getId();
//System.out.println("status--->"+status);
if(status.equals(1)||status==1)
{
listnum.add(id);
size = listnum.size();
//System.out.println("listnum==>"+listnum);
//System.out.println("listnum==>"+size);
for(int z=0;z<size;z++)
{
Object object = listnum.get(z);
//lcygdao.update(object);
//cdao.updateDate(object);
clkdao.updateKeywords(object);
}
}
}
//Integer status = findByGoodsinfoselectID.get(i).getStatus();
//System.out.println("status==>"+status);
//
}
} catch (Exception e) {
// TODO Auto-generated catch block
return MessageUtils.errorMessages(1);
}
//cdao.updateDate(map);
mapsussuccess.put("linage", size);
mapsussuccess.put("code", 200);
mapsussuccess.put("message", "Congratulations, you made it!!!");
return JSON.toJSONString(mapsussuccess);
}
}