|
|
|
@ -31,7 +31,7 @@ public class ClassifyServiceImpl implements ClassifyService { |
|
|
|
@Override |
|
|
|
public Map getClassifyList(Map<String, Object> qmap, int limit,int page) { |
|
|
|
Map retmap =new HashMap(); |
|
|
|
int start=page>0?(page-1)* limit:1; |
|
|
|
int start=page>0?(page-1)* limit:0; |
|
|
|
|
|
|
|
//记录总数
|
|
|
|
int total =classifyMapper.countRsByMap(qmap); |
|
|
|
@ -134,21 +134,22 @@ public class ClassifyServiceImpl implements ClassifyService { |
|
|
|
// ID 为返回的自编号
|
|
|
|
oplog.setLogid(classify.getId()); |
|
|
|
operationLogMapper.addLog(oplog); |
|
|
|
} |
|
|
|
}else { |
|
|
|
// 查找类目
|
|
|
|
Classify clsfy= classifyMapper.getClassify(topClass); |
|
|
|
if(clsfy!=null){ |
|
|
|
Classify clsfy = classifyMapper.getClassify(topClass); |
|
|
|
if (clsfy != null) { |
|
|
|
classify.setTopClass(topClass); |
|
|
|
ret = classifyMapper.addClassify(classify); |
|
|
|
oplog.setLogid(clsfy.getId()); |
|
|
|
operationLogMapper.addLog(oplog); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
classify.setTopClass(topClass); |
|
|
|
ret = classifyMapper.addClassify(classify); |
|
|
|
oplog.setLogid(classify.getId()); |
|
|
|
operationLogMapper.addLog(oplog); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// 返回执行结果
|
|
|
|
return ret; |
|
|
|
} |
|
|
|
|
|
|
|
|