| @@ -4,8 +4,10 @@ package com.iformall.controller.basic; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.common.Result; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.controller.base.DouyinBaseController; | |||||
| import com.iformall.domain.po.TtPoiTakeRate; | import com.iformall.domain.po.TtPoiTakeRate; | ||||
| import com.iformall.domain.po.WxCoupon; | import com.iformall.domain.po.WxCoupon; | ||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| @@ -34,7 +36,7 @@ import java.util.stream.Collectors; | |||||
| */ | */ | ||||
| @RestController | @RestController | ||||
| @RequestMapping("poiPlan") | @RequestMapping("poiPlan") | ||||
| public class TtPoiPlanController extends BaseController { | |||||
| public class TtPoiPlanController extends DouyinBaseController { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||
| @Autowired | @Autowired | ||||
| @@ -94,7 +96,13 @@ public class TtPoiPlanController extends BaseController { | |||||
| if(pageSize == null){ | if(pageSize == null){ | ||||
| pageSize = 100; | pageSize = 100; | ||||
| } | } | ||||
| return ttCouponGoodsService.poiPlanList(getTenantInfo(),couponId,pageNum,pageSize); | |||||
| try { | |||||
| boolean isSaas = this.isGoodLifeSaas(); | |||||
| return ttCouponGoodsService.poiPlanList(getTenantInfo(),couponId,pageNum,pageSize,isSaas); | |||||
| } catch (Exception e) { | |||||
| logger.error("list error.",e); | |||||
| return new ResultData(Result.ERROR,e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation("定向计划分页列表接口") | @ApiOperation("定向计划分页列表接口") | ||||
| @@ -112,7 +120,13 @@ public class TtPoiPlanController extends BaseController { | |||||
| if(pageSize == null){ | if(pageSize == null){ | ||||
| pageSize = 100; | pageSize = 100; | ||||
| } | } | ||||
| return ttCouponGoodsService.poiOrientedPlanList(getTenantInfo(),couponId,pageNum,pageSize); | |||||
| try { | |||||
| boolean isSaas = this.isGoodLifeSaas(); | |||||
| return ttCouponGoodsService.poiOrientedPlanList(getTenantInfo(),couponId,pageNum,pageSize,isSaas); | |||||
| } catch (Exception e) { | |||||
| logger.error("orientedList error.",e); | |||||
| return new ResultData(Result.ERROR,e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation("发布修改通用佣金计划") | @ApiOperation("发布修改通用佣金计划") | ||||
| @@ -134,7 +148,13 @@ public class TtPoiPlanController extends BaseController { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"商品Id为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"商品Id为空"); | ||||
| } | } | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| return ttCouponGoodsService.poiPlanSave(record); | |||||
| try { | |||||
| boolean isSaas = this.isGoodLifeSaas(); | |||||
| return ttCouponGoodsService.poiPlanSave(record,isSaas); | |||||
| } catch (Exception e) { | |||||
| logger.error("save error.",e); | |||||
| return new ResultData(Result.ERROR,e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation("发布修改定向佣金计划") | @ApiOperation("发布修改定向佣金计划") | ||||
| @@ -184,7 +204,13 @@ public class TtPoiPlanController extends BaseController { | |||||
| } | } | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| return ttCouponGoodsService.saveOrientedPlan(record); | |||||
| try { | |||||
| boolean isSaas = this.isGoodLifeSaas(); | |||||
| return ttCouponGoodsService.saveOrientedPlan(record,isSaas); | |||||
| } catch (Exception e) { | |||||
| logger.error("saveOrientedPlan error.",e); | |||||
| return new ResultData(Result.ERROR,e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation("新增定向佣金达人合作") | @ApiOperation("新增定向佣金达人合作") | ||||
| @@ -200,7 +226,13 @@ public class TtPoiPlanController extends BaseController { | |||||
| } | } | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| return ttCouponGoodsService.addOrientedPlanDouyin(record); | |||||
| try { | |||||
| boolean isSaas = this.isGoodLifeSaas(); | |||||
| return ttCouponGoodsService.addOrientedPlanDouyin(record,isSaas); | |||||
| } catch (Exception e) { | |||||
| logger.error("addOrientedPlanDouyin error.",e); | |||||
| return new ResultData(Result.ERROR,e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation("取消定向佣金达人合作") | @ApiOperation("取消定向佣金达人合作") | ||||
| @@ -215,7 +247,13 @@ public class TtPoiPlanController extends BaseController { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"取消定向达人抖音号为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"取消定向达人抖音号为空"); | ||||
| } | } | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| return ttCouponGoodsService.cancelOrientedPlanDouyin(record); | |||||
| try { | |||||
| boolean isSaas = this.isGoodLifeSaas(); | |||||
| return ttCouponGoodsService.cancelOrientedPlanDouyin(record,isSaas); | |||||
| } catch (Exception e) { | |||||
| logger.error("cancelOrientedPlanDouyin error.",e); | |||||
| return new ResultData(Result.ERROR,e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation("修改通用佣金计划状态") | @ApiOperation("修改通用佣金计划状态") | ||||
| @@ -234,8 +272,13 @@ public class TtPoiPlanController extends BaseController { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"状态不合法"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"状态不合法"); | ||||
| } | } | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| return ttCouponGoodsService.poiPlanUpdateStatus(record); | |||||
| try { | |||||
| boolean isSaas = this.isGoodLifeSaas(); | |||||
| return ttCouponGoodsService.poiPlanUpdateStatus(record,isSaas); | |||||
| } catch (Exception e) { | |||||
| logger.error("cancelOrientedPlanDouyin error.",e); | |||||
| return new ResultData(Result.ERROR,e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation("修改定向佣金计划状态") | @ApiOperation("修改定向佣金计划状态") | ||||
| @@ -254,8 +297,13 @@ public class TtPoiPlanController extends BaseController { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"状态不合法"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"状态不合法"); | ||||
| } | } | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| return ttCouponGoodsService.poiOrientedPlanUpdateStatus(record); | |||||
| try { | |||||
| boolean isSaas = this.isGoodLifeSaas(); | |||||
| return ttCouponGoodsService.poiOrientedPlanUpdateStatus(record,isSaas); | |||||
| } catch (Exception e) { | |||||
| logger.error("updateOrientedStatus error.",e); | |||||
| return new ResultData(Result.ERROR,e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @@ -226,7 +226,8 @@ public class AsyncTask { | |||||
| public void importExcelPoiDataForNew(File file, MallUserInfo user, String importKey) { | public void importExcelPoiDataForNew(File file, MallUserInfo user, String importKey) { | ||||
| ImportParams params = new ImportParams(); | ImportParams params = new ImportParams(); | ||||
| // 需要验证 | // 需要验证 | ||||
| params.setImportFields(new String[]{"富茂商户ID", "富茂商户名称", "来客门店名称", "来客门店ID"}); | |||||
| params.setImportFields(new String[]{"富茂商户ID", "富茂商户名称", "经度", "纬度", | |||||
| "来客门店名称", "来客门店ID", "省份", "城市", "地址"}); | |||||
| IExcelDataHandler<MerchantPoiTNew> handler = new AsyncTask.PoiNewExcelHandler(); | IExcelDataHandler<MerchantPoiTNew> handler = new AsyncTask.PoiNewExcelHandler(); | ||||
| handler.setNeedHandlerFields(new String[]{"富茂商户ID","来客门店ID"}); | handler.setNeedHandlerFields(new String[]{"富茂商户ID","来客门店ID"}); | ||||
| params.setNeedVerify(true); | params.setNeedVerify(true); | ||||
| @@ -0,0 +1,303 @@ | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_0` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_1` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_2` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_3` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_4` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_5` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_6` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_7` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_8` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_9` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_10` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_11` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_12` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_13` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_14` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_15` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_16` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_17` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_18` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_19` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_20` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_21` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_22` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_23` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_24` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_25` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_26` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_27` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_28` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_29` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_30` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_31` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_32` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_33` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_34` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_35` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_36` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_37` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_38` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_39` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_40` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_41` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_42` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_43` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_44` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_45` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_46` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_47` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_48` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_49` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_50` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_51` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_52` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_53` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_54` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_55` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_56` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_57` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_58` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_59` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_60` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_61` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_62` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_63` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_64` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_65` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_66` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_67` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_68` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_69` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_70` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_71` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_72` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_73` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_74` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_75` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_76` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_77` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_78` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_79` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_80` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_81` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_82` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_83` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_84` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_85` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_86` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_87` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_88` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_89` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_90` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_91` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_92` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_93` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_94` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_95` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_96` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_97` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_98` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_order_reservation_99` | |||||
| ADD COLUMN `reservation_merchant_id` bigint(20) AFTER `user_address`, | |||||
| ADD COLUMN `reservation_merchant_name` varchar(255) AFTER `reservation_merchant_id`; | |||||
| @@ -0,0 +1,92 @@ | |||||
| package com.iformall.controller; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.WxCouponOrderReservation; | |||||
| import com.iformall.domain.po.base.BaseEntity; | |||||
| import com.iformall.enums.EnumCouponOrderReservationStatus; | |||||
| import com.iformall.service.WxCouponOrderReservationService; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| @RestController | |||||
| @RequestMapping("/api/wxCouponOrderReservation") | |||||
| @Api(description = "查询预约接口") | |||||
| public class WxCouponOrderReservationController extends BaseController { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| private WxCouponOrderReservationService wxCouponOrderReservationService; | |||||
| @ApiOperation("分页列表接口") | |||||
| @GetMapping("list") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData list(@ModelAttribute WxCouponOrderReservation reservation, Integer pageNum, Integer pageSize) { | |||||
| if (reservation == null) reservation = new WxCouponOrderReservation(); | |||||
| reservation.updateTenantInfo(getTenantInfo()); | |||||
| reservation.setReservationMerchantId(getLoginBUser().getMerchantId()); | |||||
| reservation.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); | |||||
| PageInfo<WxCouponOrderReservation> wxCouponOrderReservationPageInfo = wxCouponOrderReservationService.listAsPage(reservation, pageNum, pageSize); | |||||
| return new ResultData(wxCouponOrderReservationPageInfo); | |||||
| } | |||||
| @ApiOperation(value = "详情接口") | |||||
| @GetMapping("detail") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "id", value = "预约ID", dataType = "Long", paramType = "query", required = true) | |||||
| }) | |||||
| public ResultData detail(@RequestParam("id") Long id) { | |||||
| if(id == null) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| WxCouponOrderReservation reservation = wxCouponOrderReservationService.getById(id, getTenantInfo().getTenantId()); | |||||
| return new ResultData(reservation); | |||||
| } | |||||
| @ApiOperation(value = "修改状态") | |||||
| @PostMapping("updateStatus") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "id", value = "预约ID", dataType = "Long", paramType = "query", required = true) | |||||
| }) | |||||
| public ResultData updateStatus(@RequestBody WxCouponOrderReservation reservation) { | |||||
| if(reservation.getId() == null || reservation.getStatus() == null) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| WxCouponOrderReservation sortReservation = wxCouponOrderReservationService.getSortById(reservation.getId(), getTenantInfo().getTenantId()); | |||||
| if(sortReservation == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"id is error"); | |||||
| } | |||||
| if(!getLoginBUser().getMerchantId().equals(sortReservation.getReservationMerchantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"查询数据门店不匹配"); | |||||
| } | |||||
| if(EnumCouponOrderReservationStatus.reservation_dispatch.getCode().equals(reservation.getStatus())){ | |||||
| if(!EnumCouponOrderReservationStatus.reservation.getCode().equals(sortReservation.getStatus())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"预约单状态不支持确认"); | |||||
| } | |||||
| } | |||||
| if(EnumCouponOrderReservationStatus.reservation.getCode().equals(reservation.getStatus())){ | |||||
| if(!EnumCouponOrderReservationStatus.reservation_dispatch.getCode().equals(sortReservation.getStatus())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"预约单状态不支持取消"); | |||||
| } | |||||
| } | |||||
| WxCouponOrderReservation updReservation = new WxCouponOrderReservation(); | |||||
| updReservation.updateTenantInfo(getTenantInfo()); | |||||
| updReservation.setId(reservation.getId()); | |||||
| updReservation.setStatus(reservation.getStatus()); | |||||
| updReservation.setRemark(reservation.getRemark()); | |||||
| wxCouponOrderReservationService.saveOrUpdate(updReservation); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | |||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.controller; | package com.iformall.controller; | ||||
| import com.iformall.annotation.TenantIgnore; | |||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxCouponOrderReservation; | import com.iformall.domain.po.WxCouponOrderReservation; | ||||
| @@ -57,6 +58,7 @@ public class WxCouponOrderReservationController extends BaseController { | |||||
| return new ResultData(reservation); | return new ResultData(reservation); | ||||
| } | } | ||||
| @TenantIgnore | |||||
| @ApiOperation(value = "") | @ApiOperation(value = "") | ||||
| @PostMapping("saveOrUpdate") | @PostMapping("saveOrUpdate") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.domain.po; | package com.iformall.domain.po; | ||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import lombok.Data; | import lombok.Data; | ||||
| @@ -37,6 +38,12 @@ public class WxCouponOrderReservation extends TenantEntity { | |||||
| private Date startDate; | private Date startDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "", name = "endDate") | @io.swagger.annotations.ApiModelProperty(value = "", name = "endDate") | ||||
| private Date endDate; | private Date endDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "", name = "reservationMerchantId") | |||||
| private Long reservationMerchantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "", name = "reservationMerchantName") | |||||
| private String reservationMerchantName; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "描述", name = "describeStr") | @io.swagger.annotations.ApiModelProperty(value = "描述", name = "describeStr") | ||||
| private String describeStr; | private String describeStr; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "描述", name = "describeImg") | @io.swagger.annotations.ApiModelProperty(value = "描述", name = "describeImg") | ||||
| @@ -65,6 +72,11 @@ public class WxCouponOrderReservation extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updateDate") | @io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updateDate") | ||||
| private Date updateDate; | private Date updateDate; | ||||
| @TableField(exist = false) | |||||
| private Date serchStartDate; | |||||
| @TableField(exist = false) | |||||
| private Date serchEndDate; | |||||
| public Long getcUserId() { | public Long getcUserId() { | ||||
| return cUserId; | return cUserId; | ||||
| @@ -379,6 +379,14 @@ public class WxMerchant extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long floor; | private Long floor; | ||||
| @io.swagger.annotations.ApiModelProperty(value="省",name="province") | |||||
| @TableField(exist = false) | |||||
| private String province; | |||||
| @io.swagger.annotations.ApiModelProperty(value="市",name="city") | |||||
| @TableField(exist = false) | |||||
| private String city; | |||||
| @io.swagger.annotations.ApiModelProperty(value="地址",name="addr") | @io.swagger.annotations.ApiModelProperty(value="地址",name="addr") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String addr; | private String addr; | ||||
| @@ -19,10 +19,29 @@ public class MerchantPoiTNew implements Serializable { | |||||
| @Excel(name="富茂商户名称",width = 20,orderNum = "2") | @Excel(name="富茂商户名称",width = 20,orderNum = "2") | ||||
| @io.swagger.annotations.ApiModelProperty(value="富茂商户名称",name="merchantName") | @io.swagger.annotations.ApiModelProperty(value="富茂商户名称",name="merchantName") | ||||
| private String merchantName; | private String merchantName; | ||||
| @Excel(name = "来客门店名称", width = 20, orderNum = "3") | |||||
| @Excel(name="经度",width = 20,orderNum = "3") | |||||
| @io.swagger.annotations.ApiModelProperty(value="经度",name="longitude") | |||||
| private BigDecimal longitude; | |||||
| @Excel(name = "纬度", width = 20, orderNum = "4") | |||||
| @io.swagger.annotations.ApiModelProperty(value="纬度",name="latitude") | |||||
| private BigDecimal latitude; | |||||
| @Excel(name = "来客门店名称", width = 20, orderNum = "5") | |||||
| @io.swagger.annotations.ApiModelProperty(value="来客门店名称",name="poiName") | @io.swagger.annotations.ApiModelProperty(value="来客门店名称",name="poiName") | ||||
| private String poiName; | private String poiName; | ||||
| @Excel(name="来客门店ID",width = 20,orderNum = "4") | |||||
| @Excel(name="来客门店ID",width = 20,orderNum = "6") | |||||
| @io.swagger.annotations.ApiModelProperty(value="来客门店ID",name="poiId") | @io.swagger.annotations.ApiModelProperty(value="来客门店ID",name="poiId") | ||||
| private String poiId; | private String poiId; | ||||
| @Excel(name = "省份", width = 20, orderNum = "7") | |||||
| @io.swagger.annotations.ApiModelProperty(value="已匹配POI省份",name="province") | |||||
| private String province; | |||||
| @Excel(name = "城市", width = 20, orderNum = "8") | |||||
| @io.swagger.annotations.ApiModelProperty(value="已匹配POI城市",name="city") | |||||
| private String city; | |||||
| @Excel(name = "地址", width = 20, orderNum = "9") | |||||
| @io.swagger.annotations.ApiModelProperty(value="已匹配POI地址",name="address") | |||||
| private String address; | |||||
| } | } | ||||
| @@ -36,6 +36,10 @@ public class WxMerchantVo extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户业态",name="parameter") | @io.swagger.annotations.ApiModelProperty(value="商户业态",name="parameter") | ||||
| private String parameter; | private String parameter; | ||||
| @io.swagger.annotations.ApiModelProperty(value="省",name="province") | |||||
| private String province; | |||||
| @io.swagger.annotations.ApiModelProperty(value="市",name="city") | |||||
| private String city; | |||||
| @io.swagger.annotations.ApiModelProperty(value="地址",name="addr") | @io.swagger.annotations.ApiModelProperty(value="地址",name="addr") | ||||
| private String addr; | private String addr; | ||||
| @io.swagger.annotations.ApiModelProperty(value="百度poi(省市区县street等)",name="baiduPoi") | @io.swagger.annotations.ApiModelProperty(value="百度poi(省市区县street等)",name="baiduPoi") | ||||
| @@ -138,6 +142,8 @@ public class WxMerchantVo extends TenantEntity { | |||||
| this.actionDesc = m.getActionDesc(); | this.actionDesc = m.getActionDesc(); | ||||
| this.linkLinePhone = m.getLinkLinePhone(); | this.linkLinePhone = m.getLinkLinePhone(); | ||||
| this.topTime = m.getTopTime(); | this.topTime = m.getTopTime(); | ||||
| this.province = m.getProvince(); | |||||
| this.city = m.getCity(); | |||||
| this.addr = m.getAddr(); | this.addr = m.getAddr(); | ||||
| this.supplierExtId = m.getSupplierExtId(); | this.supplierExtId = m.getSupplierExtId(); | ||||
| this.ttPoi = m.getTtPoi(); | this.ttPoi = m.getTtPoi(); | ||||
| @@ -0,0 +1,169 @@ | |||||
| package com.iformall.douyin.web.api.goodlifesaas; | |||||
| import com.iformall.douyin.web.bean.*; | |||||
| import me.chanjar.weixin.common.error.WxErrorException; | |||||
| import java.util.List; | |||||
| /** | |||||
| * 商铺 商品poi接入操作接口. | |||||
| * | |||||
| * @author | |||||
| */ | |||||
| public interface TtGoodLifeSaasPoiPlanService { | |||||
| /** | |||||
| *查询通用佣金计划 | |||||
| */ | |||||
| String POI_PLAN_LIST = "https://open.douyin.com/poi/plan/list/"; | |||||
| /** | |||||
| *发布/修改通用佣金计划 | |||||
| */ | |||||
| String POI_COMMON_PLAN_SAVE = "https://open.douyin.com/poi/common/plan/save/"; | |||||
| /** | |||||
| * 修改通用佣金计划状态 | |||||
| */ | |||||
| String POI_COMMON_PLAN_UPDATE_STATUS = "https://open.douyin.com/poi/common/plan/update/status/"; | |||||
| /** | |||||
| * 通用佣金计划查询带货数据 | |||||
| */ | |||||
| String POI_COMMON_PLAN_DETAIL = "https://open.douyin.com/poi/common/plan/detail/"; | |||||
| /** | |||||
| * 通用佣金计划查询带货达人列表 | |||||
| */ | |||||
| String POI_COMMON_PLAN_TALENT_LIST = "https://open.douyin.com/poi/common/plan/talent/list/"; | |||||
| /** | |||||
| * 通用佣金计划查询达人带货数据 | |||||
| */ | |||||
| String POI_COMMON_PLAN_TALENT_DETAIL = "https://open.douyin.com/poi/common/plan/talent/detail/"; | |||||
| /** | |||||
| * 通用佣金计划查询达人带货详情 | |||||
| */ | |||||
| String POI_COMMON_PLAN_TALENT_MEDIA_LIST = "https://open.douyin.com/poi/common/plan/talent/media/list/"; | |||||
| /** | |||||
| * 发布/修改直播间定向佣金计划 | |||||
| */ | |||||
| String POI_ORIENTED_PLAN_LIVE_SAVE = "https://open.douyin.com/poi/oriented/plan/live/save/"; | |||||
| /** | |||||
| * 发布/修改短视频定向佣金计划 | |||||
| */ | |||||
| String POI_ORIENTED_PLAN_VIDEO_SAVE = "https://open.douyin.com/poi/oriented/plan/video/save/"; | |||||
| /** | |||||
| * 修改定向计划状态 | |||||
| */ | |||||
| String POI_ORIENTED_PLAN_UPDATE_STATUS = "https://open.douyin.com/poi/oriented/plan/update/status/"; | |||||
| /** | |||||
| * 取消定向佣金计划指定的达人 | |||||
| */ | |||||
| String POI_ORIENTED_PLAN_DELETE_TALENT = "https://open.douyin.com/poi/oriented/plan/delete/talent/"; | |||||
| /** | |||||
| * 查询达人的定向佣金计划带货数据 | |||||
| */ | |||||
| String POI_ORIENTED_PLAN_TALENT_DETAIL = "https://open.douyin.com/poi/oriented/plan/talent/detail/"; | |||||
| /** | |||||
| * 通过商品 ID 查询定向佣金计划 | |||||
| */ | |||||
| String POI_ORIENTED_PLAN_LIST = "https://open.douyin.com/poi/oriented/plan/list/"; | |||||
| /** | |||||
| * 查询定向佣金计划带货汇总数据 | |||||
| */ | |||||
| String POI_ORIENTED_PLAN_DETAIL = "https://open.douyin.com/poi/oriented/plan/detail/"; | |||||
| /** | |||||
| * 商品达人分佣配置 | |||||
| * 淘汰 | |||||
| */ | |||||
| String POI_TAKE_RATE = "https://open.douyin.com/poi/v2/spu/take_rate/sync/"; | |||||
| /** | |||||
| * 查询通用佣金计划 | |||||
| */ | |||||
| PoiPlanPage poiPlanList(Long spuId,Integer pageNo,Integer pageSize) throws WxErrorException; | |||||
| /** | |||||
| * 通过商品 ID 查询定向佣金计划 | |||||
| */ | |||||
| PoiOrientedPlanPage poiOrientedPlanList(Long spuId, Integer pageNo, Integer pageSize) throws WxErrorException; | |||||
| /** | |||||
| * 发布/修改通用佣金计划 | |||||
| */ | |||||
| Long poiPlanSave(PoiPlan poiPlan) throws WxErrorException ; | |||||
| /** | |||||
| * 发布/修改直播间定向佣金计划 | |||||
| */ | |||||
| Long poiOrientedPlanLiveSave(PoiOrientedPlan poiPlan) throws WxErrorException ; | |||||
| /** | |||||
| * 发布/修改短视频定向佣金计划 | |||||
| */ | |||||
| Long poiOrientedPlanVideoSave(PoiOrientedPlan poiPlan) throws WxErrorException ; | |||||
| /** | |||||
| * 修改通用佣金计划状态 | |||||
| * status | |||||
| * 1:设置为进行中 | |||||
| * 2:设置为暂停中 | |||||
| * 3:设置为已关闭 | |||||
| */ | |||||
| boolean poiPlanUpdateStatus(Long planId,Integer status) throws WxErrorException ; | |||||
| /** | |||||
| * 修改定向佣金计划状态 | |||||
| * status | |||||
| * 1:设置为进行中 | |||||
| * 2:设置为暂停中 | |||||
| * 3:设置为已关闭 | |||||
| */ | |||||
| boolean poiOrientedPlanUpdateStatus(Long planId,Integer status) throws WxErrorException ; | |||||
| /** | |||||
| * 取消定向佣金计划指定的达人ORIENTED_PLAN_DELETE_TALENT | |||||
| */ | |||||
| boolean poiOrientedPlanDeleteTalent(Long planId,String douyinId) throws WxErrorException ; | |||||
| /** | |||||
| * 商品达人分佣配置(定向分佣) | |||||
| * 淘汰 | |||||
| */ | |||||
| String poiTakeRate(PoiTakeRate poiTakeRate) throws WxErrorException ; | |||||
| /** | |||||
| * 通用佣金计划查询带货数据 | |||||
| */ | |||||
| PoiPlanDetail poiPlanDetail(List<Long> plan_id_list) throws WxErrorException ; | |||||
| /** | |||||
| * 查询定向佣金计划带货汇总数据 | |||||
| */ | |||||
| PoiOrientedPlanDetail poiOrientedPlanDetail(List<Long> plan_id_list) throws WxErrorException ; | |||||
| /** | |||||
| * 通用佣金计划查询带货达人列表 | |||||
| */ | |||||
| PoiPlanTalentPage poiPlanTalentList(Long plan_id,Integer pageNo,Integer pageSize) throws WxErrorException ; | |||||
| /** | |||||
| * 通用佣金计划查询达人带货数据 | |||||
| */ | |||||
| PoiPlanTalentDetail poiPlanTalentDetail(Long plan_id,List<String> douyin_id_list) throws WxErrorException ; | |||||
| /** | |||||
| * 查询达人的定向佣金计划带货数据 | |||||
| */ | |||||
| PoiOrientedPlanTalentDetail poiOrientedPlanTalentDetail(Long plan_id,List<String> douyin_id_list) throws WxErrorException ; | |||||
| /** | |||||
| * 通用佣金计划查询达人带货详情 | |||||
| * | |||||
| */ | |||||
| PoiPlanTalentMediaPage poiPlanTalentMediaList(Long plan_id,Integer pageNo,Integer pageSize,String douyin_id,Integer content_type) throws WxErrorException ; | |||||
| } | |||||
| @@ -11,4 +11,6 @@ import com.iformall.douyin.web.api.web.TtWebShopMatchService; | |||||
| public interface TtGoodLifeSaasService extends TtBasicService{ | public interface TtGoodLifeSaasService extends TtBasicService{ | ||||
| TtGoodLifeSaasGoodsService getGoodsService(); | TtGoodLifeSaasGoodsService getGoodsService(); | ||||
| TtGoodLifeSaasPoiPlanService getPoiPlanService(); | |||||
| } | } | ||||
| @@ -0,0 +1,194 @@ | |||||
| package com.iformall.douyin.web.api.goodlifesaas.impl; | |||||
| import com.alibaba.fastjson.JSONArray; | |||||
| import com.alibaba.fastjson.JSONObject; | |||||
| import com.google.gson.Gson; | |||||
| import com.google.gson.GsonBuilder; | |||||
| import com.iformall.douyin.web.api.basic.TtWebPostRequestExecutor; | |||||
| import com.iformall.douyin.web.api.goodlifesaas.TtGoodLifeSaasPoiPlanService; | |||||
| import com.iformall.douyin.web.api.goodlifesaas.TtGoodLifeSaasService; | |||||
| import com.iformall.douyin.web.api.web.TtWebService; | |||||
| import com.iformall.douyin.web.bean.*; | |||||
| import lombok.AllArgsConstructor; | |||||
| import me.chanjar.weixin.common.error.WxErrorException; | |||||
| import java.util.ArrayList; | |||||
| import java.util.HashMap; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| /** | |||||
| * | |||||
| */ | |||||
| @AllArgsConstructor | |||||
| public class TtGoodLifeSaasPoiPlanServiceImpl implements TtGoodLifeSaasPoiPlanService { | |||||
| private static final Gson GSON = new GsonBuilder().create(); | |||||
| private TtGoodLifeSaasService service; | |||||
| @Override | |||||
| public PoiPlanPage poiPlanList(Long spuId, Integer pageNo, Integer pageSize) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| map.put("spu_id",spuId); | |||||
| map.put("page_no",pageNo); | |||||
| map.put("page_size",pageSize); | |||||
| String result = this.service.execute(executor, this.POI_PLAN_LIST, GSON.toJson(map)); | |||||
| return GSON.fromJson(result, PoiPlanPage.class); | |||||
| } | |||||
| @Override | |||||
| public PoiOrientedPlanPage poiOrientedPlanList(Long spuId, Integer pageNo, Integer pageSize) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| List<Long> spu_id_list = new ArrayList<>(); | |||||
| spu_id_list.add(spuId); | |||||
| map.put("spu_id_list",spu_id_list); | |||||
| String result = this.service.execute(executor, this.POI_ORIENTED_PLAN_LIST, GSON.toJson(map)); | |||||
| return GSON.fromJson(result, PoiOrientedPlanPage.class); | |||||
| } | |||||
| @Override | |||||
| public Long poiPlanSave(PoiPlan poiPlan) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| String result = this.service.execute(executor, this.POI_COMMON_PLAN_SAVE, GSON.toJson(poiPlan)); | |||||
| JSONObject jsonObject = JSONObject.parseObject(result); | |||||
| return jsonObject.getLong("plan_id"); | |||||
| } | |||||
| @Override | |||||
| public Long poiOrientedPlanLiveSave(PoiOrientedPlan poiPlan) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| String result = this.service.execute(executor, this.POI_ORIENTED_PLAN_LIVE_SAVE, GSON.toJson(poiPlan)); | |||||
| JSONObject jsonObject = JSONObject.parseObject(result); | |||||
| return jsonObject.getLong("plan_id"); | |||||
| } | |||||
| @Override | |||||
| public Long poiOrientedPlanVideoSave(PoiOrientedPlan poiPlan) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| String result = this.service.execute(executor, this.POI_ORIENTED_PLAN_VIDEO_SAVE, GSON.toJson(poiPlan)); | |||||
| JSONObject jsonObject = JSONObject.parseObject(result); | |||||
| return jsonObject.getLong("plan_id"); | |||||
| } | |||||
| @Override | |||||
| public boolean poiPlanUpdateStatus(Long planId, Integer status) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| List<Map<String,Object>> updateList = new ArrayList<>(); | |||||
| Map<String,Object> updateMap = new HashMap<>(); | |||||
| updateMap.put("plan_id",planId); | |||||
| updateMap.put("status",status); | |||||
| updateList.add(updateMap); | |||||
| map.put("plan_update_list",updateList); | |||||
| String result = this.service.execute(executor, this.POI_COMMON_PLAN_UPDATE_STATUS, GSON.toJson(map)); | |||||
| JSONObject jsonObject = JSONObject.parseObject(result); | |||||
| JSONArray fail_plan_id_list = jsonObject.getJSONArray("fail_plan_id_list"); | |||||
| if(fail_plan_id_list != null && fail_plan_id_list.size() > 0){ | |||||
| return false; | |||||
| } | |||||
| return true; | |||||
| } | |||||
| @Override | |||||
| public boolean poiOrientedPlanUpdateStatus(Long planId, Integer status) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| List<Map<String,Object>> updateList = new ArrayList<>(); | |||||
| Map<String,Object> updateMap = new HashMap<>(); | |||||
| updateMap.put("plan_id",planId); | |||||
| updateMap.put("status",status); | |||||
| updateList.add(updateMap); | |||||
| map.put("plan_update_list",updateList); | |||||
| String result = this.service.execute(executor, this.POI_ORIENTED_PLAN_UPDATE_STATUS, GSON.toJson(map)); | |||||
| JSONObject jsonObject = JSONObject.parseObject(result); | |||||
| JSONArray fail_plan_id_list = jsonObject.getJSONArray("fail_plan_id_list"); | |||||
| if(fail_plan_id_list != null && fail_plan_id_list.size() > 0){ | |||||
| return false; | |||||
| } | |||||
| return true; | |||||
| } | |||||
| @Override | |||||
| public boolean poiOrientedPlanDeleteTalent(Long planId, String douyinId) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| map.put("plan_id",planId); | |||||
| map.put("douyin_id",douyinId); | |||||
| String result = this.service.execute(executor, this.POI_ORIENTED_PLAN_DELETE_TALENT, GSON.toJson(map)); | |||||
| return true; | |||||
| } | |||||
| @Override | |||||
| public String poiTakeRate(PoiTakeRate poiTakeRate) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| String result = this.service.execute(executor, this.POI_TAKE_RATE, GSON.toJson(poiTakeRate)); | |||||
| JSONObject jsonObject = JSONObject.parseObject(result); | |||||
| return jsonObject.getString("spu_id"); | |||||
| } | |||||
| @Override | |||||
| public PoiPlanDetail poiPlanDetail(List<Long> plan_id_list) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| map.put("plan_id_list",plan_id_list); | |||||
| String result = this.service.execute(executor, this.POI_COMMON_PLAN_DETAIL, GSON.toJson(map)); | |||||
| return GSON.fromJson(result, PoiPlanDetail.class); | |||||
| } | |||||
| @Override | |||||
| public PoiOrientedPlanDetail poiOrientedPlanDetail(List<Long> plan_id_list) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| map.put("plan_id_list",plan_id_list); | |||||
| String result = this.service.execute(executor, this.POI_ORIENTED_PLAN_DETAIL, GSON.toJson(map)); | |||||
| return GSON.fromJson(result, PoiOrientedPlanDetail.class); | |||||
| } | |||||
| @Override | |||||
| public PoiPlanTalentPage poiPlanTalentList(Long plan_id, Integer pageNo, Integer pageSize) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| map.put("plan_id",plan_id); | |||||
| map.put("page_no",pageNo); | |||||
| map.put("page_size",pageSize); | |||||
| String result = this.service.execute(executor, this.POI_COMMON_PLAN_TALENT_LIST, GSON.toJson(map)); | |||||
| return GSON.fromJson(result, PoiPlanTalentPage.class); | |||||
| } | |||||
| @Override | |||||
| public PoiPlanTalentDetail poiPlanTalentDetail(Long plan_id, List<String> douyin_id_list) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| map.put("plan_id",plan_id); | |||||
| map.put("douyin_id_list",douyin_id_list); | |||||
| String result = this.service.execute(executor, this.POI_COMMON_PLAN_TALENT_DETAIL, GSON.toJson(map)); | |||||
| return GSON.fromJson(result, PoiPlanTalentDetail.class); | |||||
| } | |||||
| @Override | |||||
| public PoiOrientedPlanTalentDetail poiOrientedPlanTalentDetail(Long plan_id, List<String> douyin_id_list) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| map.put("plan_id",plan_id); | |||||
| map.put("douyin_id_list",douyin_id_list); | |||||
| String result = this.service.execute(executor, this.POI_ORIENTED_PLAN_TALENT_DETAIL, GSON.toJson(map)); | |||||
| return GSON.fromJson(result, PoiOrientedPlanTalentDetail.class); | |||||
| } | |||||
| @Override | |||||
| public PoiPlanTalentMediaPage poiPlanTalentMediaList(Long plan_id, Integer pageNo, Integer pageSize, String douyin_id, Integer content_type) throws WxErrorException { | |||||
| final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp()); | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| map.put("plan_id",plan_id); | |||||
| map.put("page_no",pageNo); | |||||
| map.put("page_size",pageSize); | |||||
| map.put("douyin_id",douyin_id); | |||||
| map.put("content_type",content_type); | |||||
| String result = this.service.execute(executor, this.POI_COMMON_PLAN_TALENT_MEDIA_LIST, GSON.toJson(map)); | |||||
| return GSON.fromJson(result, PoiPlanTalentMediaPage.class); | |||||
| } | |||||
| } | |||||
| @@ -2,6 +2,7 @@ package com.iformall.douyin.web.api.goodlifesaas.impl; | |||||
| import com.iformall.douyin.web.api.basic.TtBasicServiceImpl; | import com.iformall.douyin.web.api.basic.TtBasicServiceImpl; | ||||
| import com.iformall.douyin.web.api.goodlifesaas.TtGoodLifeSaasGoodsService; | import com.iformall.douyin.web.api.goodlifesaas.TtGoodLifeSaasGoodsService; | ||||
| import com.iformall.douyin.web.api.goodlifesaas.TtGoodLifeSaasPoiPlanService; | |||||
| import com.iformall.douyin.web.api.goodlifesaas.TtGoodLifeSaasService; | import com.iformall.douyin.web.api.goodlifesaas.TtGoodLifeSaasService; | ||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
| @@ -11,12 +12,16 @@ import lombok.extern.slf4j.Slf4j; | |||||
| @Slf4j | @Slf4j | ||||
| public class TtGoodLifeSaasServiceImpl extends TtBasicServiceImpl implements TtGoodLifeSaasService { | public class TtGoodLifeSaasServiceImpl extends TtBasicServiceImpl implements TtGoodLifeSaasService { | ||||
| private TtGoodLifeSaasGoodsService shopMatchService = new TtGoodLifeSaasGoodsServiceImpl(this); | private TtGoodLifeSaasGoodsService shopMatchService = new TtGoodLifeSaasGoodsServiceImpl(this); | ||||
| private TtGoodLifeSaasPoiPlanService ttGoodLifeSaasPoiPlanService = new TtGoodLifeSaasPoiPlanServiceImpl(this); | |||||
| @Override | @Override | ||||
| public TtGoodLifeSaasGoodsService getGoodsService() { | public TtGoodLifeSaasGoodsService getGoodsService() { | ||||
| return this.shopMatchService; | return this.shopMatchService; | ||||
| } | } | ||||
| @Override | |||||
| public TtGoodLifeSaasPoiPlanService getPoiPlanService() { | |||||
| return this.ttGoodLifeSaasPoiPlanService; | |||||
| } | |||||
| } | } | ||||
| @@ -13,7 +13,7 @@ public enum EnumCouponOrderReservationStatus { | |||||
| reservation_user_cancellation(1, "用户取消"), | reservation_user_cancellation(1, "用户取消"), | ||||
| reservation_expire_cancellation(2, "过期取消"), | reservation_expire_cancellation(2, "过期取消"), | ||||
| reservation_refund_cancellation(3, "退款取消"), | reservation_refund_cancellation(3, "退款取消"), | ||||
| reservation_refuse_cancellation(4, "拒绝服务"), | |||||
| reservation_refuse_cancellation(4, "工作人员取消"),//拒绝服务 | |||||
| reservation_dispatch(5, "已派单"), | reservation_dispatch(5, "已派单"), | ||||
| reservation_refuse_dispatch(6, "派单被拒绝"), | reservation_refuse_dispatch(6, "派单被拒绝"), | ||||
| reservation_accept_dispatch(7, "派单已接受"), | reservation_accept_dispatch(7, "派单已接受"), | ||||
| @@ -6,12 +6,8 @@ import com.iformall.domain.po.TtCouponChannelPoi; | |||||
| import com.iformall.domain.po.TtPoiTakeRate; | import com.iformall.domain.po.TtPoiTakeRate; | ||||
| import com.iformall.domain.po.WxCoupon; | import com.iformall.domain.po.WxCoupon; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.TtCouponChannelVo; | |||||
| import com.iformall.domain.vo.TtCouponVo; | |||||
| import com.iformall.enums.EnumCpsPlanType; | import com.iformall.enums.EnumCpsPlanType; | ||||
| import java.util.List; | |||||
| public interface TtCouponGoodsService { | public interface TtCouponGoodsService { | ||||
| // ResultData couponList(TtCouponVo ttCouponVo, Integer pageNum, Integer pageSize); | // ResultData couponList(TtCouponVo ttCouponVo, Integer pageNum, Integer pageSize); | ||||
| @@ -39,21 +35,21 @@ public interface TtCouponGoodsService { | |||||
| TtPoiTakeRate getTakeRateById(TenantEntity tenantInfo, Long id); | TtPoiTakeRate getTakeRateById(TenantEntity tenantInfo, Long id); | ||||
| //根据商品id查询线上通用佣金情况 | //根据商品id查询线上通用佣金情况 | ||||
| ResultData poiPlanList(TenantEntity tenantInfo,Long couponId, Integer pageNum, Integer pageSize); | |||||
| ResultData poiPlanList(TenantEntity tenantInfo, Long couponId, Integer pageNum, Integer pageSize, boolean isGoodSaas); | |||||
| //根据商品id查询线上定向佣金情况 | //根据商品id查询线上定向佣金情况 | ||||
| ResultData poiOrientedPlanList(TenantEntity tenantInfo,Long couponId, Integer pageNum, Integer pageSize); | |||||
| ResultData poiOrientedPlanList(TenantEntity tenantInfo, Long couponId, Integer pageNum, Integer pageSize, boolean isGoodSaas); | |||||
| ResultData poiPlanSave(TtPoiTakeRate record); | |||||
| ResultData poiPlanSave(TtPoiTakeRate record,boolean isGoodSaas); | |||||
| ResultData saveOrientedPlan(TtPoiTakeRate record); | |||||
| ResultData saveOrientedPlan(TtPoiTakeRate record, boolean isGoodSaas); | |||||
| ResultData addOrientedPlanDouyin(TtPoiTakeRate record); | |||||
| ResultData addOrientedPlanDouyin(TtPoiTakeRate record, boolean isGoodSaas); | |||||
| ResultData cancelOrientedPlanDouyin(TtPoiTakeRate record); | |||||
| ResultData cancelOrientedPlanDouyin(TtPoiTakeRate record, boolean isGoodSaas); | |||||
| ResultData poiPlanUpdateStatus(TtPoiTakeRate record); | |||||
| ResultData poiPlanUpdateStatus(TtPoiTakeRate record, boolean isGoodSaas); | |||||
| ResultData poiOrientedPlanUpdateStatus(TtPoiTakeRate record); | |||||
| ResultData poiOrientedPlanUpdateStatus(TtPoiTakeRate record, boolean isGoodSaas); | |||||
| ResultData setUpAll(TenantEntity tenantInfo, Long couponId, Integer mallRate); | ResultData setUpAll(TenantEntity tenantInfo, Long couponId, Integer mallRate); | ||||
| @@ -2,7 +2,6 @@ package com.iformall.service.impl; | |||||
| import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
| import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||||
| import com.github.pagehelper.PageHelper; | import com.github.pagehelper.PageHelper; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| @@ -11,8 +10,7 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.*; | |||||
| import com.iformall.douyin.web.api.web.TtWebPoiPlanService; | |||||
| import com.iformall.douyin.web.api.goodlifesaas.TtGoodLifeSaasService; | |||||
| import com.iformall.douyin.web.api.web.TtWebService; | import com.iformall.douyin.web.api.web.TtWebService; | ||||
| import com.iformall.douyin.web.bean.*; | import com.iformall.douyin.web.bean.*; | ||||
| import com.iformall.enums.*; | import com.iformall.enums.*; | ||||
| @@ -35,10 +33,6 @@ import org.springframework.transaction.annotation.Propagation; | |||||
| import org.springframework.transaction.annotation.Transactional; | import org.springframework.transaction.annotation.Transactional; | ||||
| import java.util.*; | import java.util.*; | ||||
| import java.util.stream.Collectors; | |||||
| import java.util.stream.Stream; | |||||
| import static java.util.stream.Collectors.toList; | |||||
| @Service | @Service | ||||
| @@ -84,11 +78,11 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| @Autowired | @Autowired | ||||
| TtGoodsCategoryService ttGoodsCategoryService; | TtGoodsCategoryService ttGoodsCategoryService; | ||||
| @Lazy | @Lazy | ||||
| @Autowired | @Autowired | ||||
| WxCouponMallService wxCouponMallService; | WxCouponMallService wxCouponMallService; | ||||
| @Lazy | @Lazy | ||||
| @Autowired | @Autowired | ||||
| WxMerchantService wxMerchantService; | WxMerchantService wxMerchantService; | ||||
| @@ -217,14 +211,14 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| merchantIds.add(adminMerchant.getId()); | merchantIds.add(adminMerchant.getId()); | ||||
| } | } | ||||
| } | } | ||||
| }else { | }else { | ||||
| merchantIds = wxCouponMerchantMapper.findMerchantIdListByProduct(coupon.getId(), coupon.getTenantId()); | merchantIds = wxCouponMerchantMapper.findMerchantIdListByProduct(coupon.getId(), coupon.getTenantId()); | ||||
| } | } | ||||
| if (null == merchantIds || merchantIds.size() <= 0) { | if (null == merchantIds || merchantIds.size() <= 0) { | ||||
| return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND.getCode(),"未设置商户"); | return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND.getCode(),"未设置商户"); | ||||
| } | } | ||||
| List<TtMerchantPoi> pois = null; | List<TtMerchantPoi> pois = null; | ||||
| if (EnumCouponType.isParentCoupon(coupon.getType())) { | if (EnumCouponType.isParentCoupon(coupon.getType())) { | ||||
| if (null == couponMallList || couponMallList.size() <= 0 ) { | if (null == couponMallList || couponMallList.size() <= 0 ) { | ||||
| @@ -243,14 +237,14 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| pois.addAll(pois1); | pois.addAll(pois1); | ||||
| } | } | ||||
| } | } | ||||
| }else { | }else { | ||||
| TtMerchantPoi poiQ = new TtMerchantPoi(); | TtMerchantPoi poiQ = new TtMerchantPoi(); | ||||
| poiQ.updateTenantInfo(coupon); | poiQ.updateTenantInfo(coupon); | ||||
| poiQ.setIds(merchantIds); | poiQ.setIds(merchantIds); | ||||
| pois = ttMerchantPoiMapper.findList(poiQ); | pois = ttMerchantPoiMapper.findList(poiQ); | ||||
| } | } | ||||
| if(pois == null || pois.isEmpty()){ | if(pois == null || pois.isEmpty()){ | ||||
| return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND.getCode(),"未找到poi门店"); | return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND.getCode(),"未找到poi门店"); | ||||
| } | } | ||||
| @@ -277,7 +271,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| }else { | }else { | ||||
| return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND.getCode(),"当前券类型未找到收款商户"); | return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND.getCode(),"当前券类型未找到收款商户"); | ||||
| } | } | ||||
| }else { | }else { | ||||
| WxMerchant merchantQ = new WxMerchant(); | WxMerchant merchantQ = new WxMerchant(); | ||||
| merchantQ.updateTenantInfo(coupon); | merchantQ.updateTenantInfo(coupon); | ||||
| @@ -285,7 +279,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| merchantQ.setSortColumns(BaseEntity.SortField.MerchantAdmin); | merchantQ.setSortColumns(BaseEntity.SortField.MerchantAdmin); | ||||
| payAccountMerchant = wxMerchantMapper.findIdNameList(merchantQ).get(0); | payAccountMerchant = wxMerchantMapper.findIdNameList(merchantQ).get(0); | ||||
| } | } | ||||
| //投放到抖音渠道,获取详情地址,以做审核 | //投放到抖音渠道,获取详情地址,以做审核 | ||||
| WxCouponChannel wxCouponChannelQuery = new WxCouponChannel(); | WxCouponChannel wxCouponChannelQuery = new WxCouponChannel(); | ||||
| wxCouponChannelQuery.updateTenantInfo(coupon); | wxCouponChannelQuery.updateTenantInfo(coupon); | ||||
| @@ -392,7 +386,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| skuStruct.setStatus(1); | skuStruct.setStatus(1); | ||||
| skuStruct.setAttrKeyValueMap(ttattrs.getSkuAttrKeyValueMap()); | skuStruct.setAttrKeyValueMap(ttattrs.getSkuAttrKeyValueMap()); | ||||
| product.setSku(skuStruct); | product.setSku(skuStruct); | ||||
| if (isSaas) { | if (isSaas) { | ||||
| product.setAccountId(getDouyinLaikeId(coupon)); | product.setAccountId(getDouyinLaikeId(coupon)); | ||||
| } | } | ||||
| @@ -430,8 +424,8 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| } | } | ||||
| return appinfo.getLaikeId(); | return appinfo.getLaikeId(); | ||||
| } | } | ||||
| @Override | @Override | ||||
| public int handlerTtGoodsAudit(TtCouponChannelPoi couponChannelPoi) { | public int handlerTtGoodsAudit(TtCouponChannelPoi couponChannelPoi) { | ||||
| return ttCouponChannelPoiMapper.updateBySpuId(couponChannelPoi); | return ttCouponChannelPoiMapper.updateBySpuId(couponChannelPoi); | ||||
| @@ -450,7 +444,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| }else { | }else { | ||||
| products = ttMerchantPoiService.getTtWebService(ttCouponChannelPoi).getGoodsService().productDraftGet(null, ttCouponChannelPoi.getId().toString()); | products = ttMerchantPoiService.getTtWebService(ttCouponChannelPoi).getGoodsService().productDraftGet(null, ttCouponChannelPoi.getId().toString()); | ||||
| } | } | ||||
| if(null != products && products.size() > 0){ | if(null != products && products.size() > 0){ | ||||
| Product product = products.get(0); | Product product = products.get(0); | ||||
| if(product.getDraftStatus().intValue() == 12 && !EnumSpuSyncStatus.sync_audit_rejection.getCode().equals(ttCouponChannelPoi.getLastStatus())){ | if(product.getDraftStatus().intValue() == 12 && !EnumSpuSyncStatus.sync_audit_rejection.getCode().equals(ttCouponChannelPoi.getLastStatus())){ | ||||
| @@ -493,7 +487,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| }else { | }else { | ||||
| products = ttMerchantPoiService.getTtWebService(ttCouponChannelPoi).getGoodsService().productOnlineGet(null, ttCouponChannelPoi.getId().toString()); | products = ttMerchantPoiService.getTtWebService(ttCouponChannelPoi).getGoodsService().productOnlineGet(null, ttCouponChannelPoi.getId().toString()); | ||||
| } | } | ||||
| if(products.size() > 0){ | if(products.size() > 0){ | ||||
| Product product = products.get(0); | Product product = products.get(0); | ||||
| if(product.getOnlineStatus().intValue() == 1 && !EnumSpuSyncStatus.sync_put_on.getCode().equals(ttCouponChannelPoi.getStatus())){ | if(product.getOnlineStatus().intValue() == 1 && !EnumSpuSyncStatus.sync_put_on.getCode().equals(ttCouponChannelPoi.getStatus())){ | ||||
| @@ -562,7 +556,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| }else { | }else { | ||||
| b = ttMerchantPoiService.getTtWebService(ttCouponChannelPoi).getGoodsService().productOperate(null,wxCoupon.getId().toString(),op_type); | b = ttMerchantPoiService.getTtWebService(ttCouponChannelPoi).getGoodsService().productOperate(null,wxCoupon.getId().toString(),op_type); | ||||
| } | } | ||||
| if(b){ | if(b){ | ||||
| TtCouponChannelPoi ccPoi = new TtCouponChannelPoi(); | TtCouponChannelPoi ccPoi = new TtCouponChannelPoi(); | ||||
| ccPoi.setId(ttCouponChannelPoi.getId()); | ccPoi.setId(ttCouponChannelPoi.getId()); | ||||
| @@ -635,7 +629,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| b = ttMerchantPoiService.getTtWebService(ttCouponChannelPoi).getGoodsService().productFreeAudit(null,wxCoupon.getId().toString(), | b = ttMerchantPoiService.getTtWebService(ttCouponChannelPoi).getGoodsService().productFreeAudit(null,wxCoupon.getId().toString(), | ||||
| null,wxCoupon.getInventory()); | null,wxCoupon.getInventory()); | ||||
| } | } | ||||
| if(b){ | if(b){ | ||||
| return new ResultData(); | return new ResultData(); | ||||
| }else{ | }else{ | ||||
| @@ -735,7 +729,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| @Override | @Override | ||||
| public ResultData poiPlanList(TenantEntity tenantInfo,Long couponId, Integer pageNum, Integer pageSize) { | |||||
| public ResultData poiPlanList(TenantEntity tenantInfo,Long couponId, Integer pageNum, Integer pageSize,boolean isGoodSaas) { | |||||
| TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(tenantInfo.getTenantId(),couponId); | TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(tenantInfo.getTenantId(),couponId); | ||||
| if(ttCouponChannelPoi == null || EnumSpuSyncStatus.sync_auditing.getCode().equals(ttCouponChannelPoi.getLastStatus()) | if(ttCouponChannelPoi == null || EnumSpuSyncStatus.sync_auditing.getCode().equals(ttCouponChannelPoi.getLastStatus()) | ||||
| || EnumSpuSyncStatus.sync_audit_rejection.getCode().equals(ttCouponChannelPoi.getLastStatus())){ | || EnumSpuSyncStatus.sync_audit_rejection.getCode().equals(ttCouponChannelPoi.getLastStatus())){ | ||||
| @@ -743,7 +737,12 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| } | } | ||||
| try { | try { | ||||
| Long spu_id = Long.parseLong(ttCouponChannelPoi.getSpuId()); | Long spu_id = Long.parseLong(ttCouponChannelPoi.getSpuId()); | ||||
| PoiPlanPage poiPlanPage = ttMerchantPoiService.getTtWebService(tenantInfo).getPoiPlanService().poiPlanList(spu_id, pageNum, pageSize); | |||||
| PoiPlanPage poiPlanPage; | |||||
| if (isGoodSaas) { | |||||
| poiPlanPage = ttMerchantPoiService.getTtGoodLifeSassService(tenantInfo).getPoiPlanService().poiPlanList(spu_id, pageNum, pageSize); | |||||
| } else { | |||||
| poiPlanPage = ttMerchantPoiService.getTtWebService(tenantInfo).getPoiPlanService().poiPlanList(spu_id, pageNum, pageSize); | |||||
| } | |||||
| return new ResultData(poiPlanPage); | return new ResultData(poiPlanPage); | ||||
| } catch (WxErrorException e) { | } catch (WxErrorException e) { | ||||
| e.printStackTrace(); | e.printStackTrace(); | ||||
| @@ -752,7 +751,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData poiOrientedPlanList(TenantEntity tenantInfo,Long couponId, Integer pageNum, Integer pageSize) { | |||||
| public ResultData poiOrientedPlanList(TenantEntity tenantInfo, Long couponId, Integer pageNum, Integer pageSize, boolean isGoodSaas) { | |||||
| TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(tenantInfo.getTenantId(),couponId); | TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(tenantInfo.getTenantId(),couponId); | ||||
| if(ttCouponChannelPoi == null || EnumSpuSyncStatus.sync_auditing.getCode().equals(ttCouponChannelPoi.getLastStatus()) | if(ttCouponChannelPoi == null || EnumSpuSyncStatus.sync_auditing.getCode().equals(ttCouponChannelPoi.getLastStatus()) | ||||
| || EnumSpuSyncStatus.sync_audit_rejection.getCode().equals(ttCouponChannelPoi.getLastStatus())){ | || EnumSpuSyncStatus.sync_audit_rejection.getCode().equals(ttCouponChannelPoi.getLastStatus())){ | ||||
| @@ -760,7 +759,12 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| } | } | ||||
| try { | try { | ||||
| Long spu_id = Long.parseLong(ttCouponChannelPoi.getSpuId()); | Long spu_id = Long.parseLong(ttCouponChannelPoi.getSpuId()); | ||||
| PoiOrientedPlanPage poiOrientedPlanPage = ttMerchantPoiService.getTtWebService(tenantInfo).getPoiPlanService().poiOrientedPlanList(spu_id, pageNum, pageSize); | |||||
| PoiOrientedPlanPage poiOrientedPlanPage; | |||||
| if (isGoodSaas) { | |||||
| poiOrientedPlanPage = ttMerchantPoiService.getTtGoodLifeSassService(tenantInfo).getPoiPlanService().poiOrientedPlanList(spu_id, pageNum, pageSize); | |||||
| } else { | |||||
| poiOrientedPlanPage = ttMerchantPoiService.getTtWebService(tenantInfo).getPoiPlanService().poiOrientedPlanList(spu_id, pageNum, pageSize); | |||||
| } | |||||
| return new ResultData(poiOrientedPlanPage); | return new ResultData(poiOrientedPlanPage); | ||||
| } catch (WxErrorException e) { | } catch (WxErrorException e) { | ||||
| e.printStackTrace(); | e.printStackTrace(); | ||||
| @@ -769,7 +773,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData poiPlanSave(TtPoiTakeRate record) { | |||||
| public ResultData poiPlanSave(TtPoiTakeRate record,boolean isGoodSaas) { | |||||
| WxCoupon wxCoupon = wxCouponMapper.selectById(record.getCouponId(), record.getTenantId()); | WxCoupon wxCoupon = wxCouponMapper.selectById(record.getCouponId(), record.getTenantId()); | ||||
| if(wxCoupon == null){ | if(wxCoupon == null){ | ||||
| return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(),"未找到该券"); | return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(),"未找到该券"); | ||||
| @@ -801,7 +805,13 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| poiPlan.setContentType(record.getContentType()); | poiPlan.setContentType(record.getContentType()); | ||||
| poiPlan.setCommissionRate(record.getTakeRate()); | poiPlan.setCommissionRate(record.getTakeRate()); | ||||
| Long returnPlanId = ttMerchantPoiService.getTtWebService(record).getPoiPlanService().poiPlanSave(poiPlan); | |||||
| Long returnPlanId; | |||||
| if (isGoodSaas){ | |||||
| returnPlanId = ttMerchantPoiService.getTtGoodLifeSassService(record).getPoiPlanService().poiPlanSave(poiPlan); | |||||
| }else { | |||||
| returnPlanId = ttMerchantPoiService.getTtWebService(record).getPoiPlanService().poiPlanSave(poiPlan); | |||||
| } | |||||
| if(returnPlanId != null){ | if(returnPlanId != null){ | ||||
| if(record.getId() == null){ | if(record.getId() == null){ | ||||
| record.setId(returnPlanId); | record.setId(returnPlanId); | ||||
| @@ -821,7 +831,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData saveOrientedPlan(TtPoiTakeRate record) { | |||||
| public ResultData saveOrientedPlan(TtPoiTakeRate record, boolean isGoodSaas) { | |||||
| WxCoupon wxCoupon = wxCouponMapper.selectById(record.getCouponId(), record.getTenantId()); | WxCoupon wxCoupon = wxCouponMapper.selectById(record.getCouponId(), record.getTenantId()); | ||||
| if(wxCoupon == null){ | if(wxCoupon == null){ | ||||
| return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(),"未找到该券"); | return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(),"未找到该券"); | ||||
| @@ -845,6 +855,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| } | } | ||||
| Long spu_id = Long.parseLong(ttCouponChannelPoi.getSpuId()); | Long spu_id = Long.parseLong(ttCouponChannelPoi.getSpuId()); | ||||
| TtWebService ttWebService = ttMerchantPoiService.getTtWebService(record); | TtWebService ttWebService = ttMerchantPoiService.getTtWebService(record); | ||||
| TtGoodLifeSaasService ttGoodLifeSassService = ttMerchantPoiService.getTtGoodLifeSassService(record); | |||||
| Long returnPlanId = null; | Long returnPlanId = null; | ||||
| PoiOrientedPlan poiPlan = new PoiOrientedPlan(); | PoiOrientedPlan poiPlan = new PoiOrientedPlan(); | ||||
| if(record.getId() != null){ | if(record.getId() != null){ | ||||
| @@ -916,7 +927,11 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| poiPlan.setProductList(productList); | poiPlan.setProductList(productList); | ||||
| if(EnumCpsPlanContentType.LIVE.getCode().equals(record.getContentType())){ | if(EnumCpsPlanContentType.LIVE.getCode().equals(record.getContentType())){ | ||||
| returnPlanId = ttWebService.getPoiPlanService().poiOrientedPlanLiveSave(poiPlan); | |||||
| if (isGoodSaas){ | |||||
| returnPlanId = ttGoodLifeSassService.getPoiPlanService().poiOrientedPlanLiveSave(poiPlan); | |||||
| }else { | |||||
| returnPlanId = ttWebService.getPoiPlanService().poiOrientedPlanLiveSave(poiPlan); | |||||
| } | |||||
| }else if(EnumCpsPlanContentType.VIDEO.getCode().equals(record.getContentType())){ | }else if(EnumCpsPlanContentType.VIDEO.getCode().equals(record.getContentType())){ | ||||
| if(record.getStartTime() != null){ | if(record.getStartTime() != null){ | ||||
| poiPlan.setStartTime(record.getStartTime().getTime()/1000); | poiPlan.setStartTime(record.getStartTime().getTime()/1000); | ||||
| @@ -927,7 +942,11 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| if(record.getCommissionDuration() != null){ | if(record.getCommissionDuration() != null){ | ||||
| poiPlan.setCommissionDuration(record.getCommissionDuration()); | poiPlan.setCommissionDuration(record.getCommissionDuration()); | ||||
| } | } | ||||
| returnPlanId = ttWebService.getPoiPlanService().poiOrientedPlanVideoSave(poiPlan); | |||||
| if (isGoodSaas){ | |||||
| returnPlanId = ttGoodLifeSassService.getPoiPlanService().poiOrientedPlanVideoSave(poiPlan); | |||||
| }else { | |||||
| returnPlanId = ttWebService.getPoiPlanService().poiOrientedPlanVideoSave(poiPlan); | |||||
| } | |||||
| }else{ | }else{ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"带货场景错误"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"带货场景错误"); | ||||
| } | } | ||||
| @@ -949,7 +968,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData addOrientedPlanDouyin(TtPoiTakeRate record) { | |||||
| public ResultData addOrientedPlanDouyin(TtPoiTakeRate record, boolean isGoodSaas) { | |||||
| TtPoiTakeRate takeRate = ttPoiTakeRateMapper.selectById(record.getId(), record.getTenantId()); | TtPoiTakeRate takeRate = ttPoiTakeRateMapper.selectById(record.getId(), record.getTenantId()); | ||||
| if(takeRate == null){ | if(takeRate == null){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未获取到计划"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未获取到计划"); | ||||
| @@ -968,14 +987,23 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| try { | try { | ||||
| TtWebService ttWebService = ttMerchantPoiService.getTtWebService(record); | TtWebService ttWebService = ttMerchantPoiService.getTtWebService(record); | ||||
| TtGoodLifeSaasService ttGoodLifeSassService = ttMerchantPoiService.getTtGoodLifeSassService(record); | |||||
| PoiOrientedPlan poiPlan = new PoiOrientedPlan(); | PoiOrientedPlan poiPlan = new PoiOrientedPlan(); | ||||
| poiPlan.setPlanId(record.getId()); | poiPlan.setPlanId(record.getId()); | ||||
| poiPlan.setDouyinIdList(record.getDouyinIdList()); | poiPlan.setDouyinIdList(record.getDouyinIdList()); | ||||
| Long returnPlanId = null; | Long returnPlanId = null; | ||||
| if(EnumCpsPlanContentType.LIVE.getCode().equals(record.getContentType())){ | if(EnumCpsPlanContentType.LIVE.getCode().equals(record.getContentType())){ | ||||
| returnPlanId = ttWebService.getPoiPlanService().poiOrientedPlanLiveSave(poiPlan); | |||||
| if (isGoodSaas){ | |||||
| returnPlanId = ttGoodLifeSassService.getPoiPlanService().poiOrientedPlanLiveSave(poiPlan); | |||||
| }else { | |||||
| returnPlanId = ttWebService.getPoiPlanService().poiOrientedPlanLiveSave(poiPlan); | |||||
| } | |||||
| }else if(EnumCpsPlanContentType.VIDEO.getCode().equals(record.getContentType())){ | }else if(EnumCpsPlanContentType.VIDEO.getCode().equals(record.getContentType())){ | ||||
| returnPlanId = ttWebService.getPoiPlanService().poiOrientedPlanVideoSave(poiPlan); | |||||
| if (isGoodSaas){ | |||||
| returnPlanId = ttGoodLifeSassService.getPoiPlanService().poiOrientedPlanVideoSave(poiPlan); | |||||
| }else { | |||||
| returnPlanId = ttWebService.getPoiPlanService().poiOrientedPlanVideoSave(poiPlan); | |||||
| } | |||||
| } | } | ||||
| TtPoiTakeRate updTakeRate = new TtPoiTakeRate(); | TtPoiTakeRate updTakeRate = new TtPoiTakeRate(); | ||||
| @@ -993,7 +1021,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData cancelOrientedPlanDouyin(TtPoiTakeRate record) { | |||||
| public ResultData cancelOrientedPlanDouyin(TtPoiTakeRate record, boolean isGoodSaas) { | |||||
| TtPoiTakeRate takeRate = ttPoiTakeRateMapper.selectById(record.getId(), record.getTenantId()); | TtPoiTakeRate takeRate = ttPoiTakeRateMapper.selectById(record.getId(), record.getTenantId()); | ||||
| if(takeRate == null){ | if(takeRate == null){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未获取到计划"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未获取到计划"); | ||||
| @@ -1006,7 +1034,13 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| douyinMap.put(record.getDouyinId(),EnumCpsPlanStatus.OFF.getCode()); | douyinMap.put(record.getDouyinId(),EnumCpsPlanStatus.OFF.getCode()); | ||||
| try { | try { | ||||
| TtWebService ttWebService = ttMerchantPoiService.getTtWebService(record); | TtWebService ttWebService = ttMerchantPoiService.getTtWebService(record); | ||||
| boolean b = ttWebService.getPoiPlanService().poiOrientedPlanDeleteTalent(record.getId(), record.getDouyinId()); | |||||
| TtGoodLifeSaasService ttGoodLifeSassService = ttMerchantPoiService.getTtGoodLifeSassService(record); | |||||
| boolean b; | |||||
| if (isGoodSaas){ | |||||
| b = ttGoodLifeSassService.getPoiPlanService().poiOrientedPlanDeleteTalent(record.getId(), record.getDouyinId()); | |||||
| }else { | |||||
| b = ttWebService.getPoiPlanService().poiOrientedPlanDeleteTalent(record.getId(), record.getDouyinId()); | |||||
| } | |||||
| TtPoiTakeRate updTakeRate = new TtPoiTakeRate(); | TtPoiTakeRate updTakeRate = new TtPoiTakeRate(); | ||||
| @@ -1085,9 +1119,14 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| // } | // } | ||||
| @Override | @Override | ||||
| public ResultData poiPlanUpdateStatus(TtPoiTakeRate record) { | |||||
| public ResultData poiPlanUpdateStatus(TtPoiTakeRate record, boolean isGoodSaas) { | |||||
| try { | try { | ||||
| boolean b = ttMerchantPoiService.getTtWebService(record).getPoiPlanService().poiPlanUpdateStatus(record.getId(), record.getStatus()); | |||||
| boolean b; | |||||
| if (isGoodSaas){ | |||||
| b = ttMerchantPoiService.getTtGoodLifeSassService(record).getPoiPlanService().poiPlanUpdateStatus(record.getId(), record.getStatus()); | |||||
| }else { | |||||
| b = ttMerchantPoiService.getTtWebService(record).getPoiPlanService().poiPlanUpdateStatus(record.getId(), record.getStatus()); | |||||
| } | |||||
| if(b){ | if(b){ | ||||
| TtPoiTakeRate updTakeRate = new TtPoiTakeRate(); | TtPoiTakeRate updTakeRate = new TtPoiTakeRate(); | ||||
| updTakeRate.setId(record.getId()); | updTakeRate.setId(record.getId()); | ||||
| @@ -1107,11 +1146,17 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData poiOrientedPlanUpdateStatus(TtPoiTakeRate record) { | |||||
| public ResultData poiOrientedPlanUpdateStatus(TtPoiTakeRate record, boolean isGoodSaas) { | |||||
| try { | try { | ||||
| //仅支持传3,将计划修改为已取消 | //仅支持传3,将计划修改为已取消 | ||||
| //仅支持修改直播间定向佣金计划,不支持修改短视频定向佣金计划 | //仅支持修改直播间定向佣金计划,不支持修改短视频定向佣金计划 | ||||
| boolean b = ttMerchantPoiService.getTtWebService(record).getPoiPlanService().poiOrientedPlanUpdateStatus(record.getId(), record.getStatus()); | |||||
| boolean b; | |||||
| if (isGoodSaas){ | |||||
| b = ttMerchantPoiService.getTtGoodLifeSassService(record).getPoiPlanService().poiOrientedPlanUpdateStatus(record.getId(), record.getStatus()); | |||||
| }else { | |||||
| b = ttMerchantPoiService.getTtWebService(record).getPoiPlanService().poiOrientedPlanUpdateStatus(record.getId(), record.getStatus()); | |||||
| } | |||||
| if(b){ | if(b){ | ||||
| TtPoiTakeRate updTakeRate = new TtPoiTakeRate(); | TtPoiTakeRate updTakeRate = new TtPoiTakeRate(); | ||||
| updTakeRate.setId(record.getId()); | updTakeRate.setId(record.getId()); | ||||
| @@ -624,8 +624,13 @@ public class TtMerchantPoiServiceImpl implements TtMerchantPoiService { | |||||
| merchantPoi.updateTenantInfo(user); | merchantPoi.updateTenantInfo(user); | ||||
| merchantPoi.setSupplierExtId(poiBase.getMerchantId()); | merchantPoi.setSupplierExtId(poiBase.getMerchantId()); | ||||
| merchantPoi.setMerchantName(poiBase.getMerchantName()); | merchantPoi.setMerchantName(poiBase.getMerchantName()); | ||||
| merchantPoi.setLatitude(poiBase.getLatitude()); | |||||
| merchantPoi.setLongitude(poiBase.getLongitude()); | |||||
| merchantPoi.setPoiId(poiBase.getPoiId()); | merchantPoi.setPoiId(poiBase.getPoiId()); | ||||
| merchantPoi.setPoiName(poiBase.getPoiName()); | merchantPoi.setPoiName(poiBase.getPoiName()); | ||||
| merchantPoi.setProvince(poiBase.getProvince()); | |||||
| merchantPoi.setCity(poiBase.getCity()); | |||||
| merchantPoi.setAddress(poiBase.getAddress()); | |||||
| merchantPoi.setMatchStatus(EnumSupplierMathStatus.match_success.getCode()); | merchantPoi.setMatchStatus(EnumSupplierMathStatus.match_success.getCode()); | ||||
| merchantPoi.setSyncStatus(EnumSupplierSyncStatus.sync_success.getCode()); | merchantPoi.setSyncStatus(EnumSupplierSyncStatus.sync_success.getCode()); | ||||
| merchantPoi.setLastSyncStatus(EnumSupplierSyncStatus.sync_success.getCode()); | merchantPoi.setLastSyncStatus(EnumSupplierSyncStatus.sync_success.getCode()); | ||||
| @@ -33,6 +33,12 @@ public class WxCouponOrderReservationServiceImpl implements WxCouponOrderReserva | |||||
| @Autowired | @Autowired | ||||
| WxMerchantBUserMapper wxMerchantBUserMapper; | WxMerchantBUserMapper wxMerchantBUserMapper; | ||||
| @Autowired | |||||
| WxCouponMerchantMapper wxCouponMerchantMapper; | |||||
| @Autowired | |||||
| WxMerchantMapper wxMerchantMapper; | |||||
| @Override | @Override | ||||
| public PageInfo<WxCouponOrderReservation> listAsPage(WxCouponOrderReservation record, Integer pageIndex, Integer pageSize) { | public PageInfo<WxCouponOrderReservation> listAsPage(WxCouponOrderReservation record, Integer pageIndex, Integer pageSize) { | ||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponOrderReservationMapper.findList(record)); | return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponOrderReservationMapper.findList(record)); | ||||
| @@ -81,6 +87,20 @@ public class WxCouponOrderReservationServiceImpl implements WxCouponOrderReserva | |||||
| } | } | ||||
| record.setCouponTitle(wxCoupon.getTitle()); | record.setCouponTitle(wxCoupon.getTitle()); | ||||
| } | } | ||||
| if(record.getReservationMerchantId() != null){ | |||||
| if(record.getCouponId() == null){ | |||||
| return new ResultData(ErrorCode.MERCHANT_INFO_NOT_EQUAL.getCode(),"商户信息查询异常"); | |||||
| } | |||||
| List<Long> couponMerchantIds = wxCouponMerchantMapper.findMerchantIdListByProduct(record.getCouponId(), record.getTenantId()); | |||||
| if(!couponMerchantIds.contains(record.getReservationMerchantId())){ | |||||
| return new ResultData(ErrorCode.MERCHANT_INFO_NOT_EQUAL.getCode(),"当前商户不匹配"); | |||||
| } | |||||
| WxMerchant merchant = wxMerchantMapper.selectById(record.getReservationMerchantId()); | |||||
| if(merchant == null){ | |||||
| return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND); | |||||
| } | |||||
| record.setReservationMerchantName(merchant.getName()); | |||||
| } | |||||
| if(record.getcUserId() != null){ | if(record.getcUserId() != null){ | ||||
| WxCUserBasicInfo basicInfo = wxCUserBasicInfoMapper.selectById(record.getcUserId(), record.getFinalTenantId()); | WxCUserBasicInfo basicInfo = wxCUserBasicInfoMapper.selectById(record.getcUserId(), record.getFinalTenantId()); | ||||
| if(basicInfo == null){ | if(basicInfo == null){ | ||||
| @@ -1525,6 +1525,8 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| if (null != m) { | if (null != m) { | ||||
| TtMerchantPoi poi = poiMap.get(m.getId()); | TtMerchantPoi poi = poiMap.get(m.getId()); | ||||
| if(null != poi){ | if(null != poi){ | ||||
| m.setProvince(poi.getProvince()); | |||||
| m.setCity(poi.getCity()); | |||||
| m.setAddr(poi.getAddress()); | m.setAddr(poi.getAddress()); | ||||
| m.setSupplierExtId(poi.getSupplierExtId()); | m.setSupplierExtId(poi.getSupplierExtId()); | ||||
| m.setTtPoi(poi.getPoiId()); | m.setTtPoi(poi.getPoiId()); | ||||
| @@ -1595,6 +1597,8 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| if (hasShop && null != merchantShopVoList) { | if (hasShop && null != merchantShopVoList) { | ||||
| vo.setShopVoList(merchantShopVoList.get(vo.getId())); | vo.setShopVoList(merchantShopVoList.get(vo.getId())); | ||||
| } | } | ||||
| vo.setProvince(m.getProvince()); | |||||
| vo.setCity(m.getCity()); | |||||
| vo.setAddr(m.getAddr()); | vo.setAddr(m.getAddr()); | ||||
| vo.setSupplierExtId(m.getSupplierExtId()); | vo.setSupplierExtId(m.getSupplierExtId()); | ||||
| vo.setTtPoi(m.getTtPoi()); | vo.setTtPoi(m.getTtPoi()); | ||||
| @@ -1909,7 +1913,10 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| if (null != m) { | if (null != m) { | ||||
| TtMerchantPoi poi = poiMap.get(m.getId()); | TtMerchantPoi poi = poiMap.get(m.getId()); | ||||
| if(null != poi){ | if(null != poi){ | ||||
| m.setProvince(poi.getProvince()); | |||||
| m.setCity(poi.getCity()); | |||||
| m.setAddr(poi.getAddress()); | m.setAddr(poi.getAddress()); | ||||
| m.setSupplierExtId(poi.getSupplierExtId()); | |||||
| m.setTtPoi(poi.getPoiId()); | m.setTtPoi(poi.getPoiId()); | ||||
| m.setLongitude(poi.getLongitude()); | m.setLongitude(poi.getLongitude()); | ||||
| m.setLatitude(poi.getLatitude()); | m.setLatitude(poi.getLatitude()); | ||||
| @@ -1934,7 +1941,10 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| vo.setParameter(cm.getParameter()); | vo.setParameter(cm.getParameter()); | ||||
| vo.setId(m.getId()); | vo.setId(m.getId()); | ||||
| vo.setProvince(m.getProvince()); | |||||
| vo.setCity(m.getCity()); | |||||
| vo.setAddr(m.getAddr()); | vo.setAddr(m.getAddr()); | ||||
| vo.setSupplierExtId(m.getSupplierExtId()); | |||||
| vo.setTtPoi(m.getTtPoi()); | vo.setTtPoi(m.getTtPoi()); | ||||
| vo.setLongitude(m.getLongitude()); | vo.setLongitude(m.getLongitude()); | ||||
| vo.setLatitude(m.getLatitude()); | vo.setLatitude(m.getLatitude()); | ||||
| @@ -180,7 +180,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||||
| } | } | ||||
| WxMerchant merchant = wxMerchantService.getById(sharingOrder.getMerchantId()); | |||||
| WxMerchant merchant = wxMerchantService.selectById(sharingOrder.getMerchantId()); | |||||
| Date currentDate = new Date(); | Date currentDate = new Date(); | ||||
| @@ -15,6 +15,10 @@ | |||||
| <result column="user_address" jdbcType="VARCHAR" property="userAddress" /> | <result column="user_address" jdbcType="VARCHAR" property="userAddress" /> | ||||
| <result column="start_date" jdbcType="TIMESTAMP" property="startDate" /> | <result column="start_date" jdbcType="TIMESTAMP" property="startDate" /> | ||||
| <result column="end_date" jdbcType="TIMESTAMP" property="endDate" /> | <result column="end_date" jdbcType="TIMESTAMP" property="endDate" /> | ||||
| <result column="reservation_merchant_id" jdbcType="BIGINT" property="reservationMerchantId" /> | |||||
| <result column="reservation_merchant_name" jdbcType="VARCHAR" property="reservationMerchantName" /> | |||||
| <result column="describe_str" jdbcType="VARCHAR" property="describeStr" /> | <result column="describe_str" jdbcType="VARCHAR" property="describeStr" /> | ||||
| <result column="describe_img" jdbcType="VARCHAR" property="describeImg" /> | <result column="describe_img" jdbcType="VARCHAR" property="describeImg" /> | ||||
| <result column="status" jdbcType="INTEGER" property="status" /> | <result column="status" jdbcType="INTEGER" property="status" /> | ||||
| @@ -34,6 +38,7 @@ | |||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`coupon_order_id`,`coupon_id`,`coupon_title`, | `id`,`tenant_id`,`parent_tenant_id`,`coupon_order_id`,`coupon_id`,`coupon_title`, | ||||
| `c_user_id`,`user_name`,`user_phone`,`user_region`,`user_address`, | `c_user_id`,`user_name`,`user_phone`,`user_region`,`user_address`, | ||||
| `reservation_merchant_id`,`reservation_merchant_name`, | |||||
| `start_date`,`end_date`,`describe_str`,`describe_img`,`status`,`remark`, | `start_date`,`end_date`,`describe_str`,`describe_img`,`status`,`remark`, | ||||
| `btenant_id`,`merchant_id`,`buser_id`,`buser_name`,`buser_phone`,`finish_time`, | `btenant_id`,`merchant_id`,`buser_id`,`buser_name`,`buser_phone`,`finish_time`, | ||||
| `create_date`,`update_date` | `create_date`,`update_date` | ||||
| @@ -75,6 +80,21 @@ | |||||
| and `user_phone` like concat('%', #{userPhone},'%') | and `user_phone` like concat('%', #{userPhone},'%') | ||||
| </if> | </if> | ||||
| <if test=" null != reservationMerchantId "> | |||||
| and `reservation_merchant_id` = #{reservationMerchantId} | |||||
| </if> | |||||
| <if test=" null != reservationMerchantName and '' != reservationMerchantName"> | |||||
| and `reservation_merchant_name` like concat('%', #{reservationMerchantName},'%') | |||||
| </if> | |||||
| <if test=" null != serchStartDate"> | |||||
| and `start_date` >= #{serchStartDate} | |||||
| </if> | |||||
| <if test=" null != serchEndDate"> | |||||
| and `start_date` <= #{serchEndDate} | |||||
| </if> | |||||
| <if test=" null != status "> | <if test=" null != status "> | ||||
| and `status` = #{status} | and `status` = #{status} | ||||
| </if> | </if> | ||||
| @@ -119,7 +139,8 @@ | |||||
| <select id="findUserReservation" parameterType="com.iformall.domain.po.WxCouponOrderReservation" resultMap="BaseResultMap"> | <select id="findUserReservation" parameterType="com.iformall.domain.po.WxCouponOrderReservation" resultMap="BaseResultMap"> | ||||
| select `id`,`tenant_id`,`parent_tenant_id`,`start_date`,`end_date`,`status` | |||||
| select `id`,`tenant_id`,`parent_tenant_id`, | |||||
| `reservation_merchant_id`,`reservation_merchant_name`,`start_date`,`end_date`,`status` | |||||
| from wx_coupon_order_reservation | from wx_coupon_order_reservation | ||||
| where is_del = 0 | where is_del = 0 | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| @@ -135,13 +156,13 @@ | |||||
| </select> | </select> | ||||
| <select id="getSortById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | <select id="getSortById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | ||||
| select `id`,`tenant_id`,`parent_tenant_id`,`status` | |||||
| select `id`,`tenant_id`,`parent_tenant_id`,`reservation_merchant_id`,`status` | |||||
| from wx_coupon_order_reservation | from wx_coupon_order_reservation | ||||
| where `id` = #{id} and tenant_id=#{tenantId} | where `id` = #{id} and tenant_id=#{tenantId} | ||||
| </select> | </select> | ||||
| <select id="getSortByCouponOrder" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | <select id="getSortByCouponOrder" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | ||||
| select `id`,`tenant_id`,`parent_tenant_id`,`status` | |||||
| select `id`,`tenant_id`,`parent_tenant_id`,`reservation_merchant_id`,`status` | |||||
| from wx_coupon_order_reservation | from wx_coupon_order_reservation | ||||
| where `coupon_order_id` = #{couponOrderId} and tenant_id=#{tenantId} | where `coupon_order_id` = #{couponOrderId} and tenant_id=#{tenantId} | ||||
| </select> | </select> | ||||