# MsgMinPrice.java

    package cloud.wconnect.rateshop.pojo.dto.rateshop.sender;

    import lombok.AllArgsConstructor;
    import lombok.Builder;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    import org.apache.commons.lang3.StringUtils;

    import java.math.BigDecimal;
    import java.util.Arrays;
    import java.util.List;

    /**
     * 消息中的最低价格
     * 当价格等于0时，表示sold out
     *
     * @author lichen
     * @date 2023/6/6
     */
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    @Data
    public class MsgMinPrice {

        /**
         * 酒店id
         */
        private Integer hotelId;

        /**
         * 平台id
         */
        private Integer platformId;

        /**
         * 入住日期（yyyyMMdd）
         */
        private Long checkInDate;

        /**
         * 最低价格
         */
        private BigDecimal minPrice;

        /**
         * 货币id
         */
        private Integer currencyId;

        /**
         * 含税标志 1: 税前 2：税后
         */
        private Integer containTaxFlag;

        /**
         * 房价类型1-早鸟价 2-BAR房价
         */
        private Integer rateType;

        /**
         * 数据源ID
         */
        private Integer datasourceId;

        /**
         * 销售地区
         */
        private String pos;

        /**
         * 生成唯一标识
         *
         * @return java.lang.String
         * @author lichen
         * @date 2025/4/4
         */
        public String generateUniqueKey(){
            Integer hotelId = this.getHotelId();
            String pos = this.getPos();
            Integer currencyId = this.getCurrencyId();
            Long checkInDate = this.getCheckInDate();
            Integer datasourceId = this.getDatasourceId();
            Integer platformId = this.getPlatformId();
            Integer rateType = this.getRateType();
            Integer containTaxFlag = this.getContainTaxFlag();

            List<String> list = Arrays.asList(hotelId.toString(), pos, currencyId.toString(),
                    checkInDate.toString(), datasourceId.toString(), platformId.toString(), rateType.toString(), containTaxFlag.toString());
            return StringUtils.join(list, ":");
        }

    }