parent
8310ec1af5
commit
bff8c0bc7a
@ -1,7 +1,47 @@ |
|||||||
package com.hai.dao; |
package com.hai.dao; |
||||||
|
|
||||||
|
import com.hai.model.ApiProductConfigModel; |
||||||
|
import com.hai.model.OutUserOrderModel; |
||||||
|
import org.apache.ibatis.annotations.Result; |
||||||
|
import org.apache.ibatis.annotations.Results; |
||||||
|
import org.apache.ibatis.annotations.Select; |
||||||
|
import org.apache.ibatis.type.JdbcType; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
/** |
/** |
||||||
* mapper扩展类 |
* mapper扩展类 |
||||||
*/ |
*/ |
||||||
public interface ApiProductConfigMapperExt { |
public interface ApiProductConfigMapperExt { |
||||||
|
|
||||||
|
@Select(value = { |
||||||
|
"<script>", |
||||||
|
" select ap.* , discount_price , apc.id as api_config_product_id , discount , apc.status as config_status from api_product ap join api_product_config apc on ap.id = apc.product_id where apc.status != 100", |
||||||
|
" and merchants_id = #{merchantsId} " + |
||||||
|
"</script>" |
||||||
|
}) |
||||||
|
@Results({ |
||||||
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||||
|
@Result(column="recharge_type", property="rechargeType", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="recharge_platform", property="rechargePlatform", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="phone_recharge_type", property="phoneRechargeType", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="operator_type", property="operatorType", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="recharge_price", property="rechargePrice", jdbcType=JdbcType.DECIMAL), |
||||||
|
@Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="api_config_product_id", property="apiConfigProductId", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="discount", property="discount", jdbcType=JdbcType.DECIMAL), |
||||||
|
@Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL), |
||||||
|
@Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="config_status", property="configStatus", jdbcType=JdbcType.INTEGER), |
||||||
|
@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<ApiProductConfigModel> getListMerchProduct(Long merchantsId); |
||||||
|
|
||||||
} |
} |
@ -0,0 +1,60 @@ |
|||||||
|
package com.hai.model; |
||||||
|
|
||||||
|
import com.hai.entity.ApiProduct; |
||||||
|
import com.hai.entity.ApiProductConfig; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
|
||||||
|
public class ApiProductConfigModel extends ApiProduct { |
||||||
|
/** |
||||||
|
* 折扣比例 |
||||||
|
*/ |
||||||
|
private BigDecimal discount; |
||||||
|
|
||||||
|
/** |
||||||
|
* 折扣价格 |
||||||
|
*/ |
||||||
|
private BigDecimal discountPrice; |
||||||
|
|
||||||
|
/** |
||||||
|
* 主键 |
||||||
|
*/ |
||||||
|
private Long apiConfigProductId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 101 正常 102 下架 100 删除 |
||||||
|
*/ |
||||||
|
private Integer configStatus; |
||||||
|
|
||||||
|
public Integer getConfigStatus() { |
||||||
|
return configStatus; |
||||||
|
} |
||||||
|
|
||||||
|
public void setConfigStatus(Integer configStatus) { |
||||||
|
this.configStatus = configStatus; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getApiConfigProductId() { |
||||||
|
return apiConfigProductId; |
||||||
|
} |
||||||
|
|
||||||
|
public void setApiConfigProductId(Long apiConfigProductId) { |
||||||
|
this.apiConfigProductId = apiConfigProductId; |
||||||
|
} |
||||||
|
|
||||||
|
public BigDecimal getDiscount() { |
||||||
|
return discount; |
||||||
|
} |
||||||
|
|
||||||
|
public void setDiscount(BigDecimal discount) { |
||||||
|
this.discount = discount; |
||||||
|
} |
||||||
|
|
||||||
|
public BigDecimal getDiscountPrice() { |
||||||
|
return discountPrice; |
||||||
|
} |
||||||
|
|
||||||
|
public void setDiscountPrice(BigDecimal discountPrice) { |
||||||
|
this.discountPrice = discountPrice; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue