|
@@ -10,6 +10,8 @@ import com.yami.shop.common.exception.GlobalException;
|
|
|
import com.yami.shop.common.util.PageParam;
|
|
import com.yami.shop.common.util.PageParam;
|
|
|
import com.yami.shop.dao.CategoryProdMapper;
|
|
import com.yami.shop.dao.CategoryProdMapper;
|
|
|
import com.yami.shop.service.CategoryProdService;
|
|
import com.yami.shop.service.CategoryProdService;
|
|
|
|
|
+import lombok.extern.log4j.Log4j;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -21,6 +23,7 @@ import java.util.List;
|
|
|
* Created by lgh on 2018/07/13.
|
|
* Created by lgh on 2018/07/13.
|
|
|
*/
|
|
*/
|
|
|
@Service
|
|
@Service
|
|
|
|
|
+@Slf4j
|
|
|
public class CategoryProdServiceImpl extends ServiceImpl<CategoryProdMapper, CategoryProd> implements CategoryProdService {
|
|
public class CategoryProdServiceImpl extends ServiceImpl<CategoryProdMapper, CategoryProd> implements CategoryProdService {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -62,6 +65,7 @@ public class CategoryProdServiceImpl extends ServiceImpl<CategoryProdMapper, Cat
|
|
|
.eq(CategoryProd::getCode, categoryProductDTO.getParentCode())
|
|
.eq(CategoryProd::getCode, categoryProductDTO.getParentCode())
|
|
|
.eq(CategoryProd::getShopId, categoryProductDTO.getShopId())
|
|
.eq(CategoryProd::getShopId, categoryProductDTO.getShopId())
|
|
|
.eq(CategoryProd::getIsDelete, 0));
|
|
.eq(CategoryProd::getIsDelete, 0));
|
|
|
|
|
+ log.info("查看父类绑定商品是否存在不存在添加:{}", integer1);
|
|
|
if (integer1 == 0) {
|
|
if (integer1 == 0) {
|
|
|
CategoryProd categoryProdParent = new CategoryProd();
|
|
CategoryProd categoryProdParent = new CategoryProd();
|
|
|
categoryProdParent.setCategoryId(categoryProductDTO.getCategoryId());
|
|
categoryProdParent.setCategoryId(categoryProductDTO.getCategoryId());
|