to change:杂

JSON.parseArray(JSON.parseObject(provincesJson).getString(“data”),Province.class)

本地上传到gitlab:
git init
git add .
git commit -m ‘’
远程gitlab新建git项目
git remote add origin 远程该项目.git
git pull origin master
git push --set-upstream origin master

user-center的insertSelectiveAndGetId
见:https://blog.csdn.net/dongyanfa/article/details/73839415

分销里的一系列util

service里不要出现request,response,service不要用ResponseObject,可以异常向上抛,把东西分清是放在业务层还是Controller

RabbitMQConfig 影响短信发送

分页 https://www.aliyun.com/jiaocheng/1403487.html

存储过程:

drop procedure if exists loopProce;
delimiter //
create procedure loopProce()
begin
    declare i int default 1;
    while i<10
    do
        insert into test values(i,concat('hangzhou',i));
        set i=i+1;
    end while;
    commit;
end //
delimiter ;

call loopProce();

查询区间范围内的所有日期:

select a.Date  
from ( 
    select curdate() - INTERVAL (a.a + (10 * b.a) + (100 * c.a) + (1000 * d.a) ) DAY as Date 
    from (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as a 
    join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as b 
    join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as c 
    join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as d 
) a 
where a.Date between '2009-12-20' and '2010-01-24'  
order by a.Date 

当天 TO_DAYS(created_at) = TO_DAYS(NOW())

sql 分组后每组取前几个?

SELECT *
FROM
mil_applys r
WHERE 3 >
	(SELECT COUNT(*)
	FROM mil_applys
	WHERE mil_applys.user_id = r.user_id AND mil_applys.id < r.id)
ORDER BY user_id

注:
3表示每组取前3个,mil_applys表名,user_id 分组字段,id 组内排序的字段,mil_applys.id < r.id表示按照id生序,mil_applys.id > r.id表示按照id降序。

date所在月的第一天
Date monthStart = new DateTime(boundDate).withDayOfMonth(1).toDate();

@EnableAspectJAutoProxy(exposeProxy = true)

你可能感兴趣的:(Spring框架)