From 029cc83dc3172f6f5e34529c00ff9078c82861af Mon Sep 17 00:00:00 2001 From: YuanYe <418471657@qq.com> Date: Wed, 24 Jul 2024 15:30:27 +0800 Subject: [PATCH] 1 --- .../com/hfkj/dao/CyymallAddressMapper.java | 64 ++- .../hfkj/dao/CyymallAddressSqlProvider.java | 73 ++++ .../java/com/hfkj/dao/CyymallGoodsMapper.java | 243 +++++++++++- .../com/hfkj/dao/CyymallGoodsSqlProvider.java | 277 +++++++++++++ .../hfkj/dao/CyymallOrderDetailMapper.java | 88 ++++- .../dao/CyymallOrderDetailSqlProvider.java | 73 ++++ .../java/com/hfkj/dao/CyymallOrderMapper.java | 319 ++++++++++++++- .../com/hfkj/dao/CyymallOrderSqlProvider.java | 373 ++++++++++++++++++ .../java/com/hfkj/dao/CyymallUserMapper.java | 161 +++++++- .../com/hfkj/dao/CyymallUserSqlProvider.java | 253 ++++++++++++ 10 files changed, 1916 insertions(+), 8 deletions(-) diff --git a/service/src/main/java/com/hfkj/dao/CyymallAddressMapper.java b/service/src/main/java/com/hfkj/dao/CyymallAddressMapper.java index 01bfe6a..6438428 100644 --- a/service/src/main/java/com/hfkj/dao/CyymallAddressMapper.java +++ b/service/src/main/java/com/hfkj/dao/CyymallAddressMapper.java @@ -3,6 +3,7 @@ package com.hfkj.dao; import com.hfkj.entity.CyymallAddress; import com.hfkj.entity.CyymallAddressExample; import java.util.List; +import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.DeleteProvider; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.InsertProvider; @@ -10,7 +11,9 @@ import org.apache.ibatis.annotations.Options; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.UpdateProvider; import org.apache.ibatis.type.JdbcType; import org.springframework.stereotype.Repository; @@ -29,6 +32,12 @@ public interface CyymallAddressMapper extends CyymallAddressMapperExt { @DeleteProvider(type=CyymallAddressSqlProvider.class, method="deleteByExample") int deleteByExample(CyymallAddressExample example); + @Delete({ + "delete from cyymall_address", + "where id = #{id,jdbcType=INTEGER}" + }) + int deleteByPrimaryKey(Integer id); + @Insert({ "insert into cyymall_address (store_id, user_id, ", "`name`, mobile, province_id, ", @@ -56,7 +65,7 @@ public interface CyymallAddressMapper extends CyymallAddressMapperExt { @SelectProvider(type=CyymallAddressSqlProvider.class, method="selectByExample") @Results({ - @Result(column="id", property="id", jdbcType=JdbcType.INTEGER), + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="store_id", property="storeId", jdbcType=JdbcType.INTEGER), @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @@ -76,9 +85,62 @@ public interface CyymallAddressMapper extends CyymallAddressMapperExt { }) List selectByExample(CyymallAddressExample example); + @Select({ + "select", + "id, store_id, user_id, `name`, mobile, province_id, province, city_id, city, ", + "district_id, district, detail, is_default, addtime, is_delete, latitude, longitude", + "from cyymall_address", + "where id = #{id,jdbcType=INTEGER}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.INTEGER), + @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR), + @Result(column="province_id", property="provinceId", jdbcType=JdbcType.INTEGER), + @Result(column="province", property="province", jdbcType=JdbcType.VARCHAR), + @Result(column="city_id", property="cityId", jdbcType=JdbcType.INTEGER), + @Result(column="city", property="city", jdbcType=JdbcType.VARCHAR), + @Result(column="district_id", property="districtId", jdbcType=JdbcType.INTEGER), + @Result(column="district", property="district", jdbcType=JdbcType.VARCHAR), + @Result(column="detail", property="detail", jdbcType=JdbcType.VARCHAR), + @Result(column="is_default", property="isDefault", jdbcType=JdbcType.SMALLINT), + @Result(column="addtime", property="addtime", jdbcType=JdbcType.INTEGER), + @Result(column="is_delete", property="isDelete", jdbcType=JdbcType.SMALLINT), + @Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR), + @Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR) + }) + CyymallAddress selectByPrimaryKey(Integer id); + @UpdateProvider(type=CyymallAddressSqlProvider.class, method="updateByExampleSelective") int updateByExampleSelective(@Param("record") CyymallAddress record, @Param("example") CyymallAddressExample example); @UpdateProvider(type=CyymallAddressSqlProvider.class, method="updateByExample") int updateByExample(@Param("record") CyymallAddress record, @Param("example") CyymallAddressExample example); + + @UpdateProvider(type=CyymallAddressSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(CyymallAddress record); + + @Update({ + "update cyymall_address", + "set store_id = #{storeId,jdbcType=INTEGER},", + "user_id = #{userId,jdbcType=INTEGER},", + "`name` = #{name,jdbcType=VARCHAR},", + "mobile = #{mobile,jdbcType=VARCHAR},", + "province_id = #{provinceId,jdbcType=INTEGER},", + "province = #{province,jdbcType=VARCHAR},", + "city_id = #{cityId,jdbcType=INTEGER},", + "city = #{city,jdbcType=VARCHAR},", + "district_id = #{districtId,jdbcType=INTEGER},", + "district = #{district,jdbcType=VARCHAR},", + "detail = #{detail,jdbcType=VARCHAR},", + "is_default = #{isDefault,jdbcType=SMALLINT},", + "addtime = #{addtime,jdbcType=INTEGER},", + "is_delete = #{isDelete,jdbcType=SMALLINT},", + "latitude = #{latitude,jdbcType=VARCHAR},", + "longitude = #{longitude,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKey(CyymallAddress record); } \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CyymallAddressSqlProvider.java b/service/src/main/java/com/hfkj/dao/CyymallAddressSqlProvider.java index e785182..95d3ea8 100644 --- a/service/src/main/java/com/hfkj/dao/CyymallAddressSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/CyymallAddressSqlProvider.java @@ -234,6 +234,79 @@ public class CyymallAddressSqlProvider { return sql.toString(); } + public String updateByPrimaryKeySelective(CyymallAddress record) { + SQL sql = new SQL(); + sql.UPDATE("cyymall_address"); + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=INTEGER}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=INTEGER}"); + } + + if (record.getName() != null) { + sql.SET("`name` = #{name,jdbcType=VARCHAR}"); + } + + if (record.getMobile() != null) { + sql.SET("mobile = #{mobile,jdbcType=VARCHAR}"); + } + + if (record.getProvinceId() != null) { + sql.SET("province_id = #{provinceId,jdbcType=INTEGER}"); + } + + if (record.getProvince() != null) { + sql.SET("province = #{province,jdbcType=VARCHAR}"); + } + + if (record.getCityId() != null) { + sql.SET("city_id = #{cityId,jdbcType=INTEGER}"); + } + + if (record.getCity() != null) { + sql.SET("city = #{city,jdbcType=VARCHAR}"); + } + + if (record.getDistrictId() != null) { + sql.SET("district_id = #{districtId,jdbcType=INTEGER}"); + } + + if (record.getDistrict() != null) { + sql.SET("district = #{district,jdbcType=VARCHAR}"); + } + + if (record.getDetail() != null) { + sql.SET("detail = #{detail,jdbcType=VARCHAR}"); + } + + if (record.getIsDefault() != null) { + sql.SET("is_default = #{isDefault,jdbcType=SMALLINT}"); + } + + if (record.getAddtime() != null) { + sql.SET("addtime = #{addtime,jdbcType=INTEGER}"); + } + + if (record.getIsDelete() != null) { + sql.SET("is_delete = #{isDelete,jdbcType=SMALLINT}"); + } + + if (record.getLatitude() != null) { + sql.SET("latitude = #{latitude,jdbcType=VARCHAR}"); + } + + if (record.getLongitude() != null) { + sql.SET("longitude = #{longitude,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=INTEGER}"); + + return sql.toString(); + } + protected void applyWhere(SQL sql, CyymallAddressExample example, boolean includeExamplePhrase) { if (example == null) { return; diff --git a/service/src/main/java/com/hfkj/dao/CyymallGoodsMapper.java b/service/src/main/java/com/hfkj/dao/CyymallGoodsMapper.java index 9b89c37..7129565 100644 --- a/service/src/main/java/com/hfkj/dao/CyymallGoodsMapper.java +++ b/service/src/main/java/com/hfkj/dao/CyymallGoodsMapper.java @@ -4,6 +4,7 @@ import com.hfkj.entity.CyymallGoods; import com.hfkj.entity.CyymallGoodsExample; import com.hfkj.entity.CyymallGoodsWithBLOBs; import java.util.List; +import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.DeleteProvider; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.InsertProvider; @@ -11,7 +12,9 @@ import org.apache.ibatis.annotations.Options; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.UpdateProvider; import org.apache.ibatis.type.JdbcType; import org.springframework.stereotype.Repository; @@ -30,6 +33,12 @@ public interface CyymallGoodsMapper extends CyymallGoodsMapperExt { @DeleteProvider(type=CyymallGoodsSqlProvider.class, method="deleteByExample") int deleteByExample(CyymallGoodsExample example); + @Delete({ + "delete from cyymall_goods", + "where id = #{id,jdbcType=INTEGER}" + }) + int deleteByPrimaryKey(Integer id); + @Insert({ "insert into cyymall_goods (store_id, `name`, ", "price, original_price, ", @@ -107,7 +116,7 @@ public interface CyymallGoodsMapper extends CyymallGoodsMapperExt { @SelectProvider(type=CyymallGoodsSqlProvider.class, method="selectByExampleWithBLOBs") @Results({ - @Result(column="id", property="id", jdbcType=JdbcType.INTEGER), + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="store_id", property="storeId", jdbcType=JdbcType.INTEGER), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @@ -180,7 +189,7 @@ public interface CyymallGoodsMapper extends CyymallGoodsMapperExt { @SelectProvider(type=CyymallGoodsSqlProvider.class, method="selectByExample") @Results({ - @Result(column="id", property="id", jdbcType=JdbcType.INTEGER), + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="store_id", property="storeId", jdbcType=JdbcType.INTEGER), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @@ -244,6 +253,94 @@ public interface CyymallGoodsMapper extends CyymallGoodsMapperExt { }) List selectByExample(CyymallGoodsExample example); + @Select({ + "select", + "id, store_id, `name`, price, original_price, cat_id, `status`, addtime, is_delete, ", + "service, sort, virtual_sales, video_url, unit, individual_share, share_commission_first, ", + "share_commission_second, share_commission_third, weight, freight, use_attr, ", + "share_type, quick_purchase, hot_cakes, cost_price, member_discount, rebate, ", + "mch_id, goods_num, mch_sort, confine_count, is_level, `type`, is_negotiable, ", + "attr_setting_type, views, supplier_price, supplier_goods_id, supplier_id, goods_share_title, ", + "goods_share_logo, goods_share_desc, is_examine, dabao_price, brand_id, key_word, ", + "buying_method, buying_method_level, home_block_id, new_individual_share, new_attr_setting_type, ", + "share_commission_base, is_sjht, sjht_proIdent, is_oil, oil_couTypeCode, is_abholung, ", + "is_transnational, goods_transfer_rate, oil_discount, oil_type, detail, attr, ", + "cover_pic, full_cut, integral, shop_id, verify_card_id", + "from cyymall_goods", + "where id = #{id,jdbcType=INTEGER}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.INTEGER), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), + @Result(column="original_price", property="originalPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="cat_id", property="catId", jdbcType=JdbcType.INTEGER), + @Result(column="status", property="status", jdbcType=JdbcType.SMALLINT), + @Result(column="addtime", property="addtime", jdbcType=JdbcType.INTEGER), + @Result(column="is_delete", property="isDelete", jdbcType=JdbcType.SMALLINT), + @Result(column="service", property="service", jdbcType=JdbcType.VARCHAR), + @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER), + @Result(column="virtual_sales", property="virtualSales", jdbcType=JdbcType.INTEGER), + @Result(column="video_url", property="videoUrl", jdbcType=JdbcType.VARCHAR), + @Result(column="unit", property="unit", jdbcType=JdbcType.VARCHAR), + @Result(column="individual_share", property="individualShare", jdbcType=JdbcType.SMALLINT), + @Result(column="share_commission_first", property="shareCommissionFirst", jdbcType=JdbcType.DECIMAL), + @Result(column="share_commission_second", property="shareCommissionSecond", jdbcType=JdbcType.DECIMAL), + @Result(column="share_commission_third", property="shareCommissionThird", jdbcType=JdbcType.DECIMAL), + @Result(column="weight", property="weight", jdbcType=JdbcType.DOUBLE), + @Result(column="freight", property="freight", jdbcType=JdbcType.INTEGER), + @Result(column="use_attr", property="useAttr", jdbcType=JdbcType.SMALLINT), + @Result(column="share_type", property="shareType", jdbcType=JdbcType.INTEGER), + @Result(column="quick_purchase", property="quickPurchase", jdbcType=JdbcType.SMALLINT), + @Result(column="hot_cakes", property="hotCakes", jdbcType=JdbcType.SMALLINT), + @Result(column="cost_price", property="costPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="member_discount", property="memberDiscount", jdbcType=JdbcType.SMALLINT), + @Result(column="rebate", property="rebate", jdbcType=JdbcType.DECIMAL), + @Result(column="mch_id", property="mchId", jdbcType=JdbcType.INTEGER), + @Result(column="goods_num", property="goodsNum", jdbcType=JdbcType.INTEGER), + @Result(column="mch_sort", property="mchSort", jdbcType=JdbcType.INTEGER), + @Result(column="confine_count", property="confineCount", jdbcType=JdbcType.INTEGER), + @Result(column="is_level", property="isLevel", jdbcType=JdbcType.SMALLINT), + @Result(column="type", property="type", jdbcType=JdbcType.SMALLINT), + @Result(column="is_negotiable", property="isNegotiable", jdbcType=JdbcType.SMALLINT), + @Result(column="attr_setting_type", property="attrSettingType", jdbcType=JdbcType.BIT), + @Result(column="views", property="views", jdbcType=JdbcType.BIGINT), + @Result(column="supplier_price", property="supplierPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="supplier_goods_id", property="supplierGoodsId", jdbcType=JdbcType.INTEGER), + @Result(column="supplier_id", property="supplierId", jdbcType=JdbcType.INTEGER), + @Result(column="goods_share_title", property="goodsShareTitle", jdbcType=JdbcType.VARCHAR), + @Result(column="goods_share_logo", property="goodsShareLogo", jdbcType=JdbcType.VARCHAR), + @Result(column="goods_share_desc", property="goodsShareDesc", jdbcType=JdbcType.VARCHAR), + @Result(column="is_examine", property="isExamine", jdbcType=JdbcType.INTEGER), + @Result(column="dabao_price", property="dabaoPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="brand_id", property="brandId", jdbcType=JdbcType.INTEGER), + @Result(column="key_word", property="keyWord", jdbcType=JdbcType.VARCHAR), + @Result(column="buying_method", property="buyingMethod", jdbcType=JdbcType.INTEGER), + @Result(column="buying_method_level", property="buyingMethodLevel", jdbcType=JdbcType.INTEGER), + @Result(column="home_block_id", property="homeBlockId", jdbcType=JdbcType.INTEGER), + @Result(column="new_individual_share", property="newIndividualShare", jdbcType=JdbcType.INTEGER), + @Result(column="new_attr_setting_type", property="newAttrSettingType", jdbcType=JdbcType.INTEGER), + @Result(column="share_commission_base", property="shareCommissionBase", jdbcType=JdbcType.DECIMAL), + @Result(column="is_sjht", property="isSjht", jdbcType=JdbcType.SMALLINT), + @Result(column="sjht_proIdent", property="sjhtProident", jdbcType=JdbcType.VARCHAR), + @Result(column="is_oil", property="isOil", jdbcType=JdbcType.SMALLINT), + @Result(column="oil_couTypeCode", property="oilCoutypecode", jdbcType=JdbcType.VARCHAR), + @Result(column="is_abholung", property="isAbholung", jdbcType=JdbcType.SMALLINT), + @Result(column="is_transnational", property="isTransnational", jdbcType=JdbcType.SMALLINT), + @Result(column="goods_transfer_rate", property="goodsTransferRate", jdbcType=JdbcType.INTEGER), + @Result(column="oil_discount", property="oilDiscount", jdbcType=JdbcType.INTEGER), + @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), + @Result(column="detail", property="detail", jdbcType=JdbcType.LONGVARCHAR), + @Result(column="attr", property="attr", jdbcType=JdbcType.LONGVARCHAR), + @Result(column="cover_pic", property="coverPic", jdbcType=JdbcType.LONGVARCHAR), + @Result(column="full_cut", property="fullCut", jdbcType=JdbcType.LONGVARCHAR), + @Result(column="integral", property="integral", jdbcType=JdbcType.LONGVARCHAR), + @Result(column="shop_id", property="shopId", jdbcType=JdbcType.LONGVARCHAR), + @Result(column="verify_card_id", property="verifyCardId", jdbcType=JdbcType.LONGVARCHAR) + }) + CyymallGoodsWithBLOBs selectByPrimaryKey(Integer id); + @UpdateProvider(type=CyymallGoodsSqlProvider.class, method="updateByExampleSelective") int updateByExampleSelective(@Param("record") CyymallGoodsWithBLOBs record, @Param("example") CyymallGoodsExample example); @@ -252,4 +349,146 @@ public interface CyymallGoodsMapper extends CyymallGoodsMapperExt { @UpdateProvider(type=CyymallGoodsSqlProvider.class, method="updateByExample") int updateByExample(@Param("record") CyymallGoods record, @Param("example") CyymallGoodsExample example); + + @UpdateProvider(type=CyymallGoodsSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(CyymallGoodsWithBLOBs record); + + @Update({ + "update cyymall_goods", + "set store_id = #{storeId,jdbcType=INTEGER},", + "`name` = #{name,jdbcType=VARCHAR},", + "price = #{price,jdbcType=DECIMAL},", + "original_price = #{originalPrice,jdbcType=DECIMAL},", + "cat_id = #{catId,jdbcType=INTEGER},", + "`status` = #{status,jdbcType=SMALLINT},", + "addtime = #{addtime,jdbcType=INTEGER},", + "is_delete = #{isDelete,jdbcType=SMALLINT},", + "service = #{service,jdbcType=VARCHAR},", + "sort = #{sort,jdbcType=INTEGER},", + "virtual_sales = #{virtualSales,jdbcType=INTEGER},", + "video_url = #{videoUrl,jdbcType=VARCHAR},", + "unit = #{unit,jdbcType=VARCHAR},", + "individual_share = #{individualShare,jdbcType=SMALLINT},", + "share_commission_first = #{shareCommissionFirst,jdbcType=DECIMAL},", + "share_commission_second = #{shareCommissionSecond,jdbcType=DECIMAL},", + "share_commission_third = #{shareCommissionThird,jdbcType=DECIMAL},", + "weight = #{weight,jdbcType=DOUBLE},", + "freight = #{freight,jdbcType=INTEGER},", + "use_attr = #{useAttr,jdbcType=SMALLINT},", + "share_type = #{shareType,jdbcType=INTEGER},", + "quick_purchase = #{quickPurchase,jdbcType=SMALLINT},", + "hot_cakes = #{hotCakes,jdbcType=SMALLINT},", + "cost_price = #{costPrice,jdbcType=DECIMAL},", + "member_discount = #{memberDiscount,jdbcType=SMALLINT},", + "rebate = #{rebate,jdbcType=DECIMAL},", + "mch_id = #{mchId,jdbcType=INTEGER},", + "goods_num = #{goodsNum,jdbcType=INTEGER},", + "mch_sort = #{mchSort,jdbcType=INTEGER},", + "confine_count = #{confineCount,jdbcType=INTEGER},", + "is_level = #{isLevel,jdbcType=SMALLINT},", + "`type` = #{type,jdbcType=SMALLINT},", + "is_negotiable = #{isNegotiable,jdbcType=SMALLINT},", + "attr_setting_type = #{attrSettingType,jdbcType=BIT},", + "views = #{views,jdbcType=BIGINT},", + "supplier_price = #{supplierPrice,jdbcType=DECIMAL},", + "supplier_goods_id = #{supplierGoodsId,jdbcType=INTEGER},", + "supplier_id = #{supplierId,jdbcType=INTEGER},", + "goods_share_title = #{goodsShareTitle,jdbcType=VARCHAR},", + "goods_share_logo = #{goodsShareLogo,jdbcType=VARCHAR},", + "goods_share_desc = #{goodsShareDesc,jdbcType=VARCHAR},", + "is_examine = #{isExamine,jdbcType=INTEGER},", + "dabao_price = #{dabaoPrice,jdbcType=DECIMAL},", + "brand_id = #{brandId,jdbcType=INTEGER},", + "key_word = #{keyWord,jdbcType=VARCHAR},", + "buying_method = #{buyingMethod,jdbcType=INTEGER},", + "buying_method_level = #{buyingMethodLevel,jdbcType=INTEGER},", + "home_block_id = #{homeBlockId,jdbcType=INTEGER},", + "new_individual_share = #{newIndividualShare,jdbcType=INTEGER},", + "new_attr_setting_type = #{newAttrSettingType,jdbcType=INTEGER},", + "share_commission_base = #{shareCommissionBase,jdbcType=DECIMAL},", + "is_sjht = #{isSjht,jdbcType=SMALLINT},", + "sjht_proIdent = #{sjhtProident,jdbcType=VARCHAR},", + "is_oil = #{isOil,jdbcType=SMALLINT},", + "oil_couTypeCode = #{oilCoutypecode,jdbcType=VARCHAR},", + "is_abholung = #{isAbholung,jdbcType=SMALLINT},", + "is_transnational = #{isTransnational,jdbcType=SMALLINT},", + "goods_transfer_rate = #{goodsTransferRate,jdbcType=INTEGER},", + "oil_discount = #{oilDiscount,jdbcType=INTEGER},", + "oil_type = #{oilType,jdbcType=INTEGER},", + "detail = #{detail,jdbcType=LONGVARCHAR},", + "attr = #{attr,jdbcType=LONGVARCHAR},", + "cover_pic = #{coverPic,jdbcType=LONGVARCHAR},", + "full_cut = #{fullCut,jdbcType=LONGVARCHAR},", + "integral = #{integral,jdbcType=LONGVARCHAR},", + "shop_id = #{shopId,jdbcType=LONGVARCHAR},", + "verify_card_id = #{verifyCardId,jdbcType=LONGVARCHAR}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKeyWithBLOBs(CyymallGoodsWithBLOBs record); + + @Update({ + "update cyymall_goods", + "set store_id = #{storeId,jdbcType=INTEGER},", + "`name` = #{name,jdbcType=VARCHAR},", + "price = #{price,jdbcType=DECIMAL},", + "original_price = #{originalPrice,jdbcType=DECIMAL},", + "cat_id = #{catId,jdbcType=INTEGER},", + "`status` = #{status,jdbcType=SMALLINT},", + "addtime = #{addtime,jdbcType=INTEGER},", + "is_delete = #{isDelete,jdbcType=SMALLINT},", + "service = #{service,jdbcType=VARCHAR},", + "sort = #{sort,jdbcType=INTEGER},", + "virtual_sales = #{virtualSales,jdbcType=INTEGER},", + "video_url = #{videoUrl,jdbcType=VARCHAR},", + "unit = #{unit,jdbcType=VARCHAR},", + "individual_share = #{individualShare,jdbcType=SMALLINT},", + "share_commission_first = #{shareCommissionFirst,jdbcType=DECIMAL},", + "share_commission_second = #{shareCommissionSecond,jdbcType=DECIMAL},", + "share_commission_third = #{shareCommissionThird,jdbcType=DECIMAL},", + "weight = #{weight,jdbcType=DOUBLE},", + "freight = #{freight,jdbcType=INTEGER},", + "use_attr = #{useAttr,jdbcType=SMALLINT},", + "share_type = #{shareType,jdbcType=INTEGER},", + "quick_purchase = #{quickPurchase,jdbcType=SMALLINT},", + "hot_cakes = #{hotCakes,jdbcType=SMALLINT},", + "cost_price = #{costPrice,jdbcType=DECIMAL},", + "member_discount = #{memberDiscount,jdbcType=SMALLINT},", + "rebate = #{rebate,jdbcType=DECIMAL},", + "mch_id = #{mchId,jdbcType=INTEGER},", + "goods_num = #{goodsNum,jdbcType=INTEGER},", + "mch_sort = #{mchSort,jdbcType=INTEGER},", + "confine_count = #{confineCount,jdbcType=INTEGER},", + "is_level = #{isLevel,jdbcType=SMALLINT},", + "`type` = #{type,jdbcType=SMALLINT},", + "is_negotiable = #{isNegotiable,jdbcType=SMALLINT},", + "attr_setting_type = #{attrSettingType,jdbcType=BIT},", + "views = #{views,jdbcType=BIGINT},", + "supplier_price = #{supplierPrice,jdbcType=DECIMAL},", + "supplier_goods_id = #{supplierGoodsId,jdbcType=INTEGER},", + "supplier_id = #{supplierId,jdbcType=INTEGER},", + "goods_share_title = #{goodsShareTitle,jdbcType=VARCHAR},", + "goods_share_logo = #{goodsShareLogo,jdbcType=VARCHAR},", + "goods_share_desc = #{goodsShareDesc,jdbcType=VARCHAR},", + "is_examine = #{isExamine,jdbcType=INTEGER},", + "dabao_price = #{dabaoPrice,jdbcType=DECIMAL},", + "brand_id = #{brandId,jdbcType=INTEGER},", + "key_word = #{keyWord,jdbcType=VARCHAR},", + "buying_method = #{buyingMethod,jdbcType=INTEGER},", + "buying_method_level = #{buyingMethodLevel,jdbcType=INTEGER},", + "home_block_id = #{homeBlockId,jdbcType=INTEGER},", + "new_individual_share = #{newIndividualShare,jdbcType=INTEGER},", + "new_attr_setting_type = #{newAttrSettingType,jdbcType=INTEGER},", + "share_commission_base = #{shareCommissionBase,jdbcType=DECIMAL},", + "is_sjht = #{isSjht,jdbcType=SMALLINT},", + "sjht_proIdent = #{sjhtProident,jdbcType=VARCHAR},", + "is_oil = #{isOil,jdbcType=SMALLINT},", + "oil_couTypeCode = #{oilCoutypecode,jdbcType=VARCHAR},", + "is_abholung = #{isAbholung,jdbcType=SMALLINT},", + "is_transnational = #{isTransnational,jdbcType=SMALLINT},", + "goods_transfer_rate = #{goodsTransferRate,jdbcType=INTEGER},", + "oil_discount = #{oilDiscount,jdbcType=INTEGER},", + "oil_type = #{oilType,jdbcType=INTEGER}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKey(CyymallGoods record); } \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CyymallGoodsSqlProvider.java b/service/src/main/java/com/hfkj/dao/CyymallGoodsSqlProvider.java index ae1ec0e..dfa1ff0 100644 --- a/service/src/main/java/com/hfkj/dao/CyymallGoodsSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/CyymallGoodsSqlProvider.java @@ -892,6 +892,283 @@ public class CyymallGoodsSqlProvider { return sql.toString(); } + public String updateByPrimaryKeySelective(CyymallGoodsWithBLOBs record) { + SQL sql = new SQL(); + sql.UPDATE("cyymall_goods"); + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=INTEGER}"); + } + + if (record.getName() != null) { + sql.SET("`name` = #{name,jdbcType=VARCHAR}"); + } + + if (record.getPrice() != null) { + sql.SET("price = #{price,jdbcType=DECIMAL}"); + } + + if (record.getOriginalPrice() != null) { + sql.SET("original_price = #{originalPrice,jdbcType=DECIMAL}"); + } + + if (record.getCatId() != null) { + sql.SET("cat_id = #{catId,jdbcType=INTEGER}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=SMALLINT}"); + } + + if (record.getAddtime() != null) { + sql.SET("addtime = #{addtime,jdbcType=INTEGER}"); + } + + if (record.getIsDelete() != null) { + sql.SET("is_delete = #{isDelete,jdbcType=SMALLINT}"); + } + + if (record.getService() != null) { + sql.SET("service = #{service,jdbcType=VARCHAR}"); + } + + if (record.getSort() != null) { + sql.SET("sort = #{sort,jdbcType=INTEGER}"); + } + + if (record.getVirtualSales() != null) { + sql.SET("virtual_sales = #{virtualSales,jdbcType=INTEGER}"); + } + + if (record.getVideoUrl() != null) { + sql.SET("video_url = #{videoUrl,jdbcType=VARCHAR}"); + } + + if (record.getUnit() != null) { + sql.SET("unit = #{unit,jdbcType=VARCHAR}"); + } + + if (record.getIndividualShare() != null) { + sql.SET("individual_share = #{individualShare,jdbcType=SMALLINT}"); + } + + if (record.getShareCommissionFirst() != null) { + sql.SET("share_commission_first = #{shareCommissionFirst,jdbcType=DECIMAL}"); + } + + if (record.getShareCommissionSecond() != null) { + sql.SET("share_commission_second = #{shareCommissionSecond,jdbcType=DECIMAL}"); + } + + if (record.getShareCommissionThird() != null) { + sql.SET("share_commission_third = #{shareCommissionThird,jdbcType=DECIMAL}"); + } + + if (record.getWeight() != null) { + sql.SET("weight = #{weight,jdbcType=DOUBLE}"); + } + + if (record.getFreight() != null) { + sql.SET("freight = #{freight,jdbcType=INTEGER}"); + } + + if (record.getUseAttr() != null) { + sql.SET("use_attr = #{useAttr,jdbcType=SMALLINT}"); + } + + if (record.getShareType() != null) { + sql.SET("share_type = #{shareType,jdbcType=INTEGER}"); + } + + if (record.getQuickPurchase() != null) { + sql.SET("quick_purchase = #{quickPurchase,jdbcType=SMALLINT}"); + } + + if (record.getHotCakes() != null) { + sql.SET("hot_cakes = #{hotCakes,jdbcType=SMALLINT}"); + } + + if (record.getCostPrice() != null) { + sql.SET("cost_price = #{costPrice,jdbcType=DECIMAL}"); + } + + if (record.getMemberDiscount() != null) { + sql.SET("member_discount = #{memberDiscount,jdbcType=SMALLINT}"); + } + + if (record.getRebate() != null) { + sql.SET("rebate = #{rebate,jdbcType=DECIMAL}"); + } + + if (record.getMchId() != null) { + sql.SET("mch_id = #{mchId,jdbcType=INTEGER}"); + } + + if (record.getGoodsNum() != null) { + sql.SET("goods_num = #{goodsNum,jdbcType=INTEGER}"); + } + + if (record.getMchSort() != null) { + sql.SET("mch_sort = #{mchSort,jdbcType=INTEGER}"); + } + + if (record.getConfineCount() != null) { + sql.SET("confine_count = #{confineCount,jdbcType=INTEGER}"); + } + + if (record.getIsLevel() != null) { + sql.SET("is_level = #{isLevel,jdbcType=SMALLINT}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=SMALLINT}"); + } + + if (record.getIsNegotiable() != null) { + sql.SET("is_negotiable = #{isNegotiable,jdbcType=SMALLINT}"); + } + + if (record.getAttrSettingType() != null) { + sql.SET("attr_setting_type = #{attrSettingType,jdbcType=BIT}"); + } + + if (record.getViews() != null) { + sql.SET("views = #{views,jdbcType=BIGINT}"); + } + + if (record.getSupplierPrice() != null) { + sql.SET("supplier_price = #{supplierPrice,jdbcType=DECIMAL}"); + } + + if (record.getSupplierGoodsId() != null) { + sql.SET("supplier_goods_id = #{supplierGoodsId,jdbcType=INTEGER}"); + } + + if (record.getSupplierId() != null) { + sql.SET("supplier_id = #{supplierId,jdbcType=INTEGER}"); + } + + if (record.getGoodsShareTitle() != null) { + sql.SET("goods_share_title = #{goodsShareTitle,jdbcType=VARCHAR}"); + } + + if (record.getGoodsShareLogo() != null) { + sql.SET("goods_share_logo = #{goodsShareLogo,jdbcType=VARCHAR}"); + } + + if (record.getGoodsShareDesc() != null) { + sql.SET("goods_share_desc = #{goodsShareDesc,jdbcType=VARCHAR}"); + } + + if (record.getIsExamine() != null) { + sql.SET("is_examine = #{isExamine,jdbcType=INTEGER}"); + } + + if (record.getDabaoPrice() != null) { + sql.SET("dabao_price = #{dabaoPrice,jdbcType=DECIMAL}"); + } + + if (record.getBrandId() != null) { + sql.SET("brand_id = #{brandId,jdbcType=INTEGER}"); + } + + if (record.getKeyWord() != null) { + sql.SET("key_word = #{keyWord,jdbcType=VARCHAR}"); + } + + if (record.getBuyingMethod() != null) { + sql.SET("buying_method = #{buyingMethod,jdbcType=INTEGER}"); + } + + if (record.getBuyingMethodLevel() != null) { + sql.SET("buying_method_level = #{buyingMethodLevel,jdbcType=INTEGER}"); + } + + if (record.getHomeBlockId() != null) { + sql.SET("home_block_id = #{homeBlockId,jdbcType=INTEGER}"); + } + + if (record.getNewIndividualShare() != null) { + sql.SET("new_individual_share = #{newIndividualShare,jdbcType=INTEGER}"); + } + + if (record.getNewAttrSettingType() != null) { + sql.SET("new_attr_setting_type = #{newAttrSettingType,jdbcType=INTEGER}"); + } + + if (record.getShareCommissionBase() != null) { + sql.SET("share_commission_base = #{shareCommissionBase,jdbcType=DECIMAL}"); + } + + if (record.getIsSjht() != null) { + sql.SET("is_sjht = #{isSjht,jdbcType=SMALLINT}"); + } + + if (record.getSjhtProident() != null) { + sql.SET("sjht_proIdent = #{sjhtProident,jdbcType=VARCHAR}"); + } + + if (record.getIsOil() != null) { + sql.SET("is_oil = #{isOil,jdbcType=SMALLINT}"); + } + + if (record.getOilCoutypecode() != null) { + sql.SET("oil_couTypeCode = #{oilCoutypecode,jdbcType=VARCHAR}"); + } + + if (record.getIsAbholung() != null) { + sql.SET("is_abholung = #{isAbholung,jdbcType=SMALLINT}"); + } + + if (record.getIsTransnational() != null) { + sql.SET("is_transnational = #{isTransnational,jdbcType=SMALLINT}"); + } + + if (record.getGoodsTransferRate() != null) { + sql.SET("goods_transfer_rate = #{goodsTransferRate,jdbcType=INTEGER}"); + } + + if (record.getOilDiscount() != null) { + sql.SET("oil_discount = #{oilDiscount,jdbcType=INTEGER}"); + } + + if (record.getOilType() != null) { + sql.SET("oil_type = #{oilType,jdbcType=INTEGER}"); + } + + if (record.getDetail() != null) { + sql.SET("detail = #{detail,jdbcType=LONGVARCHAR}"); + } + + if (record.getAttr() != null) { + sql.SET("attr = #{attr,jdbcType=LONGVARCHAR}"); + } + + if (record.getCoverPic() != null) { + sql.SET("cover_pic = #{coverPic,jdbcType=LONGVARCHAR}"); + } + + if (record.getFullCut() != null) { + sql.SET("full_cut = #{fullCut,jdbcType=LONGVARCHAR}"); + } + + if (record.getIntegral() != null) { + sql.SET("integral = #{integral,jdbcType=LONGVARCHAR}"); + } + + if (record.getShopId() != null) { + sql.SET("shop_id = #{shopId,jdbcType=LONGVARCHAR}"); + } + + if (record.getVerifyCardId() != null) { + sql.SET("verify_card_id = #{verifyCardId,jdbcType=LONGVARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=INTEGER}"); + + return sql.toString(); + } + protected void applyWhere(SQL sql, CyymallGoodsExample example, boolean includeExamplePhrase) { if (example == null) { return; diff --git a/service/src/main/java/com/hfkj/dao/CyymallOrderDetailMapper.java b/service/src/main/java/com/hfkj/dao/CyymallOrderDetailMapper.java index a9c8d1b..d57c7eb 100644 --- a/service/src/main/java/com/hfkj/dao/CyymallOrderDetailMapper.java +++ b/service/src/main/java/com/hfkj/dao/CyymallOrderDetailMapper.java @@ -3,6 +3,7 @@ package com.hfkj.dao; import com.hfkj.entity.CyymallOrderDetail; import com.hfkj.entity.CyymallOrderDetailExample; import java.util.List; +import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.DeleteProvider; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.InsertProvider; @@ -10,7 +11,9 @@ import org.apache.ibatis.annotations.Options; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.UpdateProvider; import org.apache.ibatis.type.JdbcType; import org.springframework.stereotype.Repository; @@ -29,6 +32,12 @@ public interface CyymallOrderDetailMapper extends CyymallOrderDetailMapperExt { @DeleteProvider(type=CyymallOrderDetailSqlProvider.class, method="deleteByExample") int deleteByExample(CyymallOrderDetailExample example); + @Delete({ + "delete from cyymall_order_detail", + "where id = #{id,jdbcType=INTEGER}" + }) + int deleteByPrimaryKey(Integer id); + @Insert({ "insert into cyymall_order_detail (order_id, goods_id, ", "num, total_price, ", @@ -56,7 +65,7 @@ public interface CyymallOrderDetailMapper extends CyymallOrderDetailMapperExt { @SelectProvider(type=CyymallOrderDetailSqlProvider.class, method="selectByExampleWithBLOBs") @Results({ - @Result(column="id", property="id", jdbcType=JdbcType.INTEGER), + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER), @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.INTEGER), @Result(column="num", property="num", jdbcType=JdbcType.INTEGER), @@ -78,7 +87,7 @@ public interface CyymallOrderDetailMapper extends CyymallOrderDetailMapperExt { @SelectProvider(type=CyymallOrderDetailSqlProvider.class, method="selectByExample") @Results({ - @Result(column="id", property="id", jdbcType=JdbcType.INTEGER), + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER), @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.INTEGER), @Result(column="num", property="num", jdbcType=JdbcType.INTEGER), @@ -97,6 +106,35 @@ public interface CyymallOrderDetailMapper extends CyymallOrderDetailMapperExt { }) List selectByExample(CyymallOrderDetailExample example); + @Select({ + "select", + "id, order_id, goods_id, num, total_price, addtime, is_delete, pic, integral, ", + "is_level, batch_price_tips, supplier_price, vgoods_id, vgoods_price, verify_card_sale_id, ", + "give_goods_id, attr", + "from cyymall_order_detail", + "where id = #{id,jdbcType=INTEGER}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER), + @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.INTEGER), + @Result(column="num", property="num", jdbcType=JdbcType.INTEGER), + @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="addtime", property="addtime", jdbcType=JdbcType.INTEGER), + @Result(column="is_delete", property="isDelete", jdbcType=JdbcType.SMALLINT), + @Result(column="pic", property="pic", jdbcType=JdbcType.VARCHAR), + @Result(column="integral", property="integral", jdbcType=JdbcType.INTEGER), + @Result(column="is_level", property="isLevel", jdbcType=JdbcType.SMALLINT), + @Result(column="batch_price_tips", property="batchPriceTips", jdbcType=JdbcType.VARCHAR), + @Result(column="supplier_price", property="supplierPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="vgoods_id", property="vgoodsId", jdbcType=JdbcType.INTEGER), + @Result(column="vgoods_price", property="vgoodsPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="verify_card_sale_id", property="verifyCardSaleId", jdbcType=JdbcType.INTEGER), + @Result(column="give_goods_id", property="giveGoodsId", jdbcType=JdbcType.INTEGER), + @Result(column="attr", property="attr", jdbcType=JdbcType.LONGVARCHAR) + }) + CyymallOrderDetail selectByPrimaryKey(Integer id); + @UpdateProvider(type=CyymallOrderDetailSqlProvider.class, method="updateByExampleSelective") int updateByExampleSelective(@Param("record") CyymallOrderDetail record, @Param("example") CyymallOrderDetailExample example); @@ -105,4 +143,50 @@ public interface CyymallOrderDetailMapper extends CyymallOrderDetailMapperExt { @UpdateProvider(type=CyymallOrderDetailSqlProvider.class, method="updateByExample") int updateByExample(@Param("record") CyymallOrderDetail record, @Param("example") CyymallOrderDetailExample example); + + @UpdateProvider(type=CyymallOrderDetailSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(CyymallOrderDetail record); + + @Update({ + "update cyymall_order_detail", + "set order_id = #{orderId,jdbcType=INTEGER},", + "goods_id = #{goodsId,jdbcType=INTEGER},", + "num = #{num,jdbcType=INTEGER},", + "total_price = #{totalPrice,jdbcType=DECIMAL},", + "addtime = #{addtime,jdbcType=INTEGER},", + "is_delete = #{isDelete,jdbcType=SMALLINT},", + "pic = #{pic,jdbcType=VARCHAR},", + "integral = #{integral,jdbcType=INTEGER},", + "is_level = #{isLevel,jdbcType=SMALLINT},", + "batch_price_tips = #{batchPriceTips,jdbcType=VARCHAR},", + "supplier_price = #{supplierPrice,jdbcType=DECIMAL},", + "vgoods_id = #{vgoodsId,jdbcType=INTEGER},", + "vgoods_price = #{vgoodsPrice,jdbcType=DECIMAL},", + "verify_card_sale_id = #{verifyCardSaleId,jdbcType=INTEGER},", + "give_goods_id = #{giveGoodsId,jdbcType=INTEGER},", + "attr = #{attr,jdbcType=LONGVARCHAR}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKeyWithBLOBs(CyymallOrderDetail record); + + @Update({ + "update cyymall_order_detail", + "set order_id = #{orderId,jdbcType=INTEGER},", + "goods_id = #{goodsId,jdbcType=INTEGER},", + "num = #{num,jdbcType=INTEGER},", + "total_price = #{totalPrice,jdbcType=DECIMAL},", + "addtime = #{addtime,jdbcType=INTEGER},", + "is_delete = #{isDelete,jdbcType=SMALLINT},", + "pic = #{pic,jdbcType=VARCHAR},", + "integral = #{integral,jdbcType=INTEGER},", + "is_level = #{isLevel,jdbcType=SMALLINT},", + "batch_price_tips = #{batchPriceTips,jdbcType=VARCHAR},", + "supplier_price = #{supplierPrice,jdbcType=DECIMAL},", + "vgoods_id = #{vgoodsId,jdbcType=INTEGER},", + "vgoods_price = #{vgoodsPrice,jdbcType=DECIMAL},", + "verify_card_sale_id = #{verifyCardSaleId,jdbcType=INTEGER},", + "give_goods_id = #{giveGoodsId,jdbcType=INTEGER}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKey(CyymallOrderDetail record); } \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CyymallOrderDetailSqlProvider.java b/service/src/main/java/com/hfkj/dao/CyymallOrderDetailSqlProvider.java index 23ee0c0..7dc676e 100644 --- a/service/src/main/java/com/hfkj/dao/CyymallOrderDetailSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/CyymallOrderDetailSqlProvider.java @@ -292,6 +292,79 @@ public class CyymallOrderDetailSqlProvider { return sql.toString(); } + public String updateByPrimaryKeySelective(CyymallOrderDetail record) { + SQL sql = new SQL(); + sql.UPDATE("cyymall_order_detail"); + + if (record.getOrderId() != null) { + sql.SET("order_id = #{orderId,jdbcType=INTEGER}"); + } + + if (record.getGoodsId() != null) { + sql.SET("goods_id = #{goodsId,jdbcType=INTEGER}"); + } + + if (record.getNum() != null) { + sql.SET("num = #{num,jdbcType=INTEGER}"); + } + + if (record.getTotalPrice() != null) { + sql.SET("total_price = #{totalPrice,jdbcType=DECIMAL}"); + } + + if (record.getAddtime() != null) { + sql.SET("addtime = #{addtime,jdbcType=INTEGER}"); + } + + if (record.getIsDelete() != null) { + sql.SET("is_delete = #{isDelete,jdbcType=SMALLINT}"); + } + + if (record.getPic() != null) { + sql.SET("pic = #{pic,jdbcType=VARCHAR}"); + } + + if (record.getIntegral() != null) { + sql.SET("integral = #{integral,jdbcType=INTEGER}"); + } + + if (record.getIsLevel() != null) { + sql.SET("is_level = #{isLevel,jdbcType=SMALLINT}"); + } + + if (record.getBatchPriceTips() != null) { + sql.SET("batch_price_tips = #{batchPriceTips,jdbcType=VARCHAR}"); + } + + if (record.getSupplierPrice() != null) { + sql.SET("supplier_price = #{supplierPrice,jdbcType=DECIMAL}"); + } + + if (record.getVgoodsId() != null) { + sql.SET("vgoods_id = #{vgoodsId,jdbcType=INTEGER}"); + } + + if (record.getVgoodsPrice() != null) { + sql.SET("vgoods_price = #{vgoodsPrice,jdbcType=DECIMAL}"); + } + + if (record.getVerifyCardSaleId() != null) { + sql.SET("verify_card_sale_id = #{verifyCardSaleId,jdbcType=INTEGER}"); + } + + if (record.getGiveGoodsId() != null) { + sql.SET("give_goods_id = #{giveGoodsId,jdbcType=INTEGER}"); + } + + if (record.getAttr() != null) { + sql.SET("attr = #{attr,jdbcType=LONGVARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=INTEGER}"); + + return sql.toString(); + } + protected void applyWhere(SQL sql, CyymallOrderDetailExample example, boolean includeExamplePhrase) { if (example == null) { return; diff --git a/service/src/main/java/com/hfkj/dao/CyymallOrderMapper.java b/service/src/main/java/com/hfkj/dao/CyymallOrderMapper.java index bf1224c..1950662 100644 --- a/service/src/main/java/com/hfkj/dao/CyymallOrderMapper.java +++ b/service/src/main/java/com/hfkj/dao/CyymallOrderMapper.java @@ -4,6 +4,7 @@ import com.hfkj.entity.CyymallOrder; import com.hfkj.entity.CyymallOrderExample; import com.hfkj.entity.CyymallOrderWithBLOBs; import java.util.List; +import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.DeleteProvider; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.InsertProvider; @@ -11,7 +12,9 @@ import org.apache.ibatis.annotations.Options; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.UpdateProvider; import org.apache.ibatis.type.JdbcType; import org.springframework.stereotype.Repository; @@ -30,6 +33,12 @@ public interface CyymallOrderMapper extends CyymallOrderMapperExt { @DeleteProvider(type=CyymallOrderSqlProvider.class, method="deleteByExample") int deleteByExample(CyymallOrderExample example); + @Delete({ + "delete from cyymall_order", + "where id = #{id,jdbcType=INTEGER}" + }) + int deleteByPrimaryKey(Integer id); + @Insert({ "insert into cyymall_order (store_id, user_id, ", "order_no, total_price, ", @@ -129,7 +138,7 @@ public interface CyymallOrderMapper extends CyymallOrderMapperExt { @SelectProvider(type=CyymallOrderSqlProvider.class, method="selectByExampleWithBLOBs") @Results({ - @Result(column="id", property="id", jdbcType=JdbcType.INTEGER), + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="store_id", property="storeId", jdbcType=JdbcType.INTEGER), @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @@ -226,7 +235,7 @@ public interface CyymallOrderMapper extends CyymallOrderMapperExt { @SelectProvider(type=CyymallOrderSqlProvider.class, method="selectByExample") @Results({ - @Result(column="id", property="id", jdbcType=JdbcType.INTEGER), + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="store_id", property="storeId", jdbcType=JdbcType.INTEGER), @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @@ -315,6 +324,121 @@ public interface CyymallOrderMapper extends CyymallOrderMapperExt { }) List selectByExample(CyymallOrderExample example); + @Select({ + "select", + "id, store_id, user_id, order_no, total_price, pay_price, express_price, `name`, ", + "mobile, address, remark, is_pay, pay_type, pay_time, is_send, send_time, express, ", + "express_no, is_confirm, confirm_time, is_comment, apply_delete, addtime, is_delete, ", + "is_price, parent_id, first_price, second_price, third_price, coupon_sub_price, ", + "is_offline, clerk_id, is_cancel, before_update_price, shop_id, discount, user_coupon_id, ", + "give_integral, parent_id_2, parent_id_3, is_sale, version, express_price_2, ", + "is_recycle, rebate, before_update_express, mch_id, order_union_id, is_transfer, ", + "`type`, share_price, is_show, currency, order_origin, delivery_id, delivery_status, ", + "fy_status, fyjine, fysingle, mch_fyjine, mch_fysingle, is_fan, is_dada, shop_peisong, ", + "is_open_offline, supplier_id, is_sup_transfer, dabao_price, settlement_amount, ", + "is_settlement, settlement_time, is_mch_shop, is_divide_money, transaction_id, ", + "pay_user_id, pay_type_true, is_vgoods, reduction_price, minus_price, order_from, ", + "discount_price, discount_num, give_goods_id, coupon_record_id, id_card_no, refund_time, ", + "content, address_data, offline_qrcode, integral, words, seller_comments", + "from cyymall_order", + "where id = #{id,jdbcType=INTEGER}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.INTEGER), + @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="express_price", property="expressPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR), + @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR), + @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR), + @Result(column="is_pay", property="isPay", jdbcType=JdbcType.SMALLINT), + @Result(column="pay_type", property="payType", jdbcType=JdbcType.SMALLINT), + @Result(column="pay_time", property="payTime", jdbcType=JdbcType.INTEGER), + @Result(column="is_send", property="isSend", jdbcType=JdbcType.SMALLINT), + @Result(column="send_time", property="sendTime", jdbcType=JdbcType.INTEGER), + @Result(column="express", property="express", jdbcType=JdbcType.VARCHAR), + @Result(column="express_no", property="expressNo", jdbcType=JdbcType.VARCHAR), + @Result(column="is_confirm", property="isConfirm", jdbcType=JdbcType.SMALLINT), + @Result(column="confirm_time", property="confirmTime", jdbcType=JdbcType.INTEGER), + @Result(column="is_comment", property="isComment", jdbcType=JdbcType.SMALLINT), + @Result(column="apply_delete", property="applyDelete", jdbcType=JdbcType.SMALLINT), + @Result(column="addtime", property="addtime", jdbcType=JdbcType.INTEGER), + @Result(column="is_delete", property="isDelete", jdbcType=JdbcType.SMALLINT), + @Result(column="is_price", property="isPrice", jdbcType=JdbcType.SMALLINT), + @Result(column="parent_id", property="parentId", jdbcType=JdbcType.INTEGER), + @Result(column="first_price", property="firstPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="second_price", property="secondPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="third_price", property="thirdPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="coupon_sub_price", property="couponSubPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="is_offline", property="isOffline", jdbcType=JdbcType.INTEGER), + @Result(column="clerk_id", property="clerkId", jdbcType=JdbcType.INTEGER), + @Result(column="is_cancel", property="isCancel", jdbcType=JdbcType.SMALLINT), + @Result(column="before_update_price", property="beforeUpdatePrice", jdbcType=JdbcType.DECIMAL), + @Result(column="shop_id", property="shopId", jdbcType=JdbcType.INTEGER), + @Result(column="discount", property="discount", jdbcType=JdbcType.DECIMAL), + @Result(column="user_coupon_id", property="userCouponId", jdbcType=JdbcType.INTEGER), + @Result(column="give_integral", property="giveIntegral", jdbcType=JdbcType.SMALLINT), + @Result(column="parent_id_2", property="parentId2", jdbcType=JdbcType.INTEGER), + @Result(column="parent_id_3", property="parentId3", jdbcType=JdbcType.INTEGER), + @Result(column="is_sale", property="isSale", jdbcType=JdbcType.INTEGER), + @Result(column="version", property="version", jdbcType=JdbcType.VARCHAR), + @Result(column="express_price_2", property="expressPrice2", jdbcType=JdbcType.DECIMAL), + @Result(column="is_recycle", property="isRecycle", jdbcType=JdbcType.SMALLINT), + @Result(column="rebate", property="rebate", jdbcType=JdbcType.DECIMAL), + @Result(column="before_update_express", property="beforeUpdateExpress", jdbcType=JdbcType.DECIMAL), + @Result(column="mch_id", property="mchId", jdbcType=JdbcType.INTEGER), + @Result(column="order_union_id", property="orderUnionId", jdbcType=JdbcType.INTEGER), + @Result(column="is_transfer", property="isTransfer", jdbcType=JdbcType.SMALLINT), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="share_price", property="sharePrice", jdbcType=JdbcType.DECIMAL), + @Result(column="is_show", property="isShow", jdbcType=JdbcType.SMALLINT), + @Result(column="currency", property="currency", jdbcType=JdbcType.DECIMAL), + @Result(column="order_origin", property="orderOrigin", jdbcType=JdbcType.BIT), + @Result(column="delivery_id", property="deliveryId", jdbcType=JdbcType.INTEGER), + @Result(column="delivery_status", property="deliveryStatus", jdbcType=JdbcType.BIT), + @Result(column="fy_status", property="fyStatus", jdbcType=JdbcType.BIT), + @Result(column="fyjine", property="fyjine", jdbcType=JdbcType.DECIMAL), + @Result(column="fysingle", property="fysingle", jdbcType=JdbcType.DECIMAL), + @Result(column="mch_fyjine", property="mchFyjine", jdbcType=JdbcType.DECIMAL), + @Result(column="mch_fysingle", property="mchFysingle", jdbcType=JdbcType.DECIMAL), + @Result(column="is_fan", property="isFan", jdbcType=JdbcType.BIT), + @Result(column="is_dada", property="isDada", jdbcType=JdbcType.BIT), + @Result(column="shop_peisong", property="shopPeisong", jdbcType=JdbcType.INTEGER), + @Result(column="is_open_offline", property="isOpenOffline", jdbcType=JdbcType.BIT), + @Result(column="supplier_id", property="supplierId", jdbcType=JdbcType.INTEGER), + @Result(column="is_sup_transfer", property="isSupTransfer", jdbcType=JdbcType.BIT), + @Result(column="dabao_price", property="dabaoPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="settlement_amount", property="settlementAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="is_settlement", property="isSettlement", jdbcType=JdbcType.SMALLINT), + @Result(column="settlement_time", property="settlementTime", jdbcType=JdbcType.INTEGER), + @Result(column="is_mch_shop", property="isMchShop", jdbcType=JdbcType.BIT), + @Result(column="is_divide_money", property="isDivideMoney", jdbcType=JdbcType.BIT), + @Result(column="transaction_id", property="transactionId", jdbcType=JdbcType.VARCHAR), + @Result(column="pay_user_id", property="payUserId", jdbcType=JdbcType.INTEGER), + @Result(column="pay_type_true", property="payTypeTrue", jdbcType=JdbcType.BIT), + @Result(column="is_vgoods", property="isVgoods", jdbcType=JdbcType.INTEGER), + @Result(column="reduction_price", property="reductionPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="minus_price", property="minusPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="order_from", property="orderFrom", jdbcType=JdbcType.INTEGER), + @Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="discount_num", property="discountNum", jdbcType=JdbcType.DECIMAL), + @Result(column="give_goods_id", property="giveGoodsId", jdbcType=JdbcType.INTEGER), + @Result(column="coupon_record_id", property="couponRecordId", jdbcType=JdbcType.VARCHAR), + @Result(column="id_card_no", property="idCardNo", jdbcType=JdbcType.VARCHAR), + @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.INTEGER), + @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR), + @Result(column="address_data", property="addressData", jdbcType=JdbcType.LONGVARCHAR), + @Result(column="offline_qrcode", property="offlineQrcode", jdbcType=JdbcType.LONGVARCHAR), + @Result(column="integral", property="integral", jdbcType=JdbcType.LONGVARCHAR), + @Result(column="words", property="words", jdbcType=JdbcType.LONGVARCHAR), + @Result(column="seller_comments", property="sellerComments", jdbcType=JdbcType.LONGVARCHAR) + }) + CyymallOrderWithBLOBs selectByPrimaryKey(Integer id); + @UpdateProvider(type=CyymallOrderSqlProvider.class, method="updateByExampleSelective") int updateByExampleSelective(@Param("record") CyymallOrderWithBLOBs record, @Param("example") CyymallOrderExample example); @@ -323,4 +447,195 @@ public interface CyymallOrderMapper extends CyymallOrderMapperExt { @UpdateProvider(type=CyymallOrderSqlProvider.class, method="updateByExample") int updateByExample(@Param("record") CyymallOrder record, @Param("example") CyymallOrderExample example); + + @UpdateProvider(type=CyymallOrderSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(CyymallOrderWithBLOBs record); + + @Update({ + "update cyymall_order", + "set store_id = #{storeId,jdbcType=INTEGER},", + "user_id = #{userId,jdbcType=INTEGER},", + "order_no = #{orderNo,jdbcType=VARCHAR},", + "total_price = #{totalPrice,jdbcType=DECIMAL},", + "pay_price = #{payPrice,jdbcType=DECIMAL},", + "express_price = #{expressPrice,jdbcType=DECIMAL},", + "`name` = #{name,jdbcType=VARCHAR},", + "mobile = #{mobile,jdbcType=VARCHAR},", + "address = #{address,jdbcType=VARCHAR},", + "remark = #{remark,jdbcType=VARCHAR},", + "is_pay = #{isPay,jdbcType=SMALLINT},", + "pay_type = #{payType,jdbcType=SMALLINT},", + "pay_time = #{payTime,jdbcType=INTEGER},", + "is_send = #{isSend,jdbcType=SMALLINT},", + "send_time = #{sendTime,jdbcType=INTEGER},", + "express = #{express,jdbcType=VARCHAR},", + "express_no = #{expressNo,jdbcType=VARCHAR},", + "is_confirm = #{isConfirm,jdbcType=SMALLINT},", + "confirm_time = #{confirmTime,jdbcType=INTEGER},", + "is_comment = #{isComment,jdbcType=SMALLINT},", + "apply_delete = #{applyDelete,jdbcType=SMALLINT},", + "addtime = #{addtime,jdbcType=INTEGER},", + "is_delete = #{isDelete,jdbcType=SMALLINT},", + "is_price = #{isPrice,jdbcType=SMALLINT},", + "parent_id = #{parentId,jdbcType=INTEGER},", + "first_price = #{firstPrice,jdbcType=DECIMAL},", + "second_price = #{secondPrice,jdbcType=DECIMAL},", + "third_price = #{thirdPrice,jdbcType=DECIMAL},", + "coupon_sub_price = #{couponSubPrice,jdbcType=DECIMAL},", + "is_offline = #{isOffline,jdbcType=INTEGER},", + "clerk_id = #{clerkId,jdbcType=INTEGER},", + "is_cancel = #{isCancel,jdbcType=SMALLINT},", + "before_update_price = #{beforeUpdatePrice,jdbcType=DECIMAL},", + "shop_id = #{shopId,jdbcType=INTEGER},", + "discount = #{discount,jdbcType=DECIMAL},", + "user_coupon_id = #{userCouponId,jdbcType=INTEGER},", + "give_integral = #{giveIntegral,jdbcType=SMALLINT},", + "parent_id_2 = #{parentId2,jdbcType=INTEGER},", + "parent_id_3 = #{parentId3,jdbcType=INTEGER},", + "is_sale = #{isSale,jdbcType=INTEGER},", + "version = #{version,jdbcType=VARCHAR},", + "express_price_2 = #{expressPrice2,jdbcType=DECIMAL},", + "is_recycle = #{isRecycle,jdbcType=SMALLINT},", + "rebate = #{rebate,jdbcType=DECIMAL},", + "before_update_express = #{beforeUpdateExpress,jdbcType=DECIMAL},", + "mch_id = #{mchId,jdbcType=INTEGER},", + "order_union_id = #{orderUnionId,jdbcType=INTEGER},", + "is_transfer = #{isTransfer,jdbcType=SMALLINT},", + "`type` = #{type,jdbcType=INTEGER},", + "share_price = #{sharePrice,jdbcType=DECIMAL},", + "is_show = #{isShow,jdbcType=SMALLINT},", + "currency = #{currency,jdbcType=DECIMAL},", + "order_origin = #{orderOrigin,jdbcType=BIT},", + "delivery_id = #{deliveryId,jdbcType=INTEGER},", + "delivery_status = #{deliveryStatus,jdbcType=BIT},", + "fy_status = #{fyStatus,jdbcType=BIT},", + "fyjine = #{fyjine,jdbcType=DECIMAL},", + "fysingle = #{fysingle,jdbcType=DECIMAL},", + "mch_fyjine = #{mchFyjine,jdbcType=DECIMAL},", + "mch_fysingle = #{mchFysingle,jdbcType=DECIMAL},", + "is_fan = #{isFan,jdbcType=BIT},", + "is_dada = #{isDada,jdbcType=BIT},", + "shop_peisong = #{shopPeisong,jdbcType=INTEGER},", + "is_open_offline = #{isOpenOffline,jdbcType=BIT},", + "supplier_id = #{supplierId,jdbcType=INTEGER},", + "is_sup_transfer = #{isSupTransfer,jdbcType=BIT},", + "dabao_price = #{dabaoPrice,jdbcType=DECIMAL},", + "settlement_amount = #{settlementAmount,jdbcType=DECIMAL},", + "is_settlement = #{isSettlement,jdbcType=SMALLINT},", + "settlement_time = #{settlementTime,jdbcType=INTEGER},", + "is_mch_shop = #{isMchShop,jdbcType=BIT},", + "is_divide_money = #{isDivideMoney,jdbcType=BIT},", + "transaction_id = #{transactionId,jdbcType=VARCHAR},", + "pay_user_id = #{payUserId,jdbcType=INTEGER},", + "pay_type_true = #{payTypeTrue,jdbcType=BIT},", + "is_vgoods = #{isVgoods,jdbcType=INTEGER},", + "reduction_price = #{reductionPrice,jdbcType=DECIMAL},", + "minus_price = #{minusPrice,jdbcType=DECIMAL},", + "order_from = #{orderFrom,jdbcType=INTEGER},", + "discount_price = #{discountPrice,jdbcType=DECIMAL},", + "discount_num = #{discountNum,jdbcType=DECIMAL},", + "give_goods_id = #{giveGoodsId,jdbcType=INTEGER},", + "coupon_record_id = #{couponRecordId,jdbcType=VARCHAR},", + "id_card_no = #{idCardNo,jdbcType=VARCHAR},", + "refund_time = #{refundTime,jdbcType=INTEGER},", + "content = #{content,jdbcType=LONGVARCHAR},", + "address_data = #{addressData,jdbcType=LONGVARCHAR},", + "offline_qrcode = #{offlineQrcode,jdbcType=LONGVARCHAR},", + "integral = #{integral,jdbcType=LONGVARCHAR},", + "words = #{words,jdbcType=LONGVARCHAR},", + "seller_comments = #{sellerComments,jdbcType=LONGVARCHAR}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKeyWithBLOBs(CyymallOrderWithBLOBs record); + + @Update({ + "update cyymall_order", + "set store_id = #{storeId,jdbcType=INTEGER},", + "user_id = #{userId,jdbcType=INTEGER},", + "order_no = #{orderNo,jdbcType=VARCHAR},", + "total_price = #{totalPrice,jdbcType=DECIMAL},", + "pay_price = #{payPrice,jdbcType=DECIMAL},", + "express_price = #{expressPrice,jdbcType=DECIMAL},", + "`name` = #{name,jdbcType=VARCHAR},", + "mobile = #{mobile,jdbcType=VARCHAR},", + "address = #{address,jdbcType=VARCHAR},", + "remark = #{remark,jdbcType=VARCHAR},", + "is_pay = #{isPay,jdbcType=SMALLINT},", + "pay_type = #{payType,jdbcType=SMALLINT},", + "pay_time = #{payTime,jdbcType=INTEGER},", + "is_send = #{isSend,jdbcType=SMALLINT},", + "send_time = #{sendTime,jdbcType=INTEGER},", + "express = #{express,jdbcType=VARCHAR},", + "express_no = #{expressNo,jdbcType=VARCHAR},", + "is_confirm = #{isConfirm,jdbcType=SMALLINT},", + "confirm_time = #{confirmTime,jdbcType=INTEGER},", + "is_comment = #{isComment,jdbcType=SMALLINT},", + "apply_delete = #{applyDelete,jdbcType=SMALLINT},", + "addtime = #{addtime,jdbcType=INTEGER},", + "is_delete = #{isDelete,jdbcType=SMALLINT},", + "is_price = #{isPrice,jdbcType=SMALLINT},", + "parent_id = #{parentId,jdbcType=INTEGER},", + "first_price = #{firstPrice,jdbcType=DECIMAL},", + "second_price = #{secondPrice,jdbcType=DECIMAL},", + "third_price = #{thirdPrice,jdbcType=DECIMAL},", + "coupon_sub_price = #{couponSubPrice,jdbcType=DECIMAL},", + "is_offline = #{isOffline,jdbcType=INTEGER},", + "clerk_id = #{clerkId,jdbcType=INTEGER},", + "is_cancel = #{isCancel,jdbcType=SMALLINT},", + "before_update_price = #{beforeUpdatePrice,jdbcType=DECIMAL},", + "shop_id = #{shopId,jdbcType=INTEGER},", + "discount = #{discount,jdbcType=DECIMAL},", + "user_coupon_id = #{userCouponId,jdbcType=INTEGER},", + "give_integral = #{giveIntegral,jdbcType=SMALLINT},", + "parent_id_2 = #{parentId2,jdbcType=INTEGER},", + "parent_id_3 = #{parentId3,jdbcType=INTEGER},", + "is_sale = #{isSale,jdbcType=INTEGER},", + "version = #{version,jdbcType=VARCHAR},", + "express_price_2 = #{expressPrice2,jdbcType=DECIMAL},", + "is_recycle = #{isRecycle,jdbcType=SMALLINT},", + "rebate = #{rebate,jdbcType=DECIMAL},", + "before_update_express = #{beforeUpdateExpress,jdbcType=DECIMAL},", + "mch_id = #{mchId,jdbcType=INTEGER},", + "order_union_id = #{orderUnionId,jdbcType=INTEGER},", + "is_transfer = #{isTransfer,jdbcType=SMALLINT},", + "`type` = #{type,jdbcType=INTEGER},", + "share_price = #{sharePrice,jdbcType=DECIMAL},", + "is_show = #{isShow,jdbcType=SMALLINT},", + "currency = #{currency,jdbcType=DECIMAL},", + "order_origin = #{orderOrigin,jdbcType=BIT},", + "delivery_id = #{deliveryId,jdbcType=INTEGER},", + "delivery_status = #{deliveryStatus,jdbcType=BIT},", + "fy_status = #{fyStatus,jdbcType=BIT},", + "fyjine = #{fyjine,jdbcType=DECIMAL},", + "fysingle = #{fysingle,jdbcType=DECIMAL},", + "mch_fyjine = #{mchFyjine,jdbcType=DECIMAL},", + "mch_fysingle = #{mchFysingle,jdbcType=DECIMAL},", + "is_fan = #{isFan,jdbcType=BIT},", + "is_dada = #{isDada,jdbcType=BIT},", + "shop_peisong = #{shopPeisong,jdbcType=INTEGER},", + "is_open_offline = #{isOpenOffline,jdbcType=BIT},", + "supplier_id = #{supplierId,jdbcType=INTEGER},", + "is_sup_transfer = #{isSupTransfer,jdbcType=BIT},", + "dabao_price = #{dabaoPrice,jdbcType=DECIMAL},", + "settlement_amount = #{settlementAmount,jdbcType=DECIMAL},", + "is_settlement = #{isSettlement,jdbcType=SMALLINT},", + "settlement_time = #{settlementTime,jdbcType=INTEGER},", + "is_mch_shop = #{isMchShop,jdbcType=BIT},", + "is_divide_money = #{isDivideMoney,jdbcType=BIT},", + "transaction_id = #{transactionId,jdbcType=VARCHAR},", + "pay_user_id = #{payUserId,jdbcType=INTEGER},", + "pay_type_true = #{payTypeTrue,jdbcType=BIT},", + "is_vgoods = #{isVgoods,jdbcType=INTEGER},", + "reduction_price = #{reductionPrice,jdbcType=DECIMAL},", + "minus_price = #{minusPrice,jdbcType=DECIMAL},", + "order_from = #{orderFrom,jdbcType=INTEGER},", + "discount_price = #{discountPrice,jdbcType=DECIMAL},", + "discount_num = #{discountNum,jdbcType=DECIMAL},", + "give_goods_id = #{giveGoodsId,jdbcType=INTEGER},", + "coupon_record_id = #{couponRecordId,jdbcType=VARCHAR},", + "id_card_no = #{idCardNo,jdbcType=VARCHAR},", + "refund_time = #{refundTime,jdbcType=INTEGER}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKey(CyymallOrder record); } \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CyymallOrderSqlProvider.java b/service/src/main/java/com/hfkj/dao/CyymallOrderSqlProvider.java index ec50369..7dce1d5 100644 --- a/service/src/main/java/com/hfkj/dao/CyymallOrderSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/CyymallOrderSqlProvider.java @@ -1182,6 +1182,379 @@ public class CyymallOrderSqlProvider { return sql.toString(); } + public String updateByPrimaryKeySelective(CyymallOrderWithBLOBs record) { + SQL sql = new SQL(); + sql.UPDATE("cyymall_order"); + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=INTEGER}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=INTEGER}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getTotalPrice() != null) { + sql.SET("total_price = #{totalPrice,jdbcType=DECIMAL}"); + } + + if (record.getPayPrice() != null) { + sql.SET("pay_price = #{payPrice,jdbcType=DECIMAL}"); + } + + if (record.getExpressPrice() != null) { + sql.SET("express_price = #{expressPrice,jdbcType=DECIMAL}"); + } + + if (record.getName() != null) { + sql.SET("`name` = #{name,jdbcType=VARCHAR}"); + } + + if (record.getMobile() != null) { + sql.SET("mobile = #{mobile,jdbcType=VARCHAR}"); + } + + if (record.getAddress() != null) { + sql.SET("address = #{address,jdbcType=VARCHAR}"); + } + + if (record.getRemark() != null) { + sql.SET("remark = #{remark,jdbcType=VARCHAR}"); + } + + if (record.getIsPay() != null) { + sql.SET("is_pay = #{isPay,jdbcType=SMALLINT}"); + } + + if (record.getPayType() != null) { + sql.SET("pay_type = #{payType,jdbcType=SMALLINT}"); + } + + if (record.getPayTime() != null) { + sql.SET("pay_time = #{payTime,jdbcType=INTEGER}"); + } + + if (record.getIsSend() != null) { + sql.SET("is_send = #{isSend,jdbcType=SMALLINT}"); + } + + if (record.getSendTime() != null) { + sql.SET("send_time = #{sendTime,jdbcType=INTEGER}"); + } + + if (record.getExpress() != null) { + sql.SET("express = #{express,jdbcType=VARCHAR}"); + } + + if (record.getExpressNo() != null) { + sql.SET("express_no = #{expressNo,jdbcType=VARCHAR}"); + } + + if (record.getIsConfirm() != null) { + sql.SET("is_confirm = #{isConfirm,jdbcType=SMALLINT}"); + } + + if (record.getConfirmTime() != null) { + sql.SET("confirm_time = #{confirmTime,jdbcType=INTEGER}"); + } + + if (record.getIsComment() != null) { + sql.SET("is_comment = #{isComment,jdbcType=SMALLINT}"); + } + + if (record.getApplyDelete() != null) { + sql.SET("apply_delete = #{applyDelete,jdbcType=SMALLINT}"); + } + + if (record.getAddtime() != null) { + sql.SET("addtime = #{addtime,jdbcType=INTEGER}"); + } + + if (record.getIsDelete() != null) { + sql.SET("is_delete = #{isDelete,jdbcType=SMALLINT}"); + } + + if (record.getIsPrice() != null) { + sql.SET("is_price = #{isPrice,jdbcType=SMALLINT}"); + } + + if (record.getParentId() != null) { + sql.SET("parent_id = #{parentId,jdbcType=INTEGER}"); + } + + if (record.getFirstPrice() != null) { + sql.SET("first_price = #{firstPrice,jdbcType=DECIMAL}"); + } + + if (record.getSecondPrice() != null) { + sql.SET("second_price = #{secondPrice,jdbcType=DECIMAL}"); + } + + if (record.getThirdPrice() != null) { + sql.SET("third_price = #{thirdPrice,jdbcType=DECIMAL}"); + } + + if (record.getCouponSubPrice() != null) { + sql.SET("coupon_sub_price = #{couponSubPrice,jdbcType=DECIMAL}"); + } + + if (record.getIsOffline() != null) { + sql.SET("is_offline = #{isOffline,jdbcType=INTEGER}"); + } + + if (record.getClerkId() != null) { + sql.SET("clerk_id = #{clerkId,jdbcType=INTEGER}"); + } + + if (record.getIsCancel() != null) { + sql.SET("is_cancel = #{isCancel,jdbcType=SMALLINT}"); + } + + if (record.getBeforeUpdatePrice() != null) { + sql.SET("before_update_price = #{beforeUpdatePrice,jdbcType=DECIMAL}"); + } + + if (record.getShopId() != null) { + sql.SET("shop_id = #{shopId,jdbcType=INTEGER}"); + } + + if (record.getDiscount() != null) { + sql.SET("discount = #{discount,jdbcType=DECIMAL}"); + } + + if (record.getUserCouponId() != null) { + sql.SET("user_coupon_id = #{userCouponId,jdbcType=INTEGER}"); + } + + if (record.getGiveIntegral() != null) { + sql.SET("give_integral = #{giveIntegral,jdbcType=SMALLINT}"); + } + + if (record.getParentId2() != null) { + sql.SET("parent_id_2 = #{parentId2,jdbcType=INTEGER}"); + } + + if (record.getParentId3() != null) { + sql.SET("parent_id_3 = #{parentId3,jdbcType=INTEGER}"); + } + + if (record.getIsSale() != null) { + sql.SET("is_sale = #{isSale,jdbcType=INTEGER}"); + } + + if (record.getVersion() != null) { + sql.SET("version = #{version,jdbcType=VARCHAR}"); + } + + if (record.getExpressPrice2() != null) { + sql.SET("express_price_2 = #{expressPrice2,jdbcType=DECIMAL}"); + } + + if (record.getIsRecycle() != null) { + sql.SET("is_recycle = #{isRecycle,jdbcType=SMALLINT}"); + } + + if (record.getRebate() != null) { + sql.SET("rebate = #{rebate,jdbcType=DECIMAL}"); + } + + if (record.getBeforeUpdateExpress() != null) { + sql.SET("before_update_express = #{beforeUpdateExpress,jdbcType=DECIMAL}"); + } + + if (record.getMchId() != null) { + sql.SET("mch_id = #{mchId,jdbcType=INTEGER}"); + } + + if (record.getOrderUnionId() != null) { + sql.SET("order_union_id = #{orderUnionId,jdbcType=INTEGER}"); + } + + if (record.getIsTransfer() != null) { + sql.SET("is_transfer = #{isTransfer,jdbcType=SMALLINT}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + + if (record.getSharePrice() != null) { + sql.SET("share_price = #{sharePrice,jdbcType=DECIMAL}"); + } + + if (record.getIsShow() != null) { + sql.SET("is_show = #{isShow,jdbcType=SMALLINT}"); + } + + if (record.getCurrency() != null) { + sql.SET("currency = #{currency,jdbcType=DECIMAL}"); + } + + if (record.getOrderOrigin() != null) { + sql.SET("order_origin = #{orderOrigin,jdbcType=BIT}"); + } + + if (record.getDeliveryId() != null) { + sql.SET("delivery_id = #{deliveryId,jdbcType=INTEGER}"); + } + + if (record.getDeliveryStatus() != null) { + sql.SET("delivery_status = #{deliveryStatus,jdbcType=BIT}"); + } + + if (record.getFyStatus() != null) { + sql.SET("fy_status = #{fyStatus,jdbcType=BIT}"); + } + + if (record.getFyjine() != null) { + sql.SET("fyjine = #{fyjine,jdbcType=DECIMAL}"); + } + + if (record.getFysingle() != null) { + sql.SET("fysingle = #{fysingle,jdbcType=DECIMAL}"); + } + + if (record.getMchFyjine() != null) { + sql.SET("mch_fyjine = #{mchFyjine,jdbcType=DECIMAL}"); + } + + if (record.getMchFysingle() != null) { + sql.SET("mch_fysingle = #{mchFysingle,jdbcType=DECIMAL}"); + } + + if (record.getIsFan() != null) { + sql.SET("is_fan = #{isFan,jdbcType=BIT}"); + } + + if (record.getIsDada() != null) { + sql.SET("is_dada = #{isDada,jdbcType=BIT}"); + } + + if (record.getShopPeisong() != null) { + sql.SET("shop_peisong = #{shopPeisong,jdbcType=INTEGER}"); + } + + if (record.getIsOpenOffline() != null) { + sql.SET("is_open_offline = #{isOpenOffline,jdbcType=BIT}"); + } + + if (record.getSupplierId() != null) { + sql.SET("supplier_id = #{supplierId,jdbcType=INTEGER}"); + } + + if (record.getIsSupTransfer() != null) { + sql.SET("is_sup_transfer = #{isSupTransfer,jdbcType=BIT}"); + } + + if (record.getDabaoPrice() != null) { + sql.SET("dabao_price = #{dabaoPrice,jdbcType=DECIMAL}"); + } + + if (record.getSettlementAmount() != null) { + sql.SET("settlement_amount = #{settlementAmount,jdbcType=DECIMAL}"); + } + + if (record.getIsSettlement() != null) { + sql.SET("is_settlement = #{isSettlement,jdbcType=SMALLINT}"); + } + + if (record.getSettlementTime() != null) { + sql.SET("settlement_time = #{settlementTime,jdbcType=INTEGER}"); + } + + if (record.getIsMchShop() != null) { + sql.SET("is_mch_shop = #{isMchShop,jdbcType=BIT}"); + } + + if (record.getIsDivideMoney() != null) { + sql.SET("is_divide_money = #{isDivideMoney,jdbcType=BIT}"); + } + + if (record.getTransactionId() != null) { + sql.SET("transaction_id = #{transactionId,jdbcType=VARCHAR}"); + } + + if (record.getPayUserId() != null) { + sql.SET("pay_user_id = #{payUserId,jdbcType=INTEGER}"); + } + + if (record.getPayTypeTrue() != null) { + sql.SET("pay_type_true = #{payTypeTrue,jdbcType=BIT}"); + } + + if (record.getIsVgoods() != null) { + sql.SET("is_vgoods = #{isVgoods,jdbcType=INTEGER}"); + } + + if (record.getReductionPrice() != null) { + sql.SET("reduction_price = #{reductionPrice,jdbcType=DECIMAL}"); + } + + if (record.getMinusPrice() != null) { + sql.SET("minus_price = #{minusPrice,jdbcType=DECIMAL}"); + } + + if (record.getOrderFrom() != null) { + sql.SET("order_from = #{orderFrom,jdbcType=INTEGER}"); + } + + if (record.getDiscountPrice() != null) { + sql.SET("discount_price = #{discountPrice,jdbcType=DECIMAL}"); + } + + if (record.getDiscountNum() != null) { + sql.SET("discount_num = #{discountNum,jdbcType=DECIMAL}"); + } + + if (record.getGiveGoodsId() != null) { + sql.SET("give_goods_id = #{giveGoodsId,jdbcType=INTEGER}"); + } + + if (record.getCouponRecordId() != null) { + sql.SET("coupon_record_id = #{couponRecordId,jdbcType=VARCHAR}"); + } + + if (record.getIdCardNo() != null) { + sql.SET("id_card_no = #{idCardNo,jdbcType=VARCHAR}"); + } + + if (record.getRefundTime() != null) { + sql.SET("refund_time = #{refundTime,jdbcType=INTEGER}"); + } + + if (record.getContent() != null) { + sql.SET("content = #{content,jdbcType=LONGVARCHAR}"); + } + + if (record.getAddressData() != null) { + sql.SET("address_data = #{addressData,jdbcType=LONGVARCHAR}"); + } + + if (record.getOfflineQrcode() != null) { + sql.SET("offline_qrcode = #{offlineQrcode,jdbcType=LONGVARCHAR}"); + } + + if (record.getIntegral() != null) { + sql.SET("integral = #{integral,jdbcType=LONGVARCHAR}"); + } + + if (record.getWords() != null) { + sql.SET("words = #{words,jdbcType=LONGVARCHAR}"); + } + + if (record.getSellerComments() != null) { + sql.SET("seller_comments = #{sellerComments,jdbcType=LONGVARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=INTEGER}"); + + return sql.toString(); + } + protected void applyWhere(SQL sql, CyymallOrderExample example, boolean includeExamplePhrase) { if (example == null) { return; diff --git a/service/src/main/java/com/hfkj/dao/CyymallUserMapper.java b/service/src/main/java/com/hfkj/dao/CyymallUserMapper.java index 483cfad..380072f 100644 --- a/service/src/main/java/com/hfkj/dao/CyymallUserMapper.java +++ b/service/src/main/java/com/hfkj/dao/CyymallUserMapper.java @@ -3,6 +3,7 @@ package com.hfkj.dao; import com.hfkj.entity.CyymallUser; import com.hfkj.entity.CyymallUserExample; import java.util.List; +import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.DeleteProvider; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.InsertProvider; @@ -10,7 +11,9 @@ import org.apache.ibatis.annotations.Options; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.UpdateProvider; import org.apache.ibatis.type.JdbcType; import org.springframework.stereotype.Repository; @@ -29,6 +32,12 @@ public interface CyymallUserMapper extends CyymallUserMapperExt { @DeleteProvider(type=CyymallUserSqlProvider.class, method="deleteByExample") int deleteByExample(CyymallUserExample example); + @Delete({ + "delete from cyymall_user", + "where id = #{id,jdbcType=INTEGER}" + }) + int deleteByPrimaryKey(Integer id); + @Insert({ "insert into cyymall_user (`type`, username, ", "`password`, auth_key, ", @@ -100,7 +109,7 @@ public interface CyymallUserMapper extends CyymallUserMapperExt { @SelectProvider(type=CyymallUserSqlProvider.class, method="selectByExample") @Results({ - @Result(column="id", property="id", jdbcType=JdbcType.INTEGER), + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="type", property="type", jdbcType=JdbcType.SMALLINT), @Result(column="username", property="username", jdbcType=JdbcType.VARCHAR), @Result(column="password", property="password", jdbcType=JdbcType.VARCHAR), @@ -165,9 +174,159 @@ public interface CyymallUserMapper extends CyymallUserMapperExt { }) List selectByExample(CyymallUserExample example); + @Select({ + "select", + "id, `type`, username, `password`, auth_key, access_token, addtime, is_delete, ", + "wechat_open_id, wechat_union_id, nickname, avatar_url, store_id, is_distributor, ", + "parent_id, `time`, total_price, price, is_clerk, we7_uid, shop_id, `level`, ", + "integral, total_integral, money, contact_way, comments, binding, wechat_platform_open_id, ", + "platform, blacklist, parent_user_id, appcid, is_admin, tuan_price, is_delivery, ", + "mch_id, real_name, real_code, real_just_pic, real_back_pic, is_real, live_price, ", + "fyjine, yifan, delivery_office, subsidy_price, delivery_mch_id, clerk_mch_id, ", + "is_group_centre, sex, birth_date, is_vgoods, share_cat_id, user_label, gh_card_no, ", + "gh_card_pwd, channel_phone, channel_sign, email, apply_time, apply_status", + "from cyymall_user", + "where id = #{id,jdbcType=INTEGER}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="type", property="type", jdbcType=JdbcType.SMALLINT), + @Result(column="username", property="username", jdbcType=JdbcType.VARCHAR), + @Result(column="password", property="password", jdbcType=JdbcType.VARCHAR), + @Result(column="auth_key", property="authKey", jdbcType=JdbcType.VARCHAR), + @Result(column="access_token", property="accessToken", jdbcType=JdbcType.VARCHAR), + @Result(column="addtime", property="addtime", jdbcType=JdbcType.INTEGER), + @Result(column="is_delete", property="isDelete", jdbcType=JdbcType.SMALLINT), + @Result(column="wechat_open_id", property="wechatOpenId", jdbcType=JdbcType.VARCHAR), + @Result(column="wechat_union_id", property="wechatUnionId", jdbcType=JdbcType.VARCHAR), + @Result(column="nickname", property="nickname", jdbcType=JdbcType.VARCHAR), + @Result(column="avatar_url", property="avatarUrl", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.INTEGER), + @Result(column="is_distributor", property="isDistributor", jdbcType=JdbcType.INTEGER), + @Result(column="parent_id", property="parentId", jdbcType=JdbcType.INTEGER), + @Result(column="time", property="time", jdbcType=JdbcType.INTEGER), + @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), + @Result(column="is_clerk", property="isClerk", jdbcType=JdbcType.INTEGER), + @Result(column="we7_uid", property="we7Uid", jdbcType=JdbcType.INTEGER), + @Result(column="shop_id", property="shopId", jdbcType=JdbcType.INTEGER), + @Result(column="level", property="level", jdbcType=JdbcType.INTEGER), + @Result(column="integral", property="integral", jdbcType=JdbcType.INTEGER), + @Result(column="total_integral", property="totalIntegral", jdbcType=JdbcType.INTEGER), + @Result(column="money", property="money", jdbcType=JdbcType.DECIMAL), + @Result(column="contact_way", property="contactWay", jdbcType=JdbcType.VARCHAR), + @Result(column="comments", property="comments", jdbcType=JdbcType.VARCHAR), + @Result(column="binding", property="binding", jdbcType=JdbcType.CHAR), + @Result(column="wechat_platform_open_id", property="wechatPlatformOpenId", jdbcType=JdbcType.VARCHAR), + @Result(column="platform", property="platform", jdbcType=JdbcType.TINYINT), + @Result(column="blacklist", property="blacklist", jdbcType=JdbcType.BIT), + @Result(column="parent_user_id", property="parentUserId", jdbcType=JdbcType.INTEGER), + @Result(column="appcid", property="appcid", jdbcType=JdbcType.VARCHAR), + @Result(column="is_admin", property="isAdmin", jdbcType=JdbcType.BIT), + @Result(column="tuan_price", property="tuanPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="is_delivery", property="isDelivery", jdbcType=JdbcType.BIT), + @Result(column="mch_id", property="mchId", jdbcType=JdbcType.INTEGER), + @Result(column="real_name", property="realName", jdbcType=JdbcType.VARCHAR), + @Result(column="real_code", property="realCode", jdbcType=JdbcType.VARCHAR), + @Result(column="real_just_pic", property="realJustPic", jdbcType=JdbcType.VARCHAR), + @Result(column="real_back_pic", property="realBackPic", jdbcType=JdbcType.VARCHAR), + @Result(column="is_real", property="isReal", jdbcType=JdbcType.BIT), + @Result(column="live_price", property="livePrice", jdbcType=JdbcType.DECIMAL), + @Result(column="fyjine", property="fyjine", jdbcType=JdbcType.VARCHAR), + @Result(column="yifan", property="yifan", jdbcType=JdbcType.VARCHAR), + @Result(column="delivery_office", property="deliveryOffice", jdbcType=JdbcType.BIT), + @Result(column="subsidy_price", property="subsidyPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="delivery_mch_id", property="deliveryMchId", jdbcType=JdbcType.INTEGER), + @Result(column="clerk_mch_id", property="clerkMchId", jdbcType=JdbcType.INTEGER), + @Result(column="is_group_centre", property="isGroupCentre", jdbcType=JdbcType.INTEGER), + @Result(column="sex", property="sex", jdbcType=JdbcType.INTEGER), + @Result(column="birth_date", property="birthDate", jdbcType=JdbcType.VARCHAR), + @Result(column="is_vgoods", property="isVgoods", jdbcType=JdbcType.INTEGER), + @Result(column="share_cat_id", property="shareCatId", jdbcType=JdbcType.INTEGER), + @Result(column="user_label", property="userLabel", jdbcType=JdbcType.INTEGER), + @Result(column="gh_card_no", property="ghCardNo", jdbcType=JdbcType.VARCHAR), + @Result(column="gh_card_pwd", property="ghCardPwd", jdbcType=JdbcType.INTEGER), + @Result(column="channel_phone", property="channelPhone", jdbcType=JdbcType.CHAR), + @Result(column="channel_sign", property="channelSign", jdbcType=JdbcType.VARCHAR), + @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR), + @Result(column="apply_time", property="applyTime", jdbcType=JdbcType.INTEGER), + @Result(column="apply_status", property="applyStatus", jdbcType=JdbcType.SMALLINT) + }) + CyymallUser selectByPrimaryKey(Integer id); + @UpdateProvider(type=CyymallUserSqlProvider.class, method="updateByExampleSelective") int updateByExampleSelective(@Param("record") CyymallUser record, @Param("example") CyymallUserExample example); @UpdateProvider(type=CyymallUserSqlProvider.class, method="updateByExample") int updateByExample(@Param("record") CyymallUser record, @Param("example") CyymallUserExample example); + + @UpdateProvider(type=CyymallUserSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(CyymallUser record); + + @Update({ + "update cyymall_user", + "set `type` = #{type,jdbcType=SMALLINT},", + "username = #{username,jdbcType=VARCHAR},", + "`password` = #{password,jdbcType=VARCHAR},", + "auth_key = #{authKey,jdbcType=VARCHAR},", + "access_token = #{accessToken,jdbcType=VARCHAR},", + "addtime = #{addtime,jdbcType=INTEGER},", + "is_delete = #{isDelete,jdbcType=SMALLINT},", + "wechat_open_id = #{wechatOpenId,jdbcType=VARCHAR},", + "wechat_union_id = #{wechatUnionId,jdbcType=VARCHAR},", + "nickname = #{nickname,jdbcType=VARCHAR},", + "avatar_url = #{avatarUrl,jdbcType=VARCHAR},", + "store_id = #{storeId,jdbcType=INTEGER},", + "is_distributor = #{isDistributor,jdbcType=INTEGER},", + "parent_id = #{parentId,jdbcType=INTEGER},", + "`time` = #{time,jdbcType=INTEGER},", + "total_price = #{totalPrice,jdbcType=DECIMAL},", + "price = #{price,jdbcType=DECIMAL},", + "is_clerk = #{isClerk,jdbcType=INTEGER},", + "we7_uid = #{we7Uid,jdbcType=INTEGER},", + "shop_id = #{shopId,jdbcType=INTEGER},", + "`level` = #{level,jdbcType=INTEGER},", + "integral = #{integral,jdbcType=INTEGER},", + "total_integral = #{totalIntegral,jdbcType=INTEGER},", + "money = #{money,jdbcType=DECIMAL},", + "contact_way = #{contactWay,jdbcType=VARCHAR},", + "comments = #{comments,jdbcType=VARCHAR},", + "binding = #{binding,jdbcType=CHAR},", + "wechat_platform_open_id = #{wechatPlatformOpenId,jdbcType=VARCHAR},", + "platform = #{platform,jdbcType=TINYINT},", + "blacklist = #{blacklist,jdbcType=BIT},", + "parent_user_id = #{parentUserId,jdbcType=INTEGER},", + "appcid = #{appcid,jdbcType=VARCHAR},", + "is_admin = #{isAdmin,jdbcType=BIT},", + "tuan_price = #{tuanPrice,jdbcType=DECIMAL},", + "is_delivery = #{isDelivery,jdbcType=BIT},", + "mch_id = #{mchId,jdbcType=INTEGER},", + "real_name = #{realName,jdbcType=VARCHAR},", + "real_code = #{realCode,jdbcType=VARCHAR},", + "real_just_pic = #{realJustPic,jdbcType=VARCHAR},", + "real_back_pic = #{realBackPic,jdbcType=VARCHAR},", + "is_real = #{isReal,jdbcType=BIT},", + "live_price = #{livePrice,jdbcType=DECIMAL},", + "fyjine = #{fyjine,jdbcType=VARCHAR},", + "yifan = #{yifan,jdbcType=VARCHAR},", + "delivery_office = #{deliveryOffice,jdbcType=BIT},", + "subsidy_price = #{subsidyPrice,jdbcType=DECIMAL},", + "delivery_mch_id = #{deliveryMchId,jdbcType=INTEGER},", + "clerk_mch_id = #{clerkMchId,jdbcType=INTEGER},", + "is_group_centre = #{isGroupCentre,jdbcType=INTEGER},", + "sex = #{sex,jdbcType=INTEGER},", + "birth_date = #{birthDate,jdbcType=VARCHAR},", + "is_vgoods = #{isVgoods,jdbcType=INTEGER},", + "share_cat_id = #{shareCatId,jdbcType=INTEGER},", + "user_label = #{userLabel,jdbcType=INTEGER},", + "gh_card_no = #{ghCardNo,jdbcType=VARCHAR},", + "gh_card_pwd = #{ghCardPwd,jdbcType=INTEGER},", + "channel_phone = #{channelPhone,jdbcType=CHAR},", + "channel_sign = #{channelSign,jdbcType=VARCHAR},", + "email = #{email,jdbcType=VARCHAR},", + "apply_time = #{applyTime,jdbcType=INTEGER},", + "apply_status = #{applyStatus,jdbcType=SMALLINT}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKey(CyymallUser record); } \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CyymallUserSqlProvider.java b/service/src/main/java/com/hfkj/dao/CyymallUserSqlProvider.java index 2e4c893..beda482 100644 --- a/service/src/main/java/com/hfkj/dao/CyymallUserSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/CyymallUserSqlProvider.java @@ -684,6 +684,259 @@ public class CyymallUserSqlProvider { return sql.toString(); } + public String updateByPrimaryKeySelective(CyymallUser record) { + SQL sql = new SQL(); + sql.UPDATE("cyymall_user"); + + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=SMALLINT}"); + } + + if (record.getUsername() != null) { + sql.SET("username = #{username,jdbcType=VARCHAR}"); + } + + if (record.getPassword() != null) { + sql.SET("`password` = #{password,jdbcType=VARCHAR}"); + } + + if (record.getAuthKey() != null) { + sql.SET("auth_key = #{authKey,jdbcType=VARCHAR}"); + } + + if (record.getAccessToken() != null) { + sql.SET("access_token = #{accessToken,jdbcType=VARCHAR}"); + } + + if (record.getAddtime() != null) { + sql.SET("addtime = #{addtime,jdbcType=INTEGER}"); + } + + if (record.getIsDelete() != null) { + sql.SET("is_delete = #{isDelete,jdbcType=SMALLINT}"); + } + + if (record.getWechatOpenId() != null) { + sql.SET("wechat_open_id = #{wechatOpenId,jdbcType=VARCHAR}"); + } + + if (record.getWechatUnionId() != null) { + sql.SET("wechat_union_id = #{wechatUnionId,jdbcType=VARCHAR}"); + } + + if (record.getNickname() != null) { + sql.SET("nickname = #{nickname,jdbcType=VARCHAR}"); + } + + if (record.getAvatarUrl() != null) { + sql.SET("avatar_url = #{avatarUrl,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=INTEGER}"); + } + + if (record.getIsDistributor() != null) { + sql.SET("is_distributor = #{isDistributor,jdbcType=INTEGER}"); + } + + if (record.getParentId() != null) { + sql.SET("parent_id = #{parentId,jdbcType=INTEGER}"); + } + + if (record.getTime() != null) { + sql.SET("`time` = #{time,jdbcType=INTEGER}"); + } + + if (record.getTotalPrice() != null) { + sql.SET("total_price = #{totalPrice,jdbcType=DECIMAL}"); + } + + if (record.getPrice() != null) { + sql.SET("price = #{price,jdbcType=DECIMAL}"); + } + + if (record.getIsClerk() != null) { + sql.SET("is_clerk = #{isClerk,jdbcType=INTEGER}"); + } + + if (record.getWe7Uid() != null) { + sql.SET("we7_uid = #{we7Uid,jdbcType=INTEGER}"); + } + + if (record.getShopId() != null) { + sql.SET("shop_id = #{shopId,jdbcType=INTEGER}"); + } + + if (record.getLevel() != null) { + sql.SET("`level` = #{level,jdbcType=INTEGER}"); + } + + if (record.getIntegral() != null) { + sql.SET("integral = #{integral,jdbcType=INTEGER}"); + } + + if (record.getTotalIntegral() != null) { + sql.SET("total_integral = #{totalIntegral,jdbcType=INTEGER}"); + } + + if (record.getMoney() != null) { + sql.SET("money = #{money,jdbcType=DECIMAL}"); + } + + if (record.getContactWay() != null) { + sql.SET("contact_way = #{contactWay,jdbcType=VARCHAR}"); + } + + if (record.getComments() != null) { + sql.SET("comments = #{comments,jdbcType=VARCHAR}"); + } + + if (record.getBinding() != null) { + sql.SET("binding = #{binding,jdbcType=CHAR}"); + } + + if (record.getWechatPlatformOpenId() != null) { + sql.SET("wechat_platform_open_id = #{wechatPlatformOpenId,jdbcType=VARCHAR}"); + } + + if (record.getPlatform() != null) { + sql.SET("platform = #{platform,jdbcType=TINYINT}"); + } + + if (record.getBlacklist() != null) { + sql.SET("blacklist = #{blacklist,jdbcType=BIT}"); + } + + if (record.getParentUserId() != null) { + sql.SET("parent_user_id = #{parentUserId,jdbcType=INTEGER}"); + } + + if (record.getAppcid() != null) { + sql.SET("appcid = #{appcid,jdbcType=VARCHAR}"); + } + + if (record.getIsAdmin() != null) { + sql.SET("is_admin = #{isAdmin,jdbcType=BIT}"); + } + + if (record.getTuanPrice() != null) { + sql.SET("tuan_price = #{tuanPrice,jdbcType=DECIMAL}"); + } + + if (record.getIsDelivery() != null) { + sql.SET("is_delivery = #{isDelivery,jdbcType=BIT}"); + } + + if (record.getMchId() != null) { + sql.SET("mch_id = #{mchId,jdbcType=INTEGER}"); + } + + if (record.getRealName() != null) { + sql.SET("real_name = #{realName,jdbcType=VARCHAR}"); + } + + if (record.getRealCode() != null) { + sql.SET("real_code = #{realCode,jdbcType=VARCHAR}"); + } + + if (record.getRealJustPic() != null) { + sql.SET("real_just_pic = #{realJustPic,jdbcType=VARCHAR}"); + } + + if (record.getRealBackPic() != null) { + sql.SET("real_back_pic = #{realBackPic,jdbcType=VARCHAR}"); + } + + if (record.getIsReal() != null) { + sql.SET("is_real = #{isReal,jdbcType=BIT}"); + } + + if (record.getLivePrice() != null) { + sql.SET("live_price = #{livePrice,jdbcType=DECIMAL}"); + } + + if (record.getFyjine() != null) { + sql.SET("fyjine = #{fyjine,jdbcType=VARCHAR}"); + } + + if (record.getYifan() != null) { + sql.SET("yifan = #{yifan,jdbcType=VARCHAR}"); + } + + if (record.getDeliveryOffice() != null) { + sql.SET("delivery_office = #{deliveryOffice,jdbcType=BIT}"); + } + + if (record.getSubsidyPrice() != null) { + sql.SET("subsidy_price = #{subsidyPrice,jdbcType=DECIMAL}"); + } + + if (record.getDeliveryMchId() != null) { + sql.SET("delivery_mch_id = #{deliveryMchId,jdbcType=INTEGER}"); + } + + if (record.getClerkMchId() != null) { + sql.SET("clerk_mch_id = #{clerkMchId,jdbcType=INTEGER}"); + } + + if (record.getIsGroupCentre() != null) { + sql.SET("is_group_centre = #{isGroupCentre,jdbcType=INTEGER}"); + } + + if (record.getSex() != null) { + sql.SET("sex = #{sex,jdbcType=INTEGER}"); + } + + if (record.getBirthDate() != null) { + sql.SET("birth_date = #{birthDate,jdbcType=VARCHAR}"); + } + + if (record.getIsVgoods() != null) { + sql.SET("is_vgoods = #{isVgoods,jdbcType=INTEGER}"); + } + + if (record.getShareCatId() != null) { + sql.SET("share_cat_id = #{shareCatId,jdbcType=INTEGER}"); + } + + if (record.getUserLabel() != null) { + sql.SET("user_label = #{userLabel,jdbcType=INTEGER}"); + } + + if (record.getGhCardNo() != null) { + sql.SET("gh_card_no = #{ghCardNo,jdbcType=VARCHAR}"); + } + + if (record.getGhCardPwd() != null) { + sql.SET("gh_card_pwd = #{ghCardPwd,jdbcType=INTEGER}"); + } + + if (record.getChannelPhone() != null) { + sql.SET("channel_phone = #{channelPhone,jdbcType=CHAR}"); + } + + if (record.getChannelSign() != null) { + sql.SET("channel_sign = #{channelSign,jdbcType=VARCHAR}"); + } + + if (record.getEmail() != null) { + sql.SET("email = #{email,jdbcType=VARCHAR}"); + } + + if (record.getApplyTime() != null) { + sql.SET("apply_time = #{applyTime,jdbcType=INTEGER}"); + } + + if (record.getApplyStatus() != null) { + sql.SET("apply_status = #{applyStatus,jdbcType=SMALLINT}"); + } + + sql.WHERE("id = #{id,jdbcType=INTEGER}"); + + return sql.toString(); + } + protected void applyWhere(SQL sql, CyymallUserExample example, boolean includeExamplePhrase) { if (example == null) { return;