当前位置: 首页 > news >正文

哪个网站做视频有钱怎么创建网站赚钱

哪个网站做视频有钱,怎么创建网站赚钱,河源北京网站建设,织梦商城网站模板免费下载1.在idea中配置好数据源 2、视频案例中只给出了查询所有结果的示例,请自己完成添加、删除、修改操作的代码。以下供参 考。 Delete("delete from emp where id#{id}") public void delete(Integer id); 测试代码 Test public void testDelete(){ empMa…

1.在idea中配置好数据源

2、视频案例中只给出了查询所有结果的示例,请自己完成添加、删除、修改操作的代码。以下供参

考。

 @Delete("delete from emp where id=#{id}")

     public void delete(Integer id);

测试代码

 @Test

     public void testDelete(){

         empMapper.delete(17);

     }

@Insert("insert into emp(username, name, gender, image, job, entrydate, dept_id, create_time, update_time)" +

            "values (#{username},#{name},#{gender},#{image},#{job},#{entrydate},#{deptId},#{createTime},#{updateTime})")

public void insert(Emp emp);

测试代码

@Test

    public void testInsert(){

        Emp emp=new Emp();

        emp.setUsername("Tom");

        emp.setName("汤姆");

        emp.setImage("1.jpg");

        emp.setGender((short)1);

        emp.setJob((short)1);

        emp.setEntrydate(LocalDate.of(2000,1,1));

        emp.setCreateTime(LocalDateTime.now());

        emp.setUpdateTime(LocalDateTime.now());

        emp.setDeptId(1);

empMapper.insert(emp);

     }

@Update("update emp set username=#{username},name=#{name},gender=#{gender}," +

        "image=#{image},job=#{job},entrydate=#{entrydate},dept_id=#{deptId},update_time=#{updateTime} where id=#{id}")

public void update(Emp emp);

测试代码

 @Test

    public void testUpdate(){

        Emp emp=new Emp();

        emp.setId(17);

        emp.setUsername("Tom1");

        emp.setName("汤姆1");

        emp.setImage("1.jpg");

        emp.setGender((short)1);

        emp.setJob((short)1);

        emp.setEntrydate(LocalDate.of(2000,1,1));

        emp.setUpdateTime(LocalDateTime.now());

        emp.setDeptId(1);

        empMapper.update(emp);

    }

@Select("select * from emp where name like '%${name}%' and gender =#{gender} and " +

            "entrydate between #{begin} and #{end} order by update_time desc")

    public List<Emp> list(String name, Short gender, LocalDate begin,LocalDate end);

测试代码

 @Test

    public void testList(){

        empMapper.list("张",(short)1,LocalDate.of(2010,1,1),LocalDate.of(2020,1,1));

        System.out.println(empList);

    }

3、lombok库的使用。尝试将实体类采用注解的方式来实现。

import lombok.*;

//@Getter

//@Setter

//@ToString

//@EqualsAndHashCode

@Data

@NoArgsConstructor

@AllArgsConstructor

public class User {

    private Integer id;

    private String name;

    private Short age;

    private Short gender;

    private String phone;

4、学习idea的调试技巧,并尝试使用。

5、对以下案例使用mybatis进行添加、删除、修改、更新的操作。

@Mapper

public interface PoetMapper {

    @Delete("delete from poet where id=#{id}")

    public void delete(Integer id);

    @Insert("insert into poet(name,gender,dynasty,title,style)" +

            "values (#{name},#{gender},#{dynasty},#{title},#{style})")

    public void insert(Poet poet);

    @Update("update poet set name=#{name},gender=#{gender}," +

            "dynasty=#{dynasty},title=#{title},style=#{style} where id=#{id}")

    public void update(Poet poet);

}

测试代码

@SpringBootTest

class SpringbootMybatisCrudApplicationTests {

     @Autowired

     private PoetMapper poetMapper;

    @Test

    public void testInsert(){

        Poet poet=new Poet();

        poet.setName("汤姆");

        poet.setGender((short)1);

        poet.setDynasty("元代");

        poet.setTitle("诗词爱好者");

        poet.setStyle("无");

        poetMapper.insert(poet);

     }

    @Test

     public void testDelete(){

         poetMapper.delete(7);

     }

    @Test

    public void testUpdate(){

        Poet poet=new Poet();

        poet.setId(18);

        poet.setName("汤姆1");

        poet.setGender((short)1);

        poet.setDynasty("清代");

        poet.setTitle("无");

        poet.setStyle("无");

        poetMapper.update(poet);

    }

http://www.yidumall.com/news/43275.html

相关文章:

  • 党中央交付团中央建设的全国最大的未成年人专属网站是什么?简述网站建设的一般流程
  • 做外贸网站服务器要选择哪里的搜索引擎下载
  • 济南企业做网站互联网广告销售好做吗
  • 网站源码文件安装教程深圳创新创业大赛
  • PHP网站名字seo优化排名百度教程
  • wordpress 等级权限插件站长工具seo源码
  • 怎么样学做网站河北seo基础教程
  • 成都网站建设cdcidiseo常用方法
  • 网站申请注册 免备案黄页网站推广
  • 百度上开个网站怎么做网络营销推广公司有哪些
  • 诸城哪有做公司网站的推广软件app
  • 单位网站建设的优势安卓系统优化大师
  • 做产品包装的3d网站百度广告推广收费标准
  • ps网站头部图片广告投放推广平台
  • 网站开发用什么架构公司网站怎么建立
  • 电子商务网站建设与维护教案免费域名解析网站
  • 如何建自己网站青岛最新消息
  • 福建省晋江市建设局网站2023年时政热点事件
  • 学做网站用到哪些知识网址安全检测中心
  • 网站域名费会计分录怎么做百度云电脑网页版入口
  • 自己的主机做网站服务器zoho crm
  • 无代码开发平台什么意思seo外包网站
  • 海南网站优化模板建站网页
  • 手机网站域名怎么解析seo赚钱暴利
  • 做二手的网站都有哪些亚马逊开店流程及费用
  • 自己做网站做淘宝客seo的主要内容
  • 自建站外贸平台有哪些比较好网络广告有哪些形式
  • 网站建设所需资料及费用长沙服务好的网络营销
  • 成都网络推广哪家公司好真人seo点击平台
  • 网站空间文件夹营销策划公司名称