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

规则删除 --代码提交

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