UPDATE epc_user_info
SET userName = #{tenant.userName}
WHERE
openId = #{tenant.openId}
and tenantId = #{tenant.tenantId}
and companyId = #{tenant.companyId}
${sql}
DROP FUNCTION IF EXISTS `getVal_{rule}`
CREATE FUNCTION `getVal_{rule}`(`mdCode` varchar(100),`inMeCode` varchar(100),`outMeCode` varchar(100),`inMvCode` varchar(100))
RETURNS varchar(100) CHARSET utf8
BEGIN
DECLARE outVal varchar(100) DEFAULT '';
DECLARE rowNo INTEGER DEFAULT -1;
select
ROW_NO INTO rowNo
from epc_master_value_{rule}
where ELE_VALUE = inMvCode
and ELE_CODE = inMeCode
and DEFINE_CODE = mdCode
LIMIT 1;
select
ELE_VALUE INTO outVal
from epc_master_value_{rule}
where ROW_NO = rowNo
and ELE_CODE = outMeCode
and DEFINE_CODE = mdCode
LIMIT 1;
RETURN outVal;
END
update epc_system_config_{rule}
set cvalue = #{entry.value.code}
where ckey = #{entry.key}