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