Commit 5160186f authored by 位宇华's avatar 位宇华

规则删除 --代码提交

parent d95c13ea
...@@ -17,4 +17,6 @@ public interface RuleMapper { ...@@ -17,4 +17,6 @@ public interface RuleMapper {
List<String> queryOfId(@Param("id") String ruleRequestModel); List<String> queryOfId(@Param("id") String ruleRequestModel);
void deleteById(@Param("id") String id); void deleteById(@Param("id") String id);
void deleteByTemplateId(@Param("id") String id);
} }
...@@ -9,6 +9,7 @@ import com.ruoyi.system.mapper.RuleMapper; ...@@ -9,6 +9,7 @@ import com.ruoyi.system.mapper.RuleMapper;
import com.ruoyi.system.model.rule.RuleRequestModel; import com.ruoyi.system.model.rule.RuleRequestModel;
import com.ruoyi.system.service.RuleService; import com.ruoyi.system.service.RuleService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
...@@ -52,9 +53,11 @@ public class RuleServiceImpl implements RuleService { ...@@ -52,9 +53,11 @@ public class RuleServiceImpl implements RuleService {
} }
@Override @Override
@Transactional
public AjaxResult deleteById(RuleRequestModel ruleRequestModel) { public AjaxResult deleteById(RuleRequestModel ruleRequestModel) {
String id=ruleRequestModel.getId(); String id=ruleRequestModel.getId();
ruleMapper.deleteById(id); ruleMapper.deleteById(id);
ruleMapper.deleteByTemplateId(id);
return AjaxResult.success(); return AjaxResult.success();
} }
} }
...@@ -49,4 +49,9 @@ ...@@ -49,4 +49,9 @@
from rule_sheet from rule_sheet
where id = #{id} where id = #{id}
</delete> </delete>
<delete id="deleteByTemplateId">
delete
from act_supplies_template
where id = #{id}
</delete>
</mapper> </mapper>
\ No newline at end of file
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