记得上下班打卡 | git大法好,push需谨慎

Commit 886a1beb authored by 胡佳晨's avatar 胡佳晨

Merge branch 'dev_TFC' into pre

parents 95aade38 bbc618cc
...@@ -23,9 +23,16 @@ public class SweetConstant { ...@@ -23,9 +23,16 @@ public class SweetConstant {
public final static String REDIS_KEY_SWEET_MDSK_MANUAL_RICH_TEXT = "sweet:mdsk:manual:richText:manual:"; public final static String REDIS_KEY_SWEET_MDSK_MANUAL_RICH_TEXT = "sweet:mdsk:manual:richText:manual:";
public final static String REDIS_KEY_SWEET_MDSK_MANUAL_SORT = "sweet:mdsk:manual:sort:manual:"; public final static String REDIS_KEY_SWEET_MDSK_MANUAL_SORT = "sweet:mdsk:manual:sort:manual:";
public final static String REDIS_KEY_SWEET_MDSK_ARTISTS_RELATION = "sweet:mdsk:artists:relation:uid:"; public final static String REDIS_KEY_SWEET_MDSK_ARTISTS_RELATION = "sweet:mdsk:artists:relation:uid:";
public final static String REDIS_KEY_SWEET_MDSK_ARTISTS_DETAILS = "sweet:mdsk:artists:details:";
public final static String REDIS_KEY_SWEET_MDSK_SHOP = "sweet:mdsk:artists:shop:manual:"; public final static String REDIS_KEY_SWEET_MDSK_SHOP = "sweet:mdsk:artists:shop:manual:";
public final static String REDIS_KEY_SWEET_TFC_MANUAL_PUSH_LIST = "sweet:mdsk:manual:pushList";
public final static String REDIS_KEY_SWEET_TFC_MANUAL_TIME_LIST = "sweet:mdsk:manual:timeList:manual:";
public final static String REDIS_KEY_SWEET_TFC_MANUAL_NOTIFY_LIST = "sweet:mdsk:manual:notify:manual:";
public final static String REDIS_KEY_SWEET_TFC_MANUAL_RICH_TEXT = "sweet:mdsk:manual:richText:manual:";
public final static String REDIS_KEY_SWEET_TFC_MANUAL_SORT = "sweet:mdsk:manual:sort:manual:";
public final static String REDIS_KEY_SWEET_TFC_ARTISTS_RELATION = "sweet:mdsk:artists:relation:uid:";
public final static String REDIS_KEY_SWEET_TFC_SHOP = "sweet:mdsk:artists:shop:manual:";
// 积分活动 // 积分活动
public static final String REDIS_KEY_SWEET_INTEGRAL_ACTIVITY_LIST = "sweet:integralActivity:list"; public static final String REDIS_KEY_SWEET_INTEGRAL_ACTIVITY_LIST = "sweet:integralActivity:list";
public static final String REDIS_KEY_SWEET_INTEGRAL_ACTIVITY_INFO = "sweet:integralActivity:activityId:"; public static final String REDIS_KEY_SWEET_INTEGRAL_ACTIVITY_INFO = "sweet:integralActivity:activityId:";
......
package com.liquidnet.service.sweet.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistListTFCDto;
import com.liquidnet.service.sweet.entity.SweetManualArtistsTfc;
/**
* <p>
* 电子宣传手册艺人表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface ISweetManualArtistsTFCService extends IService<SweetManualArtistsTfc> {
ResponseDto<PageInfo<SweetManualArtistListTFCDto>> getList(Integer page, Integer size, String manualId);
ResponseDto<Boolean> add(String manualId,String artistId, String stageId,String performanceStart,String performanceEnd,String signatureStart,String signatureEnd);
ResponseDto<SweetManualArtistListTFCDto> details(String manualRelationId);
ResponseDto<Boolean> change(String manualRelationId,String manualId,String artistId, String stageId,String performanceStart,String performanceEnd,String signatureStart,String signatureEnd);
ResponseDto<Boolean> delete(String manualRelationId,String manualId);
}
package com.liquidnet.service.sweet.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetManualNotifyTfc;
/**
* <p>
* 电子宣传手册通知表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface ISweetManualNotifyTFCService extends IService<SweetManualNotifyTfc> {
ResponseDto<PageInfo<SweetManualNotifyTfc>> getList(Integer page, Integer size, String title, String manualId);
ResponseDto<Boolean> add(String manualId,String title, String content);
ResponseDto<SweetManualNotifyTfc> details(String manualId);
ResponseDto<Boolean> change(String manualId,String manualNotifyId, String title, String content);
ResponseDto<Boolean> delete(String manualId);
}
package com.liquidnet.service.sweet.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetManualShopTfc;
import java.util.List;
/**
* <p>
* 电子宣传手册商铺表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface ISweetManualShopTFCService extends IService<SweetManualShopTfc> {
ResponseDto<List<SweetManualShopTfc>> getList(String manualId, Integer type);
ResponseDto<SweetManualShopTfc> details(String manualShopId);
ResponseDto<Boolean> add(String manualId,String title,String picUrl,String describe,Integer type,Integer isRecommend,Integer sort);
ResponseDto<Boolean> change(String manualShopId,String manualId,String title,String picUrl,String describe,Integer type,Integer isRecommend,Integer sort);
ResponseDto<Boolean> delete(String manualShopId,String manualId);
}
package com.liquidnet.service.sweet.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetManualSortTfc;
/**
* <p>
* 电子宣传手册显示内容表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface ISweetManualSortTFCService extends IService<SweetManualSortTfc> {
ResponseDto<SweetManualSortTfc> get(String manualId);
ResponseDto<Boolean> add(String manualId,String content);
}
package com.liquidnet.service.sweet.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.SweetManualTFCDto;
import com.liquidnet.service.sweet.entity.SweetManualTfc;
/**
* <p>
* 电子宣传手册表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface ISweetManualTFCService extends IService<SweetManualTfc> {
ResponseDto<PageInfo<SweetManualTFCDto>> getManualList(int page, int size, String name);
ResponseDto<SweetManualTFCDto> details(String manualId);
//关闭开启
ResponseDto<Boolean> changeStatus(String manualId, String performancesId, Integer status);
//发布与否
ResponseDto<Boolean> changeRelease(String manualId, Integer isRelease);
}
package com.liquidnet.service.sweet.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetRichtextTfc;
/**
* <p>
* 电子宣传手册富文本表 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface ISweetRichtextTFCService extends IService<SweetRichtextTfc> {
ResponseDto<SweetRichtextTfc> get(String manualId, Integer type);
ResponseDto<Boolean> add(String manualId,String details, String local, String pirUrl, Integer type);
ResponseDto<Boolean> change(String manualId,String details,String local,String pirUrl,Integer type);
}
package com.liquidnet.service.sweet.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.liquidnet.service.sweet.entity.SweetUserRelationTfc;
/**
* <p>
* 用户 收藏/喜欢等状态 服务类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface ISweetUserRelationTFCService extends IService<SweetUserRelationTfc> {
}
...@@ -46,7 +46,7 @@ public class SweetAppletUsersVo implements Serializable, Cloneable { ...@@ -46,7 +46,7 @@ public class SweetAppletUsersVo implements Serializable, Cloneable {
private String countryCode; private String countryCode;
/** /**
* 1草莓 2五百里 3mdsk 4正在 * 1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节
*/ */
private Integer type; private Integer type;
......
package com.liquidnet.service.sweet.vo;
import com.liquidnet.service.sweet.entity.SweetManualShopTfc;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
@ApiModel
public class SweetManualShopTFCAllVo implements Serializable ,Cloneable {
@ApiModelProperty("推荐")
private List<SweetManualShopTfc> recommend;
@ApiModelProperty("吃喝")
private List<SweetManualShopTfc> eat;
@ApiModelProperty("玩乐")
private List<SweetManualShopTfc> play;
private static final SweetManualShopTFCAllVo obj = new SweetManualShopTFCAllVo();
public static SweetManualShopTFCAllVo getNew() {
try {
return (SweetManualShopTFCAllVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetManualShopTFCAllVo();
}
}
}
...@@ -45,8 +45,8 @@ liquidnet: ...@@ -45,8 +45,8 @@ liquidnet:
password: 3Xa%8p password: 3Xa%8p
sweet: sweet:
dbs: 0,16 dbs: 0,16
database: 255 database: 15
host: 15 host: 39.107.71.112
port: 6379 port: 6379
password: 3Xa%8p password: 3Xa%8p
adam: adam:
...@@ -148,6 +148,9 @@ liquidnet: ...@@ -148,6 +148,9 @@ liquidnet:
mdsk: mdsk:
appid: wxc278ddf30f515188 appid: wxc278ddf30f515188
secret: 21c0daa5d7d323f86c70c29db3c0613b secret: 21c0daa5d7d323f86c70c29db3c0613b
airship:
appid: wxefc896f987d72d32
secret: 24c80a734c1fdb316a31a5be1f3606d5
umeng: umeng:
ios: ios:
appkey: 54fe819bfd98c546b50004f0 appkey: 54fe819bfd98c546b50004f0
......
...@@ -151,6 +151,9 @@ liquidnet: ...@@ -151,6 +151,9 @@ liquidnet:
mdsk: mdsk:
appid: wxc278ddf30f515188 appid: wxc278ddf30f515188
secret: 21c0daa5d7d323f86c70c29db3c0613b secret: 21c0daa5d7d323f86c70c29db3c0613b
airship:
appid: wxefc896f987d72d32
secret: 24c80a734c1fdb316a31a5be1f3606d5
umeng: umeng:
ios: ios:
appkey: 54fe819bfd98c546b50004f0 appkey: 54fe819bfd98c546b50004f0
......
package com.liquidnet.service.sweet.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
@ApiModel
public class SweetManualAppletTFCDto implements Serializable ,Cloneable{
@ApiModelProperty("电子手册id")
private String manualId;
@ApiModelProperty("演出id")
private String performancesId;
@ApiModelProperty("演出标题")
private String title;
@ApiModelProperty("场地id")
private String fieldId;
@ApiModelProperty("场地名称")
private String fieldName;
@ApiModelProperty("城市名称")
private String cityName;
@ApiModelProperty("演出开始时间")
private String timeStart;
@ApiModelProperty("演出结束时间")
private String timeEnd;
@ApiModelProperty("演出开售时间")
private String timeSell;
@ApiModelProperty("是否会员")
private Integer isMember;
@ApiModelProperty("提前时间")
private Integer payCountdownMinute;
@ApiModelProperty("经度")
private String longitude;
@ApiModelProperty("纬度")
private String latitude;
private static final SweetManualAppletTFCDto obj = new SweetManualAppletTFCDto();
public static SweetManualAppletTFCDto getNew() {
try {
return (SweetManualAppletTFCDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetManualAppletTFCDto();
}
}
}
package com.liquidnet.service.sweet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class SweetManualArtistList2TFCDto implements Serializable ,Cloneable {
private List<SweetManualArtistListTFCDto> data;
private List<String> date;
private List<SweetManualArtistStageListTFCDto> stage;
private Integer total;
private static final SweetManualArtistList2TFCDto obj = new SweetManualArtistList2TFCDto();
public static SweetManualArtistList2TFCDto getNew() {
try {
return (SweetManualArtistList2TFCDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetManualArtistList2TFCDto();
}
}
}
package com.liquidnet.service.sweet.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
@ApiModel
public class SweetManualArtistListTFCDto implements Serializable,Cloneable {
private static final long serialVersionUID = 8382714055996962257L;
@ApiModelProperty("电子手册关联id")
private String manualRelationId;
@ApiModelProperty("艺人id")
private String artistId;
@ApiModelProperty("艺人名称")
private String name;
@ApiModelProperty("拼音")
private String pinyin;
@ApiModelProperty("简介")
private String describes;
@ApiModelProperty("头像图片")
private String picUrl;
@ApiModelProperty("舞台id")
private String stageId;
@ApiModelProperty("舞台名称")
private String title;
@ApiModelProperty("演出开始")
private String performanceStart;
@ApiModelProperty("演出结束")
private String performanceEnd;
@ApiModelProperty("签售开始")
private String signatureStart;
@ApiModelProperty("签售结束")
private String signatureEnd;
@ApiModelProperty("是否观看")
private Integer isWatch;
@ApiModelProperty("是否登记")
private Integer isSign;
private static final SweetManualArtistListTFCDto obj = new SweetManualArtistListTFCDto();
public static SweetManualArtistListTFCDto getNew() {
try {
return (SweetManualArtistListTFCDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetManualArtistListTFCDto();
}
}
}
package com.liquidnet.service.sweet.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class SweetManualArtistStageListTFCDto implements Serializable ,Cloneable{
private String title;
private static final SweetManualArtistStageListTFCDto obj = new SweetManualArtistStageListTFCDto();
public static SweetManualArtistStageListTFCDto getNew() {
try {
return (SweetManualArtistStageListTFCDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetManualArtistStageListTFCDto();
}
}
}
package com.liquidnet.service.sweet.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
@ApiModel
public class SweetManualTFCDto implements Serializable ,Cloneable{
@ApiModelProperty("电子手册id")
private String manualId;
@ApiModelProperty("演出id")
private String performancesId;
@ApiModelProperty("演出名称")
private String title;
@ApiModelProperty("演出开始时间")
private String timeStart;
@ApiModelProperty("演出结束时间")
private String timeEnd;
@ApiModelProperty("售卖时间")
private String timeSell;
@ApiModelProperty("停售时间")
private String timeStop;
@ApiModelProperty("状态")
private Integer status;
@ApiModelProperty("手册状态")
private Integer manualStatus;
@ApiModelProperty("是否发布")
private Integer isRelease;
private static final SweetManualTFCDto obj = new SweetManualTFCDto();
public static SweetManualTFCDto getNew() {
try {
return (SweetManualTFCDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetManualTFCDto();
}
}
}
...@@ -45,7 +45,7 @@ public class SweetAppletSubMsg implements Serializable { ...@@ -45,7 +45,7 @@ public class SweetAppletSubMsg implements Serializable {
private String targetId; private String targetId;
/** /**
* 1草莓 2五百里 3mdsk 4正在 * 1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节
*/ */
private Integer appletType; private Integer appletType;
......
...@@ -60,7 +60,7 @@ public class SweetAppletUsers implements Serializable { ...@@ -60,7 +60,7 @@ public class SweetAppletUsers implements Serializable {
private String countryCode; private String countryCode;
/** /**
* 1草莓 2五百里 3mdsk 4正在 * 1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节
*/ */
private Integer type; private Integer type;
......
package com.liquidnet.service.sweet.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 电子宣传手册艺人表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class SweetManualArtistsTfc implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* manual_relation_id
*/
private String manualRelationId;
/**
* 电子宣传手册id
*/
private String manualId;
/**
* 关联id
*/
private String stageId;
/**
* 关联id
*/
private String artistsId;
/**
* 演出开始时间
*/
private LocalDateTime performanceStart;
/**
* 演出结束时间
*/
private LocalDateTime performanceEnd;
/**
* 签收开始时间
*/
private LocalDateTime signatureStart;
/**
* 签收结束时间
*/
private LocalDateTime signatureEnd;
/**
* 0关闭 1开启
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
private static final SweetManualArtistsTfc obj = new SweetManualArtistsTfc();
public static SweetManualArtistsTfc getNew() {
try {
return (SweetManualArtistsTfc) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetManualArtistsTfc();
}
}
}
package com.liquidnet.service.sweet.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 电子宣传手册通知表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class SweetManualNotifyTfc implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* manual_notify_id
*/
private String manualNotifyId;
/**
* 电子宣传手册id
*/
private String manualId;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 0关闭 1开启
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
private static final SweetManualNotifyTfc obj = new SweetManualNotifyTfc();
public static SweetManualNotifyTfc getNew() {
try {
return (SweetManualNotifyTfc) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetManualNotifyTfc();
}
}
}
package com.liquidnet.service.sweet.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 电子宣传手册商铺表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class SweetManualShopTfc implements Serializable,Cloneable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* manual_shop_id
*/
private String manualShopId;
/**
* 电子宣传手册id
*/
private String manualId;
/**
* 商家名称
*/
private String title;
/**
* 商家图片
*/
private String picUrl;
/**
* 商家介绍
*/
private String describes;
/**
* 1吃喝 2玩乐
*/
private Integer type;
/**
* 0不推荐 1推荐
*/
private Integer isRecommend;
/**
* 排序字段 数字越大越靠前
*/
private Integer sort;
/**
* 0关闭 1开启
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
private static final SweetManualShopTfc obj = new SweetManualShopTfc();
public static SweetManualShopTfc getNew() {
try {
return (SweetManualShopTfc) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetManualShopTfc();
}
}
}
package com.liquidnet.service.sweet.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 电子宣传手册显示内容表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class SweetManualSortTfc implements Serializable,Cloneable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* manual_id
*/
private String manualId;
/**
* 显示哪个,号隔开
*/
private String showPosition;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
private static final SweetManualSortTfc obj = new SweetManualSortTfc();
public static SweetManualSortTfc getNew() {
try {
return (SweetManualSortTfc) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetManualSortTfc();
}
}
}
package com.liquidnet.service.sweet.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 电子宣传手册表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class SweetManualTfc implements Serializable,Cloneable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* manual_id
*/
private String manualId;
/**
* 演出id
*/
private String performanceId;
/**
* 0关闭 1开启
*/
private Integer status;
/**
* 0取消 1发布
*/
private Integer isRelease;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
private static final SweetManualTfc obj = new SweetManualTfc();
public static SweetManualTfc getNew() {
try {
return (SweetManualTfc) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetManualTfc();
}
}
}
package com.liquidnet.service.sweet.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 电子宣传手册富文本表
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class SweetRichtextTfc implements Serializable ,Cloneable{
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* order_refund_id
*/
private String richtextId;
/**
* manual_id
*/
private String manualId;
/**
* 富文本详情
*/
private String details;
/**
* 经纬度 5需要
*/
private String local;
/**
* 地图图片地址 2需要
*/
private String picUrl;
/**
* 类型 1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略
*/
private Integer type;
/**
* 0关闭 1开启
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
private static final SweetRichtextTfc obj = new SweetRichtextTfc();
public static SweetRichtextTfc getNew() {
try {
return (SweetRichtextTfc) obj.clone();
} catch (CloneNotSupportedException e) {
return new SweetRichtextTfc();
}
}
}
package com.liquidnet.service.sweet.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 用户 收藏/喜欢等状态
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class SweetUserRelationTfc implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* 用户id
*/
private String userId;
/**
* 类型 1喜欢艺人 2签售艺人
*/
private Integer type;
/**
* 目标id
*/
private String targetId;
/**
* 电子手册
*/
private String manualId;
/**
* 1是 0否
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
}
package com.liquidnet.service.sweet.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.sweet.dto.SweetManualArtistListTFCDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistStageListTFCDto;
import com.liquidnet.service.sweet.entity.SweetManualArtistsTfc;
import java.util.List;
import java.util.Map;
/**
* <p>
* 电子宣传手册艺人表 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface SweetManualArtistsTfcMapper extends BaseMapper<SweetManualArtistsTfc> {
List<SweetManualArtistListTFCDto> getManualList(Map<String, Object> map);
SweetManualArtistListTFCDto getManualDetails(Map<String, Object> map);
List<SweetManualArtistStageListTFCDto> getStageNameList(Map<String, Object> map);
}
package com.liquidnet.service.sweet.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.sweet.entity.SweetManualNotifyTfc;
/**
* <p>
* 电子宣传手册通知表 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface SweetManualNotifyTfcMapper extends BaseMapper<SweetManualNotifyTfc> {
}
package com.liquidnet.service.sweet.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.sweet.entity.SweetManualShopTfc;
/**
* <p>
* 电子宣传手册商铺表 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface SweetManualShopTfcMapper extends BaseMapper<SweetManualShopTfc> {
}
package com.liquidnet.service.sweet.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.sweet.entity.SweetManualSortTfc;
/**
* <p>
* 电子宣传手册显示内容表 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface SweetManualSortTfcMapper extends BaseMapper<SweetManualSortTfc> {
}
package com.liquidnet.service.sweet.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.sweet.dto.SweetManualAppletTFCDto;
import com.liquidnet.service.sweet.dto.SweetManualTFCDto;
import com.liquidnet.service.sweet.entity.SweetManualTfc;
import java.util.List;
import java.util.Map;
/**
* <p>
* 电子宣传手册表 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface SweetManualTfcMapper extends BaseMapper<SweetManualTfc> {
List<SweetManualTFCDto> getManualList(Map<String,Object> map);
SweetManualTFCDto getManualDetails(Map<String,Object> map);
List<SweetManualAppletTFCDto> getManualAppletDto();
}
package com.liquidnet.service.sweet.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.sweet.entity.SweetRichtextTfc;
/**
* <p>
* 电子宣传手册富文本表 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface SweetRichtextTfcMapper extends BaseMapper<SweetRichtextTfc> {
}
package com.liquidnet.service.sweet.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.sweet.entity.SweetUserRelationTfc;
/**
* <p>
* 用户 收藏/喜欢等状态 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
public interface SweetUserRelationTfcMapper extends BaseMapper<SweetUserRelationTfc> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.sweet.mapper.SweetManualArtistsTfcMapper">
<resultMap id="getManualListResult" type="com.liquidnet.service.sweet.dto.SweetManualArtistListTFCDto">
<result column="manual_relation_id" property="manualRelationId"/>
<result column="artists_id" property="artistId"/>
<result column="name" property="name"/>
<result column="pinyin" property="pinyin"/>
<result column="describes" property="describes"/>
<result column="pic_url" property="picUrl"/>
<result column="stage_id" property="stageId"/>
<result column="title" property="title"/>
<result column="performance_start" property="performanceStart"/>
<result column="performance_end" property="performanceEnd"/>
<result column="signature_start" property="signatureStart"/>
<result column="signature_end" property="signatureEnd"/>
</resultMap>
<resultMap id="getStageNameListResult" type="com.liquidnet.service.sweet.dto.SweetManualArtistStageListTFCDto">
<result column="title" property="title"/>
</resultMap>
<select id="getManualList" parameterType="java.util.Map" resultMap="getManualListResult">
select manual_relation_id,
sa.`artists_id`,
sa.`name`,
sa.pinyin,
sa.describes,
sa.pic_url,
ss.stage_id,
ss.title,
performance_start,
performance_end,
signature_start,
signature_end
from sweet_manual_artists_tfc as sma
left join sweet_artists as sa on sa.artists_id = sma.artists_id
left join sweet_stage as ss on ss.stage_id = sma.stage_id
<where>
sma.status = 1 and manual_id = #{manualId}
</where>
ORDER BY sma.updated_at DESC
</select>
<select id="getManualDetails" parameterType="java.util.Map" resultMap="getManualListResult">
select manual_relation_id,
sa.`name`,
sa.`artists_id`,
ss.title,
ss.stage_id,
performance_start,
performance_end,
signature_start,
signature_end
from sweet_manual_artists_tfc as sma
left join sweet_artists as sa on sa.artists_id = sma.artists_id
left join sweet_stage as ss on ss.stage_id = sma.stage_id
where manual_relation_id = #{manualRelationId}
</select>
<select id="getStageNameList" parameterType="java.util.Map" resultMap="getStageNameListResult">
select ss.title
from sweet_manual_artists_tfc as sma
left join sweet_artists as sa on sa.artists_id = sma.artists_id
left join sweet_stage as ss on ss.stage_id = sma.stage_id
where sma.status = 1
and manual_id = #{manualId}
group by ss.title;
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.sweet.mapper.SweetManualNotifyMdskMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.sweet.mapper.SweetManualShopMdskMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.sweet.mapper.SweetManualSortMdskMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.sweet.mapper.SweetManualTfcMapper">
<resultMap id="partnerPerformanceListResult" type="com.liquidnet.service.sweet.dto.SweetManualTFCDto">
<result column="manual_id" property="manualId"/>
<result column="performances_id" property="performancesId"/>
<result column="title" property="title"/>
<result column="time_start" property="timeStart"/>
<result column="time_end" property="timeEnd"/>
<result column="time_sell" property="timeSell"/>
<result column="time_stop" property="timeStop"/>
<result column="status" property="status"/>
<result column="manualStatus" property="manualStatus"/>
<result column="is_release" property="isRelease"/>
</resultMap>
<resultMap id="getManualAppletListResult" type="com.liquidnet.service.sweet.dto.SweetManualAppletTFCDto">
<result column="manual_id" property="manualId"/>
<result column="performances_id" property="performancesId"/>
<result column="title" property="title"/>
<result column="field_id" property="fieldId"/>
<result column="city_name" property="cityName"/>
<result column="time_start" property="timeStart"/>
<result column="time_end" property="timeEnd"/>
</resultMap>
<resultMap id="getManualAppletDtoResult" type="com.liquidnet.service.sweet.dto.SweetManualAppletTFCDto">
<result column="manual_id" property="manualId"/>
<result column="performances_id" property="performancesId"/>
<result column="title" property="title"/>
<result column="field_id" property="fieldId"/>
<result column="time_start" property="timeStart"/>
<result column="time_end" property="timeEnd"/>
<result column="time_sell" property="timeSell"/>
<result column="pay_countdown_minute" property="payCountdownMinute"/>
<result column="is_member" property="isMember"/>
</resultMap>
<!-- 电子手册列表 -->
<select id="getManualList" parameterType="java.util.Map" resultMap="partnerPerformanceListResult">
SELECT
IFNULL(sm.manual_id,0) as 'manual_id',
p.performances_id ,
p.title ,
p.time_start ,
p.time_end ,
ps.status ,
t.time_sell ,
t.time_stop,
IFNULL(sm.status ,0) as 'manualStatus',
IFNULL(sm.is_release,0) as 'is_release'
FROM
kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
LEFT JOIN kylin_performance_relations AS pr ON p.performances_id = pr.performance_id
LEFT JOIN sweet_manual_tfc AS sm ON p.performances_id = sm.performance_id
LEFT JOIN(
SELECT
ttr.performance_id ,
MIN(
DATE_SUB(
t.time_start ,
INTERVAL pay_countdown_minute MINUTE
)
) AS 'time_sell' ,
MAX(t.time_end) AS 'time_stop'
FROM
kylin_ticket_status AS ts
LEFT JOIN kylin_ticket_relations AS tr ON tr.ticket_id = ts.ticket_id
LEFT JOIN kylin_tickets AS t ON t.tickets_id = ts.ticket_id
LEFT JOIN kylin_ticket_time_relation AS ttr ON tr.times_id = ttr.times_id
GROUP BY
ttr.performance_id
) AS t ON p.performances_id = t.performance_id
<where>
<if test="title!='' and title != null">
AND (title LIKE concat('%', #{title}, '%'))
</if>
</where>
ORDER BY p.created_at desc
</select>
<!-- 电子手册详情 -->
<select id="getManualDetails" parameterType="java.util.Map" resultMap="partnerPerformanceListResult">
SELECT IFNULL(sm.manual_id, 0) as 'manual_id',
p.performances_id,
p.title,
p.time_start,
p.time_end,
ps.status,
t.time_sell,
t.time_stop,
IFNULL(sm.status, 0) as 'manualStatus',
IFNULL(sm.is_release, 0) as 'is_release'
FROM kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
LEFT JOIN kylin_performance_relations AS pr ON p.performances_id = pr.performance_id
LEFT JOIN sweet_manual_tfc AS sm ON p.performances_id = sm.performance_id
LEFT JOIN(
SELECT ttr.performance_id,
MIN(
DATE_SUB(
t.time_start,
INTERVAL pay_countdown_minute MINUTE
)
) AS 'time_sell',
MAX(t.time_end) AS 'time_stop'
FROM kylin_ticket_status AS ts
LEFT JOIN kylin_ticket_relations AS tr ON tr.ticket_id = ts.ticket_id
LEFT JOIN kylin_tickets AS t ON t.tickets_id = ts.ticket_id
LEFT JOIN kylin_ticket_time_relation AS ttr ON tr.times_id = ttr.times_id
GROUP BY ttr.performance_id
) AS t ON p.performances_id = t.performance_id
where sm.manual_id = #{manualId}
ORDER BY p.created_at desc
</select>
<select id="getManualAppletList" resultMap="getManualAppletListResult">
select manual_id, performances_id, title, field_id, city_name, time_start, time_end
from kylin_performances as kp
left join sweet_manual_tfc as sw on sw.performance_id = kp.performances_id
left join kylin_performance_relations as kpr on kpr.performance_id = kp.performances_id
where sw.`status` = 1
and sw.is_release = 1
</select>
<select id="getManualAppletDto" resultMap="getManualAppletDtoResult">
SELECT
IFNULL(sm.manual_id , 0) AS 'manual_id' ,
p.performances_id ,
p.title ,
pr.field_id ,
p.time_start ,
p.time_end,
t1.time_sell,
t1.pay_countdown_minute,
t1.is_member
FROM
kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
LEFT JOIN kylin_performance_relations AS pr ON p.performances_id = pr.performance_id
LEFT JOIN sweet_manual_tfc AS sm ON p.performances_id = sm.performance_id
LEFT JOIN(
SELECT
ttr.performance_id ,
MIN(
DATE_SUB(
t.time_start ,
INTERVAL pay_countdown_minute MINUTE
)
) AS 'time_sell' ,
MAX(t.time_end) AS 'time_stop'
FROM
kylin_ticket_status AS ts
LEFT JOIN kylin_ticket_relations AS tr ON tr.ticket_id = ts.ticket_id
LEFT JOIN kylin_tickets AS t ON t.tickets_id = ts.ticket_id
LEFT JOIN kylin_ticket_time_relation AS ttr ON tr.times_id = ttr.times_id
GROUP BY
ttr.performance_id
) AS t ON p.performances_id = t.performance_id
LEFT JOIN(
SELECT
ttr.performance_id ,
pay_countdown_minute,
ts.is_member,
sum(ts.total_general) AS 'total_general' ,
MIN(
DATE_SUB(
t.time_start ,
INTERVAL pay_countdown_minute MINUTE
)
) AS 'time_sell' ,
MAX(t.time_end) AS 'time_stop'
FROM
kylin_ticket_status AS ts
LEFT JOIN kylin_ticket_relations AS tr ON tr.ticket_id = ts.ticket_id
LEFT JOIN kylin_tickets AS t ON t.tickets_id = ts.ticket_id
LEFT JOIN kylin_ticket_time_relation AS ttr ON tr.times_id = ttr.times_id
GROUP BY
ttr.performance_id
) AS t1 ON p.performances_id = t1.performance_id
where sm.`status` = 1 and sm.is_release = 1
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.sweet.mapper.SweetRichtextMdskMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.sweet.mapper.SweetUserRelationMdskMapper">
</mapper>
...@@ -7,7 +7,7 @@ CREATE TABLE `sweet_applet_sub_msg` ...@@ -7,7 +7,7 @@ CREATE TABLE `sweet_applet_sub_msg`
`open_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'open_id', `open_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'open_id',
`template_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'template_id', `template_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'template_id',
`target_id` varchar(255) NOT NULL DEFAULT '' COMMENT '目标id 显示是演出id', `target_id` varchar(255) NOT NULL DEFAULT '' COMMENT '目标id 显示是演出id',
`applet_type` tinyint NOT NULL DEFAULT 0 COMMENT '1草莓 2五百里 3mdsk 4正在', `applet_type` tinyint NOT NULL DEFAULT 0 COMMENT '1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节',
`activity_type` tinyint NOT NULL DEFAULT 0 COMMENT '活动类型', `activity_type` tinyint NOT NULL DEFAULT 0 COMMENT '活动类型',
`is_push` tinyint NOT NULL DEFAULT 1 COMMENT '是否推送 1未推送 2已推送', `is_push` tinyint NOT NULL DEFAULT 1 COMMENT '是否推送 1未推送 2已推送',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
......
...@@ -452,7 +452,7 @@ CREATE TABLE `sweet_applet_users` ...@@ -452,7 +452,7 @@ CREATE TABLE `sweet_applet_users`
`phone_number` varchar(200) NOT NULL DEFAULT '' COMMENT '手机号', `phone_number` varchar(200) NOT NULL DEFAULT '' COMMENT '手机号',
`pure_phone_number` varchar(200) NOT NULL DEFAULT '' COMMENT '手机号', `pure_phone_number` varchar(200) NOT NULL DEFAULT '' COMMENT '手机号',
`country_code` varchar(200) NOT NULL DEFAULT '' COMMENT '地区码', `country_code` varchar(200) NOT NULL DEFAULT '' COMMENT '地区码',
`type` tinyint NOT NULL DEFAULT 0 COMMENT '1草莓 2五百里 3mdsk 4正在', `type` tinyint NOT NULL DEFAULT 0 COMMENT '1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', `updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`), PRIMARY KEY (`mid`),
...@@ -571,3 +571,191 @@ CREATE TABLE `sweet_antigenic_question` ...@@ -571,3 +571,191 @@ CREATE TABLE `sweet_antigenic_question`
COLLATE utf8mb4_unicode_ci COLLATE utf8mb4_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '防疫答题表'; ROW_FORMAT = DYNAMIC COMMENT '防疫答题表';
-- 下面为TFC表 --
-- 电子宣传手册表
drop TABLE if exists `sweet_manual_tfc`;
CREATE TABLE `sweet_manual_tfc`
(
`mid` bigint unsigned NOT NULL AUTO_INCREMENT,
`manual_id` varchar(200) NOT NULL DEFAULT '0' COMMENT 'manual_id',
`performance_id` varchar(200) NULL COMMENT '演出id',
`status` tinyint NOT NULL DEFAULT 1 COMMENT '0关闭 1开启',
`is_release` tinyint NOT NULL DEFAULT 1 COMMENT '0取消 1发布',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`),
KEY `manual_id_index` (`manual_id`),
KEY `performance_id_index` (`performance_id`),
KEY `is_release_index` (`is_release`),
KEY `status_index` (`status`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '电子宣传手册表';
-- 电子宣传手册显示内容表
drop TABLE if exists `sweet_manual_sort_tfc`;
CREATE TABLE `sweet_manual_sort_tfc`
(
`mid` bigint unsigned NOT NULL AUTO_INCREMENT,
`manual_id` varchar(200) NOT NULL DEFAULT '0' COMMENT 'manual_id',
`show_position` varchar(200) NULL COMMENT '显示哪个,号隔开',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`),
KEY `manual_id_index` (`manual_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '电子宣传手册显示内容表';
-- 电子宣传手册富文本表
drop TABLE if exists `sweet_richtext_tfc`;
CREATE TABLE `sweet_richtext_tfc`
(
`mid` bigint unsigned NOT NULL AUTO_INCREMENT,
`richtext_id` varchar(200) NOT NULL DEFAULT '0' COMMENT 'order_refund_id',
`manual_id` varchar(200) NOT NULL DEFAULT '0' COMMENT 'manual_id',
`details` longtext NULL COMMENT '富文本详情',
`local` varchar(200) NOT NULL DEFAULT '' COMMENT '经纬度 5需要',
`pic_url` varchar(200) NOT NULL DEFAULT '' COMMENT '地图图片地址 2需要',
`type` tinyint NOT NULL DEFAULT 0 COMMENT '类型 1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略',
`status` tinyint NOT NULL DEFAULT 1 COMMENT '0关闭 1开启',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`),
KEY `richtext_id_index` (`richtext_id`),
KEY `manual_id_index` (`manual_id`),
KEY `type_index` (`type`),
KEY `status_index` (`status`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '电子宣传手册富文本表';
-- 电子宣传手册艺人表
drop TABLE if exists `sweet_manual_artists_tfc`;
CREATE TABLE `sweet_manual_artists_tfc`
(
`mid` bigint unsigned NOT NULL AUTO_INCREMENT,
`manual_relation_id` varchar(200) NOT NULL DEFAULT '0' COMMENT 'manual_relation_id',
`manual_id` varchar(200) NOT NULL DEFAULT '' COMMENT '电子宣传手册id',
`stage_id` varchar(200) NULL COMMENT '关联id',
`artists_id` varchar(200) NULL COMMENT '关联id',
`performance_start` datetime NULL COMMENT '演出开始时间',
`performance_end` datetime NULL COMMENT '演出结束时间',
`signature_start` datetime NULL COMMENT '签收开始时间',
`signature_end` datetime NULL COMMENT '签收结束时间',
`status` tinyint NOT NULL DEFAULT 1 COMMENT '0关闭 1开启',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`),
KEY `manual_relation_id_index` (`manual_relation_id`),
KEY `manual_id_index` (`manual_id`),
KEY `stage_id_index` (`stage_id`),
KEY `artists_id_index` (`artists_id`),
KEY `status_index` (`status`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '电子宣传手册艺人表';
-- 电子宣传手册通知表
drop TABLE if exists `sweet_manual_notify_tfc`;
CREATE TABLE `sweet_manual_notify_tfc`
(
`mid` bigint unsigned NOT NULL AUTO_INCREMENT,
`manual_notify_id` varchar(200) NOT NULL DEFAULT '0' COMMENT 'manual_notify_id',
`manual_id` varchar(200) NOT NULL DEFAULT '' COMMENT '电子宣传手册id',
`title` varchar(200) NOT NULL DEFAULT '' COMMENT '标题',
`content` longtext NULL COMMENT '内容',
`status` tinyint NOT NULL DEFAULT 1 COMMENT '0关闭 1开启',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`),
KEY `manual_notify_id_index` (`manual_notify_id`),
KEY `manual_id_index` (`manual_id`),
KEY `status_index` (`status`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '电子宣传手册通知表';
-- 电子宣传手册商铺表
drop TABLE if exists `sweet_manual_shop_tfc`;
CREATE TABLE `sweet_manual_shop_tfc`
(
`mid` bigint unsigned NOT NULL AUTO_INCREMENT,
`manual_shop_id` varchar(200) NOT NULL DEFAULT '0' COMMENT 'manual_shop_id',
`manual_id` varchar(200) NOT NULL DEFAULT '' COMMENT '电子宣传手册id',
`title` varchar(200) NOT NULL DEFAULT '' COMMENT '商家名称',
`pic_url` varchar(200) NOT NULL DEFAULT '' COMMENT '商家图片',
`describes` longtext NULL COMMENT '商家介绍',
`type` tinyint NOT NULL DEFAULT 1 COMMENT '1吃喝 2玩乐',
`is_recommend` tinyint NOT NULL DEFAULT 1 COMMENT '0不推荐 1推荐',
`sort` tinyint NOT NULL DEFAULT 0 COMMENT '排序字段 数字越大越靠前',
`status` tinyint NOT NULL DEFAULT 1 COMMENT '0关闭 1开启',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`),
KEY `manual_shop_index` (`manual_shop_id`),
KEY `manual_id_index` (`manual_id`),
KEY `status_index` (`status`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '电子宣传手册商铺表';
-- 正在现场服务号关注事件储存用户信息表
drop TABLE if exists `sweet_wechat_user_tfc`;
CREATE TABLE `sweet_wechat_user_tfc`
(
`mid` bigint unsigned NOT NULL AUTO_INCREMENT,
`user_id` varchar(200) NOT NULL DEFAULT '' COMMENT 'user_id',
`openId` varchar(200) NOT NULL DEFAULT '' COMMENT 'openId',
`unionId` varchar(200) NOT NULL DEFAULT '' COMMENT 'unionId',
`nickname` varchar(200) NOT NULL DEFAULT '' COMMENT '昵称',
`sexDesc` varchar(200) NOT NULL DEFAULT '' COMMENT '性别',
`sex` tinyint NOT NULL DEFAULT 0 COMMENT '性别 男1',
`headImgUrl` varchar(200) NOT NULL DEFAULT '' COMMENT '头像',
`language` varchar(200) NOT NULL DEFAULT '' COMMENT 'zh_CN',
`country` varchar(200) NOT NULL DEFAULT '' COMMENT '国家',
`province` varchar(200) NOT NULL DEFAULT '' COMMENT '省',
`city` varchar(200) NOT NULL DEFAULT '' COMMENT '市',
`subscribeTime` datetime NULL DEFAULT null COMMENT '关注时间',
`subscribeScene` varchar(200) NOT NULL DEFAULT '' COMMENT 'ADD_SCENE_SEARCH 关注方式',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`),
KEY `sweet_wechat_user_user_id` (`user_id`)
) ENGINE = InnoDB
DEFAULT CHARSET utf8mb4
COLLATE utf8mb4_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '正在现场服务号关注事件储存用户信息表';
-- 用户 收藏/喜欢等状态
drop TABLE if exists `sweet_user_relation_tfc`;
CREATE TABLE `sweet_user_relation_tfc`
(
`mid` bigint unsigned NOT NULL AUTO_INCREMENT,
`user_id` varchar(200) NOT NULL DEFAULT '' COMMENT '用户id',
`type` tinyint NOT NULL DEFAULT 0 COMMENT '类型 1喜欢艺人 2签售艺人',
`target_id` varchar(200) NOT NULL DEFAULT '' COMMENT '目标id',
`manual_id` varchar(200) NOT NULL DEFAULT '' COMMENT '电子手册',
`status` tinyint NOT NULL DEFAULT 0 COMMENT '1是 0否',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`),
KEY `sweet_wechat_user_user_id` (`user_id`)
) ENGINE = InnoDB
DEFAULT CHARSET utf8mb4
COLLATE utf8mb4_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '用户 收藏/喜欢等状态';
\ No newline at end of file
...@@ -19,8 +19,6 @@ import javax.annotation.PostConstruct; ...@@ -19,8 +19,6 @@ import javax.annotation.PostConstruct;
@Configuration @Configuration
@Slf4j @Slf4j
public class WechatMaConfigure { public class WechatMaConfigure {
private static String appletAppidZhengzai;
private static String appletSecretZhengzai;
private static String appletAppidStrawberry; private static String appletAppidStrawberry;
private static String appletSecretStrawberry; private static String appletSecretStrawberry;
...@@ -31,21 +29,16 @@ public class WechatMaConfigure { ...@@ -31,21 +29,16 @@ public class WechatMaConfigure {
private static String appletAppidMdsk; private static String appletAppidMdsk;
private static String appletSecretMdsk; private static String appletSecretMdsk;
@Value("${liquidnet.wechat.applet.zhengzai.appid}") private static String appletAppidZhengzai;
public void setAppletAppidZhengzai(String appletAppidZhengzai) { private static String appletSecretZhengzai;
WechatMaConfigure.appletAppidZhengzai = appletAppidZhengzai;
}
@Value("${liquidnet.wechat.applet.zhengzai.secret}") private static String appletAppidAirship;
public void setAppletSecretZhengzai(String appletSecretZhengzai) { private static String appletSecretAirship;
WechatMaConfigure.appletSecretZhengzai = appletSecretZhengzai;
}
@Value("${liquidnet.wechat.applet.strawberry.appid}") @Value("${liquidnet.wechat.applet.strawberry.appid}")
public void setAppletAppidStrawberry(String appletAppidStrawberry) { public void setAppletAppidStrawberry(String appletAppidStrawberry) {
WechatMaConfigure.appletAppidStrawberry = appletAppidStrawberry; WechatMaConfigure.appletAppidStrawberry = appletAppidStrawberry;
} }
@Value("${liquidnet.wechat.applet.strawberry.secret}") @Value("${liquidnet.wechat.applet.strawberry.secret}")
public void setAppletSecretStrawberry(String appletSecretStrawberry) { public void setAppletSecretStrawberry(String appletSecretStrawberry) {
WechatMaConfigure.appletSecretStrawberry = appletSecretStrawberry; WechatMaConfigure.appletSecretStrawberry = appletSecretStrawberry;
...@@ -55,7 +48,6 @@ public class WechatMaConfigure { ...@@ -55,7 +48,6 @@ public class WechatMaConfigure {
public void setAppletAppidFive(String appletAppidFive) { public void setAppletAppidFive(String appletAppidFive) {
WechatMaConfigure.appletAppidFive = appletAppidFive; WechatMaConfigure.appletAppidFive = appletAppidFive;
} }
@Value("${liquidnet.wechat.applet.five.secret}") @Value("${liquidnet.wechat.applet.five.secret}")
public void setAppletSecretFive(String appletSecretFive) { public void setAppletSecretFive(String appletSecretFive) {
WechatMaConfigure.appletSecretFive = appletSecretFive; WechatMaConfigure.appletSecretFive = appletSecretFive;
...@@ -65,18 +57,40 @@ public class WechatMaConfigure { ...@@ -65,18 +57,40 @@ public class WechatMaConfigure {
public void setAppletAppidMdsk(String appletAppidMdsk) { public void setAppletAppidMdsk(String appletAppidMdsk) {
WechatMaConfigure.appletAppidMdsk = appletAppidMdsk; WechatMaConfigure.appletAppidMdsk = appletAppidMdsk;
} }
@Value("${liquidnet.wechat.applet.mdsk.secret}") @Value("${liquidnet.wechat.applet.mdsk.secret}")
public void setAppletSecretMdsk(String appletSecretMdsk) { public void setAppletSecretMdsk(String appletSecretMdsk) {
WechatMaConfigure.appletSecretMdsk = appletSecretMdsk; WechatMaConfigure.appletSecretMdsk = appletSecretMdsk;
} }
private WxMaService wxMaAppletZhengzaiService; @Value("${liquidnet.wechat.applet.zhengzai.appid}")
public void setAppletAppidZhengzai(String appletAppidZhengzai) {
WechatMaConfigure.appletAppidZhengzai = appletAppidZhengzai;
}
@Value("${liquidnet.wechat.applet.zhengzai.secret}")
public void setAppletSecretZhengzai(String appletSecretZhengzai) {
WechatMaConfigure.appletSecretZhengzai = appletSecretZhengzai;
}
@Value("${liquidnet.wechat.applet.airship.appid}")
public void setAppletAppidAirship(String appletAppidAirship) {
WechatMaConfigure.appletAppidAirship = appletAppidAirship;
}
@Value("${liquidnet.wechat.applet.airship.secret}")
public void setAppletSecretAirship(String appletSecretAirship) {
WechatMaConfigure.appletSecretAirship = appletSecretAirship;
}
private WxMaService wxMaAppletStrawberryService; private WxMaService wxMaAppletStrawberryService;
private WxMaService wxMaAppletFiveService; private WxMaService wxMaAppletFiveService;
private WxMaService wxMaAppletMdskService; private WxMaService wxMaAppletMdskService;
private WxMaService wxMaAppletZhengzaiService;
private WxMaService wxMaAppletAirshipService;
private WxMaMessageRouter wxMaStrawberryMessageRouter;
private WxMaMessageRouter wxMaFiveMessageRouter;
private WxMaMessageRouter wxMaMdskMessageRouter;
private WxMaMessageRouter wxMaZhengzaiMessageRouter; private WxMaMessageRouter wxMaZhengzaiMessageRouter;
private WxMaMessageRouter wxMaAirshipMessageRouter;
@Autowired @Autowired
private StringRedisTemplate stringRedisTemplate; private StringRedisTemplate stringRedisTemplate;
...@@ -88,24 +102,10 @@ public class WechatMaConfigure { ...@@ -88,24 +102,10 @@ public class WechatMaConfigure {
@PostConstruct @PostConstruct
public void init() { public void init() {
wxMaAppletZhengzaiService = new WxMaServiceImpl() {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:zhengzai");
// WxMaDefaultConfigImpl wxMaDefaultConfig = new WxMaDefaultConfigImpl();
wxMaDefaultConfig.setAppid(appletAppidZhengzai);
wxMaDefaultConfig.setSecret(appletSecretZhengzai);
wxMaDefaultConfig.setMsgDataFormat("JSON");
this.setWxMaConfig(wxMaDefaultConfig);
}
};
wxMaAppletStrawberryService = new WxMaServiceImpl() { wxMaAppletStrawberryService = new WxMaServiceImpl() {
{ {
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate); RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:strawberry"); WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:strawberry");
// WxMaDefaultConfigImpl wxMaDefaultConfig = new WxMaDefaultConfigImpl();
wxMaDefaultConfig.setAppid(appletAppidStrawberry); wxMaDefaultConfig.setAppid(appletAppidStrawberry);
wxMaDefaultConfig.setSecret(appletSecretStrawberry); wxMaDefaultConfig.setSecret(appletSecretStrawberry);
wxMaDefaultConfig.setMsgDataFormat("JSON"); wxMaDefaultConfig.setMsgDataFormat("JSON");
...@@ -117,7 +117,6 @@ public class WechatMaConfigure { ...@@ -117,7 +117,6 @@ public class WechatMaConfigure {
{ {
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate); RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:five"); WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:five");
// WxMaDefaultConfigImpl wxMaDefaultConfig = new WxMaDefaultConfigImpl();
wxMaDefaultConfig.setAppid(appletAppidFive); wxMaDefaultConfig.setAppid(appletAppidFive);
wxMaDefaultConfig.setSecret(appletSecretFive); wxMaDefaultConfig.setSecret(appletSecretFive);
wxMaDefaultConfig.setMsgDataFormat("JSON"); wxMaDefaultConfig.setMsgDataFormat("JSON");
...@@ -129,7 +128,6 @@ public class WechatMaConfigure { ...@@ -129,7 +128,6 @@ public class WechatMaConfigure {
{ {
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate); RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:mdsk"); WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:mdsk");
// WxMaDefaultConfigImpl wxMaDefaultConfig = new WxMaDefaultConfigImpl();
wxMaDefaultConfig.setAppid(appletAppidMdsk); wxMaDefaultConfig.setAppid(appletAppidMdsk);
wxMaDefaultConfig.setSecret(appletSecretMdsk); wxMaDefaultConfig.setSecret(appletSecretMdsk);
wxMaDefaultConfig.setMsgDataFormat("JSON"); wxMaDefaultConfig.setMsgDataFormat("JSON");
...@@ -137,41 +135,80 @@ public class WechatMaConfigure { ...@@ -137,41 +135,80 @@ public class WechatMaConfigure {
this.setWxMaConfig(wxMaDefaultConfig); this.setWxMaConfig(wxMaDefaultConfig);
} }
}; };
wxMaAppletZhengzaiService = new WxMaServiceImpl() {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:zhengzai");
// WxMaDefaultConfigImpl wxMaDefaultConfig = new WxMaDefaultConfigImpl();
wxMaDefaultConfig.setAppid(appletAppidZhengzai);
wxMaDefaultConfig.setSecret(appletSecretZhengzai);
wxMaDefaultConfig.setMsgDataFormat("JSON");
this.setWxMaConfig(wxMaDefaultConfig);
}
};
wxMaAppletAirshipService = new WxMaServiceImpl() {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:airship");
wxMaDefaultConfig.setAppid(appletAppidAirship);
wxMaDefaultConfig.setSecret(appletSecretAirship);
wxMaDefaultConfig.setMsgDataFormat("JSON");
this.setWxMaConfig(wxMaDefaultConfig);
}
};
wxMaStrawberryMessageRouter = new WxMaMessageRouter(wxMaAppletStrawberryService);
wxMaFiveMessageRouter = new WxMaMessageRouter(wxMaAppletFiveService);
wxMaMdskMessageRouter = new WxMaMessageRouter(wxMaAppletMdskService);
wxMaZhengzaiMessageRouter = new WxMaMessageRouter(wxMaAppletZhengzaiService); wxMaZhengzaiMessageRouter = new WxMaMessageRouter(wxMaAppletZhengzaiService);
wxMaAirshipMessageRouter = new WxMaMessageRouter(wxMaAppletAirshipService);
} }
public WxMaService getWxMaService(Integer anum) { public WxMaService getWxMaService(Integer anum) {
switch (anum) { switch (anum) {
case 4:
return wxMaAppletZhengzaiService;
case 1: case 1:
return wxMaAppletStrawberryService; return wxMaAppletStrawberryService;
case 2: case 2:
return wxMaAppletFiveService; return wxMaAppletFiveService;
case 3: case 3:
return wxMaAppletMdskService; return wxMaAppletMdskService;
case 4:
return wxMaAppletZhengzaiService;
case 5:
return wxMaAppletAirshipService;
} }
return null; return null;
} }
public String getWxMaAppid(Integer anum) { public String getWxMaAppid(Integer anum) {
switch (anum) { switch (anum) {
case 4:
return appletAppidZhengzai;
case 1: case 1:
return appletAppidStrawberry; return appletAppidStrawberry;
case 2: case 2:
return appletAppidFive; return appletAppidFive;
case 3: case 3:
return appletAppidMdsk; return appletAppidMdsk;
case 4:
return appletAppidZhengzai;
case 5:
return appletAppidAirship;
} }
return ""; return "";
} }
public WxMaMessageRouter getWxMaMessageRouter(Integer pnum) { public WxMaMessageRouter getWxMaMessageRouter(Integer pnum) {
switch (pnum) { switch (pnum) {
case 1:
return wxMaStrawberryMessageRouter;
case 2:
return wxMaFiveMessageRouter;
case 3:
return wxMaMdskMessageRouter;
case 4: case 4:
return wxMaZhengzaiMessageRouter; return wxMaZhengzaiMessageRouter;
case 5:
return wxMaAirshipMessageRouter;
} }
return null; return null;
} }
......
...@@ -59,7 +59,7 @@ public class SweetAppletSubMsgController { ...@@ -59,7 +59,7 @@ public class SweetAppletSubMsgController {
@ApiImplicitParam(type = "form", dataType = "String", name = "openId", value = "openId", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "openId", value = "openId", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "templateId", value = "templateId 多个用英文逗号分割", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "templateId", value = "templateId 多个用英文逗号分割", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "targetId", value = "演出id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "targetId", value = "演出id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "appletType", value = "1草莓 2五百里 3mdsk 4正在", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "appletType", value = "1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "activityType", value = "活动类型", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "activityType", value = "活动类型", required = true),
}) })
public ResponseDto<Boolean> create( public ResponseDto<Boolean> create(
......
package com.liquidnet.service.sweet.controller;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.*;
import com.liquidnet.service.sweet.entity.*;
import com.liquidnet.service.sweet.utils.ObjectUtil;
import com.liquidnet.service.sweet.utils.RedisTFCDataUtils;
import com.liquidnet.service.sweet.vo.SweetArtistsRelationVo;
import com.liquidnet.service.sweet.vo.SweetManualShopTFCAllVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Api(tags = "小程序_跳飞船")
@RestController
@RequestMapping("/tfc/sweet-applet")
public class SweetAppletTFCController {
@Autowired
private RedisTFCDataUtils redisDataUtils;
@GetMapping("timeSelect")
@ApiOperation("场次选择")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "name", value = "名称", required = true),
})
public ResponseDto<List<SweetManualAppletTFCDto>> timeSelect(@RequestParam String name) {
List<SweetManualAppletTFCDto> dto = redisDataUtils.getPushList();
List<SweetManualAppletTFCDto> vo = ObjectUtil.getSweetManualAppletTFCDtoList();
for (SweetManualAppletTFCDto item : dto) {
if (item.getTitle().contains(name)) {
vo.add(item);
}
}
return ResponseDto.success(vo);
}
@GetMapping("details")
@ApiOperation("详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "电子手册id", required = true),
})
public ResponseDto<SweetManualAppletTFCDto> details(@RequestParam() String manualId) {
return ResponseDto.success(redisDataUtils.getAppletPerformance(manualId));
}
@GetMapping("notify")
@ApiOperation("通知")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "电子手册id", required = true),
})
public ResponseDto<List<SweetManualNotifyTfc>> notify(@RequestParam() String manualId) {
return ResponseDto.success(redisDataUtils.getNotifyRedisData(manualId));
}
@GetMapping("tags")
@ApiOperation("标签")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "电子手册id", required = true),
})
public ResponseDto<List<String>> tag(@RequestParam() String manualId) {
return ResponseDto.success(redisDataUtils.getTagRedisData(manualId));
}
@GetMapping("timeList")
@ApiOperation("时间表")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "电子手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "dateTime", value = "时间 全部不传", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "stage", value = "舞台 全部不传", required = false),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "isSign", value = "是否签名(1是0否)", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "page", value = "页数", required = false),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "size", value = "数量", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "uid", value = "用户id", required = true),
})
public ResponseDto<SweetManualArtistList2TFCDto> timeList(@RequestParam String manualId,
@RequestParam(required = false) String dateTime,
@RequestParam(required = false) String stage,
@RequestParam Integer isSign,
@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer size,
@RequestParam String uid) {
try {
List<SweetManualArtistListTFCDto> allReturnArtist = ObjectUtil.getSweetManualArtistListTFCDtoList();
List<SweetManualArtistListTFCDto> returnArtist = ObjectUtil.getSweetManualArtistListTFCDtoList();
SweetManualArtistList2TFCDto data = redisDataUtils.getTimeList(manualId);
SweetArtistsRelationVo relationData = redisDataUtils.getArtistsRelationRedisVo(uid, manualId);
List<SweetManualArtistListTFCDto> artistData = data.getData();
int startPosition = 0;
int endPosition = 0;
if (page != null) {
startPosition = (page - 1) * size;
endPosition = (page) * size;
}
if (page == null && dateTime == null) {
try {
dateTime = data.getDate().get(0);
} catch (Exception e) {
}
}
for (SweetManualArtistListTFCDto item : artistData) {
boolean isSave = true;
if (isSign == 1) {
if (item.getSignatureStart() == null) {
//不保留
isSave = false;
}
}
if (dateTime != null) {
if (!item.getPerformanceStart().contains(dateTime)) {
//不保留
isSave = false;
}
}
if (stage != null) {
if (!item.getTitle().equalsIgnoreCase(stage)) {
//保留
isSave = false;
}
}
if (isSave) {
allReturnArtist.add(item);
}
}
for (int i = 0; i < allReturnArtist.size(); i++) {
SweetManualArtistListTFCDto item = allReturnArtist.get(i);
if (page != null && i >= startPosition && i < endPosition) {
item.setIsWatch(0);
item.setIsSign(0);
if (relationData.getWatchList() != null) {
for (String artistsId : relationData.getWatchList()) {
if (artistsId.equalsIgnoreCase(item.getArtistId())) {
item.setIsWatch(1);
break;
}
}
}
if (relationData.getSignList() != null) {
for (String artistsId : relationData.getSignList()) {
if (artistsId.equalsIgnoreCase(item.getArtistId())) {
item.setIsSign(1);
break;
}
}
}
returnArtist.add(item);
}
}
data.setData(returnArtist);
data.setTotal(allReturnArtist.size());
return ResponseDto.success(data);
} catch (Exception e) {
return ResponseDto.failure();
}
}
@GetMapping("richText")
@ApiOperation("富文本")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "电子手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "type", value = "类型 (1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略)", required = true),
})
public ResponseDto<SweetRichtextTfc> richText(@RequestParam() String manualId,
@RequestParam() String type) {
return ResponseDto.success(redisDataUtils.getRichTextRedisData(manualId, type));
}
@PostMapping("artistsWatch")
@ApiOperation("艺人-想看")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "uid", value = "用户id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "artistsId", value = "艺人id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
})
public ResponseDto<Boolean> watch(@RequestParam() String uid,
@RequestParam() String artistsId,
@RequestParam() String manualId) {
if (uid.equalsIgnoreCase("0")) {
return ResponseDto.failure();
}
redisDataUtils.setArtistsRelationRedisVo(uid, artistsId, manualId, "watch");
return ResponseDto.success();
}
@PostMapping("artistsSign")
@ApiOperation("艺人-签售")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "uid", value = "用户id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "artistsId", value = "艺人id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
})
public ResponseDto<Boolean> sign(@RequestParam() String uid,
@RequestParam() String artistsId,
@RequestParam() String manualId) {
if (uid.equalsIgnoreCase("0")) {
return ResponseDto.failure();
}
redisDataUtils.setArtistsRelationRedisVo(uid, artistsId, manualId, "sign");
return ResponseDto.success();
}
@PostMapping("manualASC")
@ApiOperation("该手册艺人收藏数")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "uid", value = "用户id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
})
public ResponseDto<Map> manualArtistsSaveCount(@RequestParam() String uid,
@RequestParam() String manualId) {
if (uid.equalsIgnoreCase("0")) {
return ResponseDto.failure();
}
SweetArtistsRelationVo vo = redisDataUtils.getArtistsRelationRedisVo(uid, manualId);
int signSize = 0;
int watchSize = 0;
if (vo.getSignList() != null) {
signSize = vo.getSignList().size();
}
if (vo.getWatchList() != null) {
watchSize = vo.getWatchList().size();
}
HashMap<String, Object> map = CollectionUtil.mapStringObject();
map.put("signSize", signSize);
map.put("watchSize", watchSize);
return ResponseDto.success(map);
}
@GetMapping("artistsDetails")
@ApiOperation("艺人-详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "artistsId", value = "艺人id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "uid", value = "用户id", required = true)
})
public ResponseDto<SweetManualArtistListTFCDto> artistsDetails(@RequestParam String artistsId,
@RequestParam String manualId,
@RequestParam String uid) {
SweetManualArtistList2TFCDto data = redisDataUtils.getTimeList(manualId);
List<SweetManualArtistListTFCDto> dataList = data.getData();
SweetArtistsRelationVo relationData = redisDataUtils.getArtistsRelationRedisVo(uid, manualId);
SweetManualArtistListTFCDto vo = SweetManualArtistListTFCDto.getNew();
for (SweetManualArtistListTFCDto item : dataList) {
if (item.getArtistId().equalsIgnoreCase(artistsId)) {
item.setIsWatch(0);
item.setIsSign(0);
if (relationData.getWatchList() != null) {
for (String artistsIds : relationData.getWatchList()) {
if (artistsId.equalsIgnoreCase(artistsIds)) {
item.setIsWatch(1);
break;
}
}
}
if (relationData.getSignList() != null) {
for (String artistsIds : relationData.getSignList()) {
if (artistsId.equalsIgnoreCase(artistsIds)) {
item.setIsSign(1);
break;
}
}
}
vo = item;
break;
}
}
return ResponseDto.success(vo);
}
@GetMapping("manualShop")
@ApiOperation("吃喝玩乐")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "uid", value = "用户id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "artistsId", value = "艺人id", required = true)
})
public ResponseDto<SweetManualShopTFCAllVo> manualShop(@RequestParam String manualId) {
List<SweetManualShopTfc> shopList = redisDataUtils.getManualShopRedisData(manualId);
List<SweetManualShopTfc> recommend = ObjectUtil.getSweetManualShopTFCList();
List<SweetManualShopTfc> eat = ObjectUtil.getSweetManualShopTFCList();
List<SweetManualShopTfc> play = ObjectUtil.getSweetManualShopTFCList();
SweetManualShopTFCAllVo vo = SweetManualShopTFCAllVo.getNew();
for (SweetManualShopTfc item : shopList) {
if (item.getIsRecommend().equals(1)) {
recommend.add(item);
}
if (item.getType().equals(1)) {
eat.add(item);
}
if (item.getType().equals(2)) {
play.add(item);
}
}
vo.setRecommend(recommend);
vo.setEat(eat);
vo.setPlay(play);
return ResponseDto.success(vo);
}
}
package com.liquidnet.service.sweet.controller;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistListTFCDto;
import com.liquidnet.service.sweet.service.ISweetManualArtistsTFCService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* <p>
* 电子宣传手册艺人表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api(tags = "电子手册艺人_TFC")
@RestController
@RequestMapping("/tfc/sweet-manual-artists")
public class SweetManualArtistsTFCController {
@Autowired
private ISweetManualArtistsTFCService sweetManualArtistsTFCService;
@GetMapping("getList")
@ApiOperation("宣传手册艺人列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "Integer", name = "page", value = "页数", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "size", value = "数量", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "manaulId", value = "手册id", required = true),
})
public ResponseDto<PageInfo<SweetManualArtistListTFCDto>> getList(@RequestParam() Integer page,
@RequestParam() Integer size,
@RequestParam() String manualId) {
return sweetManualArtistsTFCService.getList(page, size, manualId);
}
@GetMapping("details")
@ApiOperation("宣传手册艺人详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualRelationId", value = "手册艺人id", required = true),
})
public ResponseDto<SweetManualArtistListTFCDto> details(@RequestParam() String manualRelationId) {
return sweetManualArtistsTFCService.details(manualRelationId);
}
@PostMapping("add")
@ApiOperation("宣传手册艺人添加")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "artistId", value = "艺人id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "stageId", value = "场地id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "performanceStart", value = "演出开始时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "performanceEnd", value = "演出结束时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "signatureStart", value = "签售开始时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "signatureEnd", value = "签售结束时间", required = false),
})
public ResponseDto<Boolean> add(@RequestParam() String manualId,
@RequestParam() String artistId,
@RequestParam() String stageId,
@RequestParam( required = false) String performanceStart,
@RequestParam( required = false) String performanceEnd,
@RequestParam( required = false) String signatureStart,
@RequestParam( required = false) String signatureEnd) {
return sweetManualArtistsTFCService.add(manualId, artistId, stageId, performanceStart, performanceEnd, signatureStart, signatureEnd);
}
@PostMapping("change")
@ApiOperation("宣传手册艺人修改")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualRelationId", value = "手册艺人id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "artistId", value = "艺人id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "stageId", value = "场地id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "performanceStart", value = "演出开始时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "performanceEnd", value = "演出结束时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "signatureStart", value = "签售开始时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "signatureEnd", value = "签售结束时间", required = false),
})
public ResponseDto<Boolean> change(@RequestParam() String manualRelationId,
@RequestParam() String manualId,
@RequestParam() String artistId,
@RequestParam() String stageId,
@RequestParam( required = false) String performanceStart,
@RequestParam( required = false) String performanceEnd,
@RequestParam( required = false) String signatureStart,
@RequestParam(required = false) String signatureEnd) {
return sweetManualArtistsTFCService.change(manualRelationId, manualId, artistId, stageId, performanceStart, performanceEnd, signatureStart, signatureEnd);
}
@DeleteMapping("delete")
@ApiOperation("宣传手册艺人删除")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualRelationId", value = "手册艺人id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true)
})
public ResponseDto<Boolean> delete(@RequestParam() String manualRelationId,
@RequestParam() String manualId) {
return sweetManualArtistsTFCService.delete(manualRelationId, manualId);
}
}
package com.liquidnet.service.sweet.controller;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetManualNotifyTfc;
import com.liquidnet.service.sweet.service.ISweetManualNotifyTFCService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* <p>
* 电子宣传手册通知表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api(tags = "电子手册通知_TFC")
@RestController
@RequestMapping("/tfc/sweet-manual-notify")
public class SweetManualNotifyTFCController {
@Autowired
ISweetManualNotifyTFCService sweetManualNotifyTFCService;
@GetMapping("list")
@ApiOperation("通知列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "Integer", name = "page", value = "页数", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "size", value = "数量", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "name", value = "通知标题 不查询从传递null", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
})
public ResponseDto<PageInfo<SweetManualNotifyTfc>> getList(@RequestParam() Integer page,
@RequestParam() Integer size,
@RequestParam( required = false) String name,
@RequestParam() String manualId) {
return sweetManualNotifyTFCService.getList(page, size, name, manualId);
}
@PostMapping("add")
@ApiOperation("添加通知")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "title", value = "标题", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "content", value = "内容", required = true),
})
public ResponseDto<Boolean> add(@RequestParam() String manualId,
@RequestParam() String title,
@RequestParam() String content) {
return sweetManualNotifyTFCService.add(manualId, title, content);
}
@GetMapping("detail")
@ApiOperation("通知详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualNotifyId", value = "通知id", required = true),
})
public ResponseDto<SweetManualNotifyTfc> detail(@RequestParam() String manualNotifyId) {
return sweetManualNotifyTFCService.details(manualNotifyId);
}
@PostMapping("change")
@ApiOperation("修改通知")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "manualNotifyId", value = "通知id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "title", value = "标题", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "content", value = "内容", required = true),
})
public ResponseDto<Boolean> change(@RequestParam() String manualId,
@RequestParam() String manualNotifyId,
@RequestParam() String title,
@RequestParam() String content) {
return sweetManualNotifyTFCService.change(manualId, manualNotifyId, title, content);
}
@DeleteMapping("delete")
@ApiOperation("删除通知")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualNotifyId", value = "手册通知id", required = true),
})
public ResponseDto<Boolean> delete(@RequestParam() String manualNotifyId) {
return sweetManualNotifyTFCService.delete(manualNotifyId);
}
}
package com.liquidnet.service.sweet.controller;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetManualShopTfc;
import com.liquidnet.service.sweet.service.ISweetManualShopTFCService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* <p>
* 电子宣传手册商铺表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api(tags = "电子手册吃喝玩乐_TFC")
@RestController
@RequestMapping("/tfc/sweet-manual-shop")
public class SweetManualShopTFCController {
@Autowired
ISweetManualShopTFCService sweetManualShopTFCService;
@GetMapping("list")
@ApiOperation("列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "类型 1吃喝 2玩乐", required = true),
})
public ResponseDto<List<SweetManualShopTfc>> getList(@RequestParam String manualId,
@RequestParam Integer type) {
return sweetManualShopTFCService.getList(manualId, type);
}
@GetMapping("details")
@ApiOperation("详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualShopId", value = "商铺id", required = true),
})
public ResponseDto<SweetManualShopTfc> details(@RequestParam String manualShopId) {
return sweetManualShopTFCService.details(manualShopId);
}
@PostMapping("add")
@ApiOperation("添加")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册iid", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "title", value = "标题", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "picUrl", value = "图片地址", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "describes", value = "描述", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "类型 1吃喝 2玩乐", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "isRecommend", value = "是否推荐", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "sort", value = "排序", required = true),
})
public ResponseDto<Boolean> add(@RequestParam String manualId,
@RequestParam String title,
@RequestParam String picUrl,
@RequestParam String describes,
@RequestParam Integer type,
@RequestParam Integer isRecommend,
@RequestParam Integer sort) {
return sweetManualShopTFCService.add(manualId, title, picUrl, describes, type, isRecommend, sort);
}
@PostMapping("change")
@ApiOperation("修改")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualShopId", value = "商铺id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "title", value = "标题", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "picUrl", value = "图片地址", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "describes", value = "描述", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "类型 1吃喝 2玩乐", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "isRecommend", value = "是否推荐", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "sort", value = "排序", required = true),
})
public ResponseDto<Boolean> change(@RequestParam String manualShopId,
@RequestParam String manualId,
@RequestParam String title,
@RequestParam String picUrl,
@RequestParam String describes,
@RequestParam Integer type,
@RequestParam Integer isRecommend,
@RequestParam Integer sort) {
return sweetManualShopTFCService.change(manualShopId, manualId, title, picUrl, describes, type, isRecommend, sort);
}
@DeleteMapping("delete")
@ApiOperation("删除")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualShopId", value = "商铺id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
})
public ResponseDto<Boolean> delete(@RequestParam() String manualShopId,
@RequestParam String manualId) {
return sweetManualShopTFCService.delete(manualShopId, manualId);
}
}
package com.liquidnet.service.sweet.controller;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetManualSortTfc;
import com.liquidnet.service.sweet.service.ISweetManualSortTFCService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* <p>
* 电子宣传手册显示内容表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api(tags = "电子手册显示tag_TFC")
@RestController
@RequestMapping("/tfc/sweet-manual-sort")
public class SweetManualSortTFCController {
@Autowired
private ISweetManualSortTFCService sweetManualSortTFCService;
@PostMapping("add")
@ApiOperation("操作 电子手册tag")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "电子手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "content", value = "内容 例子(POSITION_1,POSITION_2)", required = true)
})
public ResponseDto<Boolean> changeStatus(@RequestParam() String manualId,
@RequestParam() String content) {
return sweetManualSortTFCService.add(manualId, content);
}
@GetMapping("get")
@ApiOperation("获取 电子手册tag")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "电子手册id", required = true)
})
public ResponseDto<SweetManualSortTfc> changeStatus(@RequestParam() String manualId) {
return sweetManualSortTFCService.get(manualId);
}
}
package com.liquidnet.service.sweet.controller;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.SweetManualTFCDto;
import com.liquidnet.service.sweet.service.ISweetManualTFCService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* <p>
* 电子宣传手册表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api(tags = "电子手册_TFC")
@RestController
@RequestMapping("/tfc/sweet-manual")
public class SweetManualTFCController {
@Autowired
private ISweetManualTFCService sweetManualTFCService;
@GetMapping("list")
@ApiOperation("宣传手册列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "Integer", name = "page", value = "页数", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "size", value = "数量", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "name", value = "姓名", required = false),
})
public ResponseDto<PageInfo<SweetManualTFCDto>> getList(@RequestParam() Integer page,
@RequestParam() Integer size,
@RequestParam(required = false) String name) {
return sweetManualTFCService.getManualList(page, size, name);
}
@GetMapping("details")
@ApiOperation("宣传手册详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id"),
})
public ResponseDto<SweetManualTFCDto> details(@RequestParam(required = false) String manualId) {
return sweetManualTFCService.details(manualId);
}
@PostMapping("changeRelease")
@ApiOperation("修改是否发布")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "Integer", name = "page", value = "页数", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "size", value = "数量", required = true),
})
public ResponseDto<Boolean> changeRelease(@RequestParam() String manualId,
@RequestParam() Integer isRelease) {
return sweetManualTFCService.changeRelease(manualId, isRelease);
}
@PostMapping("changeStatus")
@ApiOperation("修改是否开启")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "电子手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "performancesId", value = "演出id", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "status", value = "开启状态", required = true),
})
public ResponseDto<Boolean> changeStatus(@RequestParam() String manualId,
@RequestParam() String performancesId,
@RequestParam() Integer status) {
return sweetManualTFCService.changeStatus(manualId, performancesId, status);
}
}
package com.liquidnet.service.sweet.controller;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetRichtextTfc;
import com.liquidnet.service.sweet.service.ISweetRichtextTFCService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* <p>
* 电子宣传手册富文本表 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Api(tags = "电子手册 富文本_TFC")
@RestController
@RequestMapping("/tfc/sweet-richtext")
public class SweetRichtextTFCController {
@Autowired
ISweetRichtextTFCService sweetRichtextTFCService;
@GetMapping("get")
@ApiOperation("富文本详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "电子手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "类型 (1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略)", required = true),
})
public ResponseDto<SweetRichtextTfc> get(@RequestParam() String manualId,
@RequestParam() Integer type) {
return sweetRichtextTFCService.get(manualId, type);
}
@PostMapping("add")
@ApiOperation("添加富文本")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "Integer", name = "manualId", value = "页数", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "details", value = "数量", required = false),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "local", value = "经纬度 经度,维度,", required = false),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "picUrl", value = "图片地址", required = false),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "类型 (1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略)", required = true),
})
public ResponseDto<Boolean> add(@RequestParam() String manualId,
@RequestParam(required = false) String details,
@RequestParam(required = false) String local,
@RequestParam(required = false) String picUrl,
@RequestParam() Integer type) {
return sweetRichtextTFCService.add(manualId, details, local, picUrl, type);
}
@PostMapping("change")
@ApiOperation("修改富文本")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "Integer", name = "manualId", value = "页数", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "details", value = "数量", required = false),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "local", value = "经纬度 经度,维度,", required = false),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "picUrl", value = "图片地址", required = false),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "类型 (1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略)", required = true),
})
public ResponseDto<Boolean> change(@RequestParam() String manualId,
@RequestParam(required = false) String details,
@RequestParam(required = false) String local,
@RequestParam(required = false) String picUrl,
@RequestParam() Integer type) {
return sweetRichtextTFCService.change(manualId, details, local, picUrl, type);
}
}
package com.liquidnet.service.sweet.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 用户 收藏/喜欢等状态 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-06
*/
@RestController
@RequestMapping("/sweet-user-relation")
public class SweetUserRelationController {
}
package com.liquidnet.service.sweet.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 用户 收藏/喜欢等状态 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@RestController
@RequestMapping("/mdsk/sweet-user-relation")
public class SweetUserRelationMdskController {
}
...@@ -28,7 +28,7 @@ public class SweetWechatLoginController { ...@@ -28,7 +28,7 @@ public class SweetWechatLoginController {
@ApiImplicitParam(type = "query", dataType = "String", name = "code", value = "微信code", required = true), @ApiImplicitParam(type = "query", dataType = "String", name = "code", value = "微信code", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "encryptedData", value = "encryptedData", required = true), @ApiImplicitParam(type = "query", dataType = "String", name = "encryptedData", value = "encryptedData", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "iv", value = "iv", required = true), @ApiImplicitParam(type = "query", dataType = "String", name = "iv", value = "iv", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在"), @ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节"),
}) })
public ResponseDto userInfo( public ResponseDto userInfo(
@RequestParam() String code, @RequestParam() String code,
...@@ -43,7 +43,7 @@ public class SweetWechatLoginController { ...@@ -43,7 +43,7 @@ public class SweetWechatLoginController {
@GetMapping(value = {"maOpenId"}) @GetMapping(value = {"maOpenId"})
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "jsCode", value = "微信jsCode", required = true), @ApiImplicitParam(type = "query", dataType = "String", name = "jsCode", value = "微信jsCode", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在", required = true) @ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节", required = true)
}) })
public ResponseDto<String> wxaCode2Session(@RequestParam String jsCode, @RequestParam Integer type) { public ResponseDto<String> wxaCode2Session(@RequestParam String jsCode, @RequestParam Integer type) {
return sweetLoginService.wxaCode2Session(jsCode, type); return sweetLoginService.wxaCode2Session(jsCode, type);
...@@ -53,7 +53,7 @@ public class SweetWechatLoginController { ...@@ -53,7 +53,7 @@ public class SweetWechatLoginController {
@GetMapping(value = {"userInfoMa"}) @GetMapping(value = {"userInfoMa"})
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "jsCode", value = "微信jsCode", required = true), @ApiImplicitParam(type = "query", dataType = "String", name = "jsCode", value = "微信jsCode", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在", required = true) @ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节", required = true)
}) })
public ResponseDto<AdamLoginInfoVo> userInfoMa(@RequestParam String jsCode, @RequestParam Integer type) { public ResponseDto<AdamLoginInfoVo> userInfoMa(@RequestParam String jsCode, @RequestParam Integer type) {
return sweetLoginService.userInfoMa(jsCode, type); return sweetLoginService.userInfoMa(jsCode, type);
......
package com.liquidnet.service.sweet.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistListTFCDto;
import com.liquidnet.service.sweet.entity.SweetManualArtistsTfc;
import com.liquidnet.service.sweet.mapper.SweetManualArtistsTfcMapper;
import com.liquidnet.service.sweet.service.ISweetManualArtistsTFCService;
import com.liquidnet.service.sweet.utils.RedisTFCDataUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
/**
* <p>
* 电子宣传手册艺人表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public class SweetManualArtistsTFCServiceImpl extends ServiceImpl<SweetManualArtistsTfcMapper, SweetManualArtistsTfc> implements ISweetManualArtistsTFCService {
@Autowired
private SweetManualArtistsTfcMapper sweetManualArtistsTFCMapper;
@Autowired
private RedisTFCDataUtils redisDataUtils;
@Override
public ResponseDto<PageInfo<SweetManualArtistListTFCDto>> getList(Integer page, Integer size, String manualId) {
PageInfo<SweetManualArtistListTFCDto> pageInfoTmp;
try {
PageHelper.startPage(page, size);
HashMap<String, Object> map = CollectionUtil.mapStringObject();
map.put("manualId", manualId);
List<SweetManualArtistListTFCDto> voList = sweetManualArtistsTFCMapper.getManualList(map);
pageInfoTmp = new PageInfo(voList);
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure();
}
return ResponseDto.success(pageInfoTmp);
}
@Override
public ResponseDto<Boolean> add(String manualId, String artistId, String stageId, String performanceStart, String performanceEnd, String signatureStart, String signatureEnd) {
try {
SweetManualArtistsTfc sweetManualNotify = SweetManualArtistsTfc.getNew();
sweetManualNotify.setManualRelationId(IDGenerator.nextSnowId());
sweetManualNotify.setManualId(manualId);
sweetManualNotify.setStageId(stageId);
sweetManualNotify.setArtistsId(artistId);
sweetManualNotify.setPerformanceEnd(performanceEnd != null ? DateUtil.Formatter.yyyyMMddHHmmss.parse(performanceEnd) : null);
sweetManualNotify.setPerformanceStart(performanceStart != null ? DateUtil.Formatter.yyyyMMddHHmmss.parse(performanceStart) : null);
sweetManualNotify.setSignatureStart(signatureStart != null ? DateUtil.Formatter.yyyyMMddHHmmss.parse(signatureStart) : null);
sweetManualNotify.setSignatureEnd(signatureEnd != null ? DateUtil.Formatter.yyyyMMddHHmmss.parse(signatureEnd) : null);
sweetManualNotify.setCreatedAt(LocalDateTime.now());
sweetManualArtistsTFCMapper.insert(sweetManualNotify);
redisDataUtils.deleteTimeListRedisData(manualId);
return ResponseDto.success();
} catch (Exception e) {
return ResponseDto.failure();
}
}
@Override
public ResponseDto<SweetManualArtistListTFCDto> details(String manualRelationId) {
try {
HashMap<String, Object> map = CollectionUtil.mapStringObject();
map.put("manualRelationId", manualRelationId);
SweetManualArtistListTFCDto dto = sweetManualArtistsTFCMapper.getManualDetails(map);
return ResponseDto.success(dto);
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure();
}
}
@Override
public ResponseDto<Boolean> change(String manualRelationId, String manualId, String artistId, String stageId, String performanceStart, String performanceEnd, String signatureStart, String signatureEnd) {
try {
SweetManualArtistsTfc sweetManualNotify = SweetManualArtistsTfc.getNew();
sweetManualNotify.setStageId(stageId);
sweetManualNotify.setArtistsId(artistId);
sweetManualNotify.setPerformanceEnd(DateUtil.Formatter.yyyyMMddHHmmss.parse(performanceEnd));
sweetManualNotify.setPerformanceStart(DateUtil.Formatter.yyyyMMddHHmmss.parse(performanceStart));
sweetManualNotify.setSignatureStart(DateUtil.Formatter.yyyyMMddHHmmss.parse(signatureStart));
sweetManualNotify.setSignatureEnd(DateUtil.Formatter.yyyyMMddHHmmss.parse(signatureEnd));
sweetManualNotify.setUpdatedAt(LocalDateTime.now());
sweetManualArtistsTFCMapper.update(sweetManualNotify, Wrappers.lambdaUpdate(SweetManualArtistsTfc.class).eq(SweetManualArtistsTfc::getManualRelationId, manualRelationId));
redisDataUtils.deleteTimeListRedisData(manualId);
return ResponseDto.success();
} catch (Exception e) {
return ResponseDto.failure();
}
}
@Override
public ResponseDto<Boolean> delete(String manualRelationId, String manualId) {
try {
SweetManualArtistsTfc sweetManualNotify = SweetManualArtistsTfc.getNew();
sweetManualNotify.setManualRelationId(IDGenerator.nextSnowId());
sweetManualNotify.setStatus(0);
sweetManualNotify.setUpdatedAt(LocalDateTime.now());
sweetManualArtistsTFCMapper.update(sweetManualNotify, Wrappers.lambdaUpdate(SweetManualArtistsTfc.class).eq(SweetManualArtistsTfc::getManualRelationId, manualRelationId));
redisDataUtils.deleteTimeListRedisData(manualId);
return ResponseDto.success();
} catch (Exception e) {
return ResponseDto.failure();
}
}
}
package com.liquidnet.service.sweet.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetManualNotifyTfc;
import com.liquidnet.service.sweet.mapper.SweetManualNotifyTfcMapper;
import com.liquidnet.service.sweet.service.ISweetManualNotifyTFCService;
import com.liquidnet.service.sweet.utils.RedisTFCDataUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
/**
* <p>
* 电子宣传手册通知表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public class SweetManualNotifyTFCServiceImpl extends ServiceImpl<SweetManualNotifyTfcMapper, SweetManualNotifyTfc> implements ISweetManualNotifyTFCService {
@Autowired
private SweetManualNotifyTfcMapper sweetManualNotifyTFCMapper;
@Autowired
private RedisTFCDataUtils redisDataUtils;
@Override
public ResponseDto<PageInfo<SweetManualNotifyTfc>> getList(Integer page, Integer size, String title, String manualId) {
PageInfo<SweetManualNotifyTfc> pageInfo = null;
try {
PageHelper.startPage(page, size);
List<SweetManualNotifyTfc> data;
if (title != null) {
data = sweetManualNotifyTFCMapper.selectList(Wrappers.lambdaQuery(SweetManualNotifyTfc.class).like(SweetManualNotifyTfc::getTitle, title).eq(SweetManualNotifyTfc::getManualId, manualId).eq(SweetManualNotifyTfc::getStatus, 1));
} else {
data = sweetManualNotifyTFCMapper.selectList(Wrappers.lambdaQuery(SweetManualNotifyTfc.class).eq(SweetManualNotifyTfc::getManualId, manualId).eq(SweetManualNotifyTfc::getStatus, 1));
}
pageInfo = new PageInfo(data);
return ResponseDto.success(pageInfo);
} catch (Exception e) {
return ResponseDto.success(pageInfo);
}
}
@Override
public ResponseDto<Boolean> add(String manualId, String title, String content) {
try {
SweetManualNotifyTfc sweetManualNotify = SweetManualNotifyTfc.getNew();
sweetManualNotify.setManualNotifyId(IDGenerator.nextSnowId());
sweetManualNotify.setManualId(manualId);
sweetManualNotify.setTitle(title);
sweetManualNotify.setContent(content);
sweetManualNotify.setCreatedAt(LocalDateTime.now());
sweetManualNotifyTFCMapper.insert(sweetManualNotify);
List<SweetManualNotifyTfc> oldData = redisDataUtils.getNotifyRedisData(manualId);
oldData.add(sweetManualNotify);
redisDataUtils.setNotifyRedisData(manualId, oldData);
return ResponseDto.success();
} catch (Exception e) {
return ResponseDto.failure();
}
}
@Override
public ResponseDto<SweetManualNotifyTfc> details(String manualNotifyId) {
try {
return ResponseDto.success(sweetManualNotifyTFCMapper.selectOne(Wrappers.lambdaQuery(SweetManualNotifyTfc.class).eq(SweetManualNotifyTfc::getManualNotifyId, manualNotifyId).eq(SweetManualNotifyTfc::getStatus, 1)));
} catch (Exception e) {
return ResponseDto.failure();
}
}
@Override
public ResponseDto<Boolean> change(String manualId, String manualNotifyId, String title, String content) {
try {
SweetManualNotifyTfc sweetManualNotify = SweetManualNotifyTfc.getNew();
sweetManualNotify.setTitle(title);
sweetManualNotify.setContent(content);
sweetManualNotify.setUpdatedAt(LocalDateTime.now());
sweetManualNotifyTFCMapper.update(sweetManualNotify, Wrappers.lambdaUpdate(SweetManualNotifyTfc.class).eq(SweetManualNotifyTfc::getManualNotifyId, manualNotifyId));
List<SweetManualNotifyTfc> oldData = redisDataUtils.getNotifyRedisData(manualId);
for (SweetManualNotifyTfc item : oldData) {
if (item.getManualNotifyId().equalsIgnoreCase(manualNotifyId)) {
item.setTitle(title);
item.setContent(content);
item.setUpdatedAt(LocalDateTime.now());
}
}
redisDataUtils.setNotifyRedisData(manualId, oldData);
return ResponseDto.success();
} catch (Exception e) {
return ResponseDto.failure();
}
}
@Override
public ResponseDto<Boolean> delete(String manualNotifyId) {
try {
SweetManualNotifyTfc sweetManualNotify = SweetManualNotifyTfc.getNew();
sweetManualNotify.setStatus(0);
sweetManualNotify.setUpdatedAt(LocalDateTime.now());
sweetManualNotifyTFCMapper.update(sweetManualNotify, Wrappers.lambdaUpdate(SweetManualNotifyTfc.class).eq(SweetManualNotifyTfc::getManualNotifyId, manualNotifyId));
return ResponseDto.success();
} catch (Exception e) {
return ResponseDto.failure();
}
}
}
package com.liquidnet.service.sweet.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetManualShopTfc;
import com.liquidnet.service.sweet.mapper.SweetManualShopTfcMapper;
import com.liquidnet.service.sweet.service.ISweetManualShopTFCService;
import com.liquidnet.service.sweet.utils.RedisTFCDataUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 电子宣传手册商铺表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public class SweetManualShopTFCServiceImpl extends ServiceImpl<SweetManualShopTfcMapper, SweetManualShopTfc> implements ISweetManualShopTFCService {
@Autowired
private SweetManualShopTfcMapper sweetManualShopTFCMapper;
@Autowired
private RedisTFCDataUtils redisDataUtils;
@Override
public ResponseDto<List<SweetManualShopTfc>> getList(String manualId, Integer type) {
try {
List<SweetManualShopTfc> data = sweetManualShopTFCMapper.selectList(Wrappers.lambdaQuery(SweetManualShopTfc.class).eq(SweetManualShopTfc::getManualId, manualId).eq(SweetManualShopTfc::getType, type).eq(SweetManualShopTfc::getStatus, 1));
return ResponseDto.success(data);
} catch (Exception e) {
return ResponseDto.failure();
}
}
@Override
public ResponseDto<SweetManualShopTfc> details(String manualShopId) {
try {
SweetManualShopTfc data = sweetManualShopTFCMapper.selectOne(Wrappers.lambdaQuery(SweetManualShopTfc.class).eq(SweetManualShopTfc::getManualShopId, manualShopId).eq(SweetManualShopTfc::getStatus, 1));
return ResponseDto.success(data);
} catch (Exception e) {
return ResponseDto.failure();
}
}
@Override
public ResponseDto<Boolean> add(String manualId, String title, String picUrl, String describe, Integer type, Integer isRecommend, Integer sort) {
try {
SweetManualShopTfc sweetManualShop = SweetManualShopTfc.getNew();
sweetManualShop.setManualShopId(IDGenerator.nextSnowId());
sweetManualShop.setManualId(manualId);
sweetManualShop.setTitle(title);
sweetManualShop.setPicUrl(picUrl);
sweetManualShop.setDescribes(describe);
sweetManualShop.setType(type);
sweetManualShop.setIsRecommend(isRecommend);
sweetManualShop.setSort(sort);
sweetManualShop.setStatus(1);
sweetManualShopTFCMapper.insert(sweetManualShop);
redisDataUtils.setManualShopRedisData(manualId);
return ResponseDto.success();
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure();
}
}
@Override
public ResponseDto<Boolean> change(String manualShopId,String manualId, String title, String picUrl, String describe, Integer type, Integer isRecommend, Integer sort) {
try {
SweetManualShopTfc sweetManualShop = SweetManualShopTfc.getNew();
sweetManualShop.setTitle(title);
sweetManualShop.setPicUrl(picUrl);
sweetManualShop.setDescribes(describe);
sweetManualShop.setType(type);
sweetManualShop.setIsRecommend(isRecommend);
sweetManualShop.setSort(sort);
sweetManualShopTFCMapper.update(sweetManualShop, Wrappers.lambdaUpdate(SweetManualShopTfc.class).eq(SweetManualShopTfc::getManualShopId, manualShopId));
redisDataUtils.setManualShopRedisData(manualId);
return ResponseDto.success();
} catch (Exception e) {
return ResponseDto.failure();
}
}
@Override
public ResponseDto<Boolean> delete(String manualShopId,String manualId) {
try {
SweetManualShopTfc sweetManualShop = SweetManualShopTfc.getNew();
sweetManualShop.setStatus(0);
sweetManualShopTFCMapper.update(sweetManualShop, Wrappers.lambdaUpdate(SweetManualShopTfc.class).eq(SweetManualShopTfc::getManualShopId, manualShopId));
redisDataUtils.setManualShopRedisData(manualId);
return ResponseDto.success();
} catch (Exception e) {
return ResponseDto.failure();
}
}
}
package com.liquidnet.service.sweet.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetManualSortTfc;
import com.liquidnet.service.sweet.mapper.SweetManualSortTfcMapper;
import com.liquidnet.service.sweet.service.ISweetManualSortTFCService;
import com.liquidnet.service.sweet.utils.RedisTFCDataUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
/**
* <p>
* 电子宣传手册显示内容表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public class SweetManualSortTFCServiceImpl extends ServiceImpl<SweetManualSortTfcMapper, SweetManualSortTfc> implements ISweetManualSortTFCService {
@Autowired
private SweetManualSortTfcMapper sweetManualSortTFCMapper;
@Autowired
private RedisTFCDataUtils redisDataUtils;
@Override
public ResponseDto<SweetManualSortTfc> get(String manualId) {
try {
return ResponseDto.success(sweetManualSortTFCMapper.selectOne(Wrappers.lambdaQuery(SweetManualSortTfc.class).eq(SweetManualSortTfc::getManualId, manualId)));
} catch (Exception e) {
return ResponseDto.failure();
}
}
@Override
public ResponseDto<Boolean> add(String manualId, String content) {
try {
int count = sweetManualSortTFCMapper.selectCount(Wrappers.lambdaUpdate(SweetManualSortTfc.class).eq(SweetManualSortTfc::getManualId, manualId));
if (count > 0) {
SweetManualSortTfc sweetManualSort = SweetManualSortTfc.getNew();
sweetManualSort.setManualId(manualId);
sweetManualSort.setShowPosition(content);
sweetManualSort.setUpdatedAt(LocalDateTime.now());
sweetManualSortTFCMapper.update(sweetManualSort, Wrappers.lambdaUpdate(SweetManualSortTfc.class).eq(SweetManualSortTfc::getManualId, manualId));
} else {
SweetManualSortTfc sweetManualSort = SweetManualSortTfc.getNew();
sweetManualSort.setManualId(manualId);
sweetManualSort.setShowPosition(content);
sweetManualSort.setCreatedAt(LocalDateTime.now());
sweetManualSortTFCMapper.insert(sweetManualSort);
}
redisDataUtils.deleteSortRedisData(manualId);
} catch (Exception e) {
return ResponseDto.failure();
}
return ResponseDto.success();
}
}
package com.liquidnet.service.sweet.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.ErrorMapping;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.SweetManualTFCDto;
import com.liquidnet.service.sweet.entity.SweetManualTfc;
import com.liquidnet.service.sweet.mapper.SweetManualTfcMapper;
import com.liquidnet.service.sweet.service.ISweetManualTFCService;
import com.liquidnet.service.sweet.utils.RedisTFCDataUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
/**
* <p>
* 电子宣传手册表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public class SweetManualTFCServiceImpl extends ServiceImpl<SweetManualTfcMapper, SweetManualTfc> implements ISweetManualTFCService {
@Autowired
private SweetManualTfcMapper sweetManualTFCMapper;
@Autowired
private RedisTFCDataUtils redisDataUtils;
@Override
public ResponseDto<PageInfo<SweetManualTFCDto>> getManualList(int page, int size, String name) {
PageInfo<SweetManualTFCDto> pageInfoTmp;
try {
PageHelper.startPage(page, size);
HashMap<String, Object> map = CollectionUtil.mapStringObject();
map.put("title", name);
List<SweetManualTFCDto> voList = sweetManualTFCMapper.getManualList(map);
for (int i = 0; i < voList.size(); i++) {
SweetManualTFCDto vo = voList.get(i);
if (vo.getStatus() >= 6 && vo.getStatus() != 7) {
if (DateUtil.compareStrDay(vo.getTimeSell(), DateUtil.getNowTime()) > 0) {//未开始
vo.setStatus(9);
} else if (DateUtil.compareStrDay(vo.getTimeStop(), DateUtil.getNowTime()) < 0) {//已结束
vo.setStatus(10);
} else {
vo.setStatus(6);
}
}
}
pageInfoTmp = new PageInfo(voList);
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure(ErrorMapping.get(20104));
}
return ResponseDto.success(pageInfoTmp);
}
@Override
public ResponseDto<SweetManualTFCDto> details(String manualId) {
SweetManualTFCDto vo;
try {
HashMap<String, Object> map = CollectionUtil.mapStringObject();
map.put("manualId", manualId);
vo = sweetManualTFCMapper.getManualDetails(map);
if (vo.getStatus() >= 6 && vo.getStatus() != 7) {
if (DateUtil.compareStrDay(vo.getTimeSell(), DateUtil.getNowTime()) > 0) {//未开始
vo.setStatus(9);
} else if (DateUtil.compareStrDay(vo.getTimeStop(), DateUtil.getNowTime()) < 0) {//已结束
vo.setStatus(10);
} else {
vo.setStatus(6);
}
}
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure(ErrorMapping.get(20104));
}
return ResponseDto.success(vo);
}
@Override
public ResponseDto<Boolean> changeStatus(String manualId, String performancesId, Integer status) {
try {
int count = sweetManualTFCMapper.selectCount(Wrappers.lambdaUpdate(SweetManualTfc.class).eq(SweetManualTfc::getManualId, manualId));
SweetManualTfc sweetManual = SweetManualTfc.getNew();
if (count > 0) {//修改
sweetManual.setStatus(status);
sweetManual.setUpdatedAt(LocalDateTime.now());
sweetManualTFCMapper.update(sweetManual, Wrappers.lambdaUpdate(SweetManualTfc.class).eq(SweetManualTfc::getManualId, manualId));
} else {//创建
sweetManual.setManualId(IDGenerator.nextSnowId());
sweetManual.setPerformanceId(performancesId);
sweetManual.setStatus(status);
sweetManual.setIsRelease(0);
sweetManual.setCreatedAt(LocalDateTime.now());
sweetManualTFCMapper.insert(sweetManual);
}
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure();
}
redisDataUtils.deletePushListRedisData();
return ResponseDto.success();
}
@Override
public ResponseDto<Boolean> changeRelease(String manualId, Integer isRelease) {
try {
SweetManualTfc sweetManual = SweetManualTfc.getNew();
sweetManual.setIsRelease(isRelease);
sweetManual.setUpdatedAt(LocalDateTime.now());
sweetManualTFCMapper.update(sweetManual, Wrappers.lambdaUpdate(SweetManualTfc.class).eq(SweetManualTfc::getManualId, manualId));
} catch (Exception e) {
return ResponseDto.failure();
}
redisDataUtils.deletePushListRedisData();
return ResponseDto.success();
}
}
package com.liquidnet.service.sweet.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.entity.SweetRichtextTfc;
import com.liquidnet.service.sweet.mapper.SweetRichtextTfcMapper;
import com.liquidnet.service.sweet.service.ISweetRichtextTFCService;
import com.liquidnet.service.sweet.utils.RedisTFCDataUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
/**
* <p>
* 电子宣传手册富文本表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public class SweetRichtextTFCServiceImpl extends ServiceImpl<SweetRichtextTfcMapper, SweetRichtextTfc> implements ISweetRichtextTFCService {
@Autowired
private SweetRichtextTfcMapper sweetRichtextTFCMapper;
@Autowired
private RedisTFCDataUtils redisDataUtils;
@Override
public ResponseDto<SweetRichtextTfc> get(String manualId, Integer type) {
try {
return ResponseDto.success(sweetRichtextTFCMapper.selectOne(Wrappers.lambdaQuery(SweetRichtextTfc.class).eq(SweetRichtextTfc::getManualId, manualId).eq(SweetRichtextTfc::getType, type)));
} catch (Exception e) {
return ResponseDto.failure();
}
}
@Override
public ResponseDto<Boolean> add(String manualId, String details, String local, String pirUrl, Integer type) {
try {
int count = sweetRichtextTFCMapper.selectCount(Wrappers.lambdaQuery(SweetRichtextTfc.class).eq(SweetRichtextTfc::getManualId, manualId).eq(SweetRichtextTfc::getType, type));
if(count>0){
return ResponseDto.failure("不能重复添加");
}
SweetRichtextTfc sweetRichtext = SweetRichtextTfc.getNew();
sweetRichtext.setRichtextId(IDGenerator.nextSnowId());
sweetRichtext.setManualId(manualId);
if (type == 5) {
sweetRichtext.setLocal(local);
sweetRichtext.setDetails(details);
} else if (type == 2) {
sweetRichtext.setPicUrl(pirUrl);
}else{
sweetRichtext.setDetails(details);
}
sweetRichtext.setType(type);
sweetRichtext.setCreatedAt(LocalDateTime.now());
sweetRichtextTFCMapper.insert(sweetRichtext);
} catch (Exception e) {
return ResponseDto.failure();
}
return ResponseDto.success();
}
@Override
public ResponseDto<Boolean> change(String manualId, String details, String local, String pirUrl, Integer type) {
try {
SweetRichtextTfc sweetRichtext = SweetRichtextTfc.getNew();
sweetRichtext.setRichtextId(IDGenerator.nextSnowId());
sweetRichtext.setManualId(manualId);
sweetRichtext.setDetails(details);
if (type == 5) {
sweetRichtext.setLocal(local);
} else if (type == 2) {
sweetRichtext.setPicUrl(pirUrl);
}
sweetRichtext.setType(type);
sweetRichtext.setCreatedAt(LocalDateTime.now());
sweetRichtextTFCMapper.update(sweetRichtext, Wrappers.lambdaUpdate(SweetRichtextTfc.class).eq(SweetRichtextTfc::getManualId, manualId).eq(SweetRichtextTfc::getType, type));
redisDataUtils.setRichTextRedisData(manualId,type.toString(),sweetRichtext);
} catch (Exception e) {
return ResponseDto.failure();
}
return ResponseDto.success();
}
}
package com.liquidnet.service.sweet.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.service.sweet.entity.SweetUserRelationTfc;
import com.liquidnet.service.sweet.mapper.SweetUserRelationTfcMapper;
import com.liquidnet.service.sweet.service.ISweetUserRelationTFCService;
import org.springframework.stereotype.Service;
/**
* <p>
* 用户 收藏/喜欢等状态 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-08-09
*/
@Service
public class SweetUserRelationTFCServiceImpl extends ServiceImpl<SweetUserRelationTfcMapper, SweetUserRelationTfc> implements ISweetUserRelationTFCService {
}
package com.liquidnet.service.sweet.utils; package com.liquidnet.service.sweet.utils;
import com.liquidnet.service.sweet.dto.SweetManualAppletDto; import com.liquidnet.service.sweet.dto.*;
import com.liquidnet.service.sweet.dto.SweetManualAppletMDSKDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistListDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistListMDSKDto;
import com.liquidnet.service.sweet.dto.vo.IntegralActivityVo; import com.liquidnet.service.sweet.dto.vo.IntegralActivityVo;
import com.liquidnet.service.sweet.entity.SweetManualShop; import com.liquidnet.service.sweet.entity.SweetManualShop;
import com.liquidnet.service.sweet.entity.SweetManualShopMdsk; import com.liquidnet.service.sweet.entity.SweetManualShopMdsk;
import com.liquidnet.service.sweet.entity.SweetManualShopTfc;
import com.liquidnet.service.sweet.vo.SweetCItyVoteStatVo; import com.liquidnet.service.sweet.vo.SweetCItyVoteStatVo;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -19,39 +17,56 @@ public class ObjectUtil { ...@@ -19,39 +17,56 @@ public class ObjectUtil {
private static final ArrayList<SweetManualAppletMDSKDto> sweetManualAppletMDSKDtoList = new ArrayList<>(); private static final ArrayList<SweetManualAppletMDSKDto> sweetManualAppletMDSKDtoList = new ArrayList<>();
private static final ArrayList<SweetManualArtistListMDSKDto> sweetManualArtistListMDSKDtoList = new ArrayList<>(); private static final ArrayList<SweetManualArtistListMDSKDto> sweetManualArtistListMDSKDtoList = new ArrayList<>();
private static final ArrayList<SweetManualShopMdsk> sweetManualShopMDSKList = new ArrayList<>(); private static final ArrayList<SweetManualShopMdsk> sweetManualShopMDSKList = new ArrayList<>();
private static final ArrayList<SweetManualAppletTFCDto> sweetManualAppletTFCDtoList = new ArrayList<>();
private static final ArrayList<SweetManualArtistListTFCDto> sweetManualArtistListTFCDtoList = new ArrayList<>();
private static final ArrayList<SweetManualShopTfc> sweetManualShopTFCList = new ArrayList<>();
private static final ArrayList<SweetCItyVoteStatVo> sweetCItyVoteStatVoList = new ArrayList<>(); private static final ArrayList<SweetCItyVoteStatVo> sweetCItyVoteStatVoList = new ArrayList<>();
private static final ArrayList<IntegralActivityVo> sweetIntegralActivityVoList = new ArrayList<>(); private static final ArrayList<IntegralActivityVo> sweetIntegralActivityVoList = new ArrayList<>();
public static ArrayList<SweetManualAppletDto> getSweetManualAppletDtoList() { public static ArrayList<SweetManualAppletDto> getSweetManualAppletDtoList() {
return (ArrayList<SweetManualAppletDto>)sweetManualAppletDtoList.clone(); return (ArrayList<SweetManualAppletDto>) sweetManualAppletDtoList.clone();
} }
public static ArrayList<SweetManualArtistListDto> getSweetManualArtistListDtoList() { public static ArrayList<SweetManualArtistListDto> getSweetManualArtistListDtoList() {
return (ArrayList<SweetManualArtistListDto>)sweetManualArtistListDtoList.clone(); return (ArrayList<SweetManualArtistListDto>) sweetManualArtistListDtoList.clone();
} }
public static ArrayList<SweetManualShop> getSweetManualShopList() { public static ArrayList<SweetManualShop> getSweetManualShopList() {
return (ArrayList<SweetManualShop>)sweetManualShopList.clone(); return (ArrayList<SweetManualShop>) sweetManualShopList.clone();
} }
public static ArrayList<SweetManualAppletMDSKDto> getSweetManualAppletMDSKDtoList() { public static ArrayList<SweetManualAppletMDSKDto> getSweetManualAppletMDSKDtoList() {
return (ArrayList<SweetManualAppletMDSKDto>)sweetManualAppletMDSKDtoList.clone(); return (ArrayList<SweetManualAppletMDSKDto>) sweetManualAppletMDSKDtoList.clone();
}
public static ArrayList<SweetManualAppletTFCDto> getSweetManualAppletTFCDtoList() {
return (ArrayList<SweetManualAppletTFCDto>) sweetManualAppletTFCDtoList.clone();
}
public static ArrayList<SweetManualArtistListTFCDto> getSweetManualArtistListTFCDtoList() {
return (ArrayList<SweetManualArtistListTFCDto>) sweetManualArtistListTFCDtoList.clone();
}
public static ArrayList<SweetManualShopTfc> getSweetManualShopTFCList() {
return (ArrayList<SweetManualShopTfc>) sweetManualShopTFCList.clone();
} }
public static ArrayList<SweetManualArtistListMDSKDto> getSweetManualArtistListMDSKDtoList() { public static ArrayList<SweetManualArtistListMDSKDto> getSweetManualArtistListMDSKDtoList() {
return (ArrayList<SweetManualArtistListMDSKDto>)sweetManualArtistListMDSKDtoList.clone(); return (ArrayList<SweetManualArtistListMDSKDto>) sweetManualArtistListMDSKDtoList.clone();
} }
public static ArrayList<SweetManualShopMdsk> getSweetManualShopMdskList() { public static ArrayList<SweetManualShopMdsk> getSweetManualShopMdskList() {
return (ArrayList<SweetManualShopMdsk>)sweetManualShopMDSKList.clone(); return (ArrayList<SweetManualShopMdsk>) sweetManualShopMDSKList.clone();
} }
public static ArrayList<SweetCItyVoteStatVo> getSweetCItyVoteStatVoList() { public static ArrayList<SweetCItyVoteStatVo> getSweetCItyVoteStatVoList() {
return (ArrayList<SweetCItyVoteStatVo>)sweetCItyVoteStatVoList.clone(); return (ArrayList<SweetCItyVoteStatVo>) sweetCItyVoteStatVoList.clone();
} }
public static ArrayList<IntegralActivityVo> getSweetIntegralActivityVoList() { public static ArrayList<IntegralActivityVo> getSweetIntegralActivityVoList() {
return (ArrayList<IntegralActivityVo>)sweetIntegralActivityVoList.clone(); return (ArrayList<IntegralActivityVo>) sweetIntegralActivityVoList.clone();
} }
} }
package com.liquidnet.service.sweet.utils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.sweet.constant.SweetConstant;
import com.liquidnet.service.sweet.dto.SweetManualAppletTFCDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistList2TFCDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistListTFCDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistStageListTFCDto;
import com.liquidnet.service.sweet.entity.SweetManualNotifyTfc;
import com.liquidnet.service.sweet.entity.SweetManualShopTfc;
import com.liquidnet.service.sweet.entity.SweetManualSortTfc;
import com.liquidnet.service.sweet.entity.SweetRichtextTfc;
import com.liquidnet.service.sweet.mapper.*;
import com.liquidnet.service.sweet.vo.SweetArtistsRelationVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.*;
@Component
public class RedisTFCDataUtils {
@Autowired
private RedisUtil redisUtil;
@Autowired
private QueueUtils queueUtils;
@Autowired
private SweetManualTfcMapper sweetManualTFCMapper;
@Autowired
private SweetManualArtistsTfcMapper sweetManualArtistsTFCMapper;
@Autowired
private SweetRichtextTfcMapper sweetRichtextTFCMapper;
@Autowired
private SweetManualSortTfcMapper sweetManualSortTFCMapper;
@Autowired
private SweetManualNotifyTfcMapper sweetManualNotifyTFCMapper;
@Autowired
private SweetManualShopTfcMapper sweetManualShopTFCMapper;
public List<SweetManualAppletTFCDto> setPushList() {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_PUSH_LIST;
List<SweetManualAppletTFCDto> data = sweetManualTFCMapper.getManualAppletDto();
for (SweetManualAppletTFCDto item : data) {
if(!item.getIsMember().equals(1)){
item.setTimeSell(DateUtil.format(DateUtil.addMin(DateUtil.parse(item.getTimeSell(),"yyyy-MM-dd HH:mm:ss"),-item.getPayCountdownMinute()),DateUtil.Formatter.yyyyMMddHHmmss));
}
item.setFieldName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "name"));
item.setCityName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "city_name"));
item.setLatitude((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "latitude"));
item.setLongitude((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "longitude"));
}
redisUtil.set(redisKey, data);
return data;
}
//获取电子手册列表 (城市)
public List<SweetManualAppletTFCDto> getPushList() {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_PUSH_LIST;
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return setPushList();
} else {
return (List<SweetManualAppletTFCDto>) obj;
}
}
//获取电子手册演出详情
public SweetManualAppletTFCDto getAppletPerformance(String manualId) {
List<SweetManualAppletTFCDto> data = getPushList();
SweetManualAppletTFCDto returnData = SweetManualAppletTFCDto.getNew();
for (SweetManualAppletTFCDto item : data) {
if (item.getManualId().equalsIgnoreCase(manualId)) {
returnData = item;
break;
}
}
return returnData;
}
public SweetManualArtistList2TFCDto setTimeList(String manualId, String content) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_TIME_LIST.concat(manualId);
HashMap<String, Object> map = CollectionUtil.mapStringObject();
map.put("manualId", manualId);
List<SweetManualArtistListTFCDto> data = sweetManualArtistsTFCMapper.getManualList(map);
//获取时间
SweetManualAppletTFCDto sweetManualAppletDto = getAppletPerformance(manualId);
Date dateEnd = DateUtil.parse(sweetManualAppletDto.getTimeEnd(), DateUtil.DATE_SMALL_STR);
Date dateStart = DateUtil.parse(sweetManualAppletDto.getTimeStart(), DateUtil.DATE_SMALL_STR);
int intervalDay = (int) DateUtil.intervalDays(dateStart, dateEnd);
ArrayList<String> list = CollectionUtil.arrayListString();
list.add(DateUtil.format(dateStart, DateUtil.Formatter.yyyy_MM_dd));
for (int i = 0; i < intervalDay; i++) {
list.add(DateUtil.format(DateUtil.addDay(dateStart, i + 1), DateUtil.Formatter.yyyy_MM_dd));
}
//获取舞台
List<SweetManualArtistStageListTFCDto> stageData = sweetManualArtistsTFCMapper.getStageNameList(map);
SweetManualArtistList2TFCDto returnData = SweetManualArtistList2TFCDto.getNew();
returnData.setDate(list);
returnData.setData(data);
returnData.setStage(stageData);
redisUtil.set(redisKey, returnData);
return returnData;
}
//获取时间表
public SweetManualArtistList2TFCDto getTimeList(String manualId) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_TIME_LIST.concat(manualId);
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return setTimeList(manualId, null);
} else {
return (SweetManualArtistList2TFCDto) obj;
}
}
public SweetRichtextTfc setRichTextRedisData(String manualId, String type, SweetRichtextTfc content) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_RICH_TEXT.concat(manualId).concat(":type:" + type);
SweetRichtextTfc sweetRichtext;
if (content != null) {
sweetRichtext = content;
} else {
sweetRichtext = sweetRichtextTFCMapper.selectOne(Wrappers.lambdaQuery(SweetRichtextTfc.class).eq(SweetRichtextTfc::getManualId, manualId).eq(SweetRichtextTfc::getType, type));
}
redisUtil.set(redisKey, sweetRichtext);
return sweetRichtext;
}
//获取富文本详情
public SweetRichtextTfc getRichTextRedisData(String manualId, String type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_RICH_TEXT.concat(manualId).concat(":type:" + type);
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return setRichTextRedisData(manualId, type, null);
} else {
return (SweetRichtextTfc) obj;
}
}
public List<String> setTagRedisData(String manualId) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_SORT.concat(manualId);
SweetManualSortTfc data = sweetManualSortTFCMapper.selectOne(Wrappers.lambdaQuery(SweetManualSortTfc.class).eq(SweetManualSortTfc::getManualId, manualId));
String[] arrays = data.getShowPosition().split(",");
List<String> returnData = new ArrayList<>();
for (String item : arrays) {
returnData.add(item);
// returnData.add(SweetConstant.ManualPosition.getMessage(item));
}
redisUtil.set(redisKey, returnData);
return returnData;
}
//获取显示的标签
public List<String> getTagRedisData(String manualId) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_SORT.concat(manualId);
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return setTagRedisData(manualId);
} else {
return (List<String>) obj;
}
}
public List<SweetManualNotifyTfc> setNotifyRedisData(String manualId, List<SweetManualNotifyTfc> content) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_NOTIFY_LIST.concat(manualId);
List<SweetManualNotifyTfc> data;
if (content != null) {
data = content;
} else {
data = sweetManualNotifyTFCMapper.selectList(Wrappers.lambdaQuery(SweetManualNotifyTfc.class).eq(SweetManualNotifyTfc::getManualId, manualId).eq(SweetManualNotifyTfc::getStatus, 1));
}
redisUtil.set(redisKey, data);
return data;
}
//获取通知
public List<SweetManualNotifyTfc> getNotifyRedisData(String manualId) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_NOTIFY_LIST.concat(manualId);
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return setNotifyRedisData(manualId, null);
} else {
return (List<SweetManualNotifyTfc>) obj;
}
}
public void deletePushListRedisData() {
redisUtil.del(SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_PUSH_LIST);//列表
}
public void deleteTimeListRedisData(String manualId) {
redisUtil.del(SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_TIME_LIST.concat(manualId));//列表
}
public void deleteSortRedisData(String manualId) {
redisUtil.del(SweetConstant.REDIS_KEY_SWEET_TFC_MANUAL_SORT.concat(manualId));//列表
}
public void setArtistsRelationRedisVo(String uid, String artistsId, String manualId, String type) {
LinkedList<String> sqls = CollectionUtil.linkedListString();
LinkedList<Object[]> sqlsDataA = CollectionUtil.linkedListObjectArr();
LocalDateTime now = LocalDateTime.now();
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_ARTISTS_RELATION.concat(uid).concat(":manualId:").concat(manualId);
SweetArtistsRelationVo vo = getArtistsRelationRedisVo(uid, manualId);
vo.setUid(uid);
if (type.equalsIgnoreCase("sign")) {
if (vo.getSignList() == null) {
ArrayList<String> signList = CollectionUtil.arrayListString();
signList.add(artistsId);
vo.setSignList(signList);
sqls.add(SqlMapping.get("sweet_user_relation_TFC.insert"));
sqlsDataA.add(new Object[]{
uid, 2, artistsId, manualId, now
});
} else {
if (vo.getSignList().contains(artistsId)) {
vo.getSignList().remove(artistsId);
sqls.add(SqlMapping.get("sweet_user_relation_TFC.delete"));
sqlsDataA.add(new Object[]{
uid, artistsId, manualId,2
});
} else {
vo.getSignList().add(artistsId);
sqls.add(SqlMapping.get("sweet_user_relation_TFC.insert"));
sqlsDataA.add(new Object[]{
uid, 2, artistsId, manualId, now
});
}
}
} else if (type.equalsIgnoreCase("watch")) {
if (vo.getWatchList() == null) {
ArrayList<String> watchList = CollectionUtil.arrayListString();
watchList.add(artistsId);
vo.setWatchList(watchList);
sqls.add(SqlMapping.get("sweet_user_relation_TFC.insert"));
sqlsDataA.add(new Object[]{
uid, 1, artistsId, manualId, now
});
} else {
if (vo.getWatchList().contains(artistsId)) {
vo.getWatchList().remove(artistsId);
sqls.add(SqlMapping.get("sweet_user_relation_TFC.delete"));
sqlsDataA.add(new Object[]{
uid, artistsId, manualId,1
});
} else {
vo.getWatchList().add(artistsId);
sqls.add(SqlMapping.get("sweet_user_relation_TFC.insert"));
sqlsDataA.add(new Object[]{
uid, 1, artistsId, manualId, now
});
}
}
}
redisUtil.set(redisKey, vo);
queueUtils.sendMsgByRedis(MQConst.SweetQueue.ARTISTS_RELATION.getKey(),
SqlMapping.gets(sqls, sqlsDataA));
}
//获取 签售
//获取 想看
public SweetArtistsRelationVo getArtistsRelationRedisVo(String uid, String manualId) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_ARTISTS_RELATION.concat(uid).concat(":manualId:").concat(manualId);
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return SweetArtistsRelationVo.getNew();
} else {
return (SweetArtistsRelationVo) obj;
}
}
//获取 商铺
public List<SweetManualShopTfc> setManualShopRedisData(String manualId) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_SHOP.concat(manualId);
List<SweetManualShopTfc> list = sweetManualShopTFCMapper.selectList(Wrappers.lambdaQuery(SweetManualShopTfc.class).eq(SweetManualShopTfc::getManualId, manualId).orderBy(true, false, SweetManualShopTfc::getSort));
redisUtil.set(redisKey, list);
return list;
}
public List<SweetManualShopTfc> getManualShopRedisData(String manualId) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_SHOP.concat(manualId);
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return setManualShopRedisData(manualId);
} else {
return (List<SweetManualShopTfc>) obj;
}
}
// // 艺人详情
// public SweetArtists setArtistsDetails(String artistsId) {
// String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_ARTISTS_DETAILS.concat(artistsId);
// SweetArtists sweetArtists = sweetArtistsMapper.selectOne(Wrappers.lambdaQuery(SweetArtists.class).eq(SweetArtists::getArtistsId, artistsId).eq(SweetArtists::getStatus, 1));
// redisUtil.set(redisKey, sweetArtists);
// return sweetArtists;
// }
//
// public SweetArtists getArtistsDetails(String artistsId) {
// String redisKey = SweetConstant.REDIS_KEY_SWEET_TFC_ARTISTS_DETAILS.concat(artistsId);
// Object obj = redisUtil.get(redisKey);
// if (obj == null) {
// return setArtistsDetails(artistsId);
// } else {
// return (SweetArtists) obj;
// }
// }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment