提交代码

yy_dev
胡锐 2 years ago
parent bc6ce1b539
commit 7668a3b0cc
  1. 22
      cweb/src/main/java/com/cweb/controller/BsMerController.java
  2. 2
      cweb/src/main/java/com/cweb/controller/BsStoreController.java
  3. 15
      service/src/main/java/com/hfkj/dao/BsStoreRegionMapper.java
  4. 28
      service/src/main/java/com/hfkj/dao/BsStoreRegionSqlProvider.java
  5. 32
      service/src/main/java/com/hfkj/entity/BsStoreRegion.java
  6. 140
      service/src/main/java/com/hfkj/entity/BsStoreRegionExample.java
  7. 18
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java

@ -428,6 +428,10 @@ public class BsMerController {
|| StringUtils.isBlank(storeModel.getDoorHeadImg()) || StringUtils.isBlank(storeModel.getDoorHeadImg())
|| StringUtils.isBlank(storeModel.getCashRegisterImg()) || StringUtils.isBlank(storeModel.getCashRegisterImg())
|| StringUtils.isBlank(storeModel.getInternalImg()) || StringUtils.isBlank(storeModel.getInternalImg())
|| StringUtils.isBlank(storeModel.getStoreRegion().getAddress())
|| storeModel.getStoreRegion().getAreaCode() == null
|| storeModel.getStoreRegion().getLongitude() == null
|| storeModel.getStoreRegion().getLatitude() == null
) { ) {
log.error("configStore error!","参数错误"); log.error("configStore error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
@ -484,14 +488,26 @@ public class BsMerController {
storeModel.getStoreIndustry().setChildId(mer.getMerIndustry().getChildId()); storeModel.getStoreIndustry().setChildId(mer.getMerIndustry().getChildId());
storeModel.getStoreIndustry().setChildName(mer.getMerIndustry().getChildName()); storeModel.getStoreIndustry().setChildName(mer.getMerIndustry().getChildName());
storeModel.setStoreRegion(new BsStoreRegion()); // 区域
storeModel.getStoreRegion().setProvinceCode(mer.getMerRegion().getProvinceCode()); Map<String, SecRegion> regionMap = commonService.getParentInfoByRegionId(storeModel.getStoreRegion().getAreaCode());
if (regionMap == null) {
log.error("configMerBasis error!","未知的区域");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的区域");
}
storeModel.getStoreRegion().setProvinceCode(MapUtils.getObject(regionMap, "city").getRegionId());
storeModel.getStoreRegion().setProvinceName(MapUtils.getObject(regionMap, "city").getRegionName());
storeModel.getStoreRegion().setCityCode(MapUtils.getObject(regionMap, "region").getRegionId());
storeModel.getStoreRegion().setCityName(MapUtils.getObject(regionMap, "region").getRegionName());
storeModel.getStoreRegion().setAreaCode(MapUtils.getObject(regionMap, "street").getRegionId());
storeModel.getStoreRegion().setAreaName(MapUtils.getObject(regionMap, "street").getRegionName());
/* storeModel.getStoreRegion().setProvinceCode(mer.getMerRegion().getProvinceCode());
storeModel.getStoreRegion().setProvinceName(mer.getMerRegion().getProvinceName()); storeModel.getStoreRegion().setProvinceName(mer.getMerRegion().getProvinceName());
storeModel.getStoreRegion().setCityCode(mer.getMerRegion().getCityCode()); storeModel.getStoreRegion().setCityCode(mer.getMerRegion().getCityCode());
storeModel.getStoreRegion().setCityName(mer.getMerRegion().getCityName()); storeModel.getStoreRegion().setCityName(mer.getMerRegion().getCityName());
storeModel.getStoreRegion().setAreaCode(mer.getMerRegion().getAreaCode()); storeModel.getStoreRegion().setAreaCode(mer.getMerRegion().getAreaCode());
storeModel.getStoreRegion().setAreaName(mer.getMerRegion().getAreaName()); storeModel.getStoreRegion().setAreaName(mer.getMerRegion().getAreaName());
storeModel.getStoreRegion().setAddress(mer.getMerRegion().getAddress()); storeModel.getStoreRegion().setAddress(mer.getMerRegion().getAddress());*/
merService.configMerStore(storeModel); merService.configMerStore(storeModel);

@ -128,6 +128,8 @@ public class BsStoreController {
|| storeModel.getStoreRegion() == null || storeModel.getStoreRegion() == null
|| StringUtils.isBlank(storeModel.getStoreRegion().getAddress()) || StringUtils.isBlank(storeModel.getStoreRegion().getAddress())
|| storeModel.getStoreRegion().getAreaCode() == null || storeModel.getStoreRegion().getAreaCode() == null
|| storeModel.getStoreRegion().getLongitude() == null
|| storeModel.getStoreRegion().getLatitude() == null
) { ) {
log.error("configStore error!","参数错误"); log.error("configStore error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");

@ -42,14 +42,16 @@ public interface BsStoreRegionMapper extends BsStoreRegionMapperExt {
"insert into bs_store_region (store_id, province_code, ", "insert into bs_store_region (store_id, province_code, ",
"province_name, city_code, ", "province_name, city_code, ",
"city_name, area_code, ", "city_name, area_code, ",
"area_name, address, ", "area_name, longitude, ",
"latitude, address, ",
"`status`, create_time, ", "`status`, create_time, ",
"update_time, ext_1, ", "update_time, ext_1, ",
"ext_2, ext_3)", "ext_2, ext_3)",
"values (#{storeId,jdbcType=BIGINT}, #{provinceCode,jdbcType=BIGINT}, ", "values (#{storeId,jdbcType=BIGINT}, #{provinceCode,jdbcType=BIGINT}, ",
"#{provinceName,jdbcType=VARCHAR}, #{cityCode,jdbcType=BIGINT}, ", "#{provinceName,jdbcType=VARCHAR}, #{cityCode,jdbcType=BIGINT}, ",
"#{cityName,jdbcType=VARCHAR}, #{areaCode,jdbcType=BIGINT}, ", "#{cityName,jdbcType=VARCHAR}, #{areaCode,jdbcType=BIGINT}, ",
"#{areaName,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, ", "#{areaName,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, ",
"#{latitude,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
@ -71,6 +73,8 @@ public interface BsStoreRegionMapper extends BsStoreRegionMapperExt {
@Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR), @Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
@Result(column="area_code", property="areaCode", jdbcType=JdbcType.BIGINT), @Result(column="area_code", property="areaCode", jdbcType=JdbcType.BIGINT),
@Result(column="area_name", property="areaName", jdbcType=JdbcType.VARCHAR), @Result(column="area_name", property="areaName", jdbcType=JdbcType.VARCHAR),
@Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR),
@Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR),
@Result(column="address", property="address", jdbcType=JdbcType.VARCHAR), @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -84,7 +88,8 @@ public interface BsStoreRegionMapper extends BsStoreRegionMapperExt {
@Select({ @Select({
"select", "select",
"id, store_id, province_code, province_name, city_code, city_name, area_code, ", "id, store_id, province_code, province_name, city_code, city_name, area_code, ",
"area_name, address, `status`, create_time, update_time, ext_1, ext_2, ext_3", "area_name, longitude, latitude, address, `status`, create_time, update_time, ",
"ext_1, ext_2, ext_3",
"from bs_store_region", "from bs_store_region",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -97,6 +102,8 @@ public interface BsStoreRegionMapper extends BsStoreRegionMapperExt {
@Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR), @Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
@Result(column="area_code", property="areaCode", jdbcType=JdbcType.BIGINT), @Result(column="area_code", property="areaCode", jdbcType=JdbcType.BIGINT),
@Result(column="area_name", property="areaName", jdbcType=JdbcType.VARCHAR), @Result(column="area_name", property="areaName", jdbcType=JdbcType.VARCHAR),
@Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR),
@Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR),
@Result(column="address", property="address", jdbcType=JdbcType.VARCHAR), @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -125,6 +132,8 @@ public interface BsStoreRegionMapper extends BsStoreRegionMapperExt {
"city_name = #{cityName,jdbcType=VARCHAR},", "city_name = #{cityName,jdbcType=VARCHAR},",
"area_code = #{areaCode,jdbcType=BIGINT},", "area_code = #{areaCode,jdbcType=BIGINT},",
"area_name = #{areaName,jdbcType=VARCHAR},", "area_name = #{areaName,jdbcType=VARCHAR},",
"longitude = #{longitude,jdbcType=VARCHAR},",
"latitude = #{latitude,jdbcType=VARCHAR},",
"address = #{address,jdbcType=VARCHAR},", "address = #{address,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},", "`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},", "create_time = #{createTime,jdbcType=TIMESTAMP},",

@ -56,6 +56,14 @@ public class BsStoreRegionSqlProvider {
sql.VALUES("area_name", "#{areaName,jdbcType=VARCHAR}"); sql.VALUES("area_name", "#{areaName,jdbcType=VARCHAR}");
} }
if (record.getLongitude() != null) {
sql.VALUES("longitude", "#{longitude,jdbcType=VARCHAR}");
}
if (record.getLatitude() != null) {
sql.VALUES("latitude", "#{latitude,jdbcType=VARCHAR}");
}
if (record.getAddress() != null) { if (record.getAddress() != null) {
sql.VALUES("address", "#{address,jdbcType=VARCHAR}"); sql.VALUES("address", "#{address,jdbcType=VARCHAR}");
} }
@ -101,6 +109,8 @@ public class BsStoreRegionSqlProvider {
sql.SELECT("city_name"); sql.SELECT("city_name");
sql.SELECT("area_code"); sql.SELECT("area_code");
sql.SELECT("area_name"); sql.SELECT("area_name");
sql.SELECT("longitude");
sql.SELECT("latitude");
sql.SELECT("address"); sql.SELECT("address");
sql.SELECT("`status`"); sql.SELECT("`status`");
sql.SELECT("create_time"); sql.SELECT("create_time");
@ -157,6 +167,14 @@ public class BsStoreRegionSqlProvider {
sql.SET("area_name = #{record.areaName,jdbcType=VARCHAR}"); sql.SET("area_name = #{record.areaName,jdbcType=VARCHAR}");
} }
if (record.getLongitude() != null) {
sql.SET("longitude = #{record.longitude,jdbcType=VARCHAR}");
}
if (record.getLatitude() != null) {
sql.SET("latitude = #{record.latitude,jdbcType=VARCHAR}");
}
if (record.getAddress() != null) { if (record.getAddress() != null) {
sql.SET("address = #{record.address,jdbcType=VARCHAR}"); sql.SET("address = #{record.address,jdbcType=VARCHAR}");
} }
@ -201,6 +219,8 @@ public class BsStoreRegionSqlProvider {
sql.SET("city_name = #{record.cityName,jdbcType=VARCHAR}"); sql.SET("city_name = #{record.cityName,jdbcType=VARCHAR}");
sql.SET("area_code = #{record.areaCode,jdbcType=BIGINT}"); sql.SET("area_code = #{record.areaCode,jdbcType=BIGINT}");
sql.SET("area_name = #{record.areaName,jdbcType=VARCHAR}"); sql.SET("area_name = #{record.areaName,jdbcType=VARCHAR}");
sql.SET("longitude = #{record.longitude,jdbcType=VARCHAR}");
sql.SET("latitude = #{record.latitude,jdbcType=VARCHAR}");
sql.SET("address = #{record.address,jdbcType=VARCHAR}"); sql.SET("address = #{record.address,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
@ -246,6 +266,14 @@ public class BsStoreRegionSqlProvider {
sql.SET("area_name = #{areaName,jdbcType=VARCHAR}"); sql.SET("area_name = #{areaName,jdbcType=VARCHAR}");
} }
if (record.getLongitude() != null) {
sql.SET("longitude = #{longitude,jdbcType=VARCHAR}");
}
if (record.getLatitude() != null) {
sql.SET("latitude = #{latitude,jdbcType=VARCHAR}");
}
if (record.getAddress() != null) { if (record.getAddress() != null) {
sql.SET("address = #{address,jdbcType=VARCHAR}"); sql.SET("address = #{address,jdbcType=VARCHAR}");
} }

@ -53,6 +53,16 @@ public class BsStoreRegion implements Serializable {
*/ */
private String areaName; private String areaName;
/**
* 地址经度
*/
private String longitude;
/**
* 地址纬度
*/
private String latitude;
/** /**
* 详细地址 * 详细地址
*/ */
@ -145,6 +155,22 @@ public class BsStoreRegion implements Serializable {
this.areaName = areaName; this.areaName = areaName;
} }
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getAddress() { public String getAddress() {
return address; return address;
} }
@ -221,6 +247,8 @@ public class BsStoreRegion implements Serializable {
&& (this.getCityName() == null ? other.getCityName() == null : this.getCityName().equals(other.getCityName())) && (this.getCityName() == null ? other.getCityName() == null : this.getCityName().equals(other.getCityName()))
&& (this.getAreaCode() == null ? other.getAreaCode() == null : this.getAreaCode().equals(other.getAreaCode())) && (this.getAreaCode() == null ? other.getAreaCode() == null : this.getAreaCode().equals(other.getAreaCode()))
&& (this.getAreaName() == null ? other.getAreaName() == null : this.getAreaName().equals(other.getAreaName())) && (this.getAreaName() == null ? other.getAreaName() == null : this.getAreaName().equals(other.getAreaName()))
&& (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
&& (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()))
&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress())) && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
@ -242,6 +270,8 @@ public class BsStoreRegion implements Serializable {
result = prime * result + ((getCityName() == null) ? 0 : getCityName().hashCode()); result = prime * result + ((getCityName() == null) ? 0 : getCityName().hashCode());
result = prime * result + ((getAreaCode() == null) ? 0 : getAreaCode().hashCode()); result = prime * result + ((getAreaCode() == null) ? 0 : getAreaCode().hashCode());
result = prime * result + ((getAreaName() == null) ? 0 : getAreaName().hashCode()); result = prime * result + ((getAreaName() == null) ? 0 : getAreaName().hashCode());
result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode()); result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
@ -266,6 +296,8 @@ public class BsStoreRegion implements Serializable {
sb.append(", cityName=").append(cityName); sb.append(", cityName=").append(cityName);
sb.append(", areaCode=").append(areaCode); sb.append(", areaCode=").append(areaCode);
sb.append(", areaName=").append(areaName); sb.append(", areaName=").append(areaName);
sb.append(", longitude=").append(longitude);
sb.append(", latitude=").append(latitude);
sb.append(", address=").append(address); sb.append(", address=").append(address);
sb.append(", status=").append(status); sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);

@ -635,6 +635,146 @@ public class BsStoreRegionExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andLongitudeIsNull() {
addCriterion("longitude is null");
return (Criteria) this;
}
public Criteria andLongitudeIsNotNull() {
addCriterion("longitude is not null");
return (Criteria) this;
}
public Criteria andLongitudeEqualTo(String value) {
addCriterion("longitude =", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotEqualTo(String value) {
addCriterion("longitude <>", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThan(String value) {
addCriterion("longitude >", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThanOrEqualTo(String value) {
addCriterion("longitude >=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThan(String value) {
addCriterion("longitude <", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThanOrEqualTo(String value) {
addCriterion("longitude <=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLike(String value) {
addCriterion("longitude like", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotLike(String value) {
addCriterion("longitude not like", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeIn(List<String> values) {
addCriterion("longitude in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotIn(List<String> values) {
addCriterion("longitude not in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeBetween(String value1, String value2) {
addCriterion("longitude between", value1, value2, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotBetween(String value1, String value2) {
addCriterion("longitude not between", value1, value2, "longitude");
return (Criteria) this;
}
public Criteria andLatitudeIsNull() {
addCriterion("latitude is null");
return (Criteria) this;
}
public Criteria andLatitudeIsNotNull() {
addCriterion("latitude is not null");
return (Criteria) this;
}
public Criteria andLatitudeEqualTo(String value) {
addCriterion("latitude =", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotEqualTo(String value) {
addCriterion("latitude <>", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThan(String value) {
addCriterion("latitude >", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThanOrEqualTo(String value) {
addCriterion("latitude >=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThan(String value) {
addCriterion("latitude <", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThanOrEqualTo(String value) {
addCriterion("latitude <=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLike(String value) {
addCriterion("latitude like", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotLike(String value) {
addCriterion("latitude not like", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeIn(List<String> values) {
addCriterion("latitude in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotIn(List<String> values) {
addCriterion("latitude not in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeBetween(String value1, String value2) {
addCriterion("latitude between", value1, value2, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotBetween(String value1, String value2) {
addCriterion("latitude not between", value1, value2, "latitude");
return (Criteria) this;
}
public Criteria andAddressIsNull() { public Criteria andAddressIsNull() {
addCriterion("address is null"); addCriterion("address is null");
return (Criteria) this; return (Criteria) this;

@ -210,6 +210,15 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
tradeOrder.setPayTime(new Date()); tradeOrder.setPayTime(new Date());
editOrder(tradeOrder); editOrder(tradeOrder);
Map<String,Object> param = new HashMap<>();
param.put("storeId", tradeOrder.getStoreId());
param.put("deviceType", DeviceTypeEnum.type1.getNumber());
param.put("status", DeviceStatusEnum.status1.getNumber());
List<BsDevice> deviceList = deviceService.getDeviceList(param);
for (BsDevice device : deviceList) {
soundService.sendPayMsg(device.getDeviceNo(), tradeOrder.getTradeAmount());
}
if (tradeOrder.getStoreDiscountId() != null && StringUtils.isNotBlank(tradeOrder.getUserPhone())) { if (tradeOrder.getStoreDiscountId() != null && StringUtils.isNotBlank(tradeOrder.getUserPhone())) {
BsStoreDiscountActivityPartakeUser partakeUser = discountActivityPartakeUserService.getPartakeUser(tradeOrder.getUserPhone(), tradeOrder.getStoreDiscountId()); BsStoreDiscountActivityPartakeUser partakeUser = discountActivityPartakeUserService.getPartakeUser(tradeOrder.getUserPhone(), tradeOrder.getStoreDiscountId());
if (partakeUser != null) { if (partakeUser != null) {
@ -223,15 +232,6 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
userDiscountService.userDiscountUse(tradeOrder.getUserDiscountId(), tradeOrder.getUserPhone()); userDiscountService.userDiscountUse(tradeOrder.getUserDiscountId(), tradeOrder.getUserPhone());
} }
Map<String,Object> param = new HashMap<>();
param.put("storeId", tradeOrder.getStoreId());
param.put("deviceType", DeviceTypeEnum.type1.getNumber());
param.put("status", DeviceStatusEnum.status1.getNumber());
List<BsDevice> deviceList = deviceService.getDeviceList(param);
for (BsDevice device : deviceList) {
soundService.sendPayMsg(device.getDeviceNo(), tradeOrder.getTradeAmount());
}
// 创建分账 // 创建分账
if (tradeOrder.getProfitSharingStatus().equals(true)) { if (tradeOrder.getProfitSharingStatus().equals(true)) {
new Thread(() -> { new Thread(() -> {

Loading…
Cancel
Save