Commit 46c2382e by zhangxingmin

push

parent b18cefa1
......@@ -2,6 +2,7 @@ package com.yd.csf.service.dao;
import com.yd.csf.service.model.CommissionRuleBinding;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
/**
* <p>
......@@ -13,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface CommissionRuleBindingMapper extends BaseMapper<CommissionRuleBinding> {
int physicalDelete(@Param("targetId") String targetId);
}
package com.yd.csf.service.service.impl;
import com.alibaba.druid.sql.visitor.functions.If;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yd.csf.service.dto.CommissionRuleBindingDto;
import com.yd.csf.service.model.CommissionRuleBinding;
......@@ -40,8 +41,10 @@ public class CommissionRuleBindingServiceImpl extends ServiceImpl<CommissionRule
@Override
public Boolean del(String targetId) {
return this.remove(new LambdaQueryWrapper<CommissionRuleBinding>()
.eq(CommissionRuleBinding::getTargetId,targetId));
if (StringUtils.isBlank(targetId)) {
return true;
}
return baseMapper.physicalDelete(targetId) > 0;
}
......
......@@ -2,4 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.csf.service.dao.CommissionRuleBindingMapper">
<delete id="physicalDelete">
DELETE FROM commission_rule_binding WHERE target_id = #{targetId}
</delete>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment