当前位置: 首页 > news >正文

个人能免费做网站百度收录要多久

个人能免费做网站,百度收录要多久,广告设计公司设计收费标准,上海网站定制设计图RocketMQ 实战#xff1a;模拟电商网站场景综合案例#xff08;五#xff09; 一、mybatis 逆向工程使用 4、逆向工程 生成 的 .xml 配置文件。 4.1、生成的 TradeCouponMapper.xml 文件。 ?xml version1.0 encodingUTF-8 ? !DOC…RocketMQ 实战模拟电商网站场景综合案例五 一、mybatis 逆向工程使用 4、逆向工程 生成 的 .xml 配置文件。 4.1、生成的 TradeCouponMapper.xml 文件。 ?xml version1.0 encodingUTF-8 ? !DOCTYPE mapper PUBLIC -//mybatis.org//DTD Mapper 3.0//EN http://mybatis.org/dtd/mybatis-3-mapper.dtd mapper namespacecom.itheima.shop.mapper.TradeCouponMapper resultMap idBaseResultMap typecom.itheima.shop.pojo.TradeCoupon id columncoupon_id propertycouponId jdbcTypeBIGINT /result columncoupon_price propertycouponPrice jdbcTypeDECIMAL /result columnuser_id propertyuserId jdbcTypeBIGINT /result columnorder_id propertyorderId jdbcTypeBIGINT /result columnis_used propertyisUsed jdbcTypeINTEGER /result columnused_time propertyusedTime jdbcTypeTIMESTAMP //resultMapsql idExample_Where_Clause where foreach collectionoredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idUpdate_By_Example_Where_Clause where foreach collectionexample.oredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idBase_Column_List coupon_id, coupon_price, user_id, order_id, is_used, used_time/sqlselect idselectByExample resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradeCouponExample selectif testdistinct distinct/ifinclude refidBase_Column_List /from trade_couponif test_parameter ! null include refidExample_Where_Clause //ifif testorderByClause ! null order by ${orderByClause}/if/selectselect idselectByPrimaryKey resultMapBaseResultMap parameterTypejava.lang.Long select include refidBase_Column_List /from trade_couponwhere coupon_id #{couponId,jdbcTypeBIGINT}/selectdelete iddeleteByPrimaryKey parameterTypejava.lang.Long delete from trade_couponwhere coupon_id #{couponId,jdbcTypeBIGINT}/deletedelete iddeleteByExample parameterTypecom.itheima.shop.pojo.TradeCouponExample delete from trade_couponif test_parameter ! null include refidExample_Where_Clause //if/deleteinsert idinsert parameterTypecom.itheima.shop.pojo.TradeCoupon insert into trade_coupon (coupon_id, coupon_price, user_id, order_id, is_used, used_time)values (#{couponId,jdbcTypeBIGINT}, #{couponPrice,jdbcTypeDECIMAL}, #{userId,jdbcTypeBIGINT}, #{orderId,jdbcTypeBIGINT}, #{isUsed,jdbcTypeINTEGER}, #{usedTime,jdbcTypeTIMESTAMP})/insertinsert idinsertSelective parameterTypecom.itheima.shop.pojo.TradeCoupon insert into trade_coupontrim prefix( suffix) suffixOverrides, if testcouponId ! null coupon_id,/ifif testcouponPrice ! null coupon_price,/ifif testuserId ! null user_id,/ifif testorderId ! null order_id,/ifif testisUsed ! null is_used,/ifif testusedTime ! null used_time,/if/trimtrim prefixvalues ( suffix) suffixOverrides, if testcouponId ! null #{couponId,jdbcTypeBIGINT},/ifif testcouponPrice ! null #{couponPrice,jdbcTypeDECIMAL},/ifif testuserId ! null #{userId,jdbcTypeBIGINT},/ifif testorderId ! null #{orderId,jdbcTypeBIGINT},/ifif testisUsed ! null #{isUsed,jdbcTypeINTEGER},/ifif testusedTime ! null #{usedTime,jdbcTypeTIMESTAMP},/if/trim/insertselect idcountByExample parameterTypecom.itheima.shop.pojo.TradeCouponExample resultTypejava.lang.Integer select count(*) from trade_couponif test_parameter ! null include refidExample_Where_Clause //if/selectupdate idupdateByExampleSelective parameterTypemap update trade_couponset if testrecord.couponId ! null coupon_id #{record.couponId,jdbcTypeBIGINT},/ifif testrecord.couponPrice ! null coupon_price #{record.couponPrice,jdbcTypeDECIMAL},/ifif testrecord.userId ! null user_id #{record.userId,jdbcTypeBIGINT},/ifif testrecord.orderId ! null order_id #{record.orderId,jdbcTypeBIGINT},/ifif testrecord.isUsed ! null is_used #{record.isUsed,jdbcTypeINTEGER},/ifif testrecord.usedTime ! null used_time #{record.usedTime,jdbcTypeTIMESTAMP},/if/setif test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByExample parameterTypemap update trade_couponset coupon_id #{record.couponId,jdbcTypeBIGINT},coupon_price #{record.couponPrice,jdbcTypeDECIMAL},user_id #{record.userId,jdbcTypeBIGINT},order_id #{record.orderId,jdbcTypeBIGINT},is_used #{record.isUsed,jdbcTypeINTEGER},used_time #{record.usedTime,jdbcTypeTIMESTAMP}if test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByPrimaryKeySelective parameterTypecom.itheima.shop.pojo.TradeCoupon update trade_couponset if testcouponPrice ! null coupon_price #{couponPrice,jdbcTypeDECIMAL},/ifif testuserId ! null user_id #{userId,jdbcTypeBIGINT},/ifif testorderId ! null order_id #{orderId,jdbcTypeBIGINT},/ifif testisUsed ! null is_used #{isUsed,jdbcTypeINTEGER},/ifif testusedTime ! null used_time #{usedTime,jdbcTypeTIMESTAMP},/if/setwhere coupon_id #{couponId,jdbcTypeBIGINT}/updateupdate idupdateByPrimaryKey parameterTypecom.itheima.shop.pojo.TradeCoupon update trade_couponset coupon_price #{couponPrice,jdbcTypeDECIMAL},user_id #{userId,jdbcTypeBIGINT},order_id #{orderId,jdbcTypeBIGINT},is_used #{isUsed,jdbcTypeINTEGER},used_time #{usedTime,jdbcTypeTIMESTAMP}where coupon_id #{couponId,jdbcTypeBIGINT}/update /mapper4.2、生成的 TradeGoodsMapper.xml 文件。 ?xml version1.0 encodingUTF-8 ? !DOCTYPE mapper PUBLIC -//mybatis.org//DTD Mapper 3.0//EN http://mybatis.org/dtd/mybatis-3-mapper.dtd mapper namespacecom.itheima.shop.mapper.TradeGoodsMapper resultMap idBaseResultMap typecom.itheima.shop.pojo.TradeGoods id columngoods_id propertygoodsId jdbcTypeBIGINT /result columngoods_name propertygoodsName jdbcTypeVARCHAR /result columngoods_number propertygoodsNumber jdbcTypeINTEGER /result columngoods_price propertygoodsPrice jdbcTypeDECIMAL /result columngoods_desc propertygoodsDesc jdbcTypeVARCHAR /result columnadd_time propertyaddTime jdbcTypeTIMESTAMP //resultMapsql idExample_Where_Clause where foreach collectionoredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idUpdate_By_Example_Where_Clause where foreach collectionexample.oredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idBase_Column_List goods_id, goods_name, goods_number, goods_price, goods_desc, add_time/sqlselect idselectByExample resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradeGoodsExample selectif testdistinct distinct/ifinclude refidBase_Column_List /from trade_goodsif test_parameter ! null include refidExample_Where_Clause //ifif testorderByClause ! null order by ${orderByClause}/if/selectselect idselectByPrimaryKey resultMapBaseResultMap parameterTypejava.lang.Long select include refidBase_Column_List /from trade_goodswhere goods_id #{goodsId,jdbcTypeBIGINT}/selectdelete iddeleteByPrimaryKey parameterTypejava.lang.Long delete from trade_goodswhere goods_id #{goodsId,jdbcTypeBIGINT}/deletedelete iddeleteByExample parameterTypecom.itheima.shop.pojo.TradeGoodsExample delete from trade_goodsif test_parameter ! null include refidExample_Where_Clause //if/deleteinsert idinsert parameterTypecom.itheima.shop.pojo.TradeGoods insert into trade_goods (goods_id, goods_name, goods_number, goods_price, goods_desc, add_time)values (#{goodsId,jdbcTypeBIGINT}, #{goodsName,jdbcTypeVARCHAR}, #{goodsNumber,jdbcTypeINTEGER}, #{goodsPrice,jdbcTypeDECIMAL}, #{goodsDesc,jdbcTypeVARCHAR}, #{addTime,jdbcTypeTIMESTAMP})/insertinsert idinsertSelective parameterTypecom.itheima.shop.pojo.TradeGoods insert into trade_goodstrim prefix( suffix) suffixOverrides, if testgoodsId ! null goods_id,/ifif testgoodsName ! null goods_name,/ifif testgoodsNumber ! null goods_number,/ifif testgoodsPrice ! null goods_price,/ifif testgoodsDesc ! null goods_desc,/ifif testaddTime ! null add_time,/if/trimtrim prefixvalues ( suffix) suffixOverrides, if testgoodsId ! null #{goodsId,jdbcTypeBIGINT},/ifif testgoodsName ! null #{goodsName,jdbcTypeVARCHAR},/ifif testgoodsNumber ! null #{goodsNumber,jdbcTypeINTEGER},/ifif testgoodsPrice ! null #{goodsPrice,jdbcTypeDECIMAL},/ifif testgoodsDesc ! null #{goodsDesc,jdbcTypeVARCHAR},/ifif testaddTime ! null #{addTime,jdbcTypeTIMESTAMP},/if/trim/insertselect idcountByExample parameterTypecom.itheima.shop.pojo.TradeGoodsExample resultTypejava.lang.Integer select count(*) from trade_goodsif test_parameter ! null include refidExample_Where_Clause //if/selectupdate idupdateByExampleSelective parameterTypemap update trade_goodsset if testrecord.goodsId ! null goods_id #{record.goodsId,jdbcTypeBIGINT},/ifif testrecord.goodsName ! null goods_name #{record.goodsName,jdbcTypeVARCHAR},/ifif testrecord.goodsNumber ! null goods_number #{record.goodsNumber,jdbcTypeINTEGER},/ifif testrecord.goodsPrice ! null goods_price #{record.goodsPrice,jdbcTypeDECIMAL},/ifif testrecord.goodsDesc ! null goods_desc #{record.goodsDesc,jdbcTypeVARCHAR},/ifif testrecord.addTime ! null add_time #{record.addTime,jdbcTypeTIMESTAMP},/if/setif test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByExample parameterTypemap update trade_goodsset goods_id #{record.goodsId,jdbcTypeBIGINT},goods_name #{record.goodsName,jdbcTypeVARCHAR},goods_number #{record.goodsNumber,jdbcTypeINTEGER},goods_price #{record.goodsPrice,jdbcTypeDECIMAL},goods_desc #{record.goodsDesc,jdbcTypeVARCHAR},add_time #{record.addTime,jdbcTypeTIMESTAMP}if test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByPrimaryKeySelective parameterTypecom.itheima.shop.pojo.TradeGoods update trade_goodsset if testgoodsName ! null goods_name #{goodsName,jdbcTypeVARCHAR},/ifif testgoodsNumber ! null goods_number #{goodsNumber,jdbcTypeINTEGER},/ifif testgoodsPrice ! null goods_price #{goodsPrice,jdbcTypeDECIMAL},/ifif testgoodsDesc ! null goods_desc #{goodsDesc,jdbcTypeVARCHAR},/ifif testaddTime ! null add_time #{addTime,jdbcTypeTIMESTAMP},/if/setwhere goods_id #{goodsId,jdbcTypeBIGINT}/updateupdate idupdateByPrimaryKey parameterTypecom.itheima.shop.pojo.TradeGoods update trade_goodsset goods_name #{goodsName,jdbcTypeVARCHAR},goods_number #{goodsNumber,jdbcTypeINTEGER},goods_price #{goodsPrice,jdbcTypeDECIMAL},goods_desc #{goodsDesc,jdbcTypeVARCHAR},add_time #{addTime,jdbcTypeTIMESTAMP}where goods_id #{goodsId,jdbcTypeBIGINT}/update /mapper4.3、生成的 TradeGoodsNumberLogMapper.xml 文件。 ?xml version1.0 encodingUTF-8 ? !DOCTYPE mapper PUBLIC -//mybatis.org//DTD Mapper 3.0//EN http://mybatis.org/dtd/mybatis-3-mapper.dtd mapper namespacecom.itheima.shop.mapper.TradeGoodsNumberLogMapper resultMap idBaseResultMap typecom.itheima.shop.pojo.TradeGoodsNumberLog id columngoods_id propertygoodsId jdbcTypeBIGINT /id columnorder_id propertyorderId jdbcTypeBIGINT /result columngoods_number propertygoodsNumber jdbcTypeINTEGER /result columnlog_time propertylogTime jdbcTypeTIMESTAMP //resultMapsql idExample_Where_Clause where foreach collectionoredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idUpdate_By_Example_Where_Clause where foreach collectionexample.oredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idBase_Column_List goods_id, order_id, goods_number, log_time/sqlselect idselectByExample resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradeGoodsNumberLogExample selectif testdistinct distinct/ifinclude refidBase_Column_List /from trade_goods_number_logif test_parameter ! null include refidExample_Where_Clause //ifif testorderByClause ! null order by ${orderByClause}/if/selectselect idselectByPrimaryKey resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradeGoodsNumberLogKey select include refidBase_Column_List /from trade_goods_number_logwhere goods_id #{goodsId,jdbcTypeBIGINT}and order_id #{orderId,jdbcTypeBIGINT}/selectdelete iddeleteByPrimaryKey parameterTypecom.itheima.shop.pojo.TradeGoodsNumberLogKey delete from trade_goods_number_logwhere goods_id #{goodsId,jdbcTypeBIGINT}and order_id #{orderId,jdbcTypeBIGINT}/deletedelete iddeleteByExample parameterTypecom.itheima.shop.pojo.TradeGoodsNumberLogExample delete from trade_goods_number_logif test_parameter ! null include refidExample_Where_Clause //if/deleteinsert idinsert parameterTypecom.itheima.shop.pojo.TradeGoodsNumberLog insert into trade_goods_number_log (goods_id, order_id, goods_number, log_time)values (#{goodsId,jdbcTypeBIGINT}, #{orderId,jdbcTypeBIGINT}, #{goodsNumber,jdbcTypeINTEGER}, #{logTime,jdbcTypeTIMESTAMP})/insertinsert idinsertSelective parameterTypecom.itheima.shop.pojo.TradeGoodsNumberLog insert into trade_goods_number_logtrim prefix( suffix) suffixOverrides, if testgoodsId ! null goods_id,/ifif testorderId ! null order_id,/ifif testgoodsNumber ! null goods_number,/ifif testlogTime ! null log_time,/if/trimtrim prefixvalues ( suffix) suffixOverrides, if testgoodsId ! null #{goodsId,jdbcTypeBIGINT},/ifif testorderId ! null #{orderId,jdbcTypeBIGINT},/ifif testgoodsNumber ! null #{goodsNumber,jdbcTypeINTEGER},/ifif testlogTime ! null #{logTime,jdbcTypeTIMESTAMP},/if/trim/insertselect idcountByExample parameterTypecom.itheima.shop.pojo.TradeGoodsNumberLogExample resultTypejava.lang.Integer select count(*) from trade_goods_number_logif test_parameter ! null include refidExample_Where_Clause //if/selectupdate idupdateByExampleSelective parameterTypemap update trade_goods_number_logset if testrecord.goodsId ! null goods_id #{record.goodsId,jdbcTypeBIGINT},/ifif testrecord.orderId ! null order_id #{record.orderId,jdbcTypeBIGINT},/ifif testrecord.goodsNumber ! null goods_number #{record.goodsNumber,jdbcTypeINTEGER},/ifif testrecord.logTime ! null log_time #{record.logTime,jdbcTypeTIMESTAMP},/if/setif test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByExample parameterTypemap update trade_goods_number_logset goods_id #{record.goodsId,jdbcTypeBIGINT},order_id #{record.orderId,jdbcTypeBIGINT},goods_number #{record.goodsNumber,jdbcTypeINTEGER},log_time #{record.logTime,jdbcTypeTIMESTAMP}if test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByPrimaryKeySelective parameterTypecom.itheima.shop.pojo.TradeGoodsNumberLog update trade_goods_number_logset if testgoodsNumber ! null goods_number #{goodsNumber,jdbcTypeINTEGER},/ifif testlogTime ! null log_time #{logTime,jdbcTypeTIMESTAMP},/if/setwhere goods_id #{goodsId,jdbcTypeBIGINT}and order_id #{orderId,jdbcTypeBIGINT}/updateupdate idupdateByPrimaryKey parameterTypecom.itheima.shop.pojo.TradeGoodsNumberLog update trade_goods_number_logset goods_number #{goodsNumber,jdbcTypeINTEGER},log_time #{logTime,jdbcTypeTIMESTAMP}where goods_id #{goodsId,jdbcTypeBIGINT}and order_id #{orderId,jdbcTypeBIGINT}/update /mapper4.4、生成的 TradeMqConsumerLogMapper.xml 文件。 ?xml version1.0 encodingUTF-8 ? !DOCTYPE mapper PUBLIC -//mybatis.org//DTD Mapper 3.0//EN http://mybatis.org/dtd/mybatis-3-mapper.dtd mapper namespacecom.itheima.shop.mapper.TradeMqConsumerLogMapper resultMap idBaseResultMap typecom.itheima.shop.pojo.TradeMqConsumerLog id columngroup_name propertygroupName jdbcTypeVARCHAR /id columnmsg_tag propertymsgTag jdbcTypeVARCHAR /id columnmsg_key propertymsgKey jdbcTypeVARCHAR /result columnmsg_id propertymsgId jdbcTypeVARCHAR /result columnmsg_body propertymsgBody jdbcTypeVARCHAR /result columnconsumer_status propertyconsumerStatus jdbcTypeINTEGER /result columnconsumer_times propertyconsumerTimes jdbcTypeINTEGER /result columnconsumer_timestamp propertyconsumerTimestamp jdbcTypeTIMESTAMP /result columnremark propertyremark jdbcTypeVARCHAR //resultMapsql idExample_Where_Clause where foreach collectionoredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idUpdate_By_Example_Where_Clause where foreach collectionexample.oredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idBase_Column_List group_name, msg_tag, msg_key, msg_id, msg_body, consumer_status, consumer_times, consumer_timestamp, remark/sqlselect idselectByExample resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradeMqConsumerLogExample selectif testdistinct distinct/ifinclude refidBase_Column_List /from trade_mq_consumer_logif test_parameter ! null include refidExample_Where_Clause //ifif testorderByClause ! null order by ${orderByClause}/if/selectselect idselectByPrimaryKey resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradeMqConsumerLogKey select include refidBase_Column_List /from trade_mq_consumer_logwhere group_name #{groupName,jdbcTypeVARCHAR}and msg_tag #{msgTag,jdbcTypeVARCHAR}and msg_key #{msgKey,jdbcTypeVARCHAR}/selectdelete iddeleteByPrimaryKey parameterTypecom.itheima.shop.pojo.TradeMqConsumerLogKey delete from trade_mq_consumer_logwhere group_name #{groupName,jdbcTypeVARCHAR}and msg_tag #{msgTag,jdbcTypeVARCHAR}and msg_key #{msgKey,jdbcTypeVARCHAR}/deletedelete iddeleteByExample parameterTypecom.itheima.shop.pojo.TradeMqConsumerLogExample delete from trade_mq_consumer_logif test_parameter ! null include refidExample_Where_Clause //if/deleteinsert idinsert parameterTypecom.itheima.shop.pojo.TradeMqConsumerLog insert into trade_mq_consumer_log (group_name, msg_tag, msg_key, msg_id, msg_body, consumer_status, consumer_times, consumer_timestamp, remark)values (#{groupName,jdbcTypeVARCHAR}, #{msgTag,jdbcTypeVARCHAR}, #{msgKey,jdbcTypeVARCHAR}, #{msgId,jdbcTypeVARCHAR}, #{msgBody,jdbcTypeVARCHAR}, #{consumerStatus,jdbcTypeINTEGER}, #{consumerTimes,jdbcTypeINTEGER}, #{consumerTimestamp,jdbcTypeTIMESTAMP}, #{remark,jdbcTypeVARCHAR})/insertinsert idinsertSelective parameterTypecom.itheima.shop.pojo.TradeMqConsumerLog insert into trade_mq_consumer_logtrim prefix( suffix) suffixOverrides, if testgroupName ! null group_name,/ifif testmsgTag ! null msg_tag,/ifif testmsgKey ! null msg_key,/ifif testmsgId ! null msg_id,/ifif testmsgBody ! null msg_body,/ifif testconsumerStatus ! null consumer_status,/ifif testconsumerTimes ! null consumer_times,/ifif testconsumerTimestamp ! null consumer_timestamp,/ifif testremark ! null remark,/if/trimtrim prefixvalues ( suffix) suffixOverrides, if testgroupName ! null #{groupName,jdbcTypeVARCHAR},/ifif testmsgTag ! null #{msgTag,jdbcTypeVARCHAR},/ifif testmsgKey ! null #{msgKey,jdbcTypeVARCHAR},/ifif testmsgId ! null #{msgId,jdbcTypeVARCHAR},/ifif testmsgBody ! null #{msgBody,jdbcTypeVARCHAR},/ifif testconsumerStatus ! null #{consumerStatus,jdbcTypeINTEGER},/ifif testconsumerTimes ! null #{consumerTimes,jdbcTypeINTEGER},/ifif testconsumerTimestamp ! null #{consumerTimestamp,jdbcTypeTIMESTAMP},/ifif testremark ! null #{remark,jdbcTypeVARCHAR},/if/trim/insertselect idcountByExample parameterTypecom.itheima.shop.pojo.TradeMqConsumerLogExample resultTypejava.lang.Integer select count(*) from trade_mq_consumer_logif test_parameter ! null include refidExample_Where_Clause //if/selectupdate idupdateByExampleSelective parameterTypemap update trade_mq_consumer_logset if testrecord.groupName ! null group_name #{record.groupName,jdbcTypeVARCHAR},/ifif testrecord.msgTag ! null msg_tag #{record.msgTag,jdbcTypeVARCHAR},/ifif testrecord.msgKey ! null msg_key #{record.msgKey,jdbcTypeVARCHAR},/ifif testrecord.msgId ! null msg_id #{record.msgId,jdbcTypeVARCHAR},/ifif testrecord.msgBody ! null msg_body #{record.msgBody,jdbcTypeVARCHAR},/ifif testrecord.consumerStatus ! null consumer_status #{record.consumerStatus,jdbcTypeINTEGER},/ifif testrecord.consumerTimes ! null consumer_times #{record.consumerTimes,jdbcTypeINTEGER},/ifif testrecord.consumerTimestamp ! null consumer_timestamp #{record.consumerTimestamp,jdbcTypeTIMESTAMP},/ifif testrecord.remark ! null remark #{record.remark,jdbcTypeVARCHAR},/if/setif test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByExample parameterTypemap update trade_mq_consumer_logset group_name #{record.groupName,jdbcTypeVARCHAR},msg_tag #{record.msgTag,jdbcTypeVARCHAR},msg_key #{record.msgKey,jdbcTypeVARCHAR},msg_id #{record.msgId,jdbcTypeVARCHAR},msg_body #{record.msgBody,jdbcTypeVARCHAR},consumer_status #{record.consumerStatus,jdbcTypeINTEGER},consumer_times #{record.consumerTimes,jdbcTypeINTEGER},consumer_timestamp #{record.consumerTimestamp,jdbcTypeTIMESTAMP},remark #{record.remark,jdbcTypeVARCHAR}if test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByPrimaryKeySelective parameterTypecom.itheima.shop.pojo.TradeMqConsumerLog update trade_mq_consumer_logset if testmsgId ! null msg_id #{msgId,jdbcTypeVARCHAR},/ifif testmsgBody ! null msg_body #{msgBody,jdbcTypeVARCHAR},/ifif testconsumerStatus ! null consumer_status #{consumerStatus,jdbcTypeINTEGER},/ifif testconsumerTimes ! null consumer_times #{consumerTimes,jdbcTypeINTEGER},/ifif testconsumerTimestamp ! null consumer_timestamp #{consumerTimestamp,jdbcTypeTIMESTAMP},/ifif testremark ! null remark #{remark,jdbcTypeVARCHAR},/if/setwhere group_name #{groupName,jdbcTypeVARCHAR}and msg_tag #{msgTag,jdbcTypeVARCHAR}and msg_key #{msgKey,jdbcTypeVARCHAR}/updateupdate idupdateByPrimaryKey parameterTypecom.itheima.shop.pojo.TradeMqConsumerLog update trade_mq_consumer_logset msg_id #{msgId,jdbcTypeVARCHAR},msg_body #{msgBody,jdbcTypeVARCHAR},consumer_status #{consumerStatus,jdbcTypeINTEGER},consumer_times #{consumerTimes,jdbcTypeINTEGER},consumer_timestamp #{consumerTimestamp,jdbcTypeTIMESTAMP},remark #{remark,jdbcTypeVARCHAR}where group_name #{groupName,jdbcTypeVARCHAR}and msg_tag #{msgTag,jdbcTypeVARCHAR}and msg_key #{msgKey,jdbcTypeVARCHAR}/update /mapper4.5、生成的 TradeMqProducerTempMapper.xml 文件。 ?xml version1.0 encodingUTF-8 ? !DOCTYPE mapper PUBLIC -//mybatis.org//DTD Mapper 3.0//EN http://mybatis.org/dtd/mybatis-3-mapper.dtd mapper namespacecom.itheima.shop.mapper.TradeMqProducerTempMapper resultMap idBaseResultMap typecom.itheima.shop.pojo.TradeMqProducerTemp id columnid propertyid jdbcTypeVARCHAR /result columngroup_name propertygroupName jdbcTypeVARCHAR /result columnmsg_topic propertymsgTopic jdbcTypeVARCHAR /result columnmsg_tag propertymsgTag jdbcTypeVARCHAR /result columnmsg_key propertymsgKey jdbcTypeVARCHAR /result columnmsg_body propertymsgBody jdbcTypeVARCHAR /result columnmsg_status propertymsgStatus jdbcTypeINTEGER /result columncreate_time propertycreateTime jdbcTypeTIMESTAMP //resultMapsql idExample_Where_Clause where foreach collectionoredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idUpdate_By_Example_Where_Clause where foreach collectionexample.oredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idBase_Column_List id, group_name, msg_topic, msg_tag, msg_key, msg_body, msg_status, create_time/sqlselect idselectByExample resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradeMqProducerTempExample selectif testdistinct distinct/ifinclude refidBase_Column_List /from trade_mq_producer_tempif test_parameter ! null include refidExample_Where_Clause //ifif testorderByClause ! null order by ${orderByClause}/if/selectselect idselectByPrimaryKey resultMapBaseResultMap parameterTypejava.lang.String select include refidBase_Column_List /from trade_mq_producer_tempwhere id #{id,jdbcTypeVARCHAR}/selectdelete iddeleteByPrimaryKey parameterTypejava.lang.String delete from trade_mq_producer_tempwhere id #{id,jdbcTypeVARCHAR}/deletedelete iddeleteByExample parameterTypecom.itheima.shop.pojo.TradeMqProducerTempExample delete from trade_mq_producer_tempif test_parameter ! null include refidExample_Where_Clause //if/deleteinsert idinsert parameterTypecom.itheima.shop.pojo.TradeMqProducerTemp insert into trade_mq_producer_temp (id, group_name, msg_topic, msg_tag, msg_key, msg_body, msg_status, create_time)values (#{id,jdbcTypeVARCHAR}, #{groupName,jdbcTypeVARCHAR}, #{msgTopic,jdbcTypeVARCHAR}, #{msgTag,jdbcTypeVARCHAR}, #{msgKey,jdbcTypeVARCHAR}, #{msgBody,jdbcTypeVARCHAR}, #{msgStatus,jdbcTypeINTEGER}, #{createTime,jdbcTypeTIMESTAMP})/insertinsert idinsertSelective parameterTypecom.itheima.shop.pojo.TradeMqProducerTemp insert into trade_mq_producer_temptrim prefix( suffix) suffixOverrides, if testid ! null id,/ifif testgroupName ! null group_name,/ifif testmsgTopic ! null msg_topic,/ifif testmsgTag ! null msg_tag,/ifif testmsgKey ! null msg_key,/ifif testmsgBody ! null msg_body,/ifif testmsgStatus ! null msg_status,/ifif testcreateTime ! null create_time,/if/trimtrim prefixvalues ( suffix) suffixOverrides, if testid ! null #{id,jdbcTypeVARCHAR},/ifif testgroupName ! null #{groupName,jdbcTypeVARCHAR},/ifif testmsgTopic ! null #{msgTopic,jdbcTypeVARCHAR},/ifif testmsgTag ! null #{msgTag,jdbcTypeVARCHAR},/ifif testmsgKey ! null #{msgKey,jdbcTypeVARCHAR},/ifif testmsgBody ! null #{msgBody,jdbcTypeVARCHAR},/ifif testmsgStatus ! null #{msgStatus,jdbcTypeINTEGER},/ifif testcreateTime ! null #{createTime,jdbcTypeTIMESTAMP},/if/trim/insertselect idcountByExample parameterTypecom.itheima.shop.pojo.TradeMqProducerTempExample resultTypejava.lang.Integer select count(*) from trade_mq_producer_tempif test_parameter ! null include refidExample_Where_Clause //if/selectupdate idupdateByExampleSelective parameterTypemap update trade_mq_producer_tempset if testrecord.id ! null id #{record.id,jdbcTypeVARCHAR},/ifif testrecord.groupName ! null group_name #{record.groupName,jdbcTypeVARCHAR},/ifif testrecord.msgTopic ! null msg_topic #{record.msgTopic,jdbcTypeVARCHAR},/ifif testrecord.msgTag ! null msg_tag #{record.msgTag,jdbcTypeVARCHAR},/ifif testrecord.msgKey ! null msg_key #{record.msgKey,jdbcTypeVARCHAR},/ifif testrecord.msgBody ! null msg_body #{record.msgBody,jdbcTypeVARCHAR},/ifif testrecord.msgStatus ! null msg_status #{record.msgStatus,jdbcTypeINTEGER},/ifif testrecord.createTime ! null create_time #{record.createTime,jdbcTypeTIMESTAMP},/if/setif test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByExample parameterTypemap update trade_mq_producer_tempset id #{record.id,jdbcTypeVARCHAR},group_name #{record.groupName,jdbcTypeVARCHAR},msg_topic #{record.msgTopic,jdbcTypeVARCHAR},msg_tag #{record.msgTag,jdbcTypeVARCHAR},msg_key #{record.msgKey,jdbcTypeVARCHAR},msg_body #{record.msgBody,jdbcTypeVARCHAR},msg_status #{record.msgStatus,jdbcTypeINTEGER},create_time #{record.createTime,jdbcTypeTIMESTAMP}if test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByPrimaryKeySelective parameterTypecom.itheima.shop.pojo.TradeMqProducerTemp update trade_mq_producer_tempset if testgroupName ! null group_name #{groupName,jdbcTypeVARCHAR},/ifif testmsgTopic ! null msg_topic #{msgTopic,jdbcTypeVARCHAR},/ifif testmsgTag ! null msg_tag #{msgTag,jdbcTypeVARCHAR},/ifif testmsgKey ! null msg_key #{msgKey,jdbcTypeVARCHAR},/ifif testmsgBody ! null msg_body #{msgBody,jdbcTypeVARCHAR},/ifif testmsgStatus ! null msg_status #{msgStatus,jdbcTypeINTEGER},/ifif testcreateTime ! null create_time #{createTime,jdbcTypeTIMESTAMP},/if/setwhere id #{id,jdbcTypeVARCHAR}/updateupdate idupdateByPrimaryKey parameterTypecom.itheima.shop.pojo.TradeMqProducerTemp update trade_mq_producer_tempset group_name #{groupName,jdbcTypeVARCHAR},msg_topic #{msgTopic,jdbcTypeVARCHAR},msg_tag #{msgTag,jdbcTypeVARCHAR},msg_key #{msgKey,jdbcTypeVARCHAR},msg_body #{msgBody,jdbcTypeVARCHAR},msg_status #{msgStatus,jdbcTypeINTEGER},create_time #{createTime,jdbcTypeTIMESTAMP}where id #{id,jdbcTypeVARCHAR}/update /mapper4.6、生成的 TradeOrderMapper.xml 文件。 ?xml version1.0 encodingUTF-8 ? !DOCTYPE mapper PUBLIC -//mybatis.org//DTD Mapper 3.0//EN http://mybatis.org/dtd/mybatis-3-mapper.dtd mapper namespacecom.itheima.shop.mapper.TradeOrderMapper resultMap idBaseResultMap typecom.itheima.shop.pojo.TradeOrder id columnorder_id propertyorderId jdbcTypeBIGINT /result columnuser_id propertyuserId jdbcTypeBIGINT /result columnorder_status propertyorderStatus jdbcTypeINTEGER /result columnpay_status propertypayStatus jdbcTypeINTEGER /result columnshipping_status propertyshippingStatus jdbcTypeINTEGER /result columnaddress propertyaddress jdbcTypeVARCHAR /result columnconsignee propertyconsignee jdbcTypeVARCHAR /result columngoods_id propertygoodsId jdbcTypeBIGINT /result columngoods_number propertygoodsNumber jdbcTypeINTEGER /result columngoods_price propertygoodsPrice jdbcTypeDECIMAL /result columngoods_amount propertygoodsAmount jdbcTypeDECIMAL /result columnshipping_fee propertyshippingFee jdbcTypeDECIMAL /result columnorder_amount propertyorderAmount jdbcTypeDECIMAL /result columncoupon_id propertycouponId jdbcTypeBIGINT /result columncoupon_paid propertycouponPaid jdbcTypeDECIMAL /result columnmoney_paid propertymoneyPaid jdbcTypeDECIMAL /result columnpay_amount propertypayAmount jdbcTypeDECIMAL /result columnadd_time propertyaddTime jdbcTypeTIMESTAMP /result columnconfirm_time propertyconfirmTime jdbcTypeTIMESTAMP /result columnpay_time propertypayTime jdbcTypeTIMESTAMP //resultMapsql idExample_Where_Clause where foreach collectionoredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idUpdate_By_Example_Where_Clause where foreach collectionexample.oredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idBase_Column_List order_id, user_id, order_status, pay_status, shipping_status, address, consignee, goods_id, goods_number, goods_price, goods_amount, shipping_fee, order_amount, coupon_id, coupon_paid, money_paid, pay_amount, add_time, confirm_time, pay_time/sqlselect idselectByExample resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradeOrderExample selectif testdistinct distinct/ifinclude refidBase_Column_List /from trade_orderif test_parameter ! null include refidExample_Where_Clause //ifif testorderByClause ! null order by ${orderByClause}/if/selectselect idselectByPrimaryKey resultMapBaseResultMap parameterTypejava.lang.Long select include refidBase_Column_List /from trade_orderwhere order_id #{orderId,jdbcTypeBIGINT}/selectdelete iddeleteByPrimaryKey parameterTypejava.lang.Long delete from trade_orderwhere order_id #{orderId,jdbcTypeBIGINT}/deletedelete iddeleteByExample parameterTypecom.itheima.shop.pojo.TradeOrderExample delete from trade_orderif test_parameter ! null include refidExample_Where_Clause //if/deleteinsert idinsert parameterTypecom.itheima.shop.pojo.TradeOrder insert into trade_order (order_id, user_id, order_status, pay_status, shipping_status, address, consignee, goods_id, goods_number, goods_price, goods_amount, shipping_fee, order_amount, coupon_id, coupon_paid, money_paid, pay_amount, add_time, confirm_time, pay_time)values (#{orderId,jdbcTypeBIGINT}, #{userId,jdbcTypeBIGINT}, #{orderStatus,jdbcTypeINTEGER}, #{payStatus,jdbcTypeINTEGER}, #{shippingStatus,jdbcTypeINTEGER}, #{address,jdbcTypeVARCHAR}, #{consignee,jdbcTypeVARCHAR}, #{goodsId,jdbcTypeBIGINT}, #{goodsNumber,jdbcTypeINTEGER}, #{goodsPrice,jdbcTypeDECIMAL}, #{goodsAmount,jdbcTypeDECIMAL}, #{shippingFee,jdbcTypeDECIMAL}, #{orderAmount,jdbcTypeDECIMAL}, #{couponId,jdbcTypeBIGINT}, #{couponPaid,jdbcTypeDECIMAL}, #{moneyPaid,jdbcTypeDECIMAL}, #{payAmount,jdbcTypeDECIMAL}, #{addTime,jdbcTypeTIMESTAMP}, #{confirmTime,jdbcTypeTIMESTAMP}, #{payTime,jdbcTypeTIMESTAMP})/insertinsert idinsertSelective parameterTypecom.itheima.shop.pojo.TradeOrder insert into trade_ordertrim prefix( suffix) suffixOverrides, if testorderId ! null order_id,/ifif testuserId ! null user_id,/ifif testorderStatus ! null order_status,/ifif testpayStatus ! null pay_status,/ifif testshippingStatus ! null shipping_status,/ifif testaddress ! null address,/ifif testconsignee ! null consignee,/ifif testgoodsId ! null goods_id,/ifif testgoodsNumber ! null goods_number,/ifif testgoodsPrice ! null goods_price,/ifif testgoodsAmount ! null goods_amount,/ifif testshippingFee ! null shipping_fee,/ifif testorderAmount ! null order_amount,/ifif testcouponId ! null coupon_id,/ifif testcouponPaid ! null coupon_paid,/ifif testmoneyPaid ! null money_paid,/ifif testpayAmount ! null pay_amount,/ifif testaddTime ! null add_time,/ifif testconfirmTime ! null confirm_time,/ifif testpayTime ! null pay_time,/if/trimtrim prefixvalues ( suffix) suffixOverrides, if testorderId ! null #{orderId,jdbcTypeBIGINT},/ifif testuserId ! null #{userId,jdbcTypeBIGINT},/ifif testorderStatus ! null #{orderStatus,jdbcTypeINTEGER},/ifif testpayStatus ! null #{payStatus,jdbcTypeINTEGER},/ifif testshippingStatus ! null #{shippingStatus,jdbcTypeINTEGER},/ifif testaddress ! null #{address,jdbcTypeVARCHAR},/ifif testconsignee ! null #{consignee,jdbcTypeVARCHAR},/ifif testgoodsId ! null #{goodsId,jdbcTypeBIGINT},/ifif testgoodsNumber ! null #{goodsNumber,jdbcTypeINTEGER},/ifif testgoodsPrice ! null #{goodsPrice,jdbcTypeDECIMAL},/ifif testgoodsAmount ! null #{goodsAmount,jdbcTypeDECIMAL},/ifif testshippingFee ! null #{shippingFee,jdbcTypeDECIMAL},/ifif testorderAmount ! null #{orderAmount,jdbcTypeDECIMAL},/ifif testcouponId ! null #{couponId,jdbcTypeBIGINT},/ifif testcouponPaid ! null #{couponPaid,jdbcTypeDECIMAL},/ifif testmoneyPaid ! null #{moneyPaid,jdbcTypeDECIMAL},/ifif testpayAmount ! null #{payAmount,jdbcTypeDECIMAL},/ifif testaddTime ! null #{addTime,jdbcTypeTIMESTAMP},/ifif testconfirmTime ! null #{confirmTime,jdbcTypeTIMESTAMP},/ifif testpayTime ! null #{payTime,jdbcTypeTIMESTAMP},/if/trim/insertselect idcountByExample parameterTypecom.itheima.shop.pojo.TradeOrderExample resultTypejava.lang.Integer select count(*) from trade_orderif test_parameter ! null include refidExample_Where_Clause //if/selectupdate idupdateByExampleSelective parameterTypemap update trade_orderset if testrecord.orderId ! null order_id #{record.orderId,jdbcTypeBIGINT},/ifif testrecord.userId ! null user_id #{record.userId,jdbcTypeBIGINT},/ifif testrecord.orderStatus ! null order_status #{record.orderStatus,jdbcTypeINTEGER},/ifif testrecord.payStatus ! null pay_status #{record.payStatus,jdbcTypeINTEGER},/ifif testrecord.shippingStatus ! null shipping_status #{record.shippingStatus,jdbcTypeINTEGER},/ifif testrecord.address ! null address #{record.address,jdbcTypeVARCHAR},/ifif testrecord.consignee ! null consignee #{record.consignee,jdbcTypeVARCHAR},/ifif testrecord.goodsId ! null goods_id #{record.goodsId,jdbcTypeBIGINT},/ifif testrecord.goodsNumber ! null goods_number #{record.goodsNumber,jdbcTypeINTEGER},/ifif testrecord.goodsPrice ! null goods_price #{record.goodsPrice,jdbcTypeDECIMAL},/ifif testrecord.goodsAmount ! null goods_amount #{record.goodsAmount,jdbcTypeDECIMAL},/ifif testrecord.shippingFee ! null shipping_fee #{record.shippingFee,jdbcTypeDECIMAL},/ifif testrecord.orderAmount ! null order_amount #{record.orderAmount,jdbcTypeDECIMAL},/ifif testrecord.couponId ! null coupon_id #{record.couponId,jdbcTypeBIGINT},/ifif testrecord.couponPaid ! null coupon_paid #{record.couponPaid,jdbcTypeDECIMAL},/ifif testrecord.moneyPaid ! null money_paid #{record.moneyPaid,jdbcTypeDECIMAL},/ifif testrecord.payAmount ! null pay_amount #{record.payAmount,jdbcTypeDECIMAL},/ifif testrecord.addTime ! null add_time #{record.addTime,jdbcTypeTIMESTAMP},/ifif testrecord.confirmTime ! null confirm_time #{record.confirmTime,jdbcTypeTIMESTAMP},/ifif testrecord.payTime ! null pay_time #{record.payTime,jdbcTypeTIMESTAMP},/if/setif test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByExample parameterTypemap update trade_orderset order_id #{record.orderId,jdbcTypeBIGINT},user_id #{record.userId,jdbcTypeBIGINT},order_status #{record.orderStatus,jdbcTypeINTEGER},pay_status #{record.payStatus,jdbcTypeINTEGER},shipping_status #{record.shippingStatus,jdbcTypeINTEGER},address #{record.address,jdbcTypeVARCHAR},consignee #{record.consignee,jdbcTypeVARCHAR},goods_id #{record.goodsId,jdbcTypeBIGINT},goods_number #{record.goodsNumber,jdbcTypeINTEGER},goods_price #{record.goodsPrice,jdbcTypeDECIMAL},goods_amount #{record.goodsAmount,jdbcTypeDECIMAL},shipping_fee #{record.shippingFee,jdbcTypeDECIMAL},order_amount #{record.orderAmount,jdbcTypeDECIMAL},coupon_id #{record.couponId,jdbcTypeBIGINT},coupon_paid #{record.couponPaid,jdbcTypeDECIMAL},money_paid #{record.moneyPaid,jdbcTypeDECIMAL},pay_amount #{record.payAmount,jdbcTypeDECIMAL},add_time #{record.addTime,jdbcTypeTIMESTAMP},confirm_time #{record.confirmTime,jdbcTypeTIMESTAMP},pay_time #{record.payTime,jdbcTypeTIMESTAMP}if test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByPrimaryKeySelective parameterTypecom.itheima.shop.pojo.TradeOrder update trade_orderset if testuserId ! null user_id #{userId,jdbcTypeBIGINT},/ifif testorderStatus ! null order_status #{orderStatus,jdbcTypeINTEGER},/ifif testpayStatus ! null pay_status #{payStatus,jdbcTypeINTEGER},/ifif testshippingStatus ! null shipping_status #{shippingStatus,jdbcTypeINTEGER},/ifif testaddress ! null address #{address,jdbcTypeVARCHAR},/ifif testconsignee ! null consignee #{consignee,jdbcTypeVARCHAR},/ifif testgoodsId ! null goods_id #{goodsId,jdbcTypeBIGINT},/ifif testgoodsNumber ! null goods_number #{goodsNumber,jdbcTypeINTEGER},/ifif testgoodsPrice ! null goods_price #{goodsPrice,jdbcTypeDECIMAL},/ifif testgoodsAmount ! null goods_amount #{goodsAmount,jdbcTypeDECIMAL},/ifif testshippingFee ! null shipping_fee #{shippingFee,jdbcTypeDECIMAL},/ifif testorderAmount ! null order_amount #{orderAmount,jdbcTypeDECIMAL},/ifif testcouponId ! null coupon_id #{couponId,jdbcTypeBIGINT},/ifif testcouponPaid ! null coupon_paid #{couponPaid,jdbcTypeDECIMAL},/ifif testmoneyPaid ! null money_paid #{moneyPaid,jdbcTypeDECIMAL},/ifif testpayAmount ! null pay_amount #{payAmount,jdbcTypeDECIMAL},/ifif testaddTime ! null add_time #{addTime,jdbcTypeTIMESTAMP},/ifif testconfirmTime ! null confirm_time #{confirmTime,jdbcTypeTIMESTAMP},/ifif testpayTime ! null pay_time #{payTime,jdbcTypeTIMESTAMP},/if/setwhere order_id #{orderId,jdbcTypeBIGINT}/updateupdate idupdateByPrimaryKey parameterTypecom.itheima.shop.pojo.TradeOrder update trade_orderset user_id #{userId,jdbcTypeBIGINT},order_status #{orderStatus,jdbcTypeINTEGER},pay_status #{payStatus,jdbcTypeINTEGER},shipping_status #{shippingStatus,jdbcTypeINTEGER},address #{address,jdbcTypeVARCHAR},consignee #{consignee,jdbcTypeVARCHAR},goods_id #{goodsId,jdbcTypeBIGINT},goods_number #{goodsNumber,jdbcTypeINTEGER},goods_price #{goodsPrice,jdbcTypeDECIMAL},goods_amount #{goodsAmount,jdbcTypeDECIMAL},shipping_fee #{shippingFee,jdbcTypeDECIMAL},order_amount #{orderAmount,jdbcTypeDECIMAL},coupon_id #{couponId,jdbcTypeBIGINT},coupon_paid #{couponPaid,jdbcTypeDECIMAL},money_paid #{moneyPaid,jdbcTypeDECIMAL},pay_amount #{payAmount,jdbcTypeDECIMAL},add_time #{addTime,jdbcTypeTIMESTAMP},confirm_time #{confirmTime,jdbcTypeTIMESTAMP},pay_time #{payTime,jdbcTypeTIMESTAMP}where order_id #{orderId,jdbcTypeBIGINT}/update /mapper4.7、生成的 TradePayMapper.xml 文件。 ?xml version1.0 encodingUTF-8 ? !DOCTYPE mapper PUBLIC -//mybatis.org//DTD Mapper 3.0//EN http://mybatis.org/dtd/mybatis-3-mapper.dtd mapper namespacecom.itheima.shop.mapper.TradePayMapper resultMap idBaseResultMap typecom.itheima.shop.pojo.TradePay id columnpay_id propertypayId jdbcTypeBIGINT /result columnorder_id propertyorderId jdbcTypeBIGINT /result columnpay_amount propertypayAmount jdbcTypeDECIMAL /result columnis_paid propertyisPaid jdbcTypeINTEGER //resultMapsql idExample_Where_Clause where foreach collectionoredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idUpdate_By_Example_Where_Clause where foreach collectionexample.oredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idBase_Column_List pay_id, order_id, pay_amount, is_paid/sqlselect idselectByExample resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradePayExample selectif testdistinct distinct/ifinclude refidBase_Column_List /from trade_payif test_parameter ! null include refidExample_Where_Clause //ifif testorderByClause ! null order by ${orderByClause}/if/selectselect idselectByPrimaryKey resultMapBaseResultMap parameterTypejava.lang.Long select include refidBase_Column_List /from trade_paywhere pay_id #{payId,jdbcTypeBIGINT}/selectdelete iddeleteByPrimaryKey parameterTypejava.lang.Long delete from trade_paywhere pay_id #{payId,jdbcTypeBIGINT}/deletedelete iddeleteByExample parameterTypecom.itheima.shop.pojo.TradePayExample delete from trade_payif test_parameter ! null include refidExample_Where_Clause //if/deleteinsert idinsert parameterTypecom.itheima.shop.pojo.TradePay insert into trade_pay (pay_id, order_id, pay_amount, is_paid)values (#{payId,jdbcTypeBIGINT}, #{orderId,jdbcTypeBIGINT}, #{payAmount,jdbcTypeDECIMAL}, #{isPaid,jdbcTypeINTEGER})/insertinsert idinsertSelective parameterTypecom.itheima.shop.pojo.TradePay insert into trade_paytrim prefix( suffix) suffixOverrides, if testpayId ! null pay_id,/ifif testorderId ! null order_id,/ifif testpayAmount ! null pay_amount,/ifif testisPaid ! null is_paid,/if/trimtrim prefixvalues ( suffix) suffixOverrides, if testpayId ! null #{payId,jdbcTypeBIGINT},/ifif testorderId ! null #{orderId,jdbcTypeBIGINT},/ifif testpayAmount ! null #{payAmount,jdbcTypeDECIMAL},/ifif testisPaid ! null #{isPaid,jdbcTypeINTEGER},/if/trim/insertselect idcountByExample parameterTypecom.itheima.shop.pojo.TradePayExample resultTypejava.lang.Integer select count(*) from trade_payif test_parameter ! null include refidExample_Where_Clause //if/selectupdate idupdateByExampleSelective parameterTypemap update trade_payset if testrecord.payId ! null pay_id #{record.payId,jdbcTypeBIGINT},/ifif testrecord.orderId ! null order_id #{record.orderId,jdbcTypeBIGINT},/ifif testrecord.payAmount ! null pay_amount #{record.payAmount,jdbcTypeDECIMAL},/ifif testrecord.isPaid ! null is_paid #{record.isPaid,jdbcTypeINTEGER},/if/setif test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByExample parameterTypemap update trade_payset pay_id #{record.payId,jdbcTypeBIGINT},order_id #{record.orderId,jdbcTypeBIGINT},pay_amount #{record.payAmount,jdbcTypeDECIMAL},is_paid #{record.isPaid,jdbcTypeINTEGER}if test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByPrimaryKeySelective parameterTypecom.itheima.shop.pojo.TradePay update trade_payset if testorderId ! null order_id #{orderId,jdbcTypeBIGINT},/ifif testpayAmount ! null pay_amount #{payAmount,jdbcTypeDECIMAL},/ifif testisPaid ! null is_paid #{isPaid,jdbcTypeINTEGER},/if/setwhere pay_id #{payId,jdbcTypeBIGINT}/updateupdate idupdateByPrimaryKey parameterTypecom.itheima.shop.pojo.TradePay update trade_payset order_id #{orderId,jdbcTypeBIGINT},pay_amount #{payAmount,jdbcTypeDECIMAL},is_paid #{isPaid,jdbcTypeINTEGER}where pay_id #{payId,jdbcTypeBIGINT}/update /mapper4.8、生成的 TradeUserMapper.xml 文件。 ?xml version1.0 encodingUTF-8 ? !DOCTYPE mapper PUBLIC -//mybatis.org//DTD Mapper 3.0//EN http://mybatis.org/dtd/mybatis-3-mapper.dtd mapper namespacecom.itheima.shop.mapper.TradeUserMapper resultMap idBaseResultMap typecom.itheima.shop.pojo.TradeUser id columnuser_id propertyuserId jdbcTypeBIGINT /result columnuser_name propertyuserName jdbcTypeVARCHAR /result columnuser_password propertyuserPassword jdbcTypeVARCHAR /result columnuser_mobile propertyuserMobile jdbcTypeVARCHAR /result columnuser_score propertyuserScore jdbcTypeINTEGER /result columnuser_reg_time propertyuserRegTime jdbcTypeTIMESTAMP /result columnuser_money propertyuserMoney jdbcTypeDECIMAL //resultMapsql idExample_Where_Clause where foreach collectionoredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idUpdate_By_Example_Where_Clause where foreach collectionexample.oredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idBase_Column_List user_id, user_name, user_password, user_mobile, user_score, user_reg_time, user_money/sqlselect idselectByExample resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradeUserExample selectif testdistinct distinct/ifinclude refidBase_Column_List /from trade_userif test_parameter ! null include refidExample_Where_Clause //ifif testorderByClause ! null order by ${orderByClause}/if/selectselect idselectByPrimaryKey resultMapBaseResultMap parameterTypejava.lang.Long select include refidBase_Column_List /from trade_userwhere user_id #{userId,jdbcTypeBIGINT}/selectdelete iddeleteByPrimaryKey parameterTypejava.lang.Long delete from trade_userwhere user_id #{userId,jdbcTypeBIGINT}/deletedelete iddeleteByExample parameterTypecom.itheima.shop.pojo.TradeUserExample delete from trade_userif test_parameter ! null include refidExample_Where_Clause //if/deleteinsert idinsert parameterTypecom.itheima.shop.pojo.TradeUser insert into trade_user (user_id, user_name, user_password, user_mobile, user_score, user_reg_time, user_money)values (#{userId,jdbcTypeBIGINT}, #{userName,jdbcTypeVARCHAR}, #{userPassword,jdbcTypeVARCHAR}, #{userMobile,jdbcTypeVARCHAR}, #{userScore,jdbcTypeINTEGER}, #{userRegTime,jdbcTypeTIMESTAMP}, #{userMoney,jdbcTypeDECIMAL})/insertinsert idinsertSelective parameterTypecom.itheima.shop.pojo.TradeUser insert into trade_usertrim prefix( suffix) suffixOverrides, if testuserId ! null user_id,/ifif testuserName ! null user_name,/ifif testuserPassword ! null user_password,/ifif testuserMobile ! null user_mobile,/ifif testuserScore ! null user_score,/ifif testuserRegTime ! null user_reg_time,/ifif testuserMoney ! null user_money,/if/trimtrim prefixvalues ( suffix) suffixOverrides, if testuserId ! null #{userId,jdbcTypeBIGINT},/ifif testuserName ! null #{userName,jdbcTypeVARCHAR},/ifif testuserPassword ! null #{userPassword,jdbcTypeVARCHAR},/ifif testuserMobile ! null #{userMobile,jdbcTypeVARCHAR},/ifif testuserScore ! null #{userScore,jdbcTypeINTEGER},/ifif testuserRegTime ! null #{userRegTime,jdbcTypeTIMESTAMP},/ifif testuserMoney ! null #{userMoney,jdbcTypeDECIMAL},/if/trim/insertselect idcountByExample parameterTypecom.itheima.shop.pojo.TradeUserExample resultTypejava.lang.Integer select count(*) from trade_userif test_parameter ! null include refidExample_Where_Clause //if/selectupdate idupdateByExampleSelective parameterTypemap update trade_userset if testrecord.userId ! null user_id #{record.userId,jdbcTypeBIGINT},/ifif testrecord.userName ! null user_name #{record.userName,jdbcTypeVARCHAR},/ifif testrecord.userPassword ! null user_password #{record.userPassword,jdbcTypeVARCHAR},/ifif testrecord.userMobile ! null user_mobile #{record.userMobile,jdbcTypeVARCHAR},/ifif testrecord.userScore ! null user_score #{record.userScore,jdbcTypeINTEGER},/ifif testrecord.userRegTime ! null user_reg_time #{record.userRegTime,jdbcTypeTIMESTAMP},/ifif testrecord.userMoney ! null user_money #{record.userMoney,jdbcTypeDECIMAL},/if/setif test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByExample parameterTypemap update trade_userset user_id #{record.userId,jdbcTypeBIGINT},user_name #{record.userName,jdbcTypeVARCHAR},user_password #{record.userPassword,jdbcTypeVARCHAR},user_mobile #{record.userMobile,jdbcTypeVARCHAR},user_score #{record.userScore,jdbcTypeINTEGER},user_reg_time #{record.userRegTime,jdbcTypeTIMESTAMP},user_money #{record.userMoney,jdbcTypeDECIMAL}if test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByPrimaryKeySelective parameterTypecom.itheima.shop.pojo.TradeUser update trade_userset if testuserName ! null user_name #{userName,jdbcTypeVARCHAR},/ifif testuserPassword ! null user_password #{userPassword,jdbcTypeVARCHAR},/ifif testuserMobile ! null user_mobile #{userMobile,jdbcTypeVARCHAR},/ifif testuserScore ! null user_score #{userScore,jdbcTypeINTEGER},/ifif testuserRegTime ! null user_reg_time #{userRegTime,jdbcTypeTIMESTAMP},/ifif testuserMoney ! null user_money #{userMoney,jdbcTypeDECIMAL},/if/setwhere user_id #{userId,jdbcTypeBIGINT}/updateupdate idupdateByPrimaryKey parameterTypecom.itheima.shop.pojo.TradeUser update trade_userset user_name #{userName,jdbcTypeVARCHAR},user_password #{userPassword,jdbcTypeVARCHAR},user_mobile #{userMobile,jdbcTypeVARCHAR},user_score #{userScore,jdbcTypeINTEGER},user_reg_time #{userRegTime,jdbcTypeTIMESTAMP},user_money #{userMoney,jdbcTypeDECIMAL}where user_id #{userId,jdbcTypeBIGINT}/update /mapper4.9、生成的 TradeUserMoneyLogMapper.xml 文件。 ?xml version1.0 encodingUTF-8 ? !DOCTYPE mapper PUBLIC -//mybatis.org//DTD Mapper 3.0//EN http://mybatis.org/dtd/mybatis-3-mapper.dtd mapper namespacecom.itheima.shop.mapper.TradeUserMoneyLogMapper resultMap idBaseResultMap typecom.itheima.shop.pojo.TradeUserMoneyLog id columnuser_id propertyuserId jdbcTypeBIGINT /id columnorder_id propertyorderId jdbcTypeBIGINT /id columnmoney_log_type propertymoneyLogType jdbcTypeINTEGER /result columnuse_money propertyuseMoney jdbcTypeDECIMAL /result columncreate_time propertycreateTime jdbcTypeTIMESTAMP //resultMapsql idExample_Where_Clause where foreach collectionoredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idUpdate_By_Example_Where_Clause where foreach collectionexample.oredCriteria itemcriteria separatoror if testcriteria.valid trim prefix( suffix) prefixOverridesand foreach collectioncriteria.criteria itemcriterion choose when testcriterion.noValue and ${criterion.condition}/whenwhen testcriterion.singleValue and ${criterion.condition} #{criterion.value}/whenwhen testcriterion.betweenValue and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}/whenwhen testcriterion.listValue and ${criterion.condition}foreach collectioncriterion.value itemlistItem open( close) separator, #{listItem}/foreach/when/choose/foreach/trim/if/foreach/where/sqlsql idBase_Column_List user_id, order_id, money_log_type, use_money, create_time/sqlselect idselectByExample resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradeUserMoneyLogExample selectif testdistinct distinct/ifinclude refidBase_Column_List /from trade_user_money_logif test_parameter ! null include refidExample_Where_Clause //ifif testorderByClause ! null order by ${orderByClause}/if/selectselect idselectByPrimaryKey resultMapBaseResultMap parameterTypecom.itheima.shop.pojo.TradeUserMoneyLogKey select include refidBase_Column_List /from trade_user_money_logwhere user_id #{userId,jdbcTypeBIGINT}and order_id #{orderId,jdbcTypeBIGINT}and money_log_type #{moneyLogType,jdbcTypeINTEGER}/selectdelete iddeleteByPrimaryKey parameterTypecom.itheima.shop.pojo.TradeUserMoneyLogKey delete from trade_user_money_logwhere user_id #{userId,jdbcTypeBIGINT}and order_id #{orderId,jdbcTypeBIGINT}and money_log_type #{moneyLogType,jdbcTypeINTEGER}/deletedelete iddeleteByExample parameterTypecom.itheima.shop.pojo.TradeUserMoneyLogExample delete from trade_user_money_logif test_parameter ! null include refidExample_Where_Clause //if/deleteinsert idinsert parameterTypecom.itheima.shop.pojo.TradeUserMoneyLog insert into trade_user_money_log (user_id, order_id, money_log_type, use_money, create_time)values (#{userId,jdbcTypeBIGINT}, #{orderId,jdbcTypeBIGINT}, #{moneyLogType,jdbcTypeINTEGER}, #{useMoney,jdbcTypeDECIMAL}, #{createTime,jdbcTypeTIMESTAMP})/insertinsert idinsertSelective parameterTypecom.itheima.shop.pojo.TradeUserMoneyLog insert into trade_user_money_logtrim prefix( suffix) suffixOverrides, if testuserId ! null user_id,/ifif testorderId ! null order_id,/ifif testmoneyLogType ! null money_log_type,/ifif testuseMoney ! null use_money,/ifif testcreateTime ! null create_time,/if/trimtrim prefixvalues ( suffix) suffixOverrides, if testuserId ! null #{userId,jdbcTypeBIGINT},/ifif testorderId ! null #{orderId,jdbcTypeBIGINT},/ifif testmoneyLogType ! null #{moneyLogType,jdbcTypeINTEGER},/ifif testuseMoney ! null #{useMoney,jdbcTypeDECIMAL},/ifif testcreateTime ! null #{createTime,jdbcTypeTIMESTAMP},/if/trim/insertselect idcountByExample parameterTypecom.itheima.shop.pojo.TradeUserMoneyLogExample resultTypejava.lang.Integer select count(*) from trade_user_money_logif test_parameter ! null include refidExample_Where_Clause //if/selectupdate idupdateByExampleSelective parameterTypemap update trade_user_money_logset if testrecord.userId ! null user_id #{record.userId,jdbcTypeBIGINT},/ifif testrecord.orderId ! null order_id #{record.orderId,jdbcTypeBIGINT},/ifif testrecord.moneyLogType ! null money_log_type #{record.moneyLogType,jdbcTypeINTEGER},/ifif testrecord.useMoney ! null use_money #{record.useMoney,jdbcTypeDECIMAL},/ifif testrecord.createTime ! null create_time #{record.createTime,jdbcTypeTIMESTAMP},/if/setif test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByExample parameterTypemap update trade_user_money_logset user_id #{record.userId,jdbcTypeBIGINT},order_id #{record.orderId,jdbcTypeBIGINT},money_log_type #{record.moneyLogType,jdbcTypeINTEGER},use_money #{record.useMoney,jdbcTypeDECIMAL},create_time #{record.createTime,jdbcTypeTIMESTAMP}if test_parameter ! null include refidUpdate_By_Example_Where_Clause //if/updateupdate idupdateByPrimaryKeySelective parameterTypecom.itheima.shop.pojo.TradeUserMoneyLog update trade_user_money_logset if testuseMoney ! null use_money #{useMoney,jdbcTypeDECIMAL},/ifif testcreateTime ! null create_time #{createTime,jdbcTypeTIMESTAMP},/if/setwhere user_id #{userId,jdbcTypeBIGINT}and order_id #{orderId,jdbcTypeBIGINT}and money_log_type #{moneyLogType,jdbcTypeINTEGER}/updateupdate idupdateByPrimaryKey parameterTypecom.itheima.shop.pojo.TradeUserMoneyLog update trade_user_money_logset use_money #{useMoney,jdbcTypeDECIMAL},create_time #{createTime,jdbcTypeTIMESTAMP}where user_id #{userId,jdbcTypeBIGINT}and order_id #{orderId,jdbcTypeBIGINT}and money_log_type #{moneyLogType,jdbcTypeINTEGER}/update /mapper5、创建 shop-pojo 实体类 工程复制导入 生成的 POJO 类文件。 5.1、在 pom.xml 中导入依赖坐标。 ?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdparentartifactIdshop-parent/artifactIdgroupIdcom.iteima.shop/groupIdversion1.0-SNAPSHOT/versionrelativePath../shop-parent/pom.xml/relativePath/parentmodelVersion4.0.0/modelVersionartifactIdshop-pojo/artifactId/project !-- shop\shop-pojo\pom.xml -- 5.2、创建 类 MQEntity.java package com.itheima.entity;import java.math.BigDecimal;public class MQEntity {private Long orderId;private Long couponId;private Long userId;private BigDecimal userMoney;private Long goodsId;private Integer goodsNum;public Long getOrderId() {return orderId;}public void setOrderId(Long orderId) {this.orderId orderId;}public Long getCouponId() {return couponId;}public void setCouponId(Long couponId) {this.couponId couponId;}public Long getUserId() {return userId;}public void setUserId(Long userId) {this.userId userId;}public BigDecimal getUserMoney() {return userMoney;}public void setUserMoney(BigDecimal userMoney) {this.userMoney userMoney;}public Long getGoodsId() {return goodsId;}public void setGoodsId(Long goodsId) {this.goodsId goodsId;}public Integer getGoodsNum() {return goodsNum;}public void setGoodsNum(Integer goodsNum) {this.goodsNum goodsNum;} } 5.3、创建 类 Result.java package com.itheima.entity;import java.io.Serializable;/*** 结果实体类*/ public class Result implements Serializable {private Boolean success;private String message;public Result() {}public Result(Boolean success, String message) {this.success success;this.message message;}public Boolean getSuccess() {return success;}public void setSuccess(Boolean success) {this.success success;}public String getMessage() {return message;}public void setMessage(String message) {this.message message;}Overridepublic String toString() {return Result{ success success , message message \ };} } 5.4、复制导入 POJO 类 TradeCoupon.java 5.5、复制导入 POJO 类 TradeCouponExample.java 5.6、复制导入 POJO 类 TradeGoods.java 5.7、复制导入 POJO 类 TradeGoodsExample.java 5.8、复制导入 POJO 类 TradeGoodsNumberLog.java 5.9、复制导入 POJO 类 TradeGoodsNumberLogExample.java 5.10、复制导入 POJO 类 TradeGoodsNumberLogKey.java 5.11、复制导入 POJO 类 TradeMqConsumerLog.java 5.12、复制导入 POJO 类 TradeMqConsumerLogExample.java 5.13、复制导入 POJO 类 TradeMqConsumerLogKey .java 5.14、复制导入 POJO 类 TradeMqProducerTemp.java 5.15、复制导入 POJO 类 TradeMqProducerTempExample.java 5.16、复制导入 POJO 类 TradeOrder.java 5.17、复制导入 POJO 类 TradeOrderExample.java 5.18、复制导入 POJO 类 TradePay.java 5.19、复制导入 POJO 类 TradePayExample.java 5.20、复制导入 POJO 类 TradeUser.java 5.21、复制导入 POJO 类 TradeUserExample.java 5.22、复制导入 POJO 类 TradeUserMoneyLog.java 5.23、复制导入 POJO 类 TradeUserMoneyLogExample.java 5.24、复制导入 POJO 类 TradeUserMoneyLogKey.java 6、把逆向工程生成的 mapper 类文件 和 .xml 文件复制导入到 各模块工程。 上一节关联链接请点击 # RocketMQ 实战模拟电商网站场景综合案例四 环境搭建数据库表结构介绍–项目工程初始化 查看 请点击 # RocketMQ 实战模拟电商网站场景综合案例三 mybatis 逆向工程 生成 POJO 类 源文件 和 mapper 映射文件 查看 请点击 RocketMQ 实战模拟电商网站场景综合案例四
http://www.yayakq.cn/news/874/

相关文章:

  • 国内图片素材网站给公司做网站 优帮云
  • 建站主机家装设计风格
  • 网页界面设计评分标准seo关键词排名优化费用
  • 土巴兔网站开发技术工作室logo设计免费生成
  • 聊城网站推广的公司网站推广途径及要点
  • 网站的差异百度推广弄个网站头像要钱吗?
  • 做公司网站页面写给初学网站开发们的一封信
  • 承德网站制作的流程wordpress是国外服务器吗
  • 做网站百度国内wordpress著名网站
  • 网站怎么做好优化免费制作网站用什么做
  • 欧亚专线快递查询官网成都网站seo技巧
  • 为什么做视频网站违法建站哪家好要认定兴田德润
  • 网站图片轮播怎么做的爱站网关键词挖掘工具站长工具
  • 贵州网站制作品牌公司岚山建设网站
  • 松江网站建设多少钱wordpress显示缩略图
  • 兰州新区规划建设管理局网站电商网站建设意义
  • 东莞网站推广及优化网站空间怎么更换
  • 壹六八信息科技网站建设开网站的是啥公司
  • 新手如何做网站运营怎么自学做网站
  • 仿wordpress模板教程西安seo优化顾问
  • 电子商务公司网站模版全国企业网
  • 交通局网站建设方案视频网站的建设预算
  • 乐都企业网站建设哪家快wordpress商品主题
  • 要加强网站内容建设力网站票网站开发
  • 做网站一定要用服务器吗电子商城网站开发价格
  • 做网站代理建设一个最普通网站要多少钱
  • 网站外包谁报价网站建设流程图片
  • ajax做网站河南省建设教育中心的网站
  • 一般网站做哪些端口映射wordpress 好的主题
  • 株洲市荷塘区城乡建设局网站seo优化怎么做