|
|
|
@ -86,15 +86,10 @@ public class HighThirdPartyController { |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "查询星巴克商品") |
|
|
|
|
public ResponseData getStarbucksProducts(@RequestParam(name = "name", required = false) String name, |
|
|
|
|
@RequestParam(value = "regionId", required = true) String regionId) { |
|
|
|
|
@RequestParam(value = "companyId", required = true) Long companyId) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
SecRegion region = commonService.getParentByRegion(Long.valueOf(regionId)); |
|
|
|
|
BigDecimal productDiscount = null; |
|
|
|
|
if (region != null) { |
|
|
|
|
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); |
|
|
|
|
productDiscount = thirdProductConfig.getProductConfigNum(1, bsCompany.getId()); |
|
|
|
|
} |
|
|
|
|
BigDecimal productDiscount = thirdProductConfig.getProductConfigNum(1, companyId);; |
|
|
|
|
|
|
|
|
|
if (productDiscount == null) { |
|
|
|
|
log.error("getRechargeProduct error!", "查询失败!"); |
|
|
|
@ -228,7 +223,7 @@ public class HighThirdPartyController { |
|
|
|
|
@RequestMapping(value = "/listByStoreCode", method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "查询肯德基门店菜单") |
|
|
|
|
public ResponseData listByStoreCode(@RequestParam(name = "storeCode", required = false) String storeCode, @RequestParam(value = "regionId", required = true) String regionId) { |
|
|
|
|
public ResponseData listByStoreCode(@RequestParam(name = "storeCode", required = false) String storeCode, @RequestParam(value = "companyId", required = true) Long companyId) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
JSONObject jsonObject = QianZhuConfig.listByStoreCode(storeCode); |
|
|
|
@ -240,12 +235,7 @@ public class HighThirdPartyController { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未查询到任何门店"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal productDiscount = null; |
|
|
|
|
SecRegion region = commonService.getParentByRegion(Long.valueOf(regionId)); |
|
|
|
|
if (region != null) { |
|
|
|
|
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); |
|
|
|
|
productDiscount = thirdProductConfig.getProductConfigNum(2, bsCompany.getId()); |
|
|
|
|
} |
|
|
|
|
BigDecimal productDiscount = thirdProductConfig.getProductConfigNum(2, companyId); |
|
|
|
|
|
|
|
|
|
if (productDiscount == null) { |
|
|
|
|
log.error("getRechargeProduct error!", "查询失败!"); |
|
|
|
@ -436,15 +426,10 @@ public class HighThirdPartyController { |
|
|
|
|
public ResponseData getMemberProducts(@RequestParam(name = "name", required = false) String name, |
|
|
|
|
@RequestParam(value = "typeId", required = true) Integer typeId, |
|
|
|
|
@RequestParam(value = "brandId", required = true) Integer brandId, |
|
|
|
|
@RequestParam(value = "regionId", required = true) String regionId) { |
|
|
|
|
@RequestParam(value = "companyId", required = true) Long companyId) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
SecRegion region = commonService.getParentByRegion(Long.valueOf(regionId)); |
|
|
|
|
BigDecimal productDiscount = null; |
|
|
|
|
if (region != null) { |
|
|
|
|
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); |
|
|
|
|
productDiscount = thirdProductConfig.getProductConfigNum(3, bsCompany.getId()); |
|
|
|
|
} |
|
|
|
|
BigDecimal productDiscount = thirdProductConfig.getProductConfigNum(3, companyId); |
|
|
|
|
|
|
|
|
|
if (productDiscount == null) { |
|
|
|
|
log.error("getRechargeProduct error!", "查询失败!"); |
|
|
|
|