修改3-15问题
This commit is contained in:
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -65,5 +66,9 @@ public class BuildWuyeCompany implements Serializable {
|
||||
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("关键字")
|
||||
@TableField(exist = false)
|
||||
private String keyword;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zscat.mallplus.pms.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zscat.mallplus.pms.entity.PmsProductCategory;
|
||||
import com.zscat.mallplus.pms.vo.PmsProductCategoryWithChildrenItem;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,4 +18,8 @@ import java.util.List;
|
||||
public interface PmsProductCategoryMapper extends BaseMapper<PmsProductCategory> {
|
||||
|
||||
List<PmsProductCategoryWithChildrenItem> listWithChildren();
|
||||
|
||||
int selectCountByNameAndLevel(@Param("parentId") Long parentId, @Param("name") String name);
|
||||
|
||||
int selectCountByNameAndLevelId(@Param("parentId") Long parentId, @Param("name") String name, @Param("id") Long id);
|
||||
}
|
||||
|
||||
@@ -39,4 +39,12 @@
|
||||
from pms_product_category c1 left join pms_product_category c2 on c1.id = c2.parent_id
|
||||
where c1.parent_id = 0
|
||||
</select>
|
||||
|
||||
<select id="selectCountByNameAndLevel" resultType="int">
|
||||
select count(*) from pms_product_category where parent_id = #{parentId} and name = #{name}
|
||||
</select>
|
||||
|
||||
<select id="selectCountByNameAndLevelId" resultType="int">
|
||||
select count(*) from pms_product_category where parent_id = #{parentId} and name = #{name} and id <> #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user