修改文件访问路径
This commit is contained in:
parent
2d512b38c3
commit
44d9882009
|
|
@ -114,4 +114,11 @@ public interface ProductMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer getProductByName(TbProduct product);
|
Integer getProductByName(TbProduct product);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param product
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getProductOnCz(TbProduct product);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,6 @@ public class ProductServiceImpl implements ProductService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
log.error(e.toString(),e);
|
log.error(e.toString(),e);
|
||||||
|
|
@ -266,6 +265,12 @@ public class ProductServiceImpl implements ProductService {
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult deleteProduct(TbProduct product) {
|
public AjaxResult deleteProduct(TbProduct product) {
|
||||||
try{
|
try{
|
||||||
|
//查看差评是否被使用
|
||||||
|
Integer isCz=mapper.getProductOnCz(product);
|
||||||
|
if(isCz!=null && isCz>0){
|
||||||
|
return AjaxResult.error("改产品已和宣传物料绑定,不允许删除");
|
||||||
|
}
|
||||||
|
|
||||||
//删除图片
|
//删除图片
|
||||||
List<ProductCaseImage> list=mapper.getCaseImageByTable(product.getId(),"tb_product");
|
List<ProductCaseImage> list=mapper.getCaseImageByTable(product.getId(),"tb_product");
|
||||||
if(StringUtils.isNotEmpty(list)){
|
if(StringUtils.isNotEmpty(list)){
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and id!=#{id}
|
and id!=#{id}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="getProductOnCz" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from tb_promotion_material_product
|
||||||
|
where product_id=#{id}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="addProduct" parameterType="com.bonus.business.domain.TbProduct" keyProperty="id" useGeneratedKeys="true" >
|
<insert id="addProduct" parameterType="com.bonus.business.domain.TbProduct" keyProperty="id" useGeneratedKeys="true" >
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue