胡锐 6 months ago
commit 882250b483
  1. 3
      order/src/main/java/com/order/controller/business/BsOrderGoodsController.java
  2. 14
      service/src/main/java/com/hfkj/dao/BsOrderGoodsMapper.java
  3. 18
      service/src/main/java/com/hfkj/dao/BsOrderGoodsSqlProvider.java
  4. 18
      service/src/main/java/com/hfkj/entity/BsOrderGoods.java
  5. 50
      service/src/main/java/com/hfkj/entity/BsOrderGoodsExample.java
  6. 2
      service/src/main/java/com/hfkj/service/order/OrderCreateService.java
  7. 15
      user/src/main/java/com/user/controller/BsUserController.java

@ -1,6 +1,5 @@
package com.bweb.controller.order;
package com.order.controller.business;
import com.bweb.controller.goods.GoodsController;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hfkj.common.security.SessionObject;

@ -47,7 +47,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
"goods_type_id, goods_type_name, ",
"goods_brand_id, goods_brand_name, ",
"goods_specs_id, goods_specs_name, ",
"goods_spesc_original_price, goods_count, ",
"goods_specs_original_price, goods_count, ",
"total_price, total_deduction_price, ",
"coupon_discount_price, integral_discount_price, ",
"pay_real_price, pay_channel, ",
@ -65,7 +65,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
"#{goodsTypeId,jdbcType=BIGINT}, #{goodsTypeName,jdbcType=VARCHAR}, ",
"#{goodsBrandId,jdbcType=BIGINT}, #{goodsBrandName,jdbcType=VARCHAR}, ",
"#{goodsSpecsId,jdbcType=BIGINT}, #{goodsSpecsName,jdbcType=VARCHAR}, ",
"#{goodsSpescOriginalPrice,jdbcType=DECIMAL}, #{goodsCount,jdbcType=INTEGER}, ",
"#{goodsSpecsOriginalPrice,jdbcType=DECIMAL}, #{goodsCount,jdbcType=INTEGER}, ",
"#{totalPrice,jdbcType=DECIMAL}, #{totalDeductionPrice,jdbcType=DECIMAL}, ",
"#{couponDiscountPrice,jdbcType=DECIMAL}, #{integralDiscountPrice,jdbcType=DECIMAL}, ",
"#{payRealPrice,jdbcType=DECIMAL}, #{payChannel,jdbcType=INTEGER}, ",
@ -104,7 +104,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
@Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_specs_id", property="goodsSpecsId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_specs_name", property="goodsSpecsName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_spesc_original_price", property="goodsSpescOriginalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="goods_specs_original_price", property="goodsSpecsOriginalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="goods_count", property="goodsCount", jdbcType=JdbcType.INTEGER),
@Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL),
@ -132,7 +132,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
"id, logistics_no, freight_price, delivery_address_id, delivery_address, order_no, ",
"child_order_no, mer_id, user_id, user_phone, goods_id, img, goods_name, goods_type_id, ",
"goods_type_name, goods_brand_id, goods_brand_name, goods_specs_id, goods_specs_name, ",
"goods_spesc_original_price, goods_count, total_price, total_deduction_price, ",
"goods_specs_original_price, goods_count, total_price, total_deduction_price, ",
"coupon_discount_price, integral_discount_price, pay_real_price, pay_channel, ",
"pay_serial_no, pay_type, `status`, create_time, pay_time, cancel_time, refund_time, ",
"finish_time, update_time, ext_1, ext_2, ext_3",
@ -159,7 +159,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
@Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_specs_id", property="goodsSpecsId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_specs_name", property="goodsSpecsName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_spesc_original_price", property="goodsSpescOriginalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="goods_specs_original_price", property="goodsSpecsOriginalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="goods_count", property="goodsCount", jdbcType=JdbcType.INTEGER),
@Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL),
@ -211,7 +211,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
"goods_brand_name = #{goodsBrandName,jdbcType=VARCHAR},",
"goods_specs_id = #{goodsSpecsId,jdbcType=BIGINT},",
"goods_specs_name = #{goodsSpecsName,jdbcType=VARCHAR},",
"goods_spesc_original_price = #{goodsSpescOriginalPrice,jdbcType=DECIMAL},",
"goods_specs_original_price = #{goodsSpecsOriginalPrice,jdbcType=DECIMAL},",
"goods_count = #{goodsCount,jdbcType=INTEGER},",
"total_price = #{totalPrice,jdbcType=DECIMAL},",
"total_deduction_price = #{totalDeductionPrice,jdbcType=DECIMAL},",
@ -234,4 +234,4 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(BsOrderGoods record);
}
}

@ -100,8 +100,8 @@ public class BsOrderGoodsSqlProvider {
sql.VALUES("goods_specs_name", "#{goodsSpecsName,jdbcType=VARCHAR}");
}
if (record.getGoodsSpescOriginalPrice() != null) {
sql.VALUES("goods_spesc_original_price", "#{goodsSpescOriginalPrice,jdbcType=DECIMAL}");
if (record.getGoodsSpecsOriginalPrice() != null) {
sql.VALUES("goods_specs_original_price", "#{goodsSpecsOriginalPrice,jdbcType=DECIMAL}");
}
if (record.getGoodsCount() != null) {
@ -208,7 +208,7 @@ public class BsOrderGoodsSqlProvider {
sql.SELECT("goods_brand_name");
sql.SELECT("goods_specs_id");
sql.SELECT("goods_specs_name");
sql.SELECT("goods_spesc_original_price");
sql.SELECT("goods_specs_original_price");
sql.SELECT("goods_count");
sql.SELECT("total_price");
sql.SELECT("total_deduction_price");
@ -321,8 +321,8 @@ public class BsOrderGoodsSqlProvider {
sql.SET("goods_specs_name = #{record.goodsSpecsName,jdbcType=VARCHAR}");
}
if (record.getGoodsSpescOriginalPrice() != null) {
sql.SET("goods_spesc_original_price = #{record.goodsSpescOriginalPrice,jdbcType=DECIMAL}");
if (record.getGoodsSpecsOriginalPrice() != null) {
sql.SET("goods_specs_original_price = #{record.goodsSpecsOriginalPrice,jdbcType=DECIMAL}");
}
if (record.getGoodsCount() != null) {
@ -428,7 +428,7 @@ public class BsOrderGoodsSqlProvider {
sql.SET("goods_brand_name = #{record.goodsBrandName,jdbcType=VARCHAR}");
sql.SET("goods_specs_id = #{record.goodsSpecsId,jdbcType=BIGINT}");
sql.SET("goods_specs_name = #{record.goodsSpecsName,jdbcType=VARCHAR}");
sql.SET("goods_spesc_original_price = #{record.goodsSpescOriginalPrice,jdbcType=DECIMAL}");
sql.SET("goods_specs_original_price = #{record.goodsSpecsOriginalPrice,jdbcType=DECIMAL}");
sql.SET("goods_count = #{record.goodsCount,jdbcType=INTEGER}");
sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}");
sql.SET("total_deduction_price = #{record.totalDeductionPrice,jdbcType=DECIMAL}");
@ -530,8 +530,8 @@ public class BsOrderGoodsSqlProvider {
sql.SET("goods_specs_name = #{goodsSpecsName,jdbcType=VARCHAR}");
}
if (record.getGoodsSpescOriginalPrice() != null) {
sql.SET("goods_spesc_original_price = #{goodsSpescOriginalPrice,jdbcType=DECIMAL}");
if (record.getGoodsSpecsOriginalPrice() != null) {
sql.SET("goods_specs_original_price = #{goodsSpecsOriginalPrice,jdbcType=DECIMAL}");
}
if (record.getGoodsCount() != null) {
@ -707,4 +707,4 @@ public class BsOrderGoodsSqlProvider {
sql.WHERE(sb.toString());
}
}
}
}

@ -112,7 +112,7 @@ public class BsOrderGoods implements Serializable {
/**
* 商品规格原价
*/
private BigDecimal goodsSpescOriginalPrice;
private BigDecimal goodsSpecsOriginalPrice;
/**
* 商品数量
@ -354,12 +354,12 @@ public class BsOrderGoods implements Serializable {
this.goodsSpecsName = goodsSpecsName;
}
public BigDecimal getGoodsSpescOriginalPrice() {
return goodsSpescOriginalPrice;
public BigDecimal getGoodsSpecsOriginalPrice() {
return goodsSpecsOriginalPrice;
}
public void setGoodsSpescOriginalPrice(BigDecimal goodsSpescOriginalPrice) {
this.goodsSpescOriginalPrice = goodsSpescOriginalPrice;
public void setGoodsSpecsOriginalPrice(BigDecimal goodsSpecsOriginalPrice) {
this.goodsSpecsOriginalPrice = goodsSpecsOriginalPrice;
}
public Integer getGoodsCount() {
@ -545,7 +545,7 @@ public class BsOrderGoods implements Serializable {
&& (this.getGoodsBrandName() == null ? other.getGoodsBrandName() == null : this.getGoodsBrandName().equals(other.getGoodsBrandName()))
&& (this.getGoodsSpecsId() == null ? other.getGoodsSpecsId() == null : this.getGoodsSpecsId().equals(other.getGoodsSpecsId()))
&& (this.getGoodsSpecsName() == null ? other.getGoodsSpecsName() == null : this.getGoodsSpecsName().equals(other.getGoodsSpecsName()))
&& (this.getGoodsSpescOriginalPrice() == null ? other.getGoodsSpescOriginalPrice() == null : this.getGoodsSpescOriginalPrice().equals(other.getGoodsSpescOriginalPrice()))
&& (this.getGoodsSpecsOriginalPrice() == null ? other.getGoodsSpecsOriginalPrice() == null : this.getGoodsSpecsOriginalPrice().equals(other.getGoodsSpecsOriginalPrice()))
&& (this.getGoodsCount() == null ? other.getGoodsCount() == null : this.getGoodsCount().equals(other.getGoodsCount()))
&& (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
&& (this.getTotalDeductionPrice() == null ? other.getTotalDeductionPrice() == null : this.getTotalDeductionPrice().equals(other.getTotalDeductionPrice()))
@ -590,7 +590,7 @@ public class BsOrderGoods implements Serializable {
result = prime * result + ((getGoodsBrandName() == null) ? 0 : getGoodsBrandName().hashCode());
result = prime * result + ((getGoodsSpecsId() == null) ? 0 : getGoodsSpecsId().hashCode());
result = prime * result + ((getGoodsSpecsName() == null) ? 0 : getGoodsSpecsName().hashCode());
result = prime * result + ((getGoodsSpescOriginalPrice() == null) ? 0 : getGoodsSpescOriginalPrice().hashCode());
result = prime * result + ((getGoodsSpecsOriginalPrice() == null) ? 0 : getGoodsSpecsOriginalPrice().hashCode());
result = prime * result + ((getGoodsCount() == null) ? 0 : getGoodsCount().hashCode());
result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
result = prime * result + ((getTotalDeductionPrice() == null) ? 0 : getTotalDeductionPrice().hashCode());
@ -638,7 +638,7 @@ public class BsOrderGoods implements Serializable {
sb.append(", goodsBrandName=").append(goodsBrandName);
sb.append(", goodsSpecsId=").append(goodsSpecsId);
sb.append(", goodsSpecsName=").append(goodsSpecsName);
sb.append(", goodsSpescOriginalPrice=").append(goodsSpescOriginalPrice);
sb.append(", goodsSpecsOriginalPrice=").append(goodsSpecsOriginalPrice);
sb.append(", goodsCount=").append(goodsCount);
sb.append(", totalPrice=").append(totalPrice);
sb.append(", totalDeductionPrice=").append(totalDeductionPrice);
@ -662,4 +662,4 @@ public class BsOrderGoods implements Serializable {
sb.append("]");
return sb.toString();
}
}
}

@ -1366,63 +1366,63 @@ public class BsOrderGoodsExample {
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceIsNull() {
addCriterion("goods_spesc_original_price is null");
public Criteria andGoodsSpecsOriginalPriceIsNull() {
addCriterion("goods_specs_original_price is null");
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceIsNotNull() {
addCriterion("goods_spesc_original_price is not null");
public Criteria andGoodsSpecsOriginalPriceIsNotNull() {
addCriterion("goods_specs_original_price is not null");
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceEqualTo(BigDecimal value) {
addCriterion("goods_spesc_original_price =", value, "goodsSpescOriginalPrice");
public Criteria andGoodsSpecsOriginalPriceEqualTo(BigDecimal value) {
addCriterion("goods_specs_original_price =", value, "goodsSpecsOriginalPrice");
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceNotEqualTo(BigDecimal value) {
addCriterion("goods_spesc_original_price <>", value, "goodsSpescOriginalPrice");
public Criteria andGoodsSpecsOriginalPriceNotEqualTo(BigDecimal value) {
addCriterion("goods_specs_original_price <>", value, "goodsSpecsOriginalPrice");
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceGreaterThan(BigDecimal value) {
addCriterion("goods_spesc_original_price >", value, "goodsSpescOriginalPrice");
public Criteria andGoodsSpecsOriginalPriceGreaterThan(BigDecimal value) {
addCriterion("goods_specs_original_price >", value, "goodsSpecsOriginalPrice");
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("goods_spesc_original_price >=", value, "goodsSpescOriginalPrice");
public Criteria andGoodsSpecsOriginalPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("goods_specs_original_price >=", value, "goodsSpecsOriginalPrice");
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceLessThan(BigDecimal value) {
addCriterion("goods_spesc_original_price <", value, "goodsSpescOriginalPrice");
public Criteria andGoodsSpecsOriginalPriceLessThan(BigDecimal value) {
addCriterion("goods_specs_original_price <", value, "goodsSpecsOriginalPrice");
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("goods_spesc_original_price <=", value, "goodsSpescOriginalPrice");
public Criteria andGoodsSpecsOriginalPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("goods_specs_original_price <=", value, "goodsSpecsOriginalPrice");
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceIn(List<BigDecimal> values) {
addCriterion("goods_spesc_original_price in", values, "goodsSpescOriginalPrice");
public Criteria andGoodsSpecsOriginalPriceIn(List<BigDecimal> values) {
addCriterion("goods_specs_original_price in", values, "goodsSpecsOriginalPrice");
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceNotIn(List<BigDecimal> values) {
addCriterion("goods_spesc_original_price not in", values, "goodsSpescOriginalPrice");
public Criteria andGoodsSpecsOriginalPriceNotIn(List<BigDecimal> values) {
addCriterion("goods_specs_original_price not in", values, "goodsSpecsOriginalPrice");
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("goods_spesc_original_price between", value1, value2, "goodsSpescOriginalPrice");
public Criteria andGoodsSpecsOriginalPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("goods_specs_original_price between", value1, value2, "goodsSpecsOriginalPrice");
return (Criteria) this;
}
public Criteria andGoodsSpescOriginalPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("goods_spesc_original_price not between", value1, value2, "goodsSpescOriginalPrice");
public Criteria andGoodsSpecsOriginalPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("goods_specs_original_price not between", value1, value2, "goodsSpecsOriginalPrice");
return (Criteria) this;
}
@ -2701,4 +2701,4 @@ public class BsOrderGoodsExample {
this(condition, value, secondValue, null);
}
}
}
}

@ -192,7 +192,7 @@ public class OrderCreateService {
orderGoods.setGoodsBrandName(goodsMsg.getGoodsBrandName());
orderGoods.setGoodsSpecsId(goodsSpecs.getId());
orderGoods.setGoodsSpecsName(goodsSpecs.getName());
orderGoods.setGoodsSpescOriginalPrice(goodsSpecs.getOriginalPrice());
orderGoods.setGoodsSpecsOriginalPrice(goodsSpecs.getOriginalPrice());
orderGoods.setGoodsCount(orderChild.getProductCount());
orderGoods.setStatus(OrderGoodsStatusEnum.status8.getCode());
orderGoods.setDeliveryAddress(address.getAddress());

@ -115,6 +115,21 @@ public class BsUserController {
}
}
@RequestMapping(value = "/phoneTest", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "手机号登录")
public ResponseData phoneTest() {
try {
Map<String, Object> other = new HashMap<>();
return ResponseMsgUtil.success(userService.login(UserLoginPlatform.H5, UserLoginType.SMS, "18090580471", "123456", other));
} catch (Exception e) {
log.error("LoginController --> phone() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/wechatMaHandleCode", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "微信小程序code解析")

Loading…
Cancel
Save