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

Commit 34a2c402 authored by wangyifan's avatar wangyifan

添加须知提醒状态

parent 026bd85f
......@@ -4,6 +4,7 @@ public class KylinRedisConst {
public static final String FIELDS = "kylin:fields:id";
public static final String PERFORMANCES = "kylin:performances:id:";
public static final String PERFORMANCES_INVOICE_REMINDER = "kylin:performances:invoice_reminder:id:";
public static final String PERFORMANCES_NOTICE_REMIND_STATUS = "kylin:performances:noticeRemindStatus:id:";
public static final String PERFORMANCES_TRUE_NAME = "kylin:performances_true_name:id:";
public static final String PERFORMANCES_LIST_CITY = "kylin:performances:city:";
public static final String PERFORMANCES_LIST_SYSTEM_RECOMMEND = "kylin:performances:systemRecommend";
......
......@@ -124,6 +124,9 @@ public class PerformancePartnerVo implements Serializable, Cloneable {
@ApiModelProperty(value = "是否保存", example = "")
private Integer isCreateSave;
@ApiModelProperty(value = "须知提醒 0:不提醒 1:提醒")
private Integer noticeRemindStatus;
public Integer getIdCount() {
return idCount==null?limitCount:idCount;
}
......
......@@ -89,4 +89,8 @@ public class PerformanceStep1Param implements Serializable {
@ApiModelProperty(value = "", example = "")
@JsonIgnore
private String createdAt;
@ApiModelProperty(value = "须知提醒 0:不提醒 1:提醒")
@NotNull(message = "须知提醒不能为空")
private Integer noticeRemindStatus;
}
......@@ -149,6 +149,9 @@ public class KylinPerformanceVo implements Serializable, Cloneable {
@ApiModelProperty(value = "场地地址")
private String fieldAddress;
@ApiModelProperty(value = "须知提醒 0:不提醒 1:提醒")
private Integer noticeRemindStatus;
public Integer getIdCount() {
return idCount == null ? limitCount : idCount;
}
......
......@@ -316,6 +316,7 @@ public class KylinPerformancesServiceImpl implements IKylinPerformancesService {
}
performancesInfo.setIsInvoiceReminder(dataUtils.getPerformanceInvoiceReminder(performancesId));
performancesInfo.setFieldAddress(dataUtils.getFieldAddressByFieldId(performancesInfo.getFieldId()));
performancesInfo.setNoticeRemindStatus(dataUtils.getPerformanceNoticeRemindStatus(performancesId));
return performancesInfo;
}
......
......@@ -1706,4 +1706,21 @@ public class DataUtils {
.eq(KylinRewardUser::getLuckyBagId, luckyBagId);
return kylinRewardUserMapper.selectList(lambdaQueryWrapper);
}
/**
*
* 获取演出须知提醒状态
* @param performanceId
* @return 0:不提醒 1:提醒
*/
public Integer getPerformanceNoticeRemindStatus(String performanceId) {
String redisKey = KylinRedisConst.PERFORMANCES_NOTICE_REMIND_STATUS + performanceId;
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return 0;
}else {
return (int) obj;
}
}
}
......@@ -123,6 +123,8 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
performancePartnerVo.setFieldName(redisSlimeUtils.getFieldVo(step1Param.getFieldId()).getName());
performancePartnerVo.setNoticeImage(innerUtils.getBuyNoticeJsonString(step1Param.getNoticeIds()));
mongoSlimeUtils.insertPerformancePartnerVo(performancePartnerVo);
// 设置须知提醒状态
redisSlimeUtils.setPerformanceNoticeRemindStatus(performanceId, step1Param.getNoticeRemindStatus());
return performanceId;
} catch (Exception e) {
e.printStackTrace();
......@@ -177,6 +179,8 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
performancePartnerVo.setProjectId(vo.getProjectId());
mongoSlimeUtils.insertPerformancePartnerVo(performancePartnerVo);
}
// 修改须知提醒状态
redisSlimeUtils.setPerformanceNoticeRemindStatus(performanceId, step1Param.getNoticeRemindStatus());
return performanceId;
} catch (Exception e) {
e.printStackTrace();
......@@ -204,6 +208,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
if (null != vo) {
data.setStatus(vo.getAppStatus());
}
data.setNoticeRemindStatus(redisSlimeUtils.getPerformanceNoticeRemindStatus(performancesId));
log.info(UserPathDto.setPartnerData("0", "getStep1", "merchant=" + merchantId + "&performancesId=" + performancesId, data));
return ResponseDto.success(data);
}
......
......@@ -311,4 +311,25 @@ public class RedisSlimeUtils {
String redisKey = KylinRedisConst.PERFORMANCES_INVOICE_REMINDER + performanceId;
redisUtil.set(redisKey, invoiceReminder);
}
/**
*
* 获取演出须知提醒状态
* @param performanceId
* @return 0:不提醒 1:提醒
*/
public Integer getPerformanceNoticeRemindStatus(String performanceId) {
String redisKey = KylinRedisConst.PERFORMANCES_NOTICE_REMIND_STATUS + performanceId;
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return 0;
}else {
return (int) obj;
}
}
public void setPerformanceNoticeRemindStatus(String performanceId, Integer noticeRemindStatus) {
String redisKey = KylinRedisConst.PERFORMANCES_NOTICE_REMIND_STATUS + performanceId;
redisUtil.set(redisKey, noticeRemindStatus);
}
}
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