订单详情调整
This commit is contained in:
@@ -45,7 +45,7 @@ public class ProductController {
|
|||||||
@RequestParam(required = false) String code,
|
@RequestParam(required = false) String code,
|
||||||
@RequestParam(required = false) Integer shopId
|
@RequestParam(required = false) Integer shopId
|
||||||
) {
|
) {
|
||||||
if (shopId == null && StrUtil.isNotBlank(code)) {
|
if (shopId == null && StrUtil.isBlank(code)) {
|
||||||
return Result.fail("参数缺失");
|
return Result.fail("参数缺失");
|
||||||
}
|
}
|
||||||
return productService.queryShopIdByTableCode(userId, openId, code,lat,lng, shopId);
|
return productService.queryShopIdByTableCode(userId, openId, code,lat,lng, shopId);
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(shopId);
|
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(shopId != null ? shopId : tbShopTable.getShopId());
|
||||||
String distance = LocationUtils.getDistanceString(
|
String distance = LocationUtils.getDistanceString(
|
||||||
Double.parseDouble(lng), Double.parseDouble(lat),
|
Double.parseDouble(lng), Double.parseDouble(lat),
|
||||||
Double.parseDouble(shopInfo.getLng()), Double.parseDouble(shopInfo.getLat()));
|
Double.parseDouble(shopInfo.getLng()), Double.parseDouble(shopInfo.getLat()));
|
||||||
@@ -148,7 +148,7 @@ public class ProductService {
|
|||||||
concurrentMap.put("shopTableInfo", tbShopTable);
|
concurrentMap.put("shopTableInfo", tbShopTable);
|
||||||
concurrentMap.put("storeInfo", shopInfo);
|
concurrentMap.put("storeInfo", shopInfo);
|
||||||
concurrentMap.put("distance", distance);
|
concurrentMap.put("distance", distance);
|
||||||
TbShopUser shopUser = tbShopUserMapper.selectByUserIdAndShopId(userId, shopId.toString());
|
TbShopUser shopUser = tbShopUserMapper.selectByUserIdAndShopId(userId, shopId != null ? shopId.toString() : tbShopTable.getShopId().toString());
|
||||||
try {
|
try {
|
||||||
if (ObjectUtil.isEmpty(shopUser)) {
|
if (ObjectUtil.isEmpty(shopUser)) {
|
||||||
TbUserInfo tbUserInfo = tbUserInfoMapper.selectByPrimaryKey(Integer.valueOf(userId));
|
TbUserInfo tbUserInfo = tbUserInfoMapper.selectByPrimaryKey(Integer.valueOf(userId));
|
||||||
@@ -169,7 +169,7 @@ public class ProductService {
|
|||||||
shopUser.setConsumeNumber(0);
|
shopUser.setConsumeNumber(0);
|
||||||
shopUser.setLevelConsume(BigDecimal.ZERO);
|
shopUser.setLevelConsume(BigDecimal.ZERO);
|
||||||
shopUser.setStatus(Byte.parseByte("1"));
|
shopUser.setStatus(Byte.parseByte("1"));
|
||||||
shopUser.setShopId(shopId.toString());
|
shopUser.setShopId(shopId != null ? shopId.toString() : tbShopTable.getShopId().toString());
|
||||||
shopUser.setUserId(userId);
|
shopUser.setUserId(userId);
|
||||||
shopUser.setMiniOpenId(openId);
|
shopUser.setMiniOpenId(openId);
|
||||||
shopUser.setCreatedAt(System.currentTimeMillis());
|
shopUser.setCreatedAt(System.currentTimeMillis());
|
||||||
|
|||||||
Reference in New Issue
Block a user