2023年2.21软件工程日报

今天一共有7节课,在上午,我们系统学习了数据库原理,知道了数据库的概论,知道了数据库系统的特点,还有数据管理技术的发展。

数据库系统的特点;

  1. 数据结构化
  2. 共享性高,易于扩充
  3. 数据独立性高
  4. 数据由DBMS统一管理和控制

数据管理也由人工管理到文件管理,到现在的数据库管理。

然后今天学习了Python,学习了变量 输出还有运算符等知识。python完全支持面向对象设计,拥有大量扩张库。

然后在晚上进行继续编写web mis系统

我用的是axios JSON,但是我在写删除时,不知道如何把JSON转化为Utf-8格式,不能根据名字进行删除。

Mapper:

1 @Delete("delete  from xiewen where xinwen = #{xinwen}")
2 void deleteById(@Param("xinwen")String xinwen);

Serviceimpl:

  @Override
    public void deleteById(String xinwen) {
        SqlSession sqlSession = factory.openSession();
        //3. 获取BrandMapper
        xiewenMapper mapper = sqlSession.getMapper(xiewenMapper.class);

        //4. 调用方法
        mapper.deleteById(xinwen);

        //5. 释放资源
        sqlSession.close();
    }

  然后不知道如何把json转成utf-8

html;

 1   // 删除
 2             deleteById(index, row){
 3 
 4                 // 弹出确认提示框
 5 
 6                 this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
 7                     confirmButtonText: '确定',
 8                     cancelButtonText: '取消',
 9                     type: 'warning'
10                 }).then(() => {
11                     //用户点击确认按钮
12 
13                     //2. 发送AJAX请求
14                     var _this = this;
15 
16                     // 发送ajax请求,添加数据
17                     axios({
18                         method:"post",
19                         url:"http://localhost:8080/xinwen/xiewen/deleteById?",
20                         data:row.xinwen
21                     }).then(function (resp) {
22                         if(resp.data == "success"){
23                             //删除成功
24 
25                             // 重新查询数据
26                             _this.selectAll();
27                             // 弹出消息提示
28                             _this.$message({
29                                 message: '恭喜你,删除成功',
30                                 type: 'success'
31                             });
32 
33                         }
34                     })
35                 }).catch(() => {
36                     //用户点击取消按钮
37 
38                     this.$message({
39                         type: 'info',
40                         message: '已取消删除'
41                     });
42                 });
43 
44             },
//利用的vue框架还有Element ui标签还有axios
posted @ 2023-02-21 21:58  阿飞藏泪  阅读(15)  评论(0编辑  收藏  举报
1 2 3
4