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

Commit 909efc52 authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/dev' into dev

parents 97d49934 f72ae6fb
...@@ -10,7 +10,7 @@ import java.io.Serializable; ...@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.util.List; import java.util.List;
@Data @Data
public class PerformanceParam implements Serializable { public class PerformancePartnerVo implements Serializable {
@ApiModelProperty(value = "演出id", example = "") @ApiModelProperty(value = "演出id", example = "")
@JsonIgnore @JsonIgnore
...@@ -95,7 +95,7 @@ public class PerformanceParam implements Serializable { ...@@ -95,7 +95,7 @@ public class PerformanceParam implements Serializable {
private String rejectTxt; private String rejectTxt;
@ApiModelProperty(value = "审核状态", hidden = true) @ApiModelProperty(value = "审核状态", hidden = true)
private String auditStatus; private Integer auditStatus;
@ApiModelProperty(value = "审核状态", hidden = true) @ApiModelProperty(value = "审核状态", hidden = true)
private Integer isShow; private Integer isShow;
...@@ -104,7 +104,7 @@ public class PerformanceParam implements Serializable { ...@@ -104,7 +104,7 @@ public class PerformanceParam implements Serializable {
private String projectId; private String projectId;
@ApiModelProperty(value = "购票须知 Id 数组") @ApiModelProperty(value = "购票须知 Id 数组")
private List<Integer> noticeIds; private List<String> noticeIds;
@ApiModelProperty(value = "", example = "") @ApiModelProperty(value = "", example = "")
private String createdAt; private String createdAt;
......
...@@ -83,7 +83,7 @@ public class PerformanceStep1Param implements Serializable { ...@@ -83,7 +83,7 @@ public class PerformanceStep1Param implements Serializable {
@ApiModelProperty(value = "购票须知 Id 数组") @ApiModelProperty(value = "购票须知 Id 数组")
@NotNull(message = "不能为空") @NotNull(message = "不能为空")
private List<Integer> noticeIds; private List<String> noticeIds;
@ApiModelProperty(value = "演出简介", example = "") @ApiModelProperty(value = "演出简介", example = "")
private String describes; private String describes;
......
package com.liquidnet.service.kylin.dto.vo.partner; package com.liquidnet.service.kylin.dto.vo.partner;
import com.liquidnet.service.kylin.dto.param.PerformanceParam; import com.liquidnet.service.kylin.dto.param.PerformancePartnerVo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -34,7 +34,7 @@ public class PerformancePartnerListVo { ...@@ -34,7 +34,7 @@ public class PerformancePartnerListVo {
private String createdAt; private String createdAt;
@ApiModelProperty(value = "返回数据赋值",hidden = true) @ApiModelProperty(value = "返回数据赋值",hidden = true)
public void setStatus0Data(PerformanceParam item){ public void setStatus0Data(PerformancePartnerVo item){
this.performancesId=item.getPerformancesId(); this.performancesId=item.getPerformancesId();
this.title=item.getTitle(); this.title=item.getTitle();
this.timeStart=item.getTimeStart(); this.timeStart=item.getTimeStart();
......
package com.liquidnet.service.kylin.dto.vo.partner;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class PerformancePartnerVo implements Serializable {
@ApiModelProperty(value = "演出id", example = "")
@JsonIgnore
private String performancesId;
@ApiModelProperty(value = "封面图", example = "https://img.zhengzai.tv/partner/2019/05/14/5cda2d0520177.png")
private String imgPoster;
@ApiModelProperty(value = "演出名称", example = "测试演出")
private String title;
@ApiModelProperty(value = "演出类型 1音乐节 2演唱会 3小型演出 4展览 6舞台剧", example = "3")
private int type;
@ApiModelProperty(value = "演出开始时间", example = "2021-05-01 12:00:00")
private String timeStart;
@ApiModelProperty(value = "演出结束时间", example = "2021-05-04 12:00:00")
private String timeEnd;
@ApiModelProperty(value = "场地id", example = "1")
private String fieldId;
@ApiModelProperty(value = "场地id", example = "1")
private String fieldName;
@ApiModelProperty(value = "演出公告", example = "这是演出公告")
private String notice;
@ApiModelProperty(value = "主办方id", example = "1")
private String sponsorId;
@ApiModelProperty(value = "主办方类型", example = "1")
private String sponsorType;
@ApiModelProperty(value = "主办方名称", example = "主办方名称")
private String sponsor;
@ApiModelProperty(value = "联系人", example = "联系人")
private String contacts;
@ApiModelProperty(value = "联系方式", example = "手机号")
private String mobile;
@ApiModelProperty(value = "演出详情", example = "<p>演出详情</p>")
private String details;
@ApiModelProperty(value = "演出批文地址", example = "这是一个演出批文地址")
private String approvalUrl;
@ApiModelProperty(value = "待支付时间", example = "5")
private int payCountdownMinute;
@ApiModelProperty(value = "购票须知", example = "[{\"id\":1,\"title\":\"\\u95e8\\u7968\\u4e0d\\u9000\\u4e0d\\u6362\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c45722882a13.png\",\"text\":\"\\u95e8\\u7968\\u4e3a\\u6709\\u4ef7\\u8bc1\\u5238\\uff0c\\u5e76\\u975e\\u5546\\u54c1\\uff0c\\u4e00\\u7ecf\\u552e\\u51fa\\u4e0d\\u4e88\\u9000\\u6362\\u3002\\u56e0\\u201c\\u4e0d\\u53ef\\u6297\\u529b\\u201d\\u5bfc\\u81f4\\u7684\\u6f14\\u51fa\\u53d6\\u6d88\\u6216\\u5ef6\\u671f\\u9664\\u5916\\u3002\",\"sort\":1},{\"id\":3,\"title\":\"\\u4ec5\\u8bbe\\u7ad9\\u5e2d\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c456e93db0b9.png\",\"text\":\"\\u672c\\u573a\\u6f14\\u51fa\\u4e0d\\u8bbe\\u5ea7\\u4f4d\\uff0c\\u5747\\u4e3a\\u7ad9\\u5e2d\\u89c2\\u6f14\\u3002\",\"sort\":2},{\"id\":4,\"title\":\"\\u7981\\u6b62\\u4e2a\\u4eba\\u7968\\u52a1\\u4e70\\u5356\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c456e5c27644.png\",\"text\":\"\\u4e3a\\u9632\\u6b62\\u4e0d\\u6cd5\\u5206\\u5b50\\u5229\\u7528\\u7968\\u52a1\\u8f6c\\u8ba9\\u8bc8\\u9a97\\u94b1\\u6b3e\\uff0c\\u5efa\\u8bae\\u5e7f\\u5927\\u4e50\\u8ff7\\u4e0d\\u8981\\u8fdb\\u884c\\u4e2a\\u4eba\\u95f4\\u7968\\u52a1\\u4e70\\u5356\\uff0c\\u4e0d\\u8981\\u8f7b\\u6613\\u76f8\\u4fe1\\u6765\\u6e90\\u4e0d\\u660e\\u7684\\u8f6c\\u7968\\uff0c\\u4ee5\\u514d\\u81ea\\u8eab\\u5229\\u76ca\\u53d7\\u5230\\u4fb5\\u5bb3\\u3002\",\"sort\":3}]")
private String noticeImage;
@ApiModelProperty(value = "是否实名", example = "0")
private int isTrueName;
@ApiModelProperty(value = "限购数量 0为不限购", example = "0")
private int limitCount;
@ApiModelProperty(value = "是否提交 1提交 0不提交(不验证参数)", example = "0")
private int isSubmit;
@ApiModelProperty(value = "状态:-1删除;0未提交;1审核中;2审核中(自动上线);3审核通过;4审核未通过;6上线;7下架;8活动结束;9活动取消退款中;10活动取消退", example = "0")
private int status;
@ApiModelProperty(value = "第三方id", example = "0")
private String merchantId;
@ApiModelProperty(value = "演出简介", example = "0")
private String describes;
@ApiModelProperty(value = "是否售卖", example = "0")
private int statusSell;
@ApiModelProperty(value = "巡演id", example = "0",hidden = true)
private String roadShowId;
@ApiModelProperty(value = "搭售id", example = "0",hidden = true)
private String projectId;
@ApiModelProperty(value = "", example = "")
private String createdAt;
@ApiModelProperty(value = "是否保存", example = "")
private int isCreateSave;
}
...@@ -4,8 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,8 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.liquidnet.service.kylin.dao.PerformancePartnerListDao; import com.liquidnet.service.kylin.dao.PerformancePartnerListDao;
import com.liquidnet.service.kylin.dto.param.*; import com.liquidnet.service.kylin.dto.param.*;
import com.liquidnet.service.kylin.dto.vo.BuyNoticeVo;
import com.liquidnet.service.kylin.dto.vo.partner.PerformancePartnerVo;
import com.liquidnet.service.kylin.entity.KylinPerformances; import com.liquidnet.service.kylin.entity.KylinPerformances;
/** /**
...@@ -21,12 +19,15 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma ...@@ -21,12 +19,15 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma
/** /**
* 演出第一步 * 演出第一步
*
* @param step1Param 相关参数 * @param step1Param 相关参数
* @return 演出id * @return 演出id
*/ */
String step1(PerformanceStep1Param step1Param); String step1(PerformanceStep1Param step1Param);
/** /**
* 创建演出第一步 * 创建演出第一步
*
* @param step1Param 相关参数 * @param step1Param 相关参数
* @return 演出id * @return 演出id
*/ */
...@@ -34,6 +35,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma ...@@ -34,6 +35,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma
/** /**
* 修改演出第一步 * 修改演出第一步
*
* @param step1Param 相关参数 * @param step1Param 相关参数
* @return 演出id * @return 演出id
*/ */
...@@ -41,28 +43,15 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma ...@@ -41,28 +43,15 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma
/** /**
* 获取演出第一步数据 * 获取演出第一步数据
*
* @param performancesId 演出id * @param performancesId 演出id
* @return 演出对象 * @return 演出对象
*/ */
PerformancePartnerVo getStep1(String performancesId); PerformancePartnerVo getStep1(String performancesId);
// /**
// * 获取创建演出第一步数据
// * @param performancesId
// * @return
// */
// PerformanceParam getCreateStep1(String performancesId);
//
// /**
// * 获取修改演出第一步数据
// * @param performancesId
// * @return
// */
// PerformanceParam getUpdateStep1(String performancesId);
/** /**
* 演出第二步 * 演出第二步
*
* @param step2Param 相关参数 * @param step2Param 相关参数
* @return boolean * @return boolean
*/ */
...@@ -70,6 +59,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma ...@@ -70,6 +59,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma
/** /**
* 演出第二步创建 * 演出第二步创建
*
* @param step2Param 相关参数 * @param step2Param 相关参数
* @return boolean * @return boolean
*/ */
...@@ -77,6 +67,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma ...@@ -77,6 +67,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma
/** /**
* 演出第二步修改 * 演出第二步修改
*
* @param step2Param 相关参数 * @param step2Param 相关参数
* @return boolean * @return boolean
*/ */
...@@ -84,6 +75,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma ...@@ -84,6 +75,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma
/** /**
* 获取演出第二步数据 * 获取演出第二步数据
*
* @param performancesId 演出id * @param performancesId 演出id
* @return 演出 第二步 数据 * @return 演出 第二步 数据
*/ */
...@@ -95,6 +87,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma ...@@ -95,6 +87,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma
/** /**
* 演出上线 * 演出上线
*
* @param performancesId 演出id * @param performancesId 演出id
* @return boolean * @return boolean
*/ */
...@@ -102,6 +95,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma ...@@ -102,6 +95,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma
/** /**
* 演出下线 * 演出下线
*
* @param performancesId 演出id * @param performancesId 演出id
* @return boolean * @return boolean
*/ */
...@@ -109,6 +103,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma ...@@ -109,6 +103,7 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma
/** /**
* 复制演出 (只有巡演类型) * 复制演出 (只有巡演类型)
*
* @param performancesId 演出id * @param performancesId 演出id
* @return 演出id * @return 演出id
*/ */
...@@ -116,8 +111,18 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma ...@@ -116,8 +111,18 @@ public interface IKylinPerformancesPartnerService extends IService<KylinPerforma
/** /**
* 演出列表 * 演出列表
*
* @param performancePartnerListParam 相关参数 * @param performancePartnerListParam 相关参数
* @return 分页 msql 数据 * @return 分页 msql 数据
*/ */
PageInfo<PerformancePartnerListDao> getList(PerformancePartnerListParam performancePartnerListParam); PageInfo<PerformancePartnerListDao> getList(PerformancePartnerListParam performancePartnerListParam);
/**
* 演出撤回
*
* @param performancesId 演出id
* @return boolean
*/
boolean withdraw(String performancesId);
} }
...@@ -4,7 +4,6 @@ import com.github.pagehelper.PageInfo; ...@@ -4,7 +4,6 @@ import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dao.PerformancePartnerListDao; import com.liquidnet.service.kylin.dao.PerformancePartnerListDao;
import com.liquidnet.service.kylin.dto.param.*; import com.liquidnet.service.kylin.dto.param.*;
import com.liquidnet.service.kylin.dto.vo.partner.PerformancePartnerVo;
import com.liquidnet.service.kylin.service.impl.partner.KylinPerformancesPartnerServiceImpl; import com.liquidnet.service.kylin.service.impl.partner.KylinPerformancesPartnerServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -125,4 +124,16 @@ public class PerformancePartnerController { ...@@ -125,4 +124,16 @@ public class PerformancePartnerController {
return ResponseDto.failure("下架失败"); return ResponseDto.failure("下架失败");
} }
} }
@PostMapping(value = "withdraw")
@ApiOperation(value = "演出撤回")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> withdraw(@RequestParam("performancesId") String performancesId) {
boolean result = performancesPartnerService.withdraw(performancesId);
if (result) {
return ResponseDto.success("撤回成功");
} else {
return ResponseDto.failure("撤回失败");
}
}
} }
...@@ -6,7 +6,6 @@ import com.github.pagehelper.PageHelper; ...@@ -6,7 +6,6 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.liquidnet.common.cache.redis.util.RedisUtil; import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.commons.lang.util.BeanUtil; import com.liquidnet.commons.lang.util.BeanUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.kylin.constant.KylinRedisConst; import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.kylin.dao.*; import com.liquidnet.service.kylin.dao.*;
import com.liquidnet.service.kylin.dto.param.*; import com.liquidnet.service.kylin.dto.param.*;
...@@ -120,7 +119,7 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma ...@@ -120,7 +119,7 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
map.put("auditStatus", auditStatus); map.put("auditStatus", auditStatus);
map.put("updatedAt", updatedAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); map.put("updatedAt", updatedAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
BasicDBObject objectPerformanceVo = new BasicDBObject("$set", mongoConverter.convertToMongoType(map)); BasicDBObject objectPerformanceVo = new BasicDBObject("$set", mongoConverter.convertToMongoType(map));
Document doc = mongoTemplate.getCollection(PerformanceParam.class.getSimpleName()).findOneAndUpdate( Document doc = mongoTemplate.getCollection(PerformancePartnerVo.class.getSimpleName()).findOneAndUpdate(
Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(), Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(),
objectPerformanceVo, objectPerformanceVo,
new FindOneAndUpdateOptions().returnDocument(ReturnDocument.AFTER) new FindOneAndUpdateOptions().returnDocument(ReturnDocument.AFTER)
...@@ -159,10 +158,11 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma ...@@ -159,10 +158,11 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
} }
} else { //只修改演出相关 场次 票 (不包括 库存 售卖时间 限购) } else { //只修改演出相关 场次 票 (不包括 库存 售卖时间 限购)
log.info(" PERFORMANCE 演出审核 修改"); log.info(" PERFORMANCE 演出审核 修改");
HashMap<String, Object> mapSql = new HashMap<>(); HashMap<String, Object> mapSql = new HashMap<>();
mapSql.put("status", 9); mapSql.put("status", 9);
mapSql.put("updatedAt", updatedAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); mapSql.put("updatedAt", updatedAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
performanceVoTask.updatePerformanceMySql(performancesId, mapSql, performanceVoTask.getPerformanceMisVo(performancesId), updatedAt); performanceVoTask.updatePerformanceMySql(performancesId, mapSql, performanceVoTask.getPerformanceMisVo(performancesId), updatedAt,auditStatus);
if (sqlStatus.getStatus() == 6) {//若 演出上 则 线判断状态 if (sqlStatus.getStatus() == 6) {//若 演出上 则 线判断状态
performanceVoTask.performanceVoStatus(performancesId); performanceVoTask.performanceVoStatus(performancesId);
} }
...@@ -176,10 +176,17 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma ...@@ -176,10 +176,17 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
map.put("status", status); map.put("status", status);
map.put("updatedAt", updatedAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); map.put("updatedAt", updatedAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map)); BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map));
mongoTemplate.getCollection(PerformanceParam.class.getSimpleName()).updateOne( mongoTemplate.getCollection(PerformancePartnerVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(), Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(),
object object
); );
KylinPerformanceStatus performanceStatus = new KylinPerformanceStatus();
performanceStatus.setAuditStatus(auditStatus);
performanceStatus.setUpdatedAt(updatedAt);
performanceStatusMapper.update(performanceStatus, new UpdateWrapper<KylinPerformanceStatus>().eq("performance_id", performancesId));
// mongoTemplate.getCollection(PerformanceMisVo.class.getSimpleName()).updateOne( // mongoTemplate.getCollection(PerformanceMisVo.class.getSimpleName()).updateOne(
// Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(), // Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(),
// object // object
......
...@@ -108,7 +108,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -108,7 +108,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
result = createStep1(step1Param); result = createStep1(step1Param);
log.info(" PERFORMANCE 演出第一步 创建"); log.info(" PERFORMANCE 演出第一步 创建");
} else { // 获取 create 数据 status = 0 或 无数据 创建 } else { // 获取 create 数据 status = 0 或 无数据 创建
PerformanceParam createParam = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(step1Param.getPerformancesId())), PerformanceParam.class, PerformanceParam.class.getSimpleName()); PerformancePartnerVo createParam = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(step1Param.getPerformancesId())), PerformancePartnerVo.class, PerformancePartnerVo.class.getSimpleName());
if (createParam == null) { if (createParam == null) {
result = createStep1(step1Param); result = createStep1(step1Param);
log.info(" PERFORMANCE 演出第一步 创建"); log.info(" PERFORMANCE 演出第一步 创建");
...@@ -129,23 +129,22 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -129,23 +129,22 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
try { try {
step1Param.setPerformancesId(performanceId); step1Param.setPerformancesId(performanceId);
PerformanceParam performanceParam = new PerformanceParam(); PerformancePartnerVo performancePartnerVo = new PerformancePartnerVo();
BeanUtils.copyProperties(step1Param, performanceParam); BeanUtils.copyProperties(step1Param, performancePartnerVo);
performanceParam.setIsTrueName(0); performancePartnerVo.setIsTrueName(0);
performanceParam.setLimitCount(0); performancePartnerVo.setLimitCount(0);
performanceParam.setCreatedAt(createdAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); performancePartnerVo.setCreatedAt(createdAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
performanceParam.setIsSubmit(0); performancePartnerVo.setIsSubmit(0);
performanceParam.setStatus(0); performancePartnerVo.setStatus(0);
performanceParam.setStatusSell(1); performancePartnerVo.setStatusSell(1);
performanceParam.setRoadShowId("0"); performancePartnerVo.setRoadShowId("0");
performanceParam.setProjectId("0"); performancePartnerVo.setProjectId("0");
performanceParam.setIsShow(1); performancePartnerVo.setIsShow(1);
performanceParam.setFieldName((String)redisUtil.hget(KylinRedisConst.FIELDS + ":" + performanceParam.getFieldId(), "name")); performancePartnerVo.setFieldName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performancePartnerVo.getFieldId(), "name"));
performanceParam.setNoticeImage(dataUtils.getBuyNoticeJsonString(step1Param.getNoticeIds())); performancePartnerVo.setNoticeImage(dataUtils.getBuyNoticeJsonString(step1Param.getNoticeIds()));
mongoTemplate.insert( mongoTemplate.insert(
performanceParam, PerformanceParam.class.getSimpleName() performancePartnerVo, PerformancePartnerVo.class.getSimpleName()
); );
return performanceId; return performanceId;
...@@ -162,36 +161,36 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -162,36 +161,36 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
String performanceId = step1Param.getPerformancesId(); String performanceId = step1Param.getPerformancesId();
try { try {
step1Param.setPerformancesId(performanceId); step1Param.setPerformancesId(performanceId);
PerformanceParam performanceParam = new PerformanceParam(); PerformancePartnerVo performancePartnerVo = new PerformancePartnerVo();
BeanUtils.copyProperties(step1Param, performanceParam); BeanUtils.copyProperties(step1Param, performancePartnerVo);
performanceParam.setCreatedAt(timeNow.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); performancePartnerVo.setCreatedAt(timeNow.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
performanceParam.setUpdatedAt(timeNow.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); performancePartnerVo.setUpdatedAt(timeNow.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
performanceParam.setIsSubmit(0); performancePartnerVo.setIsSubmit(0);
performanceParam.setStatus(0); performancePartnerVo.setStatus(0);
performanceParam.setNoticeImage(dataUtils.getBuyNoticeJsonString(step1Param.getNoticeIds())); performancePartnerVo.setNoticeImage(dataUtils.getBuyNoticeJsonString(step1Param.getNoticeIds()));
PerformanceParam data = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performanceId)), PerformancePartnerVo data = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performanceId)),
PerformanceParam.class, PerformanceParam.class.getSimpleName()); PerformancePartnerVo.class, PerformancePartnerVo.class.getSimpleName());
if (data != null) { // 有修改记录 if (data != null) { // 有修改记录
performanceParam.setIsTrueName(data.getIsTrueName()); performancePartnerVo.setIsTrueName(data.getIsTrueName());
performanceParam.setLimitCount(data.getLimitCount()); performancePartnerVo.setLimitCount(data.getLimitCount());
performanceParam.setStatusSell(data.getStatusSell()); performancePartnerVo.setStatusSell(data.getStatusSell());
performanceParam.setRoadShowId(data.getRoadShowId()); performancePartnerVo.setRoadShowId(data.getRoadShowId());
performanceParam.setProjectId(data.getProjectId()); performancePartnerVo.setProjectId(data.getProjectId());
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(performanceParam)); BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(performancePartnerVo));
mongoTemplate.getCollection(PerformanceParam.class.getSimpleName()).updateOne( mongoTemplate.getCollection(PerformancePartnerVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("performancesId").is(performanceId)).getQueryObject(), Query.query(Criteria.where("performancesId").is(performanceId)).getQueryObject(),
object object
); );
} else { // 无修改记录 } else { // 无修改记录
KylinPerformanceStatus statusData = performanceStatusMapper.selectOne(new UpdateWrapper<KylinPerformanceStatus>().eq("performanceId", performanceId)); KylinPerformanceStatus statusData = performanceStatusMapper.selectOne(new UpdateWrapper<KylinPerformanceStatus>().eq("performanceId", performanceId));
KylinPerformanceRelations relationsData = performanceRelationsMapper.selectOne(new UpdateWrapper<KylinPerformanceRelations>().eq("performancesId", performanceId)); KylinPerformanceRelations relationsData = performanceRelationsMapper.selectOne(new UpdateWrapper<KylinPerformanceRelations>().eq("performancesId", performanceId));
performanceParam.setIsTrueName(statusData.getIsTrueName()); performancePartnerVo.setIsTrueName(statusData.getIsTrueName());
performanceParam.setLimitCount(statusData.getLimitCount()); performancePartnerVo.setLimitCount(statusData.getLimitCount());
performanceParam.setStatusSell(statusData.getStatusSell()); performancePartnerVo.setStatusSell(statusData.getStatusSell());
performanceParam.setRoadShowId(relationsData.getRoadShowId()); performancePartnerVo.setRoadShowId(relationsData.getRoadShowId());
performanceParam.setProjectId(relationsData.getProjectId()); performancePartnerVo.setProjectId(relationsData.getProjectId());
mongoTemplate.insert( mongoTemplate.insert(
performanceParam, PerformanceParam.class.getSimpleName() performancePartnerVo, PerformancePartnerVo.class.getSimpleName()
); );
} }
return performanceId; return performanceId;
...@@ -202,42 +201,16 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -202,42 +201,16 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
@Override @Override
public PerformancePartnerVo getStep1(String performancesId) { public PerformancePartnerVo getStep1(String performancesId) {
PerformancePartnerVo performancePartnerVo = new PerformancePartnerVo(); PerformancePartnerVo data = mongoTemplate.findOne(
// PerformanceParam updateData = getUpdateStep1(performancesId); Query.query(Criteria.where("performancesId").is(performancesId)), PerformancePartnerVo.class, PerformancePartnerVo.class.getSimpleName()
PerformanceParam data = mongoTemplate.findOne(
Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceParam.class, PerformanceParam.class.getSimpleName()
); );
if (data == null) { if (data == null) {
return performancePartnerVo; return null;
} }
BeanUtils.copyProperties(data, performancePartnerVo);
log.info(" PERFORMANCE 演出第一步 获取"); log.info(" PERFORMANCE 演出第一步 获取");
return performancePartnerVo; return data;
} }
// @Override
// public PerformanceParam getCreateStep1(String performancesId) {
// PerformanceParam data = mongoTemplate.findOne(
// Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceParam.class, PerformanceParam.class.getSimpleName()
// );
// if (data == null) {
// return new PerformanceParam();
// }
// return data;
// }
//
// @Override
// public PerformanceParam getUpdateStep1(String performancesId) {
//
// PerformanceParam data = mongoTemplate.findOne(
// Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceParam.class, PerformanceParam.class.getSimpleName()
// );
// if (data == null) {
// return new PerformanceParam();
// }
// return data;
// }
@Override @Override
public boolean step2(PerformanceStep2Param step2Param) { public boolean step2(PerformanceStep2Param step2Param) {
boolean result = false; boolean result = false;
...@@ -265,8 +238,8 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -265,8 +238,8 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
LocalDateTime createdAt = LocalDateTime.now(); LocalDateTime createdAt = LocalDateTime.now();
boolean isExistsSubmit = mongoTemplate.exists(Query.query(Criteria.where("performancesId").is(performanceId).and("status").is(1)), boolean isExistsSubmit = mongoTemplate.exists(Query.query(Criteria.where("performancesId").is(performanceId).and("status").is(1)),
PerformanceParam.class, PerformancePartnerVo.class,
PerformanceParam.class.getSimpleName()); PerformancePartnerVo.class.getSimpleName());
if (isExistsSubmit) { if (isExistsSubmit) {
return false; return false;
...@@ -284,7 +257,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -284,7 +257,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
if (step2Param.getIsSubmit() == 1) { // 提交 if (step2Param.getIsSubmit() == 1) { // 提交
map.put("status", 1); map.put("status", 1);
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map)); BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map));
mongoTemplate.getCollection(PerformanceParam.class.getSimpleName()).updateOne( mongoTemplate.getCollection(PerformancePartnerVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("performancesId").is(performanceId)).getQueryObject(), Query.query(Criteria.where("performancesId").is(performanceId)).getQueryObject(),
object object
); );
...@@ -315,7 +288,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -315,7 +288,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
map.put("status", 0); map.put("status", 0);
map.put("isCreateSave", 1); map.put("isCreateSave", 1);
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map)); BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map));
mongoTemplate.getCollection(PerformanceParam.class.getSimpleName()).updateMany( mongoTemplate.getCollection(PerformancePartnerVo.class.getSimpleName()).updateMany(
Query.query(Criteria.where("performancesId").is(performanceId)).getQueryObject(), Query.query(Criteria.where("performancesId").is(performanceId)).getQueryObject(),
object object
); );
...@@ -332,8 +305,8 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -332,8 +305,8 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
LocalDateTime createdAt = LocalDateTime.now(); LocalDateTime createdAt = LocalDateTime.now();
boolean isExistsSubmit = mongoTemplate.exists(Query.query(Criteria.where("performancesId").is(performanceId).and("status").is(1)), boolean isExistsSubmit = mongoTemplate.exists(Query.query(Criteria.where("performancesId").is(performanceId).and("status").is(1)),
PerformanceParam.class, PerformancePartnerVo.class,
PerformanceParam.class.getSimpleName()); PerformancePartnerVo.class.getSimpleName());
if (isExistsSubmit) { if (isExistsSubmit) {
return false; return false;
...@@ -351,7 +324,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -351,7 +324,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
if (step2Param.getIsSubmit() == 1) { // 提交 if (step2Param.getIsSubmit() == 1) { // 提交
map.put("status", 1); map.put("status", 1);
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map)); BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map));
mongoTemplate.getCollection(PerformanceParam.class.getSimpleName()).updateOne( mongoTemplate.getCollection(PerformancePartnerVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("performancesId").is(performanceId)).getQueryObject(), Query.query(Criteria.where("performancesId").is(performanceId)).getQueryObject(),
object object
); );
...@@ -375,6 +348,9 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -375,6 +348,9 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
KylinPerformances performances = new KylinPerformances(); KylinPerformances performances = new KylinPerformances();
performances.setAuditTime(LocalDateTime.now()); performances.setAuditTime(LocalDateTime.now());
performancesMapper.update(performances, new UpdateWrapper<KylinPerformances>().eq("performances_id", performanceId)); performancesMapper.update(performances, new UpdateWrapper<KylinPerformances>().eq("performances_id", performanceId));
KylinPerformanceStatus performanceStatus = new KylinPerformanceStatus();
performanceStatus.setAuditStatus(0);
performanceStatusMapper.update(performanceStatus, new UpdateWrapper<KylinPerformanceStatus>().eq("performance_id", performanceId));
//提示:票种价格、售票时间、购票限制 直接生效 //提示:票种价格、售票时间、购票限制 直接生效
List<TicketTimesTicketCreatePartnerVo> timeList = performanceMisVo.getTicketTimes(); List<TicketTimesTicketCreatePartnerVo> timeList = performanceMisVo.getTicketTimes();
...@@ -412,7 +388,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -412,7 +388,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
} else { //保存 } else { //保存
map.put("status", 0); map.put("status", 0);
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map)); BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map));
mongoTemplate.getCollection(PerformanceParam.class.getSimpleName()).updateMany( mongoTemplate.getCollection(PerformancePartnerVo.class.getSimpleName()).updateMany(
Query.query(Criteria.where("performancesId").is(performanceId)).getQueryObject(), Query.query(Criteria.where("performancesId").is(performanceId)).getQueryObject(),
object object
); );
...@@ -424,8 +400,8 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -424,8 +400,8 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
@Override @Override
public PerformanceStep2Param getStep2(String performancesId) { public PerformanceStep2Param getStep2(String performancesId) {
PerformanceStep2Param performanceCreatePartnerVo = null; PerformanceStep2Param performanceCreatePartnerVo = null;
PerformanceParam data = mongoTemplate.findOne( PerformancePartnerVo data = mongoTemplate.findOne(
Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceParam.class, PerformanceParam.class.getSimpleName() Query.query(Criteria.where("performancesId").is(performancesId)), PerformancePartnerVo.class, PerformancePartnerVo.class.getSimpleName()
); );
if (data == null) { if (data == null) {
return new PerformanceStep2Param(); return new PerformanceStep2Param();
...@@ -449,62 +425,6 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -449,62 +425,6 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
return performanceCreatePartnerVo; return performanceCreatePartnerVo;
} }
// @Override
// public PerformanceStep2Param getCreateStep2(String performancesId) {
// PerformanceParam data = mongoTemplate.findOne(
// Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceParam.class, PerformanceParam.class.getSimpleName()
// );
//
// if (data == null) {
// return new PerformanceStep2Param();
// }
//
// List<TicketTimesPartnerVo> ticketTimesPartnerVos = ticketTimesPartnerService.getTimesMongoList(performancesId);
// List<TicketTimesTicketCreatePartnerVo> ticketTimesTicketCreatePartnerVoList = new ArrayList();
//
// for (TicketTimesPartnerVo ticketTimes : ticketTimesPartnerVos) {
// TicketTimesTicketCreatePartnerVo ticketTimesTicketCreatePartnerVo = new TicketTimesTicketCreatePartnerVo();
// BeanUtils.copyProperties(ticketTimes, ticketTimesTicketCreatePartnerVo);
// List<TicketPartnerVo> ticketPartnerVos = ticketsPartnerService.getTicketMongoList(ticketTimes.getTicketTimesId());
// ticketTimesTicketCreatePartnerVo.setTicket(ticketPartnerVos);
// ticketTimesTicketCreatePartnerVoList.add(ticketTimesTicketCreatePartnerVo);
// }
//
// PerformanceStep2Param performanceStep2Param = new PerformanceStep2Param();
// BeanUtils.copyProperties(data, performanceStep2Param);
// performanceStep2Param.setTicketTimes(ticketTimesTicketCreatePartnerVoList);
//
// return performanceStep2Param;
// }
//
// @Override
// public PerformanceStep2Param getUpdateStep2(String performancesId) {
// PerformanceParam data = mongoTemplate.findOne(
// Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceParam.class, PerformanceParam.class.getSimpleName()
// );
//
// if (data == null) {
// return new PerformanceStep2Param();
// }
//
// List<TicketTimesPartnerVo> ticketTimesPartnerVos = ticketTimesPartnerService.getTimesMongoList(performancesId);
// List<TicketTimesTicketCreatePartnerVo> ticketTimesTicketCreatePartnerVoList = new ArrayList<TicketTimesTicketCreatePartnerVo>();
//
// for (TicketTimesPartnerVo ticketTimes : ticketTimesPartnerVos) {
// TicketTimesTicketCreatePartnerVo ticketTimesTicketCreatePartnerVo = new TicketTimesTicketCreatePartnerVo();
// BeanUtils.copyProperties(ticketTimes, ticketTimesTicketCreatePartnerVo);
// List<TicketPartnerVo> ticketPartnerVos = ticketsPartnerService.getTicketMongoList(ticketTimes.getTicketTimesId());
// ticketTimesTicketCreatePartnerVo.setTicket(ticketPartnerVos);
// ticketTimesTicketCreatePartnerVoList.add(ticketTimesTicketCreatePartnerVo);
// }
//
// PerformanceStep2Param performanceStep2Param = new PerformanceStep2Param();
// BeanUtils.copyProperties(data, performanceStep2Param);
// performanceStep2Param.setTicketTimes(ticketTimesTicketCreatePartnerVoList);
//
// return performanceStep2Param;
// }
@Override @Override
public boolean onLinePerformance(String performancesId) { public boolean onLinePerformance(String performancesId) {
try { try {
...@@ -528,14 +448,14 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -528,14 +448,14 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
performanceVoData.setPerformanceRelations(performanceRelationsData); performanceVoData.setPerformanceRelations(performanceRelationsData);
performanceVoData.setPerformanceStatus(performanceStatusData); performanceVoData.setPerformanceStatus(performanceStatusData);
String cityName=(String) redisUtil.hget(KylinRedisConst.FIELDS+":"+performanceVoData.getFieldId(),"city_name"); String cityName = (String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performanceVoData.getFieldId(), "city_name");
KylinFields fields = new KylinFields(); KylinFields fields = new KylinFields();
fields.setCityId(null); fields.setCityId(null);
fields.setLatitude((String) redisUtil.hget(KylinRedisConst.FIELDS+":"+performanceVoData.getFieldId(),"latitude")); fields.setLatitude((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performanceVoData.getFieldId(), "latitude"));
fields.setLongitude((String) redisUtil.hget(KylinRedisConst.FIELDS+":"+performanceVoData.getFieldId(),"longitude")); fields.setLongitude((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performanceVoData.getFieldId(), "longitude"));
fields.setCityName((String) redisUtil.hget(KylinRedisConst.FIELDS+":"+performanceVoData.getFieldId(),"city_name")); fields.setCityName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performanceVoData.getFieldId(), "city_name"));
fields.setName((String) redisUtil.hget(KylinRedisConst.FIELDS+":"+performanceVoData.getFieldId(),"name")); fields.setName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performanceVoData.getFieldId(), "name"));
performanceVoData.setFieldsData(fields,cityName); performanceVoData.setFieldsData(fields, cityName);
//场次 //场次
List<KylinTicketTimeRelation> ticketTimeRelation = ticketTimeRelationMapper.selectList( List<KylinTicketTimeRelation> ticketTimeRelation = ticketTimeRelationMapper.selectList(
...@@ -651,14 +571,6 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -651,14 +571,6 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
performanceVoData, PerformanceVo.class.getSimpleName() performanceVoData, PerformanceVo.class.getSimpleName()
); );
} }
// //修改 提审vo
// Map<String, Object> map = new HashMap<>();
// map.put("status", 3);
// BasicDBObject objectPerformance = new BasicDBObject("$set", mongoConverter.convertToMongoType(map));
// mongoTemplate.getCollection(PerformanceMisVo.class.getSimpleName()).updateOne(
// Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(),
// objectPerformance
// );
//判断状态 //判断状态
performanceVoTask.performanceVoStatus(performancesId); performanceVoTask.performanceVoStatus(performancesId);
return true; return true;
...@@ -764,12 +676,12 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -764,12 +676,12 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
} }
Query query = Query.query(criteria); Query query = Query.query(criteria);
// 查询总数 // 查询总数
long count = mongoTemplate.count(query, PerformanceParam.class, PerformanceParam.class.getSimpleName()); long count = mongoTemplate.count(query, PerformancePartnerVo.class, PerformancePartnerVo.class.getSimpleName());
List<PerformanceParam> performanceParam = mongoTemplate.find(query, PerformanceParam.class, PerformanceParam.class.getSimpleName()); List<PerformancePartnerVo> performancePartnerVo = mongoTemplate.find(query, PerformancePartnerVo.class, PerformancePartnerVo.class.getSimpleName());
query.with(pageable); query.with(pageable);
//处理Vo //处理Vo
List<PerformancePartnerListVo> voList = new ArrayList<>(); List<PerformancePartnerListVo> voList = new ArrayList<>();
for (PerformanceParam item : performanceParam) { for (PerformancePartnerVo item : performancePartnerVo) {
PerformancePartnerListVo voData = new PerformancePartnerListVo(); PerformancePartnerListVo voData = new PerformancePartnerListVo();
voData.setStatus0Data(item); voData.setStatus0Data(item);
voList.add(voData); voList.add(voData);
...@@ -788,4 +700,33 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -788,4 +700,33 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
} }
return pageInfoTmp; return pageInfoTmp;
} }
@Override
public boolean withdraw(String performancesId) {
//mysql auditStatus
KylinPerformanceStatus performanceStatus = performanceStatusMapper.selectOne(new UpdateWrapper<KylinPerformanceStatus>().eq("performance_id", performancesId));
if (performanceStatus != null && performanceStatus.getAuditStatus() == 0) {
KylinPerformanceStatus data1 = new KylinPerformanceStatus();
HashMap<String, Object> map = new HashMap<>();
if (performanceStatus.getStatus() >= 3) {//通过审核
data1.setAuditStatus(1);
map.put("auditStatus", 1);
} else if (performanceStatus.getStatus() == 4) {//未通过审核
data1.setAuditStatus(-1);
map.put("auditStatus", -1);
} else {
data1.setAuditStatus(2);
map.put("auditStatus", 2);
}
performanceStatusMapper.update(data1, new UpdateWrapper<KylinPerformanceStatus>().eq("performance_id", performancesId));
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map));
mongoTemplate.getCollection(PerformancePartnerVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(),
object
);
return true;
} else {
return false;
}
}
} }
...@@ -6,7 +6,7 @@ import com.liquidnet.commons.lang.util.DateUtil; ...@@ -6,7 +6,7 @@ import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.IDGenerator; import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.kylin.constant.KylinRedisConst; import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.kylin.dto.param.PerformanceParam; import com.liquidnet.service.kylin.dto.param.PerformancePartnerVo;
import com.liquidnet.service.kylin.dto.vo.PerformanceVo; import com.liquidnet.service.kylin.dto.vo.PerformanceVo;
import com.liquidnet.service.kylin.dto.vo.TicketTimesVo; import com.liquidnet.service.kylin.dto.vo.TicketTimesVo;
import com.liquidnet.service.kylin.dto.vo.TicketVo; import com.liquidnet.service.kylin.dto.vo.TicketVo;
...@@ -224,7 +224,7 @@ public class PerformanceVoTask { ...@@ -224,7 +224,7 @@ public class PerformanceVoTask {
* @return * @return
*/ */
public PerformanceMisVo getPerformanceMisVo(String performancesId) { public PerformanceMisVo getPerformanceMisVo(String performancesId) {
PerformanceParam performanceData = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceParam.class, PerformanceParam.class.getSimpleName()); PerformancePartnerVo performanceData = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performancesId)), PerformancePartnerVo.class, PerformancePartnerVo.class.getSimpleName());
List<TicketTimesPartnerVo> ticketTimesPartnerVos = ticketTimesPartnerService.getTimesMongoList(performancesId); List<TicketTimesPartnerVo> ticketTimesPartnerVos = ticketTimesPartnerService.getTimesMongoList(performancesId);
List<TicketTimesTicketCreatePartnerVo> ticketTimesTicketCreatePartnerVoList = new ArrayList<TicketTimesTicketCreatePartnerVo>(); List<TicketTimesTicketCreatePartnerVo> ticketTimesTicketCreatePartnerVoList = new ArrayList<TicketTimesTicketCreatePartnerVo>();
...@@ -273,67 +273,6 @@ public class PerformanceVoTask { ...@@ -273,67 +273,6 @@ public class PerformanceVoTask {
return performanceMisVo; return performanceMisVo;
} }
// /**
// * 生成 PerformanceUpdatePartnerVo(用于修改审核提交数据)
// *
// * @param performancesId
// * @return
// */
// public PerformanceMisVo setPerformanceUpdateParam(String performancesId) {
// PerformanceParam performanceData = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceParam.class, PerformanceParam.class.getSimpleName());
// List<TicketTimesPartnerVo> ticketTimesPartnerVos = ticketTimesPartnerService.getTimesMongoList(performancesId);
// List<TicketTimesTicketCreatePartnerVo> ticketTimesTicketCreatePartnerVoList = new ArrayList<TicketTimesTicketCreatePartnerVo>();
//
// ArrayList<BigDecimal> floatList = new ArrayList<>();
// ArrayList<String> StringList = new ArrayList<>();
//
// for (TicketTimesPartnerVo ticketTimes : ticketTimesPartnerVos) {
// TicketTimesTicketCreatePartnerVo ticketTimesTicketCreatePartnerVo = new TicketTimesTicketCreatePartnerVo();
// BeanUtils.copyProperties(ticketTimes, ticketTimesTicketCreatePartnerVo);
// List<TicketPartnerVo> ticketPartnerVos = ticketsPartnerService.getTicketMongoList(ticketTimes.getTicketTimesId());
// ticketTimesTicketCreatePartnerVo.setTicket(ticketPartnerVos);
// ticketTimesTicketCreatePartnerVoList.add(ticketTimesTicketCreatePartnerVo);
// for (TicketPartnerVo ticketPartnerVoItem : ticketPartnerVos) {
// floatList.add(ticketPartnerVoItem.getPrice());
// StringList.add(ticketPartnerVoItem.getTimeEnd());
// }
// }
// PerformanceMisVo performanceMisVo = new PerformanceMisVo();
// BeanUtils.copyProperties(performanceData, performanceMisVo);
//
// floatList.sort(Comparator.reverseOrder());
// StringList.sort(Comparator.naturalOrder());
//
// performanceMisVo.setPrice(floatList.get(0) + "起");
// performanceMisVo.setStopSellTime(StringList.get(0));
// performanceMisVo.setTicketTimes(ticketTimesTicketCreatePartnerVoList);
// performanceMisVo.setStatus(1);
// performanceMisVo.setRejectTxt("");
// performanceMisVo.setAuditStatus(0);
// KylinPerformanceStatus performanceStatus = performanceStatusMapper.selectOne(new UpdateWrapper<KylinPerformanceStatus>().eq("performance_id", performancesId));
// performanceMisVo.setStatusSell(performanceStatus.getStatusSell());
// performanceMisVo.setIsShow(performanceStatus.getIsShow());
// performanceMisVo.setIsDistribution(performanceStatus.getIsDistribution());
// performanceMisVo.setSyncAgent(performanceStatus.getSyncAgent());
//
//
//// boolean exists = mongoTemplate.exists(Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceMisVo.class, PerformanceMisVo.class.getSimpleName());
////
//// if (!exists) {
//// mongoTemplate.insert(
//// performanceMisVo, PerformanceMisVo.class.getSimpleName()
//// );
//// } else {
//// BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(performanceMisVo));
//// mongoTemplate.getCollection(PerformanceMisVo.class.getSimpleName()).updateOne(
//// Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(),
//// object
//// );
//// }
//
// return performanceMisVo;
// }
/** /**
* 插入数据库 * 插入数据库
* *
...@@ -432,7 +371,7 @@ public class PerformanceVoTask { ...@@ -432,7 +371,7 @@ public class PerformanceVoTask {
ticketStatus.setTicketStatusId(IDGenerator.nextSnowId().toString()); ticketStatus.setTicketStatusId(IDGenerator.nextSnowId().toString());
ticketStatus.setTicketId(tickets.getTicketsId()); ticketStatus.setTicketId(tickets.getTicketsId());
ticketStatus.setCounts(1); // ticketStatus.setCounts(1);
ticketStatus.setIsMember(1); ticketStatus.setIsMember(1);
ticketStatus.setIsExclusive(0); ticketStatus.setIsExclusive(0);
ticketStatus.setIsTrueName(performanceStatus.getIsTrueName()); ticketStatus.setIsTrueName(performanceStatus.getIsTrueName());
...@@ -468,7 +407,7 @@ public class PerformanceVoTask { ...@@ -468,7 +407,7 @@ public class PerformanceVoTask {
* @param performanceUpdateMisVo * @param performanceUpdateMisVo
* @param updatedAt * @param updatedAt
*/ */
public void updatePerformanceMySql(String performancesId, HashMap<String, Object> map, PerformanceMisVo performanceUpdateMisVo, LocalDateTime updatedAt) { public void updatePerformanceMySql(String performancesId, HashMap<String, Object> map, PerformanceMisVo performanceUpdateMisVo, LocalDateTime updatedAt,Integer auditStatus) {
try { try {
//创建演出 //创建演出
KylinPerformances performances = new KylinPerformances(); KylinPerformances performances = new KylinPerformances();
...@@ -486,7 +425,7 @@ public class PerformanceVoTask { ...@@ -486,7 +425,7 @@ public class PerformanceVoTask {
performanceStatus.setPerformanceId(performances.getPerformancesId()); performanceStatus.setPerformanceId(performances.getPerformancesId());
performanceStatus.setPerformanceStatusId(IDGenerator.nextSnowId().toString()); performanceStatus.setPerformanceStatusId(IDGenerator.nextSnowId().toString());
performanceStatus.setCreatedAt(null); performanceStatus.setCreatedAt(null);
performanceStatus.setAuditStatus(0); performanceStatus.setAuditStatus(auditStatus);
performanceStatus.setUpdatedAt(updatedAt); performanceStatus.setUpdatedAt(updatedAt);
performanceRelations.setPerformanceId(performances.getPerformancesId()); performanceRelations.setPerformanceId(performances.getPerformancesId());
...@@ -563,7 +502,7 @@ public class PerformanceVoTask { ...@@ -563,7 +502,7 @@ public class PerformanceVoTask {
ticketStatus.setTicketStatusId(IDGenerator.nextSnowId().toString()); ticketStatus.setTicketStatusId(IDGenerator.nextSnowId().toString());
ticketStatus.setTicketId(tickets.getTicketsId()); ticketStatus.setTicketId(tickets.getTicketsId());
ticketStatus.setCounts(1); ticketStatus.setCounts(null);
ticketStatus.setIsMember(null); ticketStatus.setIsMember(null);
ticketStatus.setStatusExchange(7); ticketStatus.setStatusExchange(7);
ticketStatus.setQrCodeShowTime(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(ticketItem.getQrCodeShowTime()))); ticketStatus.setQrCodeShowTime(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(ticketItem.getQrCodeShowTime())));
......
...@@ -15,7 +15,7 @@ public class DataUtils { ...@@ -15,7 +15,7 @@ public class DataUtils {
@Autowired @Autowired
private KylinBuyNoticeMapper buyNoticeMapper; private KylinBuyNoticeMapper buyNoticeMapper;
public String getBuyNoticeJsonString(List<Integer> buyNoticeIds){ public String getBuyNoticeJsonString(List<String> buyNoticeIds){
List<KylinBuyNotice> data = buyNoticeMapper.selectList(new UpdateWrapper<KylinBuyNotice>().in("buy_notice_id",buyNoticeIds)); List<KylinBuyNotice> data = buyNoticeMapper.selectList(new UpdateWrapper<KylinBuyNotice>().in("buy_notice_id",buyNoticeIds));
return JsonUtils.toJson(data); return JsonUtils.toJson(data);
} }
......
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