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

Commit 683ce408 authored by 胡佳晨's avatar 胡佳晨

提交巡演

parent 8abaad3e
...@@ -86,6 +86,12 @@ public class PerformanceCreateParam implements Serializable { ...@@ -86,6 +86,12 @@ public class PerformanceCreateParam implements Serializable {
@ApiModelProperty(value = "是否售卖", example = "0") @ApiModelProperty(value = "是否售卖", example = "0")
private int statusSell; 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 = "") @ApiModelProperty(value = "", example = "")
private String createdAt; private String createdAt;
} }
...@@ -42,7 +42,7 @@ public class PerformanceVo { ...@@ -42,7 +42,7 @@ public class PerformanceVo {
private String roadShowId; private String roadShowId;
//@ApiModelProperty(value = "巡演相关") //@ApiModelProperty(value = "巡演相关")
// private String roadShow; // private String roadShowId;
// OSS // OSS
// @ApiModelProperty(value = "演出详情") // @ApiModelProperty(value = "演出详情")
// private String details; // private String details;
...@@ -90,10 +90,10 @@ public class PerformanceVo { ...@@ -90,10 +90,10 @@ public class PerformanceVo {
//TODO 巡演 搭售 场地 //TODO 巡演 搭售 场地
public void setPerformanceRelations(KylinPerformanceRelations performanceRelations) { public void setPerformanceRelations(KylinPerformanceRelations performanceRelations) {
this.fieldId = ""; this.fieldId = performanceRelations.getFieldId();
this.fieldName = ""; this.fieldName = "";
this.cityId = ""; this.cityId = "";
this.projectId = ""; this.projectId = performanceRelations.getProjectId();
this.roadShowId = ""; this.roadShowId = performanceRelations.getRoadShowId();
} }
} }
...@@ -111,6 +111,12 @@ public class PerformanceCreatePartnerVo { ...@@ -111,6 +111,12 @@ public class PerformanceCreatePartnerVo {
@ApiModelProperty(value = "第三方id") @ApiModelProperty(value = "第三方id")
private String merchantId; private String merchantId;
@ApiModelProperty(value = "巡演id")
private String roadShowId;
@ApiModelProperty(value = "搭售id")
private String projectId;
//场次数据 //场次数据
@ApiModelProperty(value = "场次数据") @ApiModelProperty(value = "场次数据")
private List<TicketTimesTicketCreatePartnerVo> ticketTimes; private List<TicketTimesTicketCreatePartnerVo> ticketTimes;
......
...@@ -31,4 +31,6 @@ public interface IKylinPerformancesAdminService extends IService<KylinPerformanc ...@@ -31,4 +31,6 @@ public interface IKylinPerformancesAdminService extends IService<KylinPerformanc
List<PerformanceTitleDao> getListByRoadShowId(String roadShowId); List<PerformanceTitleDao> getListByRoadShowId(String roadShowId);
List<PerformanceTitleDao> getListByStatus(String status); List<PerformanceTitleDao> getListByStatus(String status);
boolean changeRoadShowId(String performancesId,String roadShowId);
} }
...@@ -35,7 +35,7 @@ public class KylinPerformances implements Serializable { ...@@ -35,7 +35,7 @@ public class KylinPerformances implements Serializable {
private String title; private String title;
/** /**
* 1音乐节 2演唱会 3小型演出 4展览 6舞台剧 * 1音乐节 2演唱会 3小型演出 4展览 6舞台剧 101音乐节 102小型演出(livehouse演出) 103巡演
*/ */
private Integer type; private Integer type;
......
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
AND ps.STATUS = #{status} AND ps.STATUS = #{status}
</if> </if>
<if test="status=='-2'"> <if test="status=='-2'">
AND ps.STATUS >= 3 AND ps.STATUS >= 3 or ps.STATUS = 1
</if> </if>
<if test="auditStatus!='-2'"> <if test="auditStatus!='-2'">
AND ps.audit_status = #{auditStatus} AND ps.audit_status = #{auditStatus}
......
...@@ -85,7 +85,7 @@ public class KylinPerformancesAdminController { ...@@ -85,7 +85,7 @@ public class KylinPerformancesAdminController {
} }
@GetMapping(value = "list/status") @GetMapping(value = "list/status")
@ApiOperation(value = "列表根据巡演id") @ApiOperation(value = "列表根据演出状态")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<List<PerformanceTitleDao>> getListByStatus(@RequestParam("status") String status) { public ResponseDto<List<PerformanceTitleDao>> getListByStatus(@RequestParam("status") String status) {
List<PerformanceTitleDao> result = performancesAdminService.getListByStatus(status); List<PerformanceTitleDao> result = performancesAdminService.getListByStatus(status);
...@@ -96,4 +96,15 @@ public class KylinPerformancesAdminController { ...@@ -96,4 +96,15 @@ public class KylinPerformancesAdminController {
} }
} }
@GetMapping(value = "roadShow/relation")
@ApiOperation(value = "修改演出巡演关联")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> getListByStatus(@RequestParam("performanceId") String performanceId, @RequestParam("roadShowId") String roadShowId) {
boolean result = performancesAdminService.changeRoadShowId(performanceId, roadShowId);
if (result) {
return ResponseDto.success("操作成功");
} else {
return ResponseDto.failure("操作失败");
}
}
} }
...@@ -9,11 +9,13 @@ import com.liquidnet.commons.lang.util.BeanUtil; ...@@ -9,11 +9,13 @@ import com.liquidnet.commons.lang.util.BeanUtil;
import com.liquidnet.commons.lang.util.DateUtil; 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.dao.PerformanceAdminListDao; import com.liquidnet.service.kylin.dao.PerformanceAdminListDao;
import com.liquidnet.service.kylin.dao.PerformancePartnerListDao; import com.liquidnet.service.kylin.dao.PerformancePartnerListDao;
import com.liquidnet.service.kylin.dao.PerformanceTitleDao; import com.liquidnet.service.kylin.dao.PerformanceTitleDao;
import com.liquidnet.service.kylin.dto.param.PerformanceAdminListParam; import com.liquidnet.service.kylin.dto.param.PerformanceAdminListParam;
import com.liquidnet.service.kylin.dto.param.PerformanceCreateParam; import com.liquidnet.service.kylin.dto.param.PerformanceCreateParam;
import com.liquidnet.service.kylin.dto.vo.PerformanceVo;
import com.liquidnet.service.kylin.dto.vo.partner.PerformanceCreatePartnerVo; import com.liquidnet.service.kylin.dto.vo.partner.PerformanceCreatePartnerVo;
import com.liquidnet.service.kylin.dto.vo.partner.TicketTimesTicketCreatePartnerVo; import com.liquidnet.service.kylin.dto.vo.partner.TicketTimesTicketCreatePartnerVo;
import com.liquidnet.service.kylin.dto.vo.partner.TicketTimesCreatePartnerVo; import com.liquidnet.service.kylin.dto.vo.partner.TicketTimesCreatePartnerVo;
...@@ -193,7 +195,7 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma ...@@ -193,7 +195,7 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
try { try {
List<PerformanceTitleDao> voList = performancesMapper.misTitleByRoadShowIdList(roadShowId); List<PerformanceTitleDao> voList = performancesMapper.misTitleByRoadShowIdList(roadShowId);
return voList; return voList;
}catch (Exception e){ } catch (Exception e) {
return new ArrayList<>(); return new ArrayList<>();
} }
} }
...@@ -203,4 +205,31 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma ...@@ -203,4 +205,31 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
List<PerformanceTitleDao> voList = performancesMapper.misTitleByStatusList(status); List<PerformanceTitleDao> voList = performancesMapper.misTitleByStatusList(status);
return voList; return voList;
} }
@Override
public boolean changeRoadShowId(String performancesId, String roadShowId) {
try {
//mysql
KylinPerformanceRelations performanceRelations = new KylinPerformanceRelations();
performanceRelations.setRoadShowId(roadShowId);
performanceRelationsMapper.update(performanceRelations, new UpdateWrapper<KylinPerformanceRelations>().eq("performance_id", performancesId));
//redis TODO 演出缓存
// if(redisUtil.hHasKey(KylinRedisConst.PERFORMANCES,performancesId)){
// redisUtil.hset()
// }
//mongodb
HashMap<String, Object> map = new HashMap<>();
map.put("roadShowId", roadShowId);
BasicDBObject object = new BasicDBObject("$set", map);
mongoTemplate.getCollection(PerformanceVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(),
object
);
return true;
} catch (Exception e) {
return false;
}
}
} }
...@@ -116,6 +116,8 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -116,6 +116,8 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
performanceCreateParam.setIsSubmit(0); performanceCreateParam.setIsSubmit(0);
performanceCreateParam.setStatus(0); performanceCreateParam.setStatus(0);
performanceCreateParam.setStatusSell(1); performanceCreateParam.setStatusSell(1);
performanceCreateParam.setRoadShowId("0");
performanceCreateParam.setProjectId("0");
mongoTemplate.insert( mongoTemplate.insert(
performanceCreateParam, PerformanceCreateParam.class.getSimpleName() performanceCreateParam, PerformanceCreateParam.class.getSimpleName()
); );
...@@ -179,7 +181,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -179,7 +181,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
performanceVoTask.createPerformanceMySql(performanceId, mapSql, performanceCreatePartnerVo, createdAt); performanceVoTask.createPerformanceMySql(performanceId, mapSql, performanceCreatePartnerVo, createdAt);
KylinPerformances performances = new KylinPerformances(); KylinPerformances performances = new KylinPerformances();
performances.setAuditTime(LocalDateTime.now()); performances.setAuditTime(LocalDateTime.now());
performancesMapper.insert(performances); performancesMapper.update(performances,new UpdateWrapper<KylinPerformances>().eq("performances_id",performanceId));
} }
} else { //保存 } else { //保存
map.put("status", 0); map.put("status", 0);
...@@ -277,7 +279,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -277,7 +279,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
//票 //票
List<KylinTicketRelations> ticketRelations = ticketRelationsMapper.selectList(new UpdateWrapper<KylinTicketRelations>().eq("times_id", ticketTimes.getTicketTimesId())); List<KylinTicketRelations> ticketRelations = ticketRelationsMapper.selectList(new UpdateWrapper<KylinTicketRelations>().eq("times_id", ticketTimes.getTicketTimesId()));
for (KylinTicketRelations ticketRelationsItem : ticketRelations) { for (KylinTicketRelations ticketRelationsItem : ticketRelations) {
KylinTicketStatus ticketStatus = ticketStatusMapper.selectOne(new UpdateWrapper<KylinTicketStatus>().eq("ticket_id", ticketRelationsItem.getTicketId()).between("status", 6, 10).ne("status", 7)); KylinTicketStatus ticketStatus = ticketStatusMapper.selectOne(new UpdateWrapper<KylinTicketStatus>().eq("ticket_id", ticketRelationsItem.getTicketId()).between("status", 1, 10).ne("status", 7));
KylinTickets tickets = ticketsMapper.selectOne( KylinTickets tickets = ticketsMapper.selectOne(
new UpdateWrapper<KylinTickets>().eq("tickets_id", ticketStatus.getTicketId() new UpdateWrapper<KylinTickets>().eq("tickets_id", ticketStatus.getTicketId()
) )
...@@ -306,7 +308,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -306,7 +308,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
ticketInventoryDto.setSurplusGeneral(ticketStatus.getTotalGeneral() - ticketInventoryRedis.getSurplusGeneral()); ticketInventoryDto.setSurplusGeneral(ticketStatus.getTotalGeneral() - ticketInventoryRedis.getSurplusGeneral());
ticketInventoryDto.setTicketsId(ticketVo.getTicketsId()); ticketInventoryDto.setTicketsId(ticketVo.getTicketsId());
} }
redisUtil.hset(KylinRedisConst.PERFORMANCES_INVENTORY, ticketVo.getTicketsId(), ticketInventoryDto); redisUtil.hset(KylinRedisConst.PERFORMANCES_INVENTORY+":performance:"+performancesId, ticketVo.getTicketsId(), ticketInventoryDto);
if (ticketVo.getIsMember() == 1) { if (ticketVo.getIsMember() == 1) {
isMember = 1; isMember = 1;
...@@ -332,6 +334,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -332,6 +334,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
); );
} }
performanceVoData.setTimePriceVipAndLack(isLackRegister, isMember, isExclusive, price, stopSellTime, sellTime); performanceVoData.setTimePriceVipAndLack(isLackRegister, isMember, isExclusive, price, stopSellTime, sellTime);
performanceVoData.setPerformanceRelations(performanceRelationsData);
mongoTemplate.insert( mongoTemplate.insert(
performanceVoData, PerformanceVo.class.getSimpleName() performanceVoData, PerformanceVo.class.getSimpleName()
); );
......
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