| @@ -13,10 +13,7 @@ import com.iformall.domain.po.WxCampaign; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.domain.po.WxCouponChannel; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import com.iformall.enums.EnumCampaignStatus; | |||
| import com.iformall.enums.EnumCampaignType; | |||
| import com.iformall.enums.EnumCouponChannelType; | |||
| import com.iformall.enums.EnumCouponStatus; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.service.WxCampaignService; | |||
| import com.iformall.service.WxCouponChannelService; | |||
| import com.iformall.service.WxCouponService; | |||
| @@ -79,7 +76,7 @@ public class WxCampaignController extends BaseController { | |||
| } | |||
| wxCampaign.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode()); | |||
| wxCampaign.updateTenantInfo(ifParentUpdateAloneTenantInfo()); | |||
| return wxCampaignService.saveOrUpdate(wxCampaign); | |||
| return wxCampaignService.saveOrUpdate(wxCampaign, EnumProjectPlat.FM); | |||
| } | |||
| @ApiOperation(value = "新增接口-小程序路径", notes = "produceType,produceId,pagePath,pageScene必填") | |||
| @@ -114,7 +111,7 @@ public class WxCampaignController extends BaseController { | |||
| } else { | |||
| wxCampaign.setCouponIds(JSONArray.toJSONString(new String[0])); | |||
| } | |||
| return wxCampaignService.saveOrUpdate(wxCampaign); | |||
| return wxCampaignService.saveOrUpdate(wxCampaign,EnumProjectPlat.FM); | |||
| } | |||
| @ApiOperation("根据id更新接口") | |||
| @@ -194,8 +191,8 @@ public class WxCampaignController extends BaseController { | |||
| int temp = source.getSortNum(); | |||
| source.setSortNum(target.getSortNum()); | |||
| target.setSortNum(temp); | |||
| wxCampaignService.saveOrUpdate(source); | |||
| wxCampaignService.saveOrUpdate(target); | |||
| wxCampaignService.saveOrUpdate(source,EnumProjectPlat.FM); | |||
| wxCampaignService.saveOrUpdate(target,EnumProjectPlat.FM); | |||
| return new ResultData(Result.SUCCESS, "调整顺序成功", null); | |||
| } | |||
| @@ -11,3 +11,6 @@ ALTER TABLE `wx_merchant` | |||
| ADD COLUMN `entry_amount` int(11) DEFAULT 0 COMMENT '入账金额' AFTER `credit_locked`; | |||
| UPDATE wx_merchant SET entry_amount = 0 ; | |||
| ALTER TABLE `wx_merchant` | |||
| ADD COLUMN `mark_time` datetime(0) COMMENT '记号时间' AFTER `mark`; | |||
| @@ -12,6 +12,7 @@ import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import com.iformall.enums.EnumCampaignStatus; | |||
| import com.iformall.enums.EnumCouponChannelType; | |||
| import com.iformall.enums.EnumPayWay; | |||
| import com.iformall.enums.EnumProjectPlat; | |||
| import com.iformall.service.WxCampaignService; | |||
| import com.iformall.service.WxCouponChannelService; | |||
| import io.swagger.annotations.Api; | |||
| @@ -90,8 +91,8 @@ public class WxCampaignController extends BaseController { | |||
| int temp = source.getSortNum(); | |||
| source.setSortNum(target.getSortNum()); | |||
| target.setSortNum(temp); | |||
| wxCampaignService.saveOrUpdate(source); | |||
| wxCampaignService.saveOrUpdate(target); | |||
| wxCampaignService.saveOrUpdate(source, EnumProjectPlat.FM); | |||
| wxCampaignService.saveOrUpdate(target, EnumProjectPlat.FM); | |||
| return new ResultData(Result.SUCCESS, "调整顺序成功", null); | |||
| } | |||
| @@ -251,6 +251,9 @@ public class WxMerchant extends TenantEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "记号1是0否", name = "mark") | |||
| private Integer mark; | |||
| @io.swagger.annotations.ApiModelProperty(value = "记号时间", name = "markTime") | |||
| private Date markTime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "是否删除1是0否", name = "isDel") | |||
| private Integer isDel; | |||
| @io.swagger.annotations.ApiModelProperty(value = "客服电话", name = "linkLinePhone") | |||
| @@ -116,6 +116,8 @@ public class TtCoupon extends TenantEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "记号1是0否", name = "mark") | |||
| private Integer mark; | |||
| @io.swagger.annotations.ApiModelProperty(value = "记号时间", name = "markTime") | |||
| private Date markTime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "是否删除1是0否", name = "isDel") | |||
| private Integer isDel; | |||
| @@ -7,7 +7,10 @@ public enum EnumCampaignProductType { | |||
| COUPON(1, "券"), | |||
| ACTIVITY_JOIN(2, "活动报名"), | |||
| QUESTION_ONESEL(3, "问卷调查"),; | |||
| QUESTION_ONESEL(3, "问卷调查"), | |||
| TTCOUPON(10, "课程"), | |||
| ; | |||
| public static EnumCampaignProductType getEnum(Integer code) { | |||
| for (EnumCampaignProductType value : values()) { | |||
| @@ -0,0 +1,38 @@ | |||
| package com.iformall.enums; | |||
| /** | |||
| * app平台 | |||
| * @author alascor | |||
| */ | |||
| public enum EnumProjectPlat { | |||
| FM(1,"福茂"),TT(2,"抖音"); | |||
| EnumProjectPlat(Integer code, String name) { | |||
| this.code = code; | |||
| this.name = name; | |||
| } | |||
| private Integer code; | |||
| private String name; | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public void setCode(Integer code) { | |||
| this.code = code; | |||
| } | |||
| public String getName() { | |||
| return name; | |||
| } | |||
| public void setName(String name) { | |||
| this.name = name; | |||
| } | |||
| public static EnumProjectPlat getByCode(Integer code) { | |||
| for (EnumProjectPlat e : EnumProjectPlat.values()) { | |||
| if (e.getCode().intValue() == code.intValue()) { | |||
| return e; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| } | |||
| @@ -4,7 +4,10 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCampaign; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumAppPlat; | |||
| import com.iformall.enums.EnumCampaignProductType; | |||
| import com.iformall.enums.EnumPayWay; | |||
| import com.iformall.enums.EnumProjectPlat; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| @@ -43,7 +46,7 @@ public interface WxCampaignService { | |||
| * | |||
| * @param record | |||
| */ | |||
| ResultData saveOrUpdate(WxCampaign record); | |||
| ResultData saveOrUpdate(WxCampaign record, EnumProjectPlat projectPlat); | |||
| /** | |||
| * 基于小程序路径发布 | |||
| @@ -1,27 +1,23 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.dto.WxMerchantDto; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.domain.po.WxProfitSharingReceiver; | |||
| import com.iformall.domain.po.WxShop; | |||
| import com.iformall.domain.vo.WxMerchantSimpleVo; | |||
| import com.iformall.domain.vo.WxMerchantTradeDetailVo; | |||
| import com.iformall.domain.vo.WxMerchantTradeVo; | |||
| import com.iformall.domain.vo.WxMerchantVo; | |||
| import com.iformall.enums.EnumPayWay; | |||
| import org.springframework.scheduling.annotation.Async; | |||
| import org.springframework.web.bind.annotation.ModelAttribute; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.util.HashMap; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.Optional; | |||
| /** | |||
| @@ -169,4 +165,10 @@ public interface WxMerchantService { | |||
| int getfollow(Long memberId, Long id); | |||
| PageInfo<WxMerchant> followListAsPage(WxMerchant record, Integer pageNum, Integer pageSize); | |||
| ResultData damark(WxMerchant wxMerchant, TenantEntity tenantInfo); | |||
| ResultData downmark(WxMerchant wxMerchant); | |||
| ResultData markup(WxMerchant wxMerchant); | |||
| } | |||
| @@ -86,7 +86,7 @@ public class WxCampaignServiceImpl implements WxCampaignService { | |||
| @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData saveOrUpdate(WxCampaign wxCampaign) { | |||
| public ResultData saveOrUpdate(WxCampaign wxCampaign,EnumProjectPlat projectPlat) { | |||
| if(wxCampaign.getType().equals(EnumCampaignType.STABLE.getCode())) { | |||
| if (StringUtils.isEmpty(wxCampaign.getCoverImg())) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "封面图不能为空"); | |||
| @@ -136,8 +136,10 @@ public class WxCampaignServiceImpl implements WxCampaignService { | |||
| } else { | |||
| wxCampaignMapper.updateById(wxCampaign); | |||
| } | |||
| //type 为固定格式才会有券的信息 才会有投放的问题 | |||
| couponInject(wxCampaign); | |||
| if(EnumProjectPlat.FM.equals(projectPlat)){ | |||
| //type 为固定格式才会有券的信息 才会有投放的问题 | |||
| couponInject(wxCampaign); | |||
| } | |||
| return new ResultData(Result.SUCCESS,"操作成功"); | |||
| } | |||
| @@ -24,7 +24,6 @@ import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.context.annotation.Lazy; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Isolation; | |||
| import org.springframework.transaction.annotation.Propagation; | |||
| @@ -985,4 +984,52 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| return PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findFollowList(record)); | |||
| } | |||
| @Override | |||
| public ResultData damark(WxMerchant wxMerchant, TenantEntity tenantInfo) { | |||
| if (wxMerchant == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| if (wxMerchant.getId() == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| WxMerchant merchantQ = new WxMerchant(); | |||
| merchantQ.setParentTenantId(tenantInfo.getFinalTenantId()); | |||
| merchantQ.setMark(EnumYesOrNo.YES.getCode()); | |||
| Integer integer = wxMerchantMapper.selectCount(new QueryWrapper<>(merchantQ)); | |||
| if(integer.intValue() >= 7){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"数量超过7条限制"); | |||
| } | |||
| wxMerchant.setMark(EnumYesOrNo.YES.getCode()); | |||
| wxMerchant.setMarkTime(new Date()); | |||
| wxMerchantMapper.updateById(wxMerchant); | |||
| return new ResultData(Result.SUCCESS, "操作成功"); | |||
| } | |||
| @Override | |||
| public ResultData downmark(WxMerchant wxMerchant) { | |||
| if (wxMerchant == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| if (wxMerchant.getId() == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| wxMerchant.setMark(EnumYesOrNo.NO.getCode()); | |||
| wxMerchantMapper.updateById(wxMerchant); | |||
| return new ResultData(Result.SUCCESS, "操作成功"); | |||
| } | |||
| @Override | |||
| public ResultData markup(WxMerchant wxMerchant) { | |||
| if (wxMerchant == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| if (wxMerchant.getId() == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| wxMerchant.setMarkTime(new Date()); | |||
| wxMerchantMapper.updateById(wxMerchant); | |||
| return new ResultData(Result.SUCCESS, "操作成功"); | |||
| } | |||
| } | |||
| @@ -1,7 +1,6 @@ | |||
| package com.iformall.service.tt; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.tt.TtCoupon; | |||
| @@ -63,4 +62,9 @@ public interface TtCouponService { | |||
| int addSellCount(Long id); | |||
| ResultData damark(TtCoupon record, TenantEntity tenantInfo); | |||
| ResultData downmark(TtCoupon record); | |||
| ResultData markup(TtCoupon record); | |||
| } | |||
| @@ -6,12 +6,11 @@ import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.tt.TtCoupon; | |||
| import com.iformall.domain.po.tt.TtUserCollect; | |||
| import com.iformall.domain.po.tt.TtUserFollow; | |||
| import com.iformall.enums.EnumTtCouponStatus; | |||
| import com.iformall.enums.EnumTtCouponType; | |||
| import com.iformall.enums.EnumYesOrNo; | |||
| @@ -22,7 +21,6 @@ import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Propagation; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import java.math.BigDecimal; | |||
| @@ -276,4 +274,51 @@ public class TtCouponServiceImpl implements TtCouponService { | |||
| public int addSellCount(Long id) { | |||
| return ttCouponMapper.addSellCount(id); | |||
| } | |||
| @Override | |||
| public ResultData damark(TtCoupon record, TenantEntity tenantInfo) { | |||
| if (record == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| if (record.getId() == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| TtCoupon couponQ = new TtCoupon(); | |||
| couponQ.setParentTenantId(tenantInfo.getFinalTenantId()); | |||
| couponQ.setMark(EnumYesOrNo.YES.getCode()); | |||
| Integer integer = ttCouponMapper.selectCount(new QueryWrapper<>(couponQ)); | |||
| if(integer.intValue() >= 20){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"数量超过20条限制"); | |||
| } | |||
| record.setMark(EnumYesOrNo.YES.getCode()); | |||
| record.setMarkTime(new Date()); | |||
| ttCouponMapper.updateById(record); | |||
| return new ResultData(Result.SUCCESS, "操作成功"); | |||
| } | |||
| @Override | |||
| public ResultData downmark(TtCoupon record) { | |||
| if (record == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| if (record.getId() == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| record.setMark(EnumYesOrNo.NO.getCode()); | |||
| ttCouponMapper.updateById(record); | |||
| return new ResultData(Result.SUCCESS, "操作成功"); | |||
| } | |||
| @Override | |||
| public ResultData markup(TtCoupon record) { | |||
| if (record == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| if (record.getId() == null) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
| } | |||
| record.setMarkTime(new Date()); | |||
| ttCouponMapper.updateById(record); | |||
| return new ResultData(Result.SUCCESS, "操作成功"); | |||
| } | |||
| } | |||
| @@ -37,6 +37,8 @@ | |||
| <result column="assess_count" jdbcType="INTEGER" property="assessCount"/> | |||
| <result column="collect_count" jdbcType="INTEGER" property="collectCount"/> | |||
| <result column="mark" jdbcType="INTEGER" property="mark"/> | |||
| <result column="mark_time" jdbcType="INTEGER" property="markTime"/> | |||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | |||
| <result column="column_id" jdbcType="BIGINT" property="columnId"/> | |||
| <result column="popularity" jdbcType="INTEGER" property="popularity"/> | |||
| @@ -54,7 +56,7 @@ | |||
| c.`title`, c.`sub_title`, c.`count_class`, c.`video_id`, c.`video_time`,c.`video_url`, c.`html`, c.`is_landscape`, c.`is_payment`, | |||
| c.`sale_price`, c.`orig_price`, c.`is_preview`, c.`preview_duration`, c.`detail`, c.`false_sell_count`, | |||
| c.`dy_title`, c.`inventory`, c.`remark`, c.`status`, c.`create_date`, c.`update_date`, | |||
| c.`see_count`, c.`sell_count`, c.`assess_count`, c.`collect_count`, c.`mark`, c.`is_del`, | |||
| c.`see_count`, c.`sell_count`, c.`assess_count`, c.`collect_count`, c.`mark`,c.mark_time, c.`is_del`, | |||
| c.`column_id`, c.`popularity`, c.`merchant_id`, c.`business_id`, c.`business_name`, | |||
| m.name merchant_name, m.img_url merchant_pic | |||
| </sql> | |||
| @@ -32,6 +32,8 @@ | |||
| <result column="introduction" jdbcType="VARCHAR" property="introduction"/> | |||
| <result column="action_desc" jdbcType="VARCHAR" property="actionDesc"/> | |||
| <result column="mark" jdbcType="INTEGER" property="mark"/> | |||
| <result column="mark_time" jdbcType="TIMESTAMP" property="markTime"/> | |||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | |||
| <result column="talk_user_main" jdbcType="VARCHAR" property="talkUserMain"/> | |||
| <result column="talk_user_aux" jdbcType="VARCHAR" property="talkUserAux"/> | |||
| @@ -48,13 +50,13 @@ | |||
| <sql id="allColumns"> | |||
| m.`id`,m.`tenant_id`,m.`parent_tenant_id`,m.`img_url`,m.`name`,m.`encode`,m.`link_phone`,m.`create_date`,m.`update_date`,m.`car_vendor_type`,m.`car_params`,m.`status`,m.`link_person`, | |||
| m.`business_id`,m.`business_types`,m.`sub_business_id`,m.`shop_type`,m.`brand`,m.`type`,m.`is_public`,m.email,m.`title`,m.`cover_picture`,m.`is_admin`,m.`bill_setting`,m.`qr_code`, | |||
| m.`introduction`,m.`action_desc`,m.`mark`,m.`is_del`,m.`talk_user_main`,m.`talk_user_aux`,m.link_line_phone,m.credit_locked,m.credit_locked,m.entry_amount,m.cash_out_count,m.cash_out_last_time | |||
| m.`introduction`,m.`action_desc`,m.`mark`,m.mark_time,m.`is_del`,m.`talk_user_main`,m.`talk_user_aux`,m.link_line_phone,m.credit_locked,m.credit_locked,m.entry_amount,m.cash_out_count,m.cash_out_last_time | |||
| </sql> | |||
| <sql id="allColumnsVo"> | |||
| m.`id`,m.`tenant_id`,m.`parent_tenant_id`,m.`img_url`,m.`name`,m.`encode`,m.`link_phone`,m.`create_date`,m.`update_date`,m.`car_vendor_type`,m.`car_params`,m.`status`,m.`link_person`, | |||
| m.`business_id`,m.`business_types`,m.`sub_business_id`,m.`shop_type`,m.`brand`,m.`type`,m.`is_public`,m.email,m.`title`,m.`cover_picture`,m.`is_admin`,m.`bill_setting`,m.`qr_code`, | |||
| m.`introduction`,m.`action_desc`,m.`mark`,m.`is_del`,m.`talk_user_main`,m.`talk_user_aux`,m.link_line_phone,r.rental_start_date,r.rental_end_date,m.entry_amount,m.cash_out_number,m.cash_out_count,m.cash_out_last_time | |||
| m.`introduction`,m.`action_desc`,m.`mark`,m.mark_time,m.`is_del`,m.`talk_user_main`,m.`talk_user_aux`,m.link_line_phone,r.rental_start_date,r.rental_end_date,m.entry_amount,m.cash_out_number,m.cash_out_count,m.cash_out_last_time | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| @@ -341,4 +341,31 @@ public class WxMerchantController extends BaseController { | |||
| wxMerchantService.exportUserTradeList(wxMerchant, request,response); | |||
| } | |||
| @ApiOperation("") | |||
| @PostMapping("damark") | |||
| @SystemControllerLog(description = "商户-标记") | |||
| public ResultData damark(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::top"); | |||
| // wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| return wxMerchantService.damark(wxMerchant,getTenantInfo()); | |||
| } | |||
| @ApiOperation("") | |||
| @PostMapping("downmark") | |||
| @SystemControllerLog(description = "商户-取消标记") | |||
| public ResultData downmark(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::top"); | |||
| // wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| return wxMerchantService.downmark(wxMerchant); | |||
| } | |||
| @ApiOperation("") | |||
| @PostMapping("markup") | |||
| @SystemControllerLog(description = "商户-标记置顶") | |||
| public ResultData markup(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::top"); | |||
| // wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| return wxMerchantService.markup(wxMerchant); | |||
| } | |||
| } | |||
| @@ -5,22 +5,18 @@ import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.WxBusiness; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.tt.TtCoupon; | |||
| import com.iformall.domain.po.tt.TtVideoLibrary; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.WxBusinessService; | |||
| import com.iformall.service.WxFlowService; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.service.tt.TtCouponService; | |||
| import com.iformall.service.tt.TtVideoLibraryService; | |||
| import com.iformall.utils.RedisLock; | |||
| import com.iformall.video.VideoFactory; | |||
| import com.iformall.video.entity.VideUploadResult; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @@ -357,4 +353,31 @@ public class TtCouponController extends BaseController { | |||
| return ttCouponService.auditRejected(record.getId(),record.getRemark()); | |||
| } | |||
| @ApiOperation("") | |||
| @PostMapping("damark") | |||
| @SystemControllerLog(description = "商户-标记") | |||
| public ResultData damark(@RequestBody TtCoupon record) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::top"); | |||
| // wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| return ttCouponService.damark(record, getTenantInfo()); | |||
| } | |||
| @ApiOperation("") | |||
| @PostMapping("downmark") | |||
| @SystemControllerLog(description = "商户-取消标记") | |||
| public ResultData downmark(@RequestBody TtCoupon record) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::top"); | |||
| // wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| return ttCouponService.downmark(record); | |||
| } | |||
| @ApiOperation("") | |||
| @PostMapping("markup") | |||
| @SystemControllerLog(description = "商户-标记置顶") | |||
| public ResultData markup(@RequestBody TtCoupon record) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::top"); | |||
| // wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| return ttCouponService.markup(record); | |||
| } | |||
| } | |||
| @@ -13,10 +13,7 @@ import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.domain.po.WxCouponChannel; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import com.iformall.enums.EnumCampaignStatus; | |||
| import com.iformall.enums.EnumCampaignType; | |||
| import com.iformall.enums.EnumCouponChannelType; | |||
| import com.iformall.enums.EnumCouponStatus; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.service.WxCampaignService; | |||
| import com.iformall.service.WxCouponChannelService; | |||
| import com.iformall.service.WxCouponService; | |||
| @@ -79,7 +76,7 @@ public class WxCampaignController extends BaseController { | |||
| } | |||
| wxCampaign.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode()); | |||
| wxCampaign.updateTenantInfo(ifParentUpdateAloneTenantInfo()); | |||
| return wxCampaignService.saveOrUpdate(wxCampaign); | |||
| return wxCampaignService.saveOrUpdate(wxCampaign, EnumProjectPlat.TT); | |||
| } | |||
| @ApiOperation(value = "新增接口-小程序路径", notes = "produceType,produceId,pagePath,pageScene必填") | |||
| @@ -114,7 +111,7 @@ public class WxCampaignController extends BaseController { | |||
| } else { | |||
| wxCampaign.setCouponIds(JSONArray.toJSONString(new String[0])); | |||
| } | |||
| return wxCampaignService.saveOrUpdate(wxCampaign); | |||
| return wxCampaignService.saveOrUpdate(wxCampaign, EnumProjectPlat.TT); | |||
| } | |||
| @ApiOperation("根据id更新接口") | |||
| @@ -194,8 +191,8 @@ public class WxCampaignController extends BaseController { | |||
| int temp = source.getSortNum(); | |||
| source.setSortNum(target.getSortNum()); | |||
| target.setSortNum(temp); | |||
| wxCampaignService.saveOrUpdate(source); | |||
| wxCampaignService.saveOrUpdate(target); | |||
| wxCampaignService.saveOrUpdate(source, EnumProjectPlat.TT); | |||
| wxCampaignService.saveOrUpdate(target, EnumProjectPlat.TT); | |||
| return new ResultData(Result.SUCCESS, "调整顺序成功", null); | |||
| } | |||