领域模型主键属性是shopId,使用JDBC的getGenereatedKeys方法获取主键并赋值到keyProperty设置的领域模型shopId属性中,
配置参考如下:
INSERT INTO
(
shop_name,
shop_keeper_id,
shop_desc,
shop_template_id,
shop_logo_url,
shop_backgroud_pic,
shop_type,
sync_status,
jd_shop_id,
platform_id,
created,
modified,
yn
)VALUES(
#{shopName},
#{shopKeeperId},
#{shopDesc},
#{shopTemplateId},
#{shopLogoUrl},
#{shopBackgroudPic},
#{shopType},
#{syncStatus},
#{jdShopId},
#{platformId},
#{created},
#{modified},
#{yn}
)