parent
91d3f254aa
commit
940ac2fa6c
@ -0,0 +1,279 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.BsTradeOrder; |
||||
import com.hai.entity.BsTradeOrderExample; |
||||
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; |
||||
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; |
||||
|
||||
/** |
||||
* |
||||
* 代码由工具生成,请勿修改!!! |
||||
* 如果需要扩展请在其父类进行扩展 |
||||
* |
||||
**/ |
||||
@Repository |
||||
public interface BsTradeOrderMapper extends BsTradeOrderMapperExt { |
||||
@SelectProvider(type=BsTradeOrderSqlProvider.class, method="countByExample") |
||||
long countByExample(BsTradeOrderExample example); |
||||
|
||||
@DeleteProvider(type=BsTradeOrderSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(BsTradeOrderExample example); |
||||
|
||||
@Delete({ |
||||
"delete from bs_trade_order", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into bs_trade_order (company_id, agent_id, ", |
||||
"salesman_id, salesman_name, ", |
||||
"mer_id, mer_name, mer_no, ", |
||||
"store_id, store_name, ", |
||||
"device_id, device_sn, ", |
||||
"qr_code_id, qr_code_sn, ", |
||||
"platform_type, platform_mer_no, ", |
||||
"platform_trade_no, platform_log_no, ", |
||||
"pay_user_id, pay_mode, ", |
||||
"out_trade_no, trade_amount, ", |
||||
"store_discount_satisfy, store_discount_id, ", |
||||
"store_discount_name, store_discount_type, ", |
||||
"store_discount_price, store_discount_actual_price, ", |
||||
"user_id, user_phone, ", |
||||
"user_discount_id, user_discount_name, ", |
||||
"user_discount_type, user_discount_price, ", |
||||
"user_discount_actual_price, trade_actual_amount, ", |
||||
"acc_trade_no, acc_mdiscount_amount, ", |
||||
"acc_discount_amount, acc_payment_code, ", |
||||
"card_type, `status`, ", |
||||
"pay_time, create_time, ", |
||||
"cancel_time, update_time, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{companyId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ", |
||||
"#{salesmanId,jdbcType=BIGINT}, #{salesmanName,jdbcType=VARCHAR}, ", |
||||
"#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{merNo,jdbcType=VARCHAR}, ", |
||||
"#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ", |
||||
"#{deviceId,jdbcType=BIGINT}, #{deviceSn,jdbcType=VARCHAR}, ", |
||||
"#{qrCodeId,jdbcType=BIGINT}, #{qrCodeSn,jdbcType=VARCHAR}, ", |
||||
"#{platformType,jdbcType=INTEGER}, #{platformMerNo,jdbcType=VARCHAR}, ", |
||||
"#{platformTradeNo,jdbcType=VARCHAR}, #{platformLogNo,jdbcType=VARCHAR}, ", |
||||
"#{payUserId,jdbcType=VARCHAR}, #{payMode,jdbcType=VARCHAR}, ", |
||||
"#{outTradeNo,jdbcType=VARCHAR}, #{tradeAmount,jdbcType=DECIMAL}, ", |
||||
"#{storeDiscountSatisfy,jdbcType=INTEGER}, #{storeDiscountId,jdbcType=BIGINT}, ", |
||||
"#{storeDiscountName,jdbcType=VARCHAR}, #{storeDiscountType,jdbcType=INTEGER}, ", |
||||
"#{storeDiscountPrice,jdbcType=DECIMAL}, #{storeDiscountActualPrice,jdbcType=DECIMAL}, ", |
||||
"#{userId,jdbcType=INTEGER}, #{userPhone,jdbcType=VARCHAR}, ", |
||||
"#{userDiscountId,jdbcType=BIGINT}, #{userDiscountName,jdbcType=VARCHAR}, ", |
||||
"#{userDiscountType,jdbcType=INTEGER}, #{userDiscountPrice,jdbcType=DECIMAL}, ", |
||||
"#{userDiscountActualPrice,jdbcType=DECIMAL}, #{tradeActualAmount,jdbcType=DECIMAL}, ", |
||||
"#{accTradeNo,jdbcType=VARCHAR}, #{accMdiscountAmount,jdbcType=DECIMAL}, ", |
||||
"#{accDiscountAmount,jdbcType=DECIMAL}, #{accPaymentCode,jdbcType=VARCHAR}, ", |
||||
"#{cardType,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
||||
"#{payTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{cancelTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(BsTradeOrder record); |
||||
|
||||
@InsertProvider(type=BsTradeOrderSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(BsTradeOrder record); |
||||
|
||||
@SelectProvider(type=BsTradeOrderSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="salesman_id", property="salesmanId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="device_id", property="deviceId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="device_sn", property="deviceSn", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="qr_code_id", property="qrCodeId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="qr_code_sn", property="qrCodeSn", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="platform_log_no", property="platformLogNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="pay_user_id", property="payUserId", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="pay_mode", property="payMode", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="trade_amount", property="tradeAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="store_discount_satisfy", property="storeDiscountSatisfy", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="store_discount_id", property="storeDiscountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="store_discount_name", property="storeDiscountName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="store_discount_type", property="storeDiscountType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="store_discount_price", property="storeDiscountPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="store_discount_actual_price", property="storeDiscountActualPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="user_discount_id", property="userDiscountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="user_discount_name", property="userDiscountName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="user_discount_type", property="userDiscountType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="user_discount_price", property="userDiscountPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="user_discount_actual_price", property="userDiscountActualPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="trade_actual_amount", property="tradeActualAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="acc_trade_no", property="accTradeNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="acc_mdiscount_amount", property="accMdiscountAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="acc_discount_amount", property="accDiscountAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="acc_payment_code", property="accPaymentCode", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="card_type", property="cardType", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
List<BsTradeOrder> selectByExample(BsTradeOrderExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, company_id, agent_id, salesman_id, salesman_name, mer_id, mer_name, mer_no, ", |
||||
"store_id, store_name, device_id, device_sn, qr_code_id, qr_code_sn, platform_type, ", |
||||
"platform_mer_no, platform_trade_no, platform_log_no, pay_user_id, pay_mode, ", |
||||
"out_trade_no, trade_amount, store_discount_satisfy, store_discount_id, store_discount_name, ", |
||||
"store_discount_type, store_discount_price, store_discount_actual_price, user_id, ", |
||||
"user_phone, user_discount_id, user_discount_name, user_discount_type, user_discount_price, ", |
||||
"user_discount_actual_price, trade_actual_amount, acc_trade_no, acc_mdiscount_amount, ", |
||||
"acc_discount_amount, acc_payment_code, card_type, `status`, pay_time, create_time, ", |
||||
"cancel_time, update_time, ext_1, ext_2, ext_3", |
||||
"from bs_trade_order", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="salesman_id", property="salesmanId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="device_id", property="deviceId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="device_sn", property="deviceSn", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="qr_code_id", property="qrCodeId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="qr_code_sn", property="qrCodeSn", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="platform_log_no", property="platformLogNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="pay_user_id", property="payUserId", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="pay_mode", property="payMode", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="trade_amount", property="tradeAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="store_discount_satisfy", property="storeDiscountSatisfy", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="store_discount_id", property="storeDiscountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="store_discount_name", property="storeDiscountName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="store_discount_type", property="storeDiscountType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="store_discount_price", property="storeDiscountPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="store_discount_actual_price", property="storeDiscountActualPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="user_discount_id", property="userDiscountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="user_discount_name", property="userDiscountName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="user_discount_type", property="userDiscountType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="user_discount_price", property="userDiscountPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="user_discount_actual_price", property="userDiscountActualPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="trade_actual_amount", property="tradeActualAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="acc_trade_no", property="accTradeNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="acc_mdiscount_amount", property="accMdiscountAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="acc_discount_amount", property="accDiscountAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="acc_payment_code", property="accPaymentCode", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="card_type", property="cardType", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
BsTradeOrder selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=BsTradeOrderSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") BsTradeOrder record, @Param("example") BsTradeOrderExample example); |
||||
|
||||
@UpdateProvider(type=BsTradeOrderSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") BsTradeOrder record, @Param("example") BsTradeOrderExample example); |
||||
|
||||
@UpdateProvider(type=BsTradeOrderSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(BsTradeOrder record); |
||||
|
||||
@Update({ |
||||
"update bs_trade_order", |
||||
"set company_id = #{companyId,jdbcType=BIGINT},", |
||||
"agent_id = #{agentId,jdbcType=BIGINT},", |
||||
"salesman_id = #{salesmanId,jdbcType=BIGINT},", |
||||
"salesman_name = #{salesmanName,jdbcType=VARCHAR},", |
||||
"mer_id = #{merId,jdbcType=BIGINT},", |
||||
"mer_name = #{merName,jdbcType=VARCHAR},", |
||||
"mer_no = #{merNo,jdbcType=VARCHAR},", |
||||
"store_id = #{storeId,jdbcType=BIGINT},", |
||||
"store_name = #{storeName,jdbcType=VARCHAR},", |
||||
"device_id = #{deviceId,jdbcType=BIGINT},", |
||||
"device_sn = #{deviceSn,jdbcType=VARCHAR},", |
||||
"qr_code_id = #{qrCodeId,jdbcType=BIGINT},", |
||||
"qr_code_sn = #{qrCodeSn,jdbcType=VARCHAR},", |
||||
"platform_type = #{platformType,jdbcType=INTEGER},", |
||||
"platform_mer_no = #{platformMerNo,jdbcType=VARCHAR},", |
||||
"platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR},", |
||||
"platform_log_no = #{platformLogNo,jdbcType=VARCHAR},", |
||||
"pay_user_id = #{payUserId,jdbcType=VARCHAR},", |
||||
"pay_mode = #{payMode,jdbcType=VARCHAR},", |
||||
"out_trade_no = #{outTradeNo,jdbcType=VARCHAR},", |
||||
"trade_amount = #{tradeAmount,jdbcType=DECIMAL},", |
||||
"store_discount_satisfy = #{storeDiscountSatisfy,jdbcType=INTEGER},", |
||||
"store_discount_id = #{storeDiscountId,jdbcType=BIGINT},", |
||||
"store_discount_name = #{storeDiscountName,jdbcType=VARCHAR},", |
||||
"store_discount_type = #{storeDiscountType,jdbcType=INTEGER},", |
||||
"store_discount_price = #{storeDiscountPrice,jdbcType=DECIMAL},", |
||||
"store_discount_actual_price = #{storeDiscountActualPrice,jdbcType=DECIMAL},", |
||||
"user_id = #{userId,jdbcType=INTEGER},", |
||||
"user_phone = #{userPhone,jdbcType=VARCHAR},", |
||||
"user_discount_id = #{userDiscountId,jdbcType=BIGINT},", |
||||
"user_discount_name = #{userDiscountName,jdbcType=VARCHAR},", |
||||
"user_discount_type = #{userDiscountType,jdbcType=INTEGER},", |
||||
"user_discount_price = #{userDiscountPrice,jdbcType=DECIMAL},", |
||||
"user_discount_actual_price = #{userDiscountActualPrice,jdbcType=DECIMAL},", |
||||
"trade_actual_amount = #{tradeActualAmount,jdbcType=DECIMAL},", |
||||
"acc_trade_no = #{accTradeNo,jdbcType=VARCHAR},", |
||||
"acc_mdiscount_amount = #{accMdiscountAmount,jdbcType=DECIMAL},", |
||||
"acc_discount_amount = #{accDiscountAmount,jdbcType=DECIMAL},", |
||||
"acc_payment_code = #{accPaymentCode,jdbcType=VARCHAR},", |
||||
"card_type = #{cardType,jdbcType=VARCHAR},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"pay_time = #{payTime,jdbcType=TIMESTAMP},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"cancel_time = #{cancelTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(BsTradeOrder record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface BsTradeOrderMapperExt { |
||||
} |
@ -0,0 +1,850 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.BsTradeOrder; |
||||
import com.hai.entity.BsTradeOrderExample.Criteria; |
||||
import com.hai.entity.BsTradeOrderExample.Criterion; |
||||
import com.hai.entity.BsTradeOrderExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class BsTradeOrderSqlProvider { |
||||
|
||||
public String countByExample(BsTradeOrderExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("bs_trade_order"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(BsTradeOrderExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("bs_trade_order"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(BsTradeOrder record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("bs_trade_order"); |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getAgentId() != null) { |
||||
sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSalesmanId() != null) { |
||||
sql.VALUES("salesman_id", "#{salesmanId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSalesmanName() != null) { |
||||
sql.VALUES("salesman_name", "#{salesmanName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getMerId() != null) { |
||||
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerName() != null) { |
||||
sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getMerNo() != null) { |
||||
sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStoreId() != null) { |
||||
sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStoreName() != null) { |
||||
sql.VALUES("store_name", "#{storeName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDeviceId() != null) { |
||||
sql.VALUES("device_id", "#{deviceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getDeviceSn() != null) { |
||||
sql.VALUES("device_sn", "#{deviceSn,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getQrCodeId() != null) { |
||||
sql.VALUES("qr_code_id", "#{qrCodeId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getQrCodeSn() != null) { |
||||
sql.VALUES("qr_code_sn", "#{qrCodeSn,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformType() != null) { |
||||
sql.VALUES("platform_type", "#{platformType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPlatformMerNo() != null) { |
||||
sql.VALUES("platform_mer_no", "#{platformMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformTradeNo() != null) { |
||||
sql.VALUES("platform_trade_no", "#{platformTradeNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformLogNo() != null) { |
||||
sql.VALUES("platform_log_no", "#{platformLogNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayUserId() != null) { |
||||
sql.VALUES("pay_user_id", "#{payUserId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayMode() != null) { |
||||
sql.VALUES("pay_mode", "#{payMode,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getOutTradeNo() != null) { |
||||
sql.VALUES("out_trade_no", "#{outTradeNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTradeAmount() != null) { |
||||
sql.VALUES("trade_amount", "#{tradeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountSatisfy() != null) { |
||||
sql.VALUES("store_discount_satisfy", "#{storeDiscountSatisfy,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountId() != null) { |
||||
sql.VALUES("store_discount_id", "#{storeDiscountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountName() != null) { |
||||
sql.VALUES("store_discount_name", "#{storeDiscountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountType() != null) { |
||||
sql.VALUES("store_discount_type", "#{storeDiscountType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountPrice() != null) { |
||||
sql.VALUES("store_discount_price", "#{storeDiscountPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountActualPrice() != null) { |
||||
sql.VALUES("store_discount_actual_price", "#{storeDiscountActualPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.VALUES("user_id", "#{userId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserPhone() != null) { |
||||
sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountId() != null) { |
||||
sql.VALUES("user_discount_id", "#{userDiscountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountName() != null) { |
||||
sql.VALUES("user_discount_name", "#{userDiscountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountType() != null) { |
||||
sql.VALUES("user_discount_type", "#{userDiscountType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountPrice() != null) { |
||||
sql.VALUES("user_discount_price", "#{userDiscountPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountActualPrice() != null) { |
||||
sql.VALUES("user_discount_actual_price", "#{userDiscountActualPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getTradeActualAmount() != null) { |
||||
sql.VALUES("trade_actual_amount", "#{tradeActualAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAccTradeNo() != null) { |
||||
sql.VALUES("acc_trade_no", "#{accTradeNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getAccMdiscountAmount() != null) { |
||||
sql.VALUES("acc_mdiscount_amount", "#{accMdiscountAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAccDiscountAmount() != null) { |
||||
sql.VALUES("acc_discount_amount", "#{accDiscountAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAccPaymentCode() != null) { |
||||
sql.VALUES("acc_payment_code", "#{accPaymentCode,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCardType() != null) { |
||||
sql.VALUES("card_type", "#{cardType,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPayTime() != null) { |
||||
sql.VALUES("pay_time", "#{payTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCancelTime() != null) { |
||||
sql.VALUES("cancel_time", "#{cancelTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(BsTradeOrderExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("company_id"); |
||||
sql.SELECT("agent_id"); |
||||
sql.SELECT("salesman_id"); |
||||
sql.SELECT("salesman_name"); |
||||
sql.SELECT("mer_id"); |
||||
sql.SELECT("mer_name"); |
||||
sql.SELECT("mer_no"); |
||||
sql.SELECT("store_id"); |
||||
sql.SELECT("store_name"); |
||||
sql.SELECT("device_id"); |
||||
sql.SELECT("device_sn"); |
||||
sql.SELECT("qr_code_id"); |
||||
sql.SELECT("qr_code_sn"); |
||||
sql.SELECT("platform_type"); |
||||
sql.SELECT("platform_mer_no"); |
||||
sql.SELECT("platform_trade_no"); |
||||
sql.SELECT("platform_log_no"); |
||||
sql.SELECT("pay_user_id"); |
||||
sql.SELECT("pay_mode"); |
||||
sql.SELECT("out_trade_no"); |
||||
sql.SELECT("trade_amount"); |
||||
sql.SELECT("store_discount_satisfy"); |
||||
sql.SELECT("store_discount_id"); |
||||
sql.SELECT("store_discount_name"); |
||||
sql.SELECT("store_discount_type"); |
||||
sql.SELECT("store_discount_price"); |
||||
sql.SELECT("store_discount_actual_price"); |
||||
sql.SELECT("user_id"); |
||||
sql.SELECT("user_phone"); |
||||
sql.SELECT("user_discount_id"); |
||||
sql.SELECT("user_discount_name"); |
||||
sql.SELECT("user_discount_type"); |
||||
sql.SELECT("user_discount_price"); |
||||
sql.SELECT("user_discount_actual_price"); |
||||
sql.SELECT("trade_actual_amount"); |
||||
sql.SELECT("acc_trade_no"); |
||||
sql.SELECT("acc_mdiscount_amount"); |
||||
sql.SELECT("acc_discount_amount"); |
||||
sql.SELECT("acc_payment_code"); |
||||
sql.SELECT("card_type"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("pay_time"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("cancel_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("bs_trade_order"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
BsTradeOrder record = (BsTradeOrder) parameter.get("record"); |
||||
BsTradeOrderExample example = (BsTradeOrderExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_trade_order"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getAgentId() != null) { |
||||
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSalesmanId() != null) { |
||||
sql.SET("salesman_id = #{record.salesmanId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSalesmanName() != null) { |
||||
sql.SET("salesman_name = #{record.salesmanName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getMerId() != null) { |
||||
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerName() != null) { |
||||
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getMerNo() != null) { |
||||
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStoreId() != null) { |
||||
sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStoreName() != null) { |
||||
sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDeviceId() != null) { |
||||
sql.SET("device_id = #{record.deviceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getDeviceSn() != null) { |
||||
sql.SET("device_sn = #{record.deviceSn,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getQrCodeId() != null) { |
||||
sql.SET("qr_code_id = #{record.qrCodeId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getQrCodeSn() != null) { |
||||
sql.SET("qr_code_sn = #{record.qrCodeSn,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformType() != null) { |
||||
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPlatformMerNo() != null) { |
||||
sql.SET("platform_mer_no = #{record.platformMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformTradeNo() != null) { |
||||
sql.SET("platform_trade_no = #{record.platformTradeNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformLogNo() != null) { |
||||
sql.SET("platform_log_no = #{record.platformLogNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayUserId() != null) { |
||||
sql.SET("pay_user_id = #{record.payUserId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayMode() != null) { |
||||
sql.SET("pay_mode = #{record.payMode,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getOutTradeNo() != null) { |
||||
sql.SET("out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTradeAmount() != null) { |
||||
sql.SET("trade_amount = #{record.tradeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountSatisfy() != null) { |
||||
sql.SET("store_discount_satisfy = #{record.storeDiscountSatisfy,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountId() != null) { |
||||
sql.SET("store_discount_id = #{record.storeDiscountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountName() != null) { |
||||
sql.SET("store_discount_name = #{record.storeDiscountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountType() != null) { |
||||
sql.SET("store_discount_type = #{record.storeDiscountType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountPrice() != null) { |
||||
sql.SET("store_discount_price = #{record.storeDiscountPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountActualPrice() != null) { |
||||
sql.SET("store_discount_actual_price = #{record.storeDiscountActualPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserPhone() != null) { |
||||
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountId() != null) { |
||||
sql.SET("user_discount_id = #{record.userDiscountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountName() != null) { |
||||
sql.SET("user_discount_name = #{record.userDiscountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountType() != null) { |
||||
sql.SET("user_discount_type = #{record.userDiscountType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountPrice() != null) { |
||||
sql.SET("user_discount_price = #{record.userDiscountPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountActualPrice() != null) { |
||||
sql.SET("user_discount_actual_price = #{record.userDiscountActualPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getTradeActualAmount() != null) { |
||||
sql.SET("trade_actual_amount = #{record.tradeActualAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAccTradeNo() != null) { |
||||
sql.SET("acc_trade_no = #{record.accTradeNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getAccMdiscountAmount() != null) { |
||||
sql.SET("acc_mdiscount_amount = #{record.accMdiscountAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAccDiscountAmount() != null) { |
||||
sql.SET("acc_discount_amount = #{record.accDiscountAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAccPaymentCode() != null) { |
||||
sql.SET("acc_payment_code = #{record.accPaymentCode,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCardType() != null) { |
||||
sql.SET("card_type = #{record.cardType,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPayTime() != null) { |
||||
sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCancelTime() != null) { |
||||
sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_trade_order"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); |
||||
sql.SET("salesman_id = #{record.salesmanId,jdbcType=BIGINT}"); |
||||
sql.SET("salesman_name = #{record.salesmanName,jdbcType=VARCHAR}"); |
||||
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); |
||||
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); |
||||
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); |
||||
sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); |
||||
sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); |
||||
sql.SET("device_id = #{record.deviceId,jdbcType=BIGINT}"); |
||||
sql.SET("device_sn = #{record.deviceSn,jdbcType=VARCHAR}"); |
||||
sql.SET("qr_code_id = #{record.qrCodeId,jdbcType=BIGINT}"); |
||||
sql.SET("qr_code_sn = #{record.qrCodeSn,jdbcType=VARCHAR}"); |
||||
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}"); |
||||
sql.SET("platform_mer_no = #{record.platformMerNo,jdbcType=VARCHAR}"); |
||||
sql.SET("platform_trade_no = #{record.platformTradeNo,jdbcType=VARCHAR}"); |
||||
sql.SET("platform_log_no = #{record.platformLogNo,jdbcType=VARCHAR}"); |
||||
sql.SET("pay_user_id = #{record.payUserId,jdbcType=VARCHAR}"); |
||||
sql.SET("pay_mode = #{record.payMode,jdbcType=VARCHAR}"); |
||||
sql.SET("out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR}"); |
||||
sql.SET("trade_amount = #{record.tradeAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("store_discount_satisfy = #{record.storeDiscountSatisfy,jdbcType=INTEGER}"); |
||||
sql.SET("store_discount_id = #{record.storeDiscountId,jdbcType=BIGINT}"); |
||||
sql.SET("store_discount_name = #{record.storeDiscountName,jdbcType=VARCHAR}"); |
||||
sql.SET("store_discount_type = #{record.storeDiscountType,jdbcType=INTEGER}"); |
||||
sql.SET("store_discount_price = #{record.storeDiscountPrice,jdbcType=DECIMAL}"); |
||||
sql.SET("store_discount_actual_price = #{record.storeDiscountActualPrice,jdbcType=DECIMAL}"); |
||||
sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); |
||||
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); |
||||
sql.SET("user_discount_id = #{record.userDiscountId,jdbcType=BIGINT}"); |
||||
sql.SET("user_discount_name = #{record.userDiscountName,jdbcType=VARCHAR}"); |
||||
sql.SET("user_discount_type = #{record.userDiscountType,jdbcType=INTEGER}"); |
||||
sql.SET("user_discount_price = #{record.userDiscountPrice,jdbcType=DECIMAL}"); |
||||
sql.SET("user_discount_actual_price = #{record.userDiscountActualPrice,jdbcType=DECIMAL}"); |
||||
sql.SET("trade_actual_amount = #{record.tradeActualAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("acc_trade_no = #{record.accTradeNo,jdbcType=VARCHAR}"); |
||||
sql.SET("acc_mdiscount_amount = #{record.accMdiscountAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("acc_discount_amount = #{record.accDiscountAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("acc_payment_code = #{record.accPaymentCode,jdbcType=VARCHAR}"); |
||||
sql.SET("card_type = #{record.cardType,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
BsTradeOrderExample example = (BsTradeOrderExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(BsTradeOrder record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_trade_order"); |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getAgentId() != null) { |
||||
sql.SET("agent_id = #{agentId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSalesmanId() != null) { |
||||
sql.SET("salesman_id = #{salesmanId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSalesmanName() != null) { |
||||
sql.SET("salesman_name = #{salesmanName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getMerId() != null) { |
||||
sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerName() != null) { |
||||
sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getMerNo() != null) { |
||||
sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStoreId() != null) { |
||||
sql.SET("store_id = #{storeId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStoreName() != null) { |
||||
sql.SET("store_name = #{storeName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDeviceId() != null) { |
||||
sql.SET("device_id = #{deviceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getDeviceSn() != null) { |
||||
sql.SET("device_sn = #{deviceSn,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getQrCodeId() != null) { |
||||
sql.SET("qr_code_id = #{qrCodeId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getQrCodeSn() != null) { |
||||
sql.SET("qr_code_sn = #{qrCodeSn,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformType() != null) { |
||||
sql.SET("platform_type = #{platformType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPlatformMerNo() != null) { |
||||
sql.SET("platform_mer_no = #{platformMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformTradeNo() != null) { |
||||
sql.SET("platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformLogNo() != null) { |
||||
sql.SET("platform_log_no = #{platformLogNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayUserId() != null) { |
||||
sql.SET("pay_user_id = #{payUserId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayMode() != null) { |
||||
sql.SET("pay_mode = #{payMode,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getOutTradeNo() != null) { |
||||
sql.SET("out_trade_no = #{outTradeNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTradeAmount() != null) { |
||||
sql.SET("trade_amount = #{tradeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountSatisfy() != null) { |
||||
sql.SET("store_discount_satisfy = #{storeDiscountSatisfy,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountId() != null) { |
||||
sql.SET("store_discount_id = #{storeDiscountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountName() != null) { |
||||
sql.SET("store_discount_name = #{storeDiscountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountType() != null) { |
||||
sql.SET("store_discount_type = #{storeDiscountType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountPrice() != null) { |
||||
sql.SET("store_discount_price = #{storeDiscountPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStoreDiscountActualPrice() != null) { |
||||
sql.SET("store_discount_actual_price = #{storeDiscountActualPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{userId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserPhone() != null) { |
||||
sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountId() != null) { |
||||
sql.SET("user_discount_id = #{userDiscountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountName() != null) { |
||||
sql.SET("user_discount_name = #{userDiscountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountType() != null) { |
||||
sql.SET("user_discount_type = #{userDiscountType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountPrice() != null) { |
||||
sql.SET("user_discount_price = #{userDiscountPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getUserDiscountActualPrice() != null) { |
||||
sql.SET("user_discount_actual_price = #{userDiscountActualPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getTradeActualAmount() != null) { |
||||
sql.SET("trade_actual_amount = #{tradeActualAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAccTradeNo() != null) { |
||||
sql.SET("acc_trade_no = #{accTradeNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getAccMdiscountAmount() != null) { |
||||
sql.SET("acc_mdiscount_amount = #{accMdiscountAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAccDiscountAmount() != null) { |
||||
sql.SET("acc_discount_amount = #{accDiscountAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAccPaymentCode() != null) { |
||||
sql.SET("acc_payment_code = #{accPaymentCode,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCardType() != null) { |
||||
sql.SET("card_type = #{cardType,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPayTime() != null) { |
||||
sql.SET("pay_time = #{payTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCancelTime() != null) { |
||||
sql.SET("cancel_time = #{cancelTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, BsTradeOrderExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,829 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* bs_trade_order |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class BsTradeOrder implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 公司id |
||||
*/ |
||||
private Long companyId; |
||||
|
||||
/** |
||||
* 代理商id |
||||
*/ |
||||
private Long agentId; |
||||
|
||||
/** |
||||
* 业务员id |
||||
*/ |
||||
private Long salesmanId; |
||||
|
||||
/** |
||||
* 业务员名称 |
||||
*/ |
||||
private String salesmanName; |
||||
|
||||
/** |
||||
* 商户id |
||||
*/ |
||||
private Long merId; |
||||
|
||||
/** |
||||
* 商户名称 |
||||
*/ |
||||
private String merName; |
||||
|
||||
/** |
||||
* 商户号 |
||||
*/ |
||||
private String merNo; |
||||
|
||||
/** |
||||
* 门店id |
||||
*/ |
||||
private Long storeId; |
||||
|
||||
/** |
||||
* 门店名称 |
||||
*/ |
||||
private String storeName; |
||||
|
||||
/** |
||||
* 设备id |
||||
*/ |
||||
private Long deviceId; |
||||
|
||||
/** |
||||
* 设备编号SN |
||||
*/ |
||||
private String deviceSn; |
||||
|
||||
/** |
||||
* 二维码id |
||||
*/ |
||||
private Long qrCodeId; |
||||
|
||||
/** |
||||
* 二维序列号 |
||||
*/ |
||||
private String qrCodeSn; |
||||
|
||||
/** |
||||
* 平台类型 1:拉卡拉 |
||||
*/ |
||||
private Integer platformType; |
||||
|
||||
/** |
||||
* 平台商户号 |
||||
*/ |
||||
private String platformMerNo; |
||||
|
||||
/** |
||||
* 平台流水号 |
||||
*/ |
||||
private String platformTradeNo; |
||||
|
||||
/** |
||||
* 平台对账单流水号 |
||||
*/ |
||||
private String platformLogNo; |
||||
|
||||
/** |
||||
* 支付用户id |
||||
*/ |
||||
private String payUserId; |
||||
|
||||
/** |
||||
* 支付模式: |
||||
微信:WECHAT |
||||
支付宝:ALIPAY |
||||
银联:UQRCODEPAY |
||||
【建行】龙支付:DRAGON |
||||
*/ |
||||
private String payMode; |
||||
|
||||
/** |
||||
* 商户交易流水 |
||||
*/ |
||||
private String outTradeNo; |
||||
|
||||
/** |
||||
* 交易金额 |
||||
*/ |
||||
private BigDecimal tradeAmount; |
||||
|
||||
/** |
||||
* 是否满足门店优惠条件 |
||||
*/ |
||||
private Integer storeDiscountSatisfy; |
||||
|
||||
/** |
||||
* 门店优惠id |
||||
*/ |
||||
private Long storeDiscountId; |
||||
|
||||
/** |
||||
* 门店优惠名称 |
||||
*/ |
||||
private String storeDiscountName; |
||||
|
||||
/** |
||||
* 门店优惠类型 |
||||
*/ |
||||
private Integer storeDiscountType; |
||||
|
||||
/** |
||||
* 门店优惠金额 |
||||
*/ |
||||
private BigDecimal storeDiscountPrice; |
||||
|
||||
/** |
||||
* 门店实际优惠金额 |
||||
*/ |
||||
private BigDecimal storeDiscountActualPrice; |
||||
|
||||
/** |
||||
* 客户id |
||||
*/ |
||||
private Integer userId; |
||||
|
||||
/** |
||||
* 客户手机号 |
||||
*/ |
||||
private String userPhone; |
||||
|
||||
/** |
||||
* 客户优惠券id |
||||
*/ |
||||
private Long userDiscountId; |
||||
|
||||
/** |
||||
* 客户优惠券名称 |
||||
*/ |
||||
private String userDiscountName; |
||||
|
||||
/** |
||||
* 客户优惠券类型 |
||||
*/ |
||||
private Integer userDiscountType; |
||||
|
||||
/** |
||||
* 客户优惠券金额 |
||||
*/ |
||||
private BigDecimal userDiscountPrice; |
||||
|
||||
/** |
||||
* 客户优惠券实际优惠金额 |
||||
*/ |
||||
private BigDecimal userDiscountActualPrice; |
||||
|
||||
/** |
||||
* 交易实际金额 |
||||
*/ |
||||
private BigDecimal tradeActualAmount; |
||||
|
||||
/** |
||||
* 账户端交易流水号 |
||||
*/ |
||||
private String accTradeNo; |
||||
|
||||
/** |
||||
* 账户端商户优惠金额,单位分 |
||||
*/ |
||||
private BigDecimal accMdiscountAmount; |
||||
|
||||
/** |
||||
* 账户端账户端优惠金额,单位分 |
||||
*/ |
||||
private BigDecimal accDiscountAmount; |
||||
|
||||
/** |
||||
* 账户端付款码 |
||||
*/ |
||||
private String accPaymentCode; |
||||
|
||||
/** |
||||
* 银行卡 00:借记 01:贷记 02:微信零钱 03:支付宝花呗 04:支付宝其他 05:数字货币 06:拉卡拉支付账户 99:未知 |
||||
*/ |
||||
private String cardType; |
||||
|
||||
/** |
||||
* 状态 1:待支付 2:支付中 3:支付成功 4 :支付失败 5:已取消 6:已退款 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 支付时间 |
||||
*/ |
||||
private Date payTime; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 取消时间 |
||||
*/ |
||||
private Date cancelTime; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getCompanyId() { |
||||
return companyId; |
||||
} |
||||
|
||||
public void setCompanyId(Long companyId) { |
||||
this.companyId = companyId; |
||||
} |
||||
|
||||
public Long getAgentId() { |
||||
return agentId; |
||||
} |
||||
|
||||
public void setAgentId(Long agentId) { |
||||
this.agentId = agentId; |
||||
} |
||||
|
||||
public Long getSalesmanId() { |
||||
return salesmanId; |
||||
} |
||||
|
||||
public void setSalesmanId(Long salesmanId) { |
||||
this.salesmanId = salesmanId; |
||||
} |
||||
|
||||
public String getSalesmanName() { |
||||
return salesmanName; |
||||
} |
||||
|
||||
public void setSalesmanName(String salesmanName) { |
||||
this.salesmanName = salesmanName; |
||||
} |
||||
|
||||
public Long getMerId() { |
||||
return merId; |
||||
} |
||||
|
||||
public void setMerId(Long merId) { |
||||
this.merId = merId; |
||||
} |
||||
|
||||
public String getMerName() { |
||||
return merName; |
||||
} |
||||
|
||||
public void setMerName(String merName) { |
||||
this.merName = merName; |
||||
} |
||||
|
||||
public String getMerNo() { |
||||
return merNo; |
||||
} |
||||
|
||||
public void setMerNo(String merNo) { |
||||
this.merNo = merNo; |
||||
} |
||||
|
||||
public Long getStoreId() { |
||||
return storeId; |
||||
} |
||||
|
||||
public void setStoreId(Long storeId) { |
||||
this.storeId = storeId; |
||||
} |
||||
|
||||
public String getStoreName() { |
||||
return storeName; |
||||
} |
||||
|
||||
public void setStoreName(String storeName) { |
||||
this.storeName = storeName; |
||||
} |
||||
|
||||
public Long getDeviceId() { |
||||
return deviceId; |
||||
} |
||||
|
||||
public void setDeviceId(Long deviceId) { |
||||
this.deviceId = deviceId; |
||||
} |
||||
|
||||
public String getDeviceSn() { |
||||
return deviceSn; |
||||
} |
||||
|
||||
public void setDeviceSn(String deviceSn) { |
||||
this.deviceSn = deviceSn; |
||||
} |
||||
|
||||
public Long getQrCodeId() { |
||||
return qrCodeId; |
||||
} |
||||
|
||||
public void setQrCodeId(Long qrCodeId) { |
||||
this.qrCodeId = qrCodeId; |
||||
} |
||||
|
||||
public String getQrCodeSn() { |
||||
return qrCodeSn; |
||||
} |
||||
|
||||
public void setQrCodeSn(String qrCodeSn) { |
||||
this.qrCodeSn = qrCodeSn; |
||||
} |
||||
|
||||
public Integer getPlatformType() { |
||||
return platformType; |
||||
} |
||||
|
||||
public void setPlatformType(Integer platformType) { |
||||
this.platformType = platformType; |
||||
} |
||||
|
||||
public String getPlatformMerNo() { |
||||
return platformMerNo; |
||||
} |
||||
|
||||
public void setPlatformMerNo(String platformMerNo) { |
||||
this.platformMerNo = platformMerNo; |
||||
} |
||||
|
||||
public String getPlatformTradeNo() { |
||||
return platformTradeNo; |
||||
} |
||||
|
||||
public void setPlatformTradeNo(String platformTradeNo) { |
||||
this.platformTradeNo = platformTradeNo; |
||||
} |
||||
|
||||
public String getPlatformLogNo() { |
||||
return platformLogNo; |
||||
} |
||||
|
||||
public void setPlatformLogNo(String platformLogNo) { |
||||
this.platformLogNo = platformLogNo; |
||||
} |
||||
|
||||
public String getPayUserId() { |
||||
return payUserId; |
||||
} |
||||
|
||||
public void setPayUserId(String payUserId) { |
||||
this.payUserId = payUserId; |
||||
} |
||||
|
||||
public String getPayMode() { |
||||
return payMode; |
||||
} |
||||
|
||||
public void setPayMode(String payMode) { |
||||
this.payMode = payMode; |
||||
} |
||||
|
||||
public String getOutTradeNo() { |
||||
return outTradeNo; |
||||
} |
||||
|
||||
public void setOutTradeNo(String outTradeNo) { |
||||
this.outTradeNo = outTradeNo; |
||||
} |
||||
|
||||
public BigDecimal getTradeAmount() { |
||||
return tradeAmount; |
||||
} |
||||
|
||||
public void setTradeAmount(BigDecimal tradeAmount) { |
||||
this.tradeAmount = tradeAmount; |
||||
} |
||||
|
||||
public Integer getStoreDiscountSatisfy() { |
||||
return storeDiscountSatisfy; |
||||
} |
||||
|
||||
public void setStoreDiscountSatisfy(Integer storeDiscountSatisfy) { |
||||
this.storeDiscountSatisfy = storeDiscountSatisfy; |
||||
} |
||||
|
||||
public Long getStoreDiscountId() { |
||||
return storeDiscountId; |
||||
} |
||||
|
||||
public void setStoreDiscountId(Long storeDiscountId) { |
||||
this.storeDiscountId = storeDiscountId; |
||||
} |
||||
|
||||
public String getStoreDiscountName() { |
||||
return storeDiscountName; |
||||
} |
||||
|
||||
public void setStoreDiscountName(String storeDiscountName) { |
||||
this.storeDiscountName = storeDiscountName; |
||||
} |
||||
|
||||
public Integer getStoreDiscountType() { |
||||
return storeDiscountType; |
||||
} |
||||
|
||||
public void setStoreDiscountType(Integer storeDiscountType) { |
||||
this.storeDiscountType = storeDiscountType; |
||||
} |
||||
|
||||
public BigDecimal getStoreDiscountPrice() { |
||||
return storeDiscountPrice; |
||||
} |
||||
|
||||
public void setStoreDiscountPrice(BigDecimal storeDiscountPrice) { |
||||
this.storeDiscountPrice = storeDiscountPrice; |
||||
} |
||||
|
||||
public BigDecimal getStoreDiscountActualPrice() { |
||||
return storeDiscountActualPrice; |
||||
} |
||||
|
||||
public void setStoreDiscountActualPrice(BigDecimal storeDiscountActualPrice) { |
||||
this.storeDiscountActualPrice = storeDiscountActualPrice; |
||||
} |
||||
|
||||
public Integer getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Integer userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public String getUserPhone() { |
||||
return userPhone; |
||||
} |
||||
|
||||
public void setUserPhone(String userPhone) { |
||||
this.userPhone = userPhone; |
||||
} |
||||
|
||||
public Long getUserDiscountId() { |
||||
return userDiscountId; |
||||
} |
||||
|
||||
public void setUserDiscountId(Long userDiscountId) { |
||||
this.userDiscountId = userDiscountId; |
||||
} |
||||
|
||||
public String getUserDiscountName() { |
||||
return userDiscountName; |
||||
} |
||||
|
||||
public void setUserDiscountName(String userDiscountName) { |
||||
this.userDiscountName = userDiscountName; |
||||
} |
||||
|
||||
public Integer getUserDiscountType() { |
||||
return userDiscountType; |
||||
} |
||||
|
||||
public void setUserDiscountType(Integer userDiscountType) { |
||||
this.userDiscountType = userDiscountType; |
||||
} |
||||
|
||||
public BigDecimal getUserDiscountPrice() { |
||||
return userDiscountPrice; |
||||
} |
||||
|
||||
public void setUserDiscountPrice(BigDecimal userDiscountPrice) { |
||||
this.userDiscountPrice = userDiscountPrice; |
||||
} |
||||
|
||||
public BigDecimal getUserDiscountActualPrice() { |
||||
return userDiscountActualPrice; |
||||
} |
||||
|
||||
public void setUserDiscountActualPrice(BigDecimal userDiscountActualPrice) { |
||||
this.userDiscountActualPrice = userDiscountActualPrice; |
||||
} |
||||
|
||||
public BigDecimal getTradeActualAmount() { |
||||
return tradeActualAmount; |
||||
} |
||||
|
||||
public void setTradeActualAmount(BigDecimal tradeActualAmount) { |
||||
this.tradeActualAmount = tradeActualAmount; |
||||
} |
||||
|
||||
public String getAccTradeNo() { |
||||
return accTradeNo; |
||||
} |
||||
|
||||
public void setAccTradeNo(String accTradeNo) { |
||||
this.accTradeNo = accTradeNo; |
||||
} |
||||
|
||||
public BigDecimal getAccMdiscountAmount() { |
||||
return accMdiscountAmount; |
||||
} |
||||
|
||||
public void setAccMdiscountAmount(BigDecimal accMdiscountAmount) { |
||||
this.accMdiscountAmount = accMdiscountAmount; |
||||
} |
||||
|
||||
public BigDecimal getAccDiscountAmount() { |
||||
return accDiscountAmount; |
||||
} |
||||
|
||||
public void setAccDiscountAmount(BigDecimal accDiscountAmount) { |
||||
this.accDiscountAmount = accDiscountAmount; |
||||
} |
||||
|
||||
public String getAccPaymentCode() { |
||||
return accPaymentCode; |
||||
} |
||||
|
||||
public void setAccPaymentCode(String accPaymentCode) { |
||||
this.accPaymentCode = accPaymentCode; |
||||
} |
||||
|
||||
public String getCardType() { |
||||
return cardType; |
||||
} |
||||
|
||||
public void setCardType(String cardType) { |
||||
this.cardType = cardType; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Date getPayTime() { |
||||
return payTime; |
||||
} |
||||
|
||||
public void setPayTime(Date payTime) { |
||||
this.payTime = payTime; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Date getCancelTime() { |
||||
return cancelTime; |
||||
} |
||||
|
||||
public void setCancelTime(Date cancelTime) { |
||||
this.cancelTime = cancelTime; |
||||
} |
||||
|
||||
public Date getUpdateTime() { |
||||
return updateTime; |
||||
} |
||||
|
||||
public void setUpdateTime(Date updateTime) { |
||||
this.updateTime = updateTime; |
||||
} |
||||
|
||||
public String getExt1() { |
||||
return ext1; |
||||
} |
||||
|
||||
public void setExt1(String ext1) { |
||||
this.ext1 = ext1; |
||||
} |
||||
|
||||
public String getExt2() { |
||||
return ext2; |
||||
} |
||||
|
||||
public void setExt2(String ext2) { |
||||
this.ext2 = ext2; |
||||
} |
||||
|
||||
public String getExt3() { |
||||
return ext3; |
||||
} |
||||
|
||||
public void setExt3(String ext3) { |
||||
this.ext3 = ext3; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
BsTradeOrder other = (BsTradeOrder) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) |
||||
&& (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId())) |
||||
&& (this.getSalesmanId() == null ? other.getSalesmanId() == null : this.getSalesmanId().equals(other.getSalesmanId())) |
||||
&& (this.getSalesmanName() == null ? other.getSalesmanName() == null : this.getSalesmanName().equals(other.getSalesmanName())) |
||||
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) |
||||
&& (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) |
||||
&& (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) |
||||
&& (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId())) |
||||
&& (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName())) |
||||
&& (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId())) |
||||
&& (this.getDeviceSn() == null ? other.getDeviceSn() == null : this.getDeviceSn().equals(other.getDeviceSn())) |
||||
&& (this.getQrCodeId() == null ? other.getQrCodeId() == null : this.getQrCodeId().equals(other.getQrCodeId())) |
||||
&& (this.getQrCodeSn() == null ? other.getQrCodeSn() == null : this.getQrCodeSn().equals(other.getQrCodeSn())) |
||||
&& (this.getPlatformType() == null ? other.getPlatformType() == null : this.getPlatformType().equals(other.getPlatformType())) |
||||
&& (this.getPlatformMerNo() == null ? other.getPlatformMerNo() == null : this.getPlatformMerNo().equals(other.getPlatformMerNo())) |
||||
&& (this.getPlatformTradeNo() == null ? other.getPlatformTradeNo() == null : this.getPlatformTradeNo().equals(other.getPlatformTradeNo())) |
||||
&& (this.getPlatformLogNo() == null ? other.getPlatformLogNo() == null : this.getPlatformLogNo().equals(other.getPlatformLogNo())) |
||||
&& (this.getPayUserId() == null ? other.getPayUserId() == null : this.getPayUserId().equals(other.getPayUserId())) |
||||
&& (this.getPayMode() == null ? other.getPayMode() == null : this.getPayMode().equals(other.getPayMode())) |
||||
&& (this.getOutTradeNo() == null ? other.getOutTradeNo() == null : this.getOutTradeNo().equals(other.getOutTradeNo())) |
||||
&& (this.getTradeAmount() == null ? other.getTradeAmount() == null : this.getTradeAmount().equals(other.getTradeAmount())) |
||||
&& (this.getStoreDiscountSatisfy() == null ? other.getStoreDiscountSatisfy() == null : this.getStoreDiscountSatisfy().equals(other.getStoreDiscountSatisfy())) |
||||
&& (this.getStoreDiscountId() == null ? other.getStoreDiscountId() == null : this.getStoreDiscountId().equals(other.getStoreDiscountId())) |
||||
&& (this.getStoreDiscountName() == null ? other.getStoreDiscountName() == null : this.getStoreDiscountName().equals(other.getStoreDiscountName())) |
||||
&& (this.getStoreDiscountType() == null ? other.getStoreDiscountType() == null : this.getStoreDiscountType().equals(other.getStoreDiscountType())) |
||||
&& (this.getStoreDiscountPrice() == null ? other.getStoreDiscountPrice() == null : this.getStoreDiscountPrice().equals(other.getStoreDiscountPrice())) |
||||
&& (this.getStoreDiscountActualPrice() == null ? other.getStoreDiscountActualPrice() == null : this.getStoreDiscountActualPrice().equals(other.getStoreDiscountActualPrice())) |
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) |
||||
&& (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone())) |
||||
&& (this.getUserDiscountId() == null ? other.getUserDiscountId() == null : this.getUserDiscountId().equals(other.getUserDiscountId())) |
||||
&& (this.getUserDiscountName() == null ? other.getUserDiscountName() == null : this.getUserDiscountName().equals(other.getUserDiscountName())) |
||||
&& (this.getUserDiscountType() == null ? other.getUserDiscountType() == null : this.getUserDiscountType().equals(other.getUserDiscountType())) |
||||
&& (this.getUserDiscountPrice() == null ? other.getUserDiscountPrice() == null : this.getUserDiscountPrice().equals(other.getUserDiscountPrice())) |
||||
&& (this.getUserDiscountActualPrice() == null ? other.getUserDiscountActualPrice() == null : this.getUserDiscountActualPrice().equals(other.getUserDiscountActualPrice())) |
||||
&& (this.getTradeActualAmount() == null ? other.getTradeActualAmount() == null : this.getTradeActualAmount().equals(other.getTradeActualAmount())) |
||||
&& (this.getAccTradeNo() == null ? other.getAccTradeNo() == null : this.getAccTradeNo().equals(other.getAccTradeNo())) |
||||
&& (this.getAccMdiscountAmount() == null ? other.getAccMdiscountAmount() == null : this.getAccMdiscountAmount().equals(other.getAccMdiscountAmount())) |
||||
&& (this.getAccDiscountAmount() == null ? other.getAccDiscountAmount() == null : this.getAccDiscountAmount().equals(other.getAccDiscountAmount())) |
||||
&& (this.getAccPaymentCode() == null ? other.getAccPaymentCode() == null : this.getAccPaymentCode().equals(other.getAccPaymentCode())) |
||||
&& (this.getCardType() == null ? other.getCardType() == null : this.getCardType().equals(other.getCardType())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); |
||||
result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode()); |
||||
result = prime * result + ((getSalesmanId() == null) ? 0 : getSalesmanId().hashCode()); |
||||
result = prime * result + ((getSalesmanName() == null) ? 0 : getSalesmanName().hashCode()); |
||||
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); |
||||
result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); |
||||
result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); |
||||
result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode()); |
||||
result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode()); |
||||
result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode()); |
||||
result = prime * result + ((getDeviceSn() == null) ? 0 : getDeviceSn().hashCode()); |
||||
result = prime * result + ((getQrCodeId() == null) ? 0 : getQrCodeId().hashCode()); |
||||
result = prime * result + ((getQrCodeSn() == null) ? 0 : getQrCodeSn().hashCode()); |
||||
result = prime * result + ((getPlatformType() == null) ? 0 : getPlatformType().hashCode()); |
||||
result = prime * result + ((getPlatformMerNo() == null) ? 0 : getPlatformMerNo().hashCode()); |
||||
result = prime * result + ((getPlatformTradeNo() == null) ? 0 : getPlatformTradeNo().hashCode()); |
||||
result = prime * result + ((getPlatformLogNo() == null) ? 0 : getPlatformLogNo().hashCode()); |
||||
result = prime * result + ((getPayUserId() == null) ? 0 : getPayUserId().hashCode()); |
||||
result = prime * result + ((getPayMode() == null) ? 0 : getPayMode().hashCode()); |
||||
result = prime * result + ((getOutTradeNo() == null) ? 0 : getOutTradeNo().hashCode()); |
||||
result = prime * result + ((getTradeAmount() == null) ? 0 : getTradeAmount().hashCode()); |
||||
result = prime * result + ((getStoreDiscountSatisfy() == null) ? 0 : getStoreDiscountSatisfy().hashCode()); |
||||
result = prime * result + ((getStoreDiscountId() == null) ? 0 : getStoreDiscountId().hashCode()); |
||||
result = prime * result + ((getStoreDiscountName() == null) ? 0 : getStoreDiscountName().hashCode()); |
||||
result = prime * result + ((getStoreDiscountType() == null) ? 0 : getStoreDiscountType().hashCode()); |
||||
result = prime * result + ((getStoreDiscountPrice() == null) ? 0 : getStoreDiscountPrice().hashCode()); |
||||
result = prime * result + ((getStoreDiscountActualPrice() == null) ? 0 : getStoreDiscountActualPrice().hashCode()); |
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); |
||||
result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode()); |
||||
result = prime * result + ((getUserDiscountId() == null) ? 0 : getUserDiscountId().hashCode()); |
||||
result = prime * result + ((getUserDiscountName() == null) ? 0 : getUserDiscountName().hashCode()); |
||||
result = prime * result + ((getUserDiscountType() == null) ? 0 : getUserDiscountType().hashCode()); |
||||
result = prime * result + ((getUserDiscountPrice() == null) ? 0 : getUserDiscountPrice().hashCode()); |
||||
result = prime * result + ((getUserDiscountActualPrice() == null) ? 0 : getUserDiscountActualPrice().hashCode()); |
||||
result = prime * result + ((getTradeActualAmount() == null) ? 0 : getTradeActualAmount().hashCode()); |
||||
result = prime * result + ((getAccTradeNo() == null) ? 0 : getAccTradeNo().hashCode()); |
||||
result = prime * result + ((getAccMdiscountAmount() == null) ? 0 : getAccMdiscountAmount().hashCode()); |
||||
result = prime * result + ((getAccDiscountAmount() == null) ? 0 : getAccDiscountAmount().hashCode()); |
||||
result = prime * result + ((getAccPaymentCode() == null) ? 0 : getAccPaymentCode().hashCode()); |
||||
result = prime * result + ((getCardType() == null) ? 0 : getCardType().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", companyId=").append(companyId); |
||||
sb.append(", agentId=").append(agentId); |
||||
sb.append(", salesmanId=").append(salesmanId); |
||||
sb.append(", salesmanName=").append(salesmanName); |
||||
sb.append(", merId=").append(merId); |
||||
sb.append(", merName=").append(merName); |
||||
sb.append(", merNo=").append(merNo); |
||||
sb.append(", storeId=").append(storeId); |
||||
sb.append(", storeName=").append(storeName); |
||||
sb.append(", deviceId=").append(deviceId); |
||||
sb.append(", deviceSn=").append(deviceSn); |
||||
sb.append(", qrCodeId=").append(qrCodeId); |
||||
sb.append(", qrCodeSn=").append(qrCodeSn); |
||||
sb.append(", platformType=").append(platformType); |
||||
sb.append(", platformMerNo=").append(platformMerNo); |
||||
sb.append(", platformTradeNo=").append(platformTradeNo); |
||||
sb.append(", platformLogNo=").append(platformLogNo); |
||||
sb.append(", payUserId=").append(payUserId); |
||||
sb.append(", payMode=").append(payMode); |
||||
sb.append(", outTradeNo=").append(outTradeNo); |
||||
sb.append(", tradeAmount=").append(tradeAmount); |
||||
sb.append(", storeDiscountSatisfy=").append(storeDiscountSatisfy); |
||||
sb.append(", storeDiscountId=").append(storeDiscountId); |
||||
sb.append(", storeDiscountName=").append(storeDiscountName); |
||||
sb.append(", storeDiscountType=").append(storeDiscountType); |
||||
sb.append(", storeDiscountPrice=").append(storeDiscountPrice); |
||||
sb.append(", storeDiscountActualPrice=").append(storeDiscountActualPrice); |
||||
sb.append(", userId=").append(userId); |
||||
sb.append(", userPhone=").append(userPhone); |
||||
sb.append(", userDiscountId=").append(userDiscountId); |
||||
sb.append(", userDiscountName=").append(userDiscountName); |
||||
sb.append(", userDiscountType=").append(userDiscountType); |
||||
sb.append(", userDiscountPrice=").append(userDiscountPrice); |
||||
sb.append(", userDiscountActualPrice=").append(userDiscountActualPrice); |
||||
sb.append(", tradeActualAmount=").append(tradeActualAmount); |
||||
sb.append(", accTradeNo=").append(accTradeNo); |
||||
sb.append(", accMdiscountAmount=").append(accMdiscountAmount); |
||||
sb.append(", accDiscountAmount=").append(accDiscountAmount); |
||||
sb.append(", accPaymentCode=").append(accPaymentCode); |
||||
sb.append(", cardType=").append(cardType); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", payTime=").append(payTime); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", cancelTime=").append(cancelTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,38 @@ |
||||
package com.web.controller; |
||||
|
||||
import com.hai.common.utils.*; |
||||
import com.hai.model.ResponseData; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
@Controller |
||||
@RequestMapping(value = "/wechat") |
||||
@Api(value = "微信授权") |
||||
public class WechatController { |
||||
|
||||
@RequestMapping(value = "/getH5AccessToken", method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "【H5】获取AccessToken") |
||||
public ResponseData getH5AccessToken(@RequestParam(value = "code", required = true) String code) { |
||||
try { |
||||
Map<String, Object> params = new HashMap<>(); |
||||
params.put("appid", "wxa075e8509802f826"); |
||||
params.put("secret", "0e606fc1378d35e359fcf3f15570b2c5"); |
||||
params.put("code", code); |
||||
params.put("grant_type", "authorization_code"); |
||||
return ResponseMsgUtil.success(HttpsUtils.doGet("https://api.weixin.qq.com/sns/oauth2/access_token", params)); |
||||
|
||||
} catch (Exception e) { |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue