|
|
|
@ -7,6 +7,7 @@ import cn.chjyj.szwh.mapper.AdminMapper; |
|
|
|
import cn.chjyj.szwh.mapper.ClassifyMapper; |
|
|
|
import cn.chjyj.szwh.mapper.OperationLogMapper; |
|
|
|
import cn.chjyj.szwh.service.ClassifyService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.commons.logging.Log; |
|
|
|
import org.apache.commons.logging.LogFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@ -118,6 +119,14 @@ public class ClassifyServiceImpl implements ClassifyService { |
|
|
|
try { |
|
|
|
Date crt = sdf.parse(sdf.format(System.currentTimeMillis())); |
|
|
|
classify.setCreatetime(crt); |
|
|
|
// 该段代码由php 转来,完全搞不懂为啥要加这个判断
|
|
|
|
String newTopClass=topClass; |
|
|
|
if(StringUtils.isNotEmpty(pullTopclass)){ |
|
|
|
newTopClass=pullTopclass; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classify.setTopClass(pullTopclass); |
|
|
|
classify.setSonClass(sonClass); |
|
|
|
classify.setUserId(userid); |
|
|
|
|