![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
公司实战
黑蛋先生
这个作者很懒,什么都没留下…
展开
-
MySQL批量查询
public List<Long> batchSelectImageIds(Long templateId){ List<Long> imageIdList = new ArrayList<>(); int count = templateBlackImageRelMapper.selectImageCount(templateId); int limit = 500; //批量查询次数 i.原创 2022-02-07 10:30:30 · 4552 阅读 · 1 评论 -
MySQL批量添加
int size = 0; int count = list.size(); int batch = 1000; size = (int)Math.ceil(count / batch); List<List<SceneBlackImage>> partitions = Lists.partition(list, size); for(Li...原创 2022-01-21 16:47:18 · 339 阅读 · 0 评论 -
mybatis传入一个集合参数和一个对象参数
UserMapper.java@Repositorypublic interface UserMapper{ Integer batchUpdate(@Param("ids")List<Integer> ids,@Param("userDo")User user);}UserMapper.xml<update id="batchUpdate"> UPDATE user <set> <if test="use原创 2021-07-20 19:03:28 · 2440 阅读 · 0 评论 -
使用Jetty启动项目
启动公司项目所使用的参数:方法一:web-runclean install jetty:run -Dproject.name=myprojectname -Dregion.name=BJ01 -Denv.name=daily方法二:admin 【run】jetty:run package -Dproject.name=myprojectname -Dregion.name=BJ01 -Denv.name=dailyadmin 【package】clean package -原创 2021-07-08 19:09:36 · 725 阅读 · 0 评论 -
重置用户密码功能的实现
场景:公司有一个商家系统,现在要做这个商家系统的后台管理系统。我负责的项目需求:在用户忘记自己密码的时候,后台管理员手动帮用户修改密码,修改后的密码是随机生成的。Controller层:@Controller@RequestMapping("/user")public class UserController{ @Autowired private IUserService iUserService; @RequestMapping("/resetPassword原创 2021-07-08 15:38:56 · 2522 阅读 · 4 评论