1. 회원 자녀관련 매칭구조 스키마 수정, 쿼리 수정

2. 동기화 관련 쿼리 수정, 서비스 추가
dev_bert
jonghwan76 3 years ago
parent f393d9aea6
commit 3a7fc3255b

@ -29,4 +29,10 @@ select check_num, member_id, reg_dt, DATE_ADD(reg_dt, INTERVAL 10 second) from t
select * from tbl_bf_family_baby_order; select * from tbl_bf_family_baby_order;
select * from tbl_member where name = '김엄마'; select * from tbl_member where name = '김엄마';
select * from tbl_member where name = '김종환'; select * from tbl_member where name = '김종환';
-- 세션 회원아이디 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"));

@ -2,13 +2,17 @@ package com.backoffice.m.bf_family_baby;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.List; import java.util.List;
import com.backoffice.constants.ConstantSystem;
import com.renastudio.creative.web.util.RenaStringUtil;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import com.renastudio.creative.web.util.AbstractBOManager; import com.renastudio.creative.web.util.AbstractBOManager;
import com.renastudio.creative.web.util.DataMap; import com.renastudio.creative.web.util.DataMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
/** /**
* @author renamaestro * @author renamaestro
*/ */
@ -76,10 +80,15 @@ public class M_Bf_family_babyBOImpl extends AbstractBOManager implements M_Bf_fa
return lm; return lm;
} }
/**
* - snut97
* @param paramMap
* @return
* @throws Exception
*/
public DataMap select_bf_family_baby(DataMap paramMap) throws Exception{ public DataMap select_bf_family_baby(DataMap paramMap) throws Exception{
DataMap rm = null; DataMap rm = null;
try {
try {
generalDAO.setNamespace(SQLMAP_NAMESPACE); generalDAO.setNamespace(SQLMAP_NAMESPACE);
rm = generalDAO.select_item_to_datamap("select_bf_family_baby", paramMap); rm = generalDAO.select_item_to_datamap("select_bf_family_baby", paramMap);
} catch (SQLException e) { } catch (SQLException e) {

@ -63,8 +63,7 @@ public class M_Bf_growth_bodyController extends AbstractControllerManager{
M_Util gmUtil = new M_Util(); M_Util gmUtil = new M_Util();
@RequestMapping(value="view_bf_growth_body_input") @RequestMapping(value="view_bf_growth_body_input")
public String view_bf_growth_body_input(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response public String view_bf_growth_body_input(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response, RedirectAttributes ra) {
, RedirectAttributes ra) {
DataMap paramMap = gmUtil.getDataMapFromRequest(request); DataMap paramMap = gmUtil.getDataMapFromRequest(request);
@ -349,14 +348,21 @@ public class M_Bf_growth_bodyController extends AbstractControllerManager{
return redirect_url; return redirect_url;
} }
/**
* - snut97
* @param model
* @param request
* @param response
* @param redirectAttributes
* @return
*/
@RequestMapping(value="ajax_insert_bf_growth_body", method=RequestMethod.POST) @RequestMapping(value="ajax_insert_bf_growth_body", method=RequestMethod.POST)
@ResponseBody @ResponseBody
public HashMap<String, Object> ajax_insert_bf_growth_body(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response public HashMap<String, Object> ajax_insert_bf_growth_body(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
, RedirectAttributes redirectAttributes) { HttpSession session = request.getSession(false);
DataMap rm_mem = (DataMap) session.getAttribute(ConstantSystem.SESSION_RM_MEMBER);
DataMap paramMap = gmUtil.getDataMapFromRequest(request); DataMap paramMap = gmUtil.getDataMapFromRequest(request);
HashMap<String, Object> result = new HashMap<String, Object>(); HashMap<String, Object> result = new HashMap<String, Object>();
@ -371,6 +377,7 @@ public class M_Bf_growth_bodyController extends AbstractControllerManager{
if(RenaStringUtil.isNullOrEmpty(base_dt)) paramMap.put("base_dt", DateUtil.getDateString(DateUtil.F_YYYYMMDDDash)); if(RenaStringUtil.isNullOrEmpty(base_dt)) paramMap.put("base_dt", DateUtil.getDateString(DateUtil.F_YYYYMMDDDash));
paramMap.put("weight", 0); paramMap.put("weight", 0);
paramMap.put("member_id", RenaStringUtil.getData(rm_mem, "member_id"));
if(RenaStringUtil.isNullOrEmpty(RenaStringUtil.getData(paramMap, "data_from")) == true) paramMap.put("data_from", "1"); // 0 자동, 1 수기 입력 if(RenaStringUtil.isNullOrEmpty(RenaStringUtil.getData(paramMap, "data_from")) == true) paramMap.put("data_from", "1"); // 0 자동, 1 수기 입력
bf_growth_bodyBO.insert_bf_growth_body(paramMap); bf_growth_bodyBO.insert_bf_growth_body(paramMap);

@ -181,7 +181,15 @@ public class M_IndexController extends AbstractControllerManager{
return rm_mem; return rm_mem;
} }
/**
* - snut97
* @param model
* @param request
* @param paramMap
* @return
* @throws Exception
*/
@Override @Override
public DataMap init_child(ModelMap model, HttpServletRequest request, DataMap paramMap) throws Exception{ public DataMap init_child(ModelMap model, HttpServletRequest request, DataMap paramMap) throws Exception{
HttpSession session = request.getSession(false); HttpSession session = request.getSession(false);
@ -256,7 +264,15 @@ public class M_IndexController extends AbstractControllerManager{
return rm_last; return rm_last;
} }
/**
* - views/ftl/m/index/index.ftl - snut97
* @param model
* @param request
* @param response
* @param redirectAttributes
* @return
*/
@RequestMapping(value="ajax_child_info", method=RequestMethod.GET) @RequestMapping(value="ajax_child_info", method=RequestMethod.GET)
@ResponseBody @ResponseBody
public DataMap ajax_child_info(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response public DataMap ajax_child_info(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response
@ -279,12 +295,11 @@ public class M_IndexController extends AbstractControllerManager{
String base_dt = DateUtil.getDateString(DateUtil.F_YYYYMMDDDash); String base_dt = DateUtil.getDateString(DateUtil.F_YYYYMMDDDash);
paramMap.put("base_dt", base_dt); paramMap.put("base_dt", base_dt);
// 디폴트 아이 선택 // 디폴트 아이정보 선택
DataMap rm_child = init_child(model, request, paramMap); DataMap rm_child = init_child(model, request, paramMap);
result.put("rm_child", rm_child); result.put("rm_child", rm_child);
if(rm_child != null) { if(rm_child != null) {
// 선택아이 성장 정보 조회
// 선택아이 성장 정보 조회 // 선택아이 성장 정보 조회
DataMap rm_last_h = init_child_info(model, request, paramMap, "Y", "N"); DataMap rm_last_h = init_child_info(model, request, paramMap, "Y", "N");
result.put("rm_last_h", rm_last_h); result.put("rm_last_h", rm_last_h);

@ -221,8 +221,16 @@ public class M_LoginController extends AbstractControllerManager{
}catch(Exception ex1){ redirect_url = gmUtil.redirectError(true, ex1, request, paramMap, ra, ""); ex1.printStackTrace();} }catch(Exception ex1){ redirect_url = gmUtil.redirectError(true, ex1, request, paramMap, ra, ""); ex1.printStackTrace();}
return redirect_url; return redirect_url;
} }
/**
* view_login.ftl - snut97
* @param model
* @param request
* @param response
* @param ra
* @return
*/
@RequestMapping(value="loginByMemberId") @RequestMapping(value="loginByMemberId")
public String loginByMemberId(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response public String loginByMemberId(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response
, RedirectAttributes ra) { , RedirectAttributes ra) {
@ -338,7 +346,7 @@ public class M_LoginController extends AbstractControllerManager{
/** /**
* * - snut97
* @param request * @param request
* @param model * @param model
* @return * @return
@ -376,7 +384,7 @@ public class M_LoginController extends AbstractControllerManager{
} }
/** /**
* * - snut97
* @param request * @param request
* @param model * @param model
* @return * @return
@ -446,7 +454,7 @@ public class M_LoginController extends AbstractControllerManager{
} }
/** /**
* 1 - * 1 - - snut97
* @param request * @param request
* @param model * @param model
* @return * @return

@ -17,12 +17,12 @@
</Appenders> </Appenders>
<Loggers> <Loggers>
<Logger name="java.sql" level="INFO" additivity="false"> <Logger name="java.sql" level="debug" additivity="false">
<AppenderRef ref="console" /> <AppenderRef ref="console" />
<AppenderRef ref="dailyRollingFileAppender" /> <AppenderRef ref="dailyRollingFileAppender" />
</Logger> </Logger>
<Logger name="egovframework" level="INFO" additivity="false"> <Logger name="egovframework" level="debug" additivity="false">
<AppenderRef ref="console" /> <AppenderRef ref="console" />
<AppenderRef ref="dailyRollingFileAppender" /> <AppenderRef ref="dailyRollingFileAppender" />
</Logger> </Logger>
@ -44,12 +44,12 @@
<AppenderRef ref="dailyRollingFileAppender" /> <AppenderRef ref="dailyRollingFileAppender" />
</Logger> </Logger>
<Logger name="org.springframework" level="INFO" additivity="false"> <Logger name="org.springframework" level="debug" additivity="false">
<AppenderRef ref="console" /> <AppenderRef ref="console" />
<AppenderRef ref="dailyRollingFileAppender" /> <AppenderRef ref="dailyRollingFileAppender" />
</Logger> </Logger>
<Root level="INFO"> <Root level="debug">
<AppenderRef ref="console" /> <AppenderRef ref="console" />
<AppenderRef ref="dailyRollingFileAppender" /> <AppenderRef ref="dailyRollingFileAppender" />
</Root> </Root>

@ -53,8 +53,9 @@
,x.append_300_img_file ,x.append_300_img_file
,x.reg_dt ,x.reg_dt
,x.mod_dt ,x.mod_dt
,x.member_id ,y.member_id
FROM tbl_bf_family_baby x FROM tbl_bf_family_baby x
INNER JOIN tbl_bf_family_match y on x.smc_no = y.smc_no
WHERE 1 =1 WHERE 1 =1
<isEqual property="is_search" compareValue="Y"> <isEqual property="is_search" compareValue="Y">
@ -113,6 +114,7 @@
<select id="select_bf_family_baby_list_count" resultClass="Integer" parameterClass="dataMap"> <select id="select_bf_family_baby_list_count" resultClass="Integer" parameterClass="dataMap">
SELECT COUNT(*) SELECT COUNT(*)
FROM tbl_bf_family_baby x FROM tbl_bf_family_baby x
INNER JOIN tbl_bf_family_match y on x.smc_no = y.smc_no
WHERE 1 =1 WHERE 1 =1
<isEqual property="is_search" compareValue="Y"> <isEqual property="is_search" compareValue="Y">
@ -247,7 +249,7 @@
<isNotEmpty property="append_300_img_file">,append_300_img_file = #append_300_img_file#</isNotEmpty> <isNotEmpty property="append_300_img_file">,append_300_img_file = #append_300_img_file#</isNotEmpty>
<isNotEmpty property="reg_dt">,reg_dt = #reg_dt#</isNotEmpty> <isNotEmpty property="reg_dt">,reg_dt = #reg_dt#</isNotEmpty>
,mod_dt = NOW() ,mod_dt = NOW()
<isNotEmpty property="member_id">,member_id = #member_id#</isNotEmpty> <!-- <isNotEmpty property="member_id">,member_id = #member_id#</isNotEmpty>-->
WHERE smc_no = #smc_no# WHERE smc_no = #smc_no#
</update> </update>

@ -28,7 +28,8 @@
,bfb.name AS b_name ,bfb.name AS b_name
,bfb.smc_no ,bfb.smc_no
FROM tbl_bf_family_baby bfb FROM tbl_bf_family_baby bfb
LEFT JOIN tbl_member m ON m.member_id = bfb.member_id LEFT JOIN tbl_bf_family_match y on bfb.smc_no = y.smc_no
LEFT JOIN tbl_member m ON m.member_id = y.member_id
LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id
WHERE TIMESTAMPDIFF(MONTH, bfb.birthday, current_date())<![CDATA[<]]>60 WHERE TIMESTAMPDIFF(MONTH, bfb.birthday, current_date())<![CDATA[<]]>60
AND TIMESTAMPDIFF(MONTH, bfb.birthday, current_date())<![CDATA[>]]>5 AND TIMESTAMPDIFF(MONTH, bfb.birthday, current_date())<![CDATA[>]]>5

@ -62,7 +62,8 @@
GROUP BY x.smc_no, DATE(x.reg_dt) GROUP BY x.smc_no, DATE(x.reg_dt)
)x )x
LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no
LEFT JOIN tbl_member m ON m.member_id = bfb.member_id LEFT JOIN tbl_bf_family_match y ON bfb.smc_no = y.smc_no
LEFT JOIN tbl_member m ON m.member_id = y.member_id
LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id
WHERE 1=1 WHERE 1=1
<isEqual property="is_search" compareValue="Y"> <isEqual property="is_search" compareValue="Y">
@ -135,7 +136,8 @@
GROUP BY x.smc_no, DATE(x.reg_dt) GROUP BY x.smc_no, DATE(x.reg_dt)
)x )x
LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no
LEFT JOIN tbl_member m ON m.member_id = bfb.member_id LEFT JOIN tbl_bf_family_match y ON bfb.smc_no = y.smc_no
LEFT JOIN tbl_member m ON m.member_id = y.member_id
LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id
WHERE 1=1 WHERE 1=1
AND bfb.reg_dt IS NOT NULL AND bfb.reg_dt IS NOT NULL
@ -265,7 +267,8 @@
GROUP BY x.smc_no, CONCAT(YEAR(x.reg_dt),"/",WEEK(x.reg_dt)) GROUP BY x.smc_no, CONCAT(YEAR(x.reg_dt),"/",WEEK(x.reg_dt))
)x )x
LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no
LEFT JOIN tbl_member m ON m.member_id = bfb.member_id LEFT JOIN tbl_bf_family_match y ON bfb.smc_no = y.smc_no
LEFT JOIN tbl_member m ON m.member_id = y.member_id
LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id
WHERE count<![CDATA[>=]]>2 WHERE count<![CDATA[>=]]>2
<isEqual property="is_search" compareValue="Y"> <isEqual property="is_search" compareValue="Y">
@ -346,7 +349,8 @@
GROUP BY x.smc_no, CONCAT(YEAR(x.reg_dt),"/",WEEK(x.reg_dt)) GROUP BY x.smc_no, CONCAT(YEAR(x.reg_dt),"/",WEEK(x.reg_dt))
)x )x
LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no
LEFT JOIN tbl_member m ON m.member_id = bfb.member_id LEFT JOIN tbl_bf_family_match y ON bfb.smc_no = y.smc_no
LEFT JOIN tbl_member m ON m.member_id = y.member_id
LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id
WHERE x.count <![CDATA[>=]]> 2 WHERE x.count <![CDATA[>=]]> 2
AND bfb.reg_dt IS NOT NULL AND bfb.reg_dt IS NOT NULL
@ -485,7 +489,8 @@
GROUP BY x.smc_no, CONCAT(YEAR(x.reg_dt),"/",MONTH(x.reg_dt)) GROUP BY x.smc_no, CONCAT(YEAR(x.reg_dt),"/",MONTH(x.reg_dt))
)x )x
LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no
LEFT JOIN tbl_member m ON m.member_id = bfb.member_id LEFT JOIN tbl_bf_family_match y ON bfb.smc_no = y.smc_no
LEFT JOIN tbl_member m ON m.member_id = y.member_id
LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id
WHERE count<![CDATA[>=]]>2 WHERE count<![CDATA[>=]]>2
<isEqual property="is_search" compareValue="Y"> <isEqual property="is_search" compareValue="Y">
@ -567,7 +572,8 @@
GROUP BY x.smc_no, CONCAT(YEAR(x.reg_dt),"/",MONTH(x.reg_dt)) GROUP BY x.smc_no, CONCAT(YEAR(x.reg_dt),"/",MONTH(x.reg_dt))
)x )x
LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no LEFT JOIN tbl_bf_family_baby bfb ON bfb.smc_no = x.smc_no
LEFT JOIN tbl_member m ON m.member_id = bfb.member_id LEFT JOIN tbl_bf_family_match y ON bfb.smc_no = y.smc_no
LEFT JOIN tbl_member m ON m.member_id = y.member_id
LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id LEFT JOIN tbl_member_confirm mc ON m.member_id = mc.member_id
WHERE x.count <![CDATA[>=]]> 2 WHERE x.count <![CDATA[>=]]> 2
AND bfb.reg_dt IS NOT NULL AND bfb.reg_dt IS NOT NULL

@ -217,7 +217,7 @@
<isNotEmpty property="append_300_img_file">,append_300_img_file = #append_300_img_file#</isNotEmpty> <isNotEmpty property="append_300_img_file">,append_300_img_file = #append_300_img_file#</isNotEmpty>
<isNotEmpty property="reg_dt">,reg_dt = #reg_dt#</isNotEmpty> <isNotEmpty property="reg_dt">,reg_dt = #reg_dt#</isNotEmpty>
,mod_dt = NOW() ,mod_dt = NOW()
<isNotEmpty property="member_id">,member_id = #member_id#</isNotEmpty> <!-- <isNotEmpty property="member_id">,member_id = #member_id#</isNotEmpty>-->
WHERE smc_no = #smc_no# WHERE smc_no = #smc_no#
</update> </update>

@ -51,6 +51,43 @@
</insert> </insert>
<!-- <select id="select_bf_family_baby_list" resultClass="dataMap" parameterClass="dataMap">-->
<!-- SELECT x.*-->
<!-- ,REPLACE(append_src_img_file.mt_file_local_url, '/cdn001/', '') AS append_src_img_file_url-->
<!-- ,REPLACE(append_src_img_file.mt_file_nm, '/cdn001/', '') AS append_src_img_file_nm-->
<!-- ,REPLACE(append_300_img_file.mt_file_local_url, '/cdn001/', '') AS append_300_img_file_url-->
<!-- ,REPLACE(append_300_img_file.mt_file_nm, '/cdn001/', '') AS append_300_img_file_nm-->
<!-- FROM-->
<!-- (-->
<!-- SELECT -->
<!-- x.smc_no-->
<!-- ,x.name-->
<!-- ,x.gender-->
<!-- ,x.birthday-->
<!-- ,x.weight_birth-->
<!-- ,x.height_birth-->
<!-- ,x.weight-->
<!-- ,x.height-->
<!-- ,x.allergie-->
<!-- ,x.append_src_img_file-->
<!-- ,x.append_300_img_file-->
<!-- ,x.reg_dt-->
<!-- ,x.mod_dt-->
<!-- ,x.member_id-->
<!-- FROM tbl_bf_family_baby x-->
<!-- WHERE 1 =1-->
<!-- AND x.member_id = #member_id#-->
<!-- ) x-->
<!-- LEFT JOIN tbl_mt_file append_src_img_file-->
<!-- ON x.append_src_img_file = append_src_img_file.mt_file_seq-->
<!-- LEFT JOIN tbl_mt_file append_300_img_file-->
<!-- ON x.append_300_img_file = append_300_img_file.mt_file_seq-->
<!-- -->
<!-- LEFT JOIN tbl_bf_family_baby_order smco ON x.smc_no = smco.smc_no-->
<!-- ORDER BY smco.smc_order ASC-->
<!-- </select>-->
<select id="select_bf_family_baby_list" resultClass="dataMap" parameterClass="dataMap"> <select id="select_bf_family_baby_list" resultClass="dataMap" parameterClass="dataMap">
SELECT x.* SELECT x.*
,REPLACE(append_src_img_file.mt_file_local_url, '/cdn001/', '') AS append_src_img_file_url ,REPLACE(append_src_img_file.mt_file_local_url, '/cdn001/', '') AS append_src_img_file_url
@ -59,7 +96,7 @@
,REPLACE(append_300_img_file.mt_file_nm, '/cdn001/', '') AS append_300_img_file_nm ,REPLACE(append_300_img_file.mt_file_nm, '/cdn001/', '') AS append_300_img_file_nm
FROM FROM
( (
SELECT SELECT
x.smc_no x.smc_no
,x.name ,x.name
,x.gender ,x.gender
@ -73,17 +110,18 @@
,x.append_300_img_file ,x.append_300_img_file
,x.reg_dt ,x.reg_dt
,x.mod_dt ,x.mod_dt
,x.member_id ,y.member_id
FROM tbl_bf_family_baby x FROM tbl_bf_family_baby x
INNER JOIN tbl_bf_family_match y on x.smc_no = y.smc_no
WHERE 1 =1 WHERE 1 =1
AND x.member_id = #member_id# AND y.member_id = #member_id#
) x ) x
LEFT JOIN tbl_mt_file append_src_img_file LEFT JOIN tbl_mt_file append_src_img_file
ON x.append_src_img_file = append_src_img_file.mt_file_seq ON x.append_src_img_file = append_src_img_file.mt_file_seq
LEFT JOIN tbl_mt_file append_300_img_file LEFT JOIN tbl_mt_file append_300_img_file
ON x.append_300_img_file = append_300_img_file.mt_file_seq ON x.append_300_img_file = append_300_img_file.mt_file_seq
LEFT JOIN tbl_bf_family_baby_order smco ON x.smc_no = smco.smc_no LEFT JOIN tbl_bf_family_baby_order smco ON x.smc_no = smco.smc_no
ORDER BY smco.smc_order ASC ORDER BY smco.smc_order ASC
@ -92,8 +130,9 @@
<select id="select_bf_family_baby_list_count" resultClass="Integer" parameterClass="dataMap"> <select id="select_bf_family_baby_list_count" resultClass="Integer" parameterClass="dataMap">
SELECT COUNT(*) SELECT COUNT(*)
FROM tbl_bf_family_baby x FROM tbl_bf_family_baby x
INNER JOIN tbl_bf_family_match y on x.smc_no = y.smc_no
WHERE 1 =1 WHERE 1 =1
AND x.member_id = #member_id# AND y.member_id = #member_id#
</select> </select>
<select id="select_bf_family_baby" resultClass="dataMap" parameterClass="dataMap"> <select id="select_bf_family_baby" resultClass="dataMap" parameterClass="dataMap">
@ -118,8 +157,12 @@
,x.append_300_img_file ,x.append_300_img_file
,x.reg_dt ,x.reg_dt
,x.mod_dt ,x.mod_dt
,x.member_id ,y.member_id
FROM tbl_bf_family_baby x FROM tbl_bf_family_baby x
INNER JOIN tbl_bf_family_match y on x.smc_no = y.smc_no
<isNotEmpty property="member_id">
and y.member_id = #member_id#
</isNotEmpty>
WHERE 1 = 1 WHERE 1 = 1
AND x.smc_no = #smc_no# AND x.smc_no = #smc_no#
) x ) x
@ -186,7 +229,7 @@
<isNotEmpty property="append_300_img_file">,append_300_img_file = #append_300_img_file#</isNotEmpty> <isNotEmpty property="append_300_img_file">,append_300_img_file = #append_300_img_file#</isNotEmpty>
,mod_dt = NOW() ,mod_dt = NOW()
<isNotEmpty property="member_id">,member_id = #member_id#</isNotEmpty> <!-- <isNotEmpty property="member_id">,member_id = #member_id#</isNotEmpty>-->
WHERE smc_no = #smc_no# WHERE smc_no = #smc_no#
</update> </update>

@ -4,16 +4,18 @@
<select id="select_bf_growth_body_data_for_insert" resultClass="dataMap" parameterClass="dataMap"> <select id="select_bf_growth_body_data_for_insert" resultClass="dataMap" parameterClass="dataMap">
SELECT SELECT
member_id y.member_id
, #base_dt# AS base_dt , #base_dt# AS base_dt
<isNotEmpty property="weight">,#weight# AS weight</isNotEmpty> <isNotEmpty property="weight">,#weight# AS weight</isNotEmpty>
<isNotEmpty property="height">,#height# AS height</isNotEmpty> <isNotEmpty property="height">,#height# AS height</isNotEmpty>
, #data_from# AS data_from , #data_from# AS data_from
, smc_no , x.smc_no
FROM tbl_bf_family_baby FROM tbl_bf_family_baby x
WHERE smc_no = #smc_no# INNER JOIN tbl_bf_family_match y on x.smc_no = y.smc_no
and y.member_id = #member_id#
WHERE x.smc_no = #smc_no#
</select> </select>
<select id="select_bf_growth_body_child_for_last" resultClass="dataMap" parameterClass="dataMap"> <select id="select_bf_growth_body_child_for_last" resultClass="dataMap" parameterClass="dataMap">
@ -96,10 +98,12 @@
,x.smc_no ,x.smc_no
,smc.name AS child_name ,smc.name AS child_name
,smc.member_id AS child_member_id ,y.member_id AS child_member_id
FROM tbl_bf_growth_body x, tbl_bf_family_baby smc FROM tbl_bf_growth_body x
INNER JOIN tbl_bf_family_match y on x.smc_no = y.smc_no
, tbl_bf_family_baby smc
WHERE 1 =1 WHERE 1 =1
AND x.member_id = #member_id# AND y.member_id = #member_id#
AND x.smc_no = #smc_no# AND x.smc_no = #smc_no#
AND x.smc_no = smc.smc_no AND x.smc_no = smc.smc_no
@ -143,9 +147,9 @@
<select id="select_bf_growth_body_list_count" resultClass="Integer" parameterClass="dataMap"> <select id="select_bf_growth_body_list_count" resultClass="Integer" parameterClass="dataMap">
SELECT COUNT(*) SELECT COUNT(*)
FROM tbl_bf_growth_body x FROM tbl_bf_growth_body x
INNER JOIN tbl_bf_family_match y on x.smc_no = y.smc_no
WHERE 1 =1 WHERE 1 =1
AND x.member_id = #member_id# AND y.member_id = #member_id#
AND x.smc_no = #smc_no# AND x.smc_no = #smc_no#
</select> </select>

Loading…
Cancel
Save