parent
01943656a2
commit
988e1d7bcf
@ -1,38 +1,82 @@
|
||||
# bf
|
||||
|
||||
-- 쿼리작업중
|
||||
SELECT
|
||||
smc_no,
|
||||
a.name,
|
||||
gender,
|
||||
birthday,
|
||||
weight_birth,
|
||||
height_birth,
|
||||
weight,
|
||||
height,
|
||||
allergie,
|
||||
append_src_img_file,
|
||||
append_300_img_file,
|
||||
now(),
|
||||
'1642860993576'
|
||||
FROM tbl_bf_family_baby a
|
||||
INNER JOIN tbl_sync_log b on a.member_id = b.member_id and b.check_num = '1323' and DATE_ADD(b.reg_dt, INTERVAL 180 second) > now()
|
||||
LIMIT 1;
|
||||
|
||||
select * from tbl_sync_log;
|
||||
select * from tbl_bf_family;
|
||||
select * from tbl_bf_family_baby;
|
||||
|
||||
select DATE_ADD(now(), INTERVAL 10 second) from tbl_bf_family_baby;
|
||||
|
||||
select check_num, member_id, reg_dt, DATE_ADD(reg_dt, INTERVAL 10 second) from tbl_sync_log where DATE_ADD(reg_dt, INTERVAL 100 second) > now();
|
||||
|
||||
select * from tbl_bf_family_baby_order;
|
||||
select * from tbl_member where name = '김엄마';
|
||||
select * from tbl_member where name = '김종환';
|
||||
|
||||
|
||||
-- 세션 회원아이디 GET
|
||||
# 계정정보
|
||||
- 어드민 운영서버 : [http://devops.lookylooks.ai:14288/bf/admin/index.do](http://devops.lookylooks.ai:14288/bf/admin/index.do)
|
||||
- 프론트 운영서버 : [http://devops.lookylooks.ai:14288/bf/m/login/view_login.do](http://devops.lookylooks.ai:14288/bf/m/login/view_login.do)
|
||||
- 계정정보 : imcloud / imc1234
|
||||
|
||||
# DB정보
|
||||
- http://devops.lookylooks.ai:14236
|
||||
- id : imcloud
|
||||
- pw : imc1234
|
||||
|
||||
|
||||
---------------------------------------------------------------------------- 참고 쿼리 ----------------------------------------------------------------------------
|
||||
# 일상기록 삭제
|
||||
delete from tbl_bf_daily_nutrition where smc_no = 73;
|
||||
delete from tbl_bf_daily_nutrition_1 where smc_no = 73;
|
||||
delete from tbl_bf_daily_nutrition_2 where smc_no = 73;
|
||||
delete from tbl_bf_daily_nutrition_3 where smc_no = 73;
|
||||
delete from tbl_bf_daily_nutrition_4 where smc_no = 73;
|
||||
delete from tbl_bf_daily_nutrition_5 where smc_no = 73;
|
||||
delete from tbl_bf_daily_nutrition_6 where smc_no = 73;
|
||||
delete from tbl_bf_daily_nutrition_7 where smc_no = 73;
|
||||
delete from tbl_bf_daily_nutrition_8 where smc_no = 73;
|
||||
delete from tbl_bf_daily_nutrition_9 where smc_no = 73;
|
||||
delete from tbl_bf_daily_nutrition_10 where smc_no = 73;
|
||||
|
||||
# 동기화 관련
|
||||
select * from tbl_bf_family where member_id = 'renamaestro';
|
||||
select smc_no, member_id from tbl_bf_family_baby where member_id = 'renamaestro';
|
||||
select * from tbl_bf_family_baby_disease where smc_no in(2,3);
|
||||
select * from tbl_bf_family_baby_order where smc_no in(2,3);
|
||||
|
||||
# 회원정보 삭제
|
||||
delete from tbl_member where name = '김종환';
|
||||
delete from tbl_member_confirm where member_id = '1642055604247';
|
||||
delete from tbl_bf_family_disease where bf_no = '5';
|
||||
delete from tbl_bf_family where member_id = '1642055604247';
|
||||
delete from tbl_bf_family_baby where member_id = '1642055604247';
|
||||
delete from tbl_bf_family_baby_disease where smc_no = '72';
|
||||
|
||||
# 세션 회원아이디 GET
|
||||
HttpSession session = request.getSession(false);
|
||||
DataMap rm_mem = (DataMap) session.getAttribute(ConstantSystem.SESSION_RM_MEMBER);
|
||||
paramMap.put("member_id", RenaStringUtil.getData(rm_mem, "member_id"));
|
||||
|
||||
#메모리 - 일간분석
|
||||
select
|
||||
DATE_FORMAT(a.reg_dt, '%H') as hour,
|
||||
count(*) as cnt
|
||||
from tbl_bf_family_match a
|
||||
inner join tbl_bf_daily_nutrition b on a.smc_no = b.smc_no
|
||||
inner join tbl_bf_family_match c on a.smc_no = c.smc_no
|
||||
where
|
||||
a.member_id = '1642861413918'
|
||||
and DATE_FORMAT(b.reg_dt, '%Y-%m-%d') = DATE_FORMAT(now(), '%Y-%m-%d')
|
||||
group by DATE_FORMAT(b.reg_dt, '%H');
|
||||
|
||||
#메모리 - 주간분석
|
||||
select
|
||||
DATE_FORMAT(b.reg_dt, '%Y-%m-%d %H') as day,
|
||||
count(*) as cnt
|
||||
from tbl_bf_family_match a
|
||||
inner join tbl_bf_daily_nutrition b on a.smc_no = b.smc_no
|
||||
inner join tbl_bf_family_match c on a.smc_no = c.smc_no
|
||||
where
|
||||
a.member_id = '1642861413918'
|
||||
and b.reg_dt between STR_TO_DATE('2022-02-15 00:00:00','%Y-%m-%d %H:%i:%s') and STR_TO_DATE('2022-02-15 23:59:59','%Y-%m-%d %H:%i:%s')
|
||||
group by DATE_FORMAT(b.reg_dt, '%Y-%m-%d %H')
|
||||
order by DATE_FORMAT(b.reg_dt, '%Y-%m-%d %H') asc;
|
||||
|
||||
#메모리 - 타임라인(모유, 각 카테고리별 수치 및 시간간격 계산해야됨.)
|
||||
select
|
||||
DATE_FORMAT(b.reg_dt, '%Y-%m-%d %H:%i:%s') as reg_date,
|
||||
d.title,
|
||||
b.dn_no,
|
||||
(select eat_qty from tbl_bf_daily_nutrition_1 tn1 where tn1.dn_no = b.dn_no) as eat_qty
|
||||
from tbl_bf_family_match a
|
||||
inner join tbl_bf_daily_nutrition b on a.smc_no = b.smc_no
|
||||
inner join tbl_bf_family_match c on a.smc_no = c.smc_no
|
||||
inner join tbl_code_item_str d on b.nutirition_cd_no = d.cd_no
|
||||
where
|
||||
a.member_id = '1642861413918'
|
||||
and DATE_FORMAT(b.reg_dt,'%Y-%m-%d') = STR_TO_DATE('2022-02-15','%Y-%m-%d') ;
|
||||
|
Loading…
Reference in new issue