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

Commit 3d56b67a authored by 胡佳晨's avatar 胡佳晨

暂时commit 没修改完成

parent 37b455af
...@@ -26,6 +26,8 @@ public class KylinRedisConst { ...@@ -26,6 +26,8 @@ public class KylinRedisConst {
public static final String ORDER_REFUND_BY_ORDER_ID = "kylin:order:refund:orderId:"; public static final String ORDER_REFUND_BY_ORDER_ID = "kylin:order:refund:orderId:";
public static final String ORDER_REFUND = "kylin:order:refund:orderRefundsId:"; public static final String ORDER_REFUND = "kylin:order:refund:orderRefundsId:";
public static final String BUY_NOTICE = "kylin:buyNotice";//购票须知
public static final String ORDER_TRANSFER = "kylin:order:transfer:uid:"; public static final String ORDER_TRANSFER = "kylin:order:transfer:uid:";
//订单导入失败key //订单导入失败key
public static final String ORDER_IMPORT_FAIL = "kylin:order:import:fail:"; public static final String ORDER_IMPORT_FAIL = "kylin:order:import:fail:";
......
...@@ -89,9 +89,13 @@ public class KylinTicketVo { ...@@ -89,9 +89,13 @@ public class KylinTicketVo {
private String qrCodeShowTime; private String qrCodeShowTime;
@ApiModelProperty(value = "会员提前分钟") @ApiModelProperty(value = "会员提前分钟")
private Integer advanceMinuteMember; private Integer advanceMinuteMember;
@ApiModelProperty(value = "总库存")
private Integer totalGeneral;
@ApiModelProperty(value = "总兑换库存")
private Integer totalExchange;
public void setTicket(KylinTickets ticket) { public void setTicket(KylinTickets ticket) {
this.mid=ticket.getMid(); this.mid = ticket.getMid();
this.ticketsId = ticket.getTicketsId(); this.ticketsId = ticket.getTicketsId();
this.title = ticket.getTitle(); this.title = ticket.getTitle();
this.type = ticket.getType(); this.type = ticket.getType();
...@@ -134,7 +138,8 @@ public class KylinTicketVo { ...@@ -134,7 +138,8 @@ public class KylinTicketVo {
this.sysDamai = ticketStatus.getSyncDamai(); this.sysDamai = ticketStatus.getSyncDamai();
this.isShowCode = ticketStatus.getIsShowCode(); this.isShowCode = ticketStatus.getIsShowCode();
this.qrCodeShowTime = DateUtil.Formatter.yyyyMMddHHmmss.format(ticketStatus.getQrCodeShowTime()); this.qrCodeShowTime = DateUtil.Formatter.yyyyMMddHHmmss.format(ticketStatus.getQrCodeShowTime());
this.totalGeneral = ticketStatus.getTotalGeneral();
this.totalExchange = ticketStatus.getTotalExchange();
} }
} }
...@@ -120,6 +120,8 @@ public class KylinPerformanceVo { ...@@ -120,6 +120,8 @@ public class KylinPerformanceVo {
private Integer isRefundVoucher; private Integer isRefundVoucher;
private Integer isRefundExpress; private Integer isRefundExpress;
private Integer auditStatus;
public void setPerformance(KylinPerformances performance) { public void setPerformance(KylinPerformances performance) {
this.mid = performance.getMid(); this.mid = performance.getMid();
this.performancesId = performance.getPerformancesId(); this.performancesId = performance.getPerformancesId();
...@@ -175,6 +177,7 @@ public class KylinPerformanceVo { ...@@ -175,6 +177,7 @@ public class KylinPerformanceVo {
this.isRefundPoundage = performanceStatus.getIsRefundPoundage(); this.isRefundPoundage = performanceStatus.getIsRefundPoundage();
this.isRefundVoucher = performanceStatus.getIsRefundVoucher(); this.isRefundVoucher = performanceStatus.getIsRefundVoucher();
this.isRefundExpress = performanceStatus.getIsRefundExpress(); this.isRefundExpress = performanceStatus.getIsRefundExpress();
this.auditStatus = 0;
} }
public void setPerformanceRelations(KylinPerformanceRelations performanceRelations) { public void setPerformanceRelations(KylinPerformanceRelations performanceRelations) {
......
...@@ -45,7 +45,7 @@ public interface IKylinTicketTimesPartnerService { ...@@ -45,7 +45,7 @@ public interface IKylinTicketTimesPartnerService {
* @param ticketTimesId 场次id * @param ticketTimesId 场次id
* @return boolean * @return boolean
*/ */
ResponseDto<String> deleteTimes(String ticketTimesId); ResponseDto<String> deleteTimes(String ticketTimesId,String performanceId);
/** /**
* 修改场次信息 * 修改场次信息
......
...@@ -51,7 +51,7 @@ public interface IKylinTicketsPartnerService { ...@@ -51,7 +51,7 @@ public interface IKylinTicketsPartnerService {
* @param ticketsId 票id * @param ticketsId 票id
* @return boolean * @return boolean
*/ */
ResponseDto<String> deleteTicket(String ticketsId); ResponseDto<String> deleteTicket(String ticketsId,String performanceId);
/** /**
* 复制票 * 复制票
......
package com.liquidnet.service.merchant.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.service.kylin.dto.vo.middle.KylinBuyNoticeVo;
import com.liquidnet.service.kylin.entity.KylinBuyNotice;
import com.liquidnet.service.kylin.mapper.KylinBuyNoticeMapper;
import com.liquidnet.service.kylin.service.partner.IKylinBuyNoticePartnerService;
import com.liquidnet.service.merchant.util.RedisMerchantUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 购票须知表 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-05-18
*/
@Service
public class KylinBuyNoticePartnerServiceImpl extends ServiceImpl<KylinBuyNoticeMapper, KylinBuyNotice> implements IKylinBuyNoticePartnerService {
@Autowired
RedisMerchantUtils merchantUtils;
@Override
public PageInfo<KylinBuyNoticeVo> getBuyNotice() {
List<KylinBuyNoticeVo> buyNoticeList = merchantUtils.getBuyNotice();
PageInfo<KylinBuyNoticeVo> pageInfoTmp = new PageInfo(buyNoticeList);
return pageInfoTmp;
}
}
package com.liquidnet.service.merchant.util; package com.liquidnet.service.merchant.util;
import com.fasterxml.jackson.core.type.TypeReference;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.vo.middle.KylinBuyNoticeVo;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.MultiValueMap;
import java.util.List;
@Component @Component
public class InnerUtils { public class InnerUtils {
@Value("${liquidnet.service.platform.url}")
private String platform;
public List<KylinBuyNoticeVo> getBuyNotice() {
MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
header.add("Accept", "application/json;charset=UTF-8");
String resultData = HttpUtil.get(platform + "/platform/partner/buyNotice", null, header);
ResponseDto<List<KylinBuyNoticeVo>> innerReturnVo = JsonUtils.fromJson(resultData, new TypeReference<ResponseDto<List<KylinBuyNoticeVo>>>() {
});
return innerReturnVo.getData();
}
// public AdamUserInfoSimpleVo getUserInfo() throws Exception { public String getBuyNoticeJsonString(List<String> buyNoticeId) {
// MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString(); MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
// header.add("Accept", "application/json;charset=UTF-8"); header.add("Accept", "application/json;charset=UTF-8");
// header.add("Authorization", "Bearer " + CurrentUtil.getToken()); String resultData = HttpUtil.get(platform + "/platform/partner/buyNotice/string?buyNoticeId="+ StringUtils.join(buyNoticeId,","), null, header);
// String resultData = HttpUtil.post(adamUrl + "/adam/user/gif/mobile", null, header); ResponseDto<String> innerReturnVo = JsonUtils.fromJson(resultData, new TypeReference<ResponseDto<String>>() {
// ResponseDto<AdamUserInfoSimpleVo> innerReturnVo = JsonUtils.fromJson(resultData, new TypeReference<ResponseDto<AdamUserInfoSimpleVo>>() { });
// }); return innerReturnVo.getData();
// return innerReturnVo.getData(); }
// }
} }
...@@ -4,3 +4,8 @@ merchant_fields.update_is_check=UPDATE merchant_fields SET is_check = ?, updated ...@@ -4,3 +4,8 @@ merchant_fields.update_is_check=UPDATE merchant_fields SET is_check = ?, updated
# --------------------------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------------------------
merchant_field_applies.insert=INSERT INTO merchant_field_applies (field_apply_id, apply_status, apply_type, reject, uid, field_id, name, logo, background, description, built_date, province_id, province_name, city_id, city_name, district_id, district_name, address, longitude, latitude, contact_name, contact_email, company_name, license_code, license_img, legal_name, legal_identity, legal_identity_obverse, legal_identity_reverse, created_at) VALUE (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) merchant_field_applies.insert=INSERT INTO merchant_field_applies (field_apply_id, apply_status, apply_type, reject, uid, field_id, name, logo, background, description, built_date, province_id, province_name, city_id, city_name, district_id, district_name, address, longitude, latitude, contact_name, contact_email, company_name, license_code, license_img, legal_name, legal_identity, legal_identity_obverse, legal_identity_reverse, created_at) VALUE (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
# ---- 演出审核时间修改 ----
kylin_performances.auditTime=UPDATE kylin_performances SET audit_time = WHERE performances_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
# ---- 票种状态修改 ----
kylin_ticket_status.update_status=UPDATE kylin_ticket_status SET status = ?, updated_at = ? WHERE ticket_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
...@@ -5,14 +5,18 @@ import com.github.pagehelper.PageInfo; ...@@ -5,14 +5,18 @@ import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.vo.middle.KylinBuyNoticeVo; import com.liquidnet.service.kylin.dto.vo.middle.KylinBuyNoticeVo;
import com.liquidnet.service.kylin.service.partner.IKylinBuyNoticePartnerService; import com.liquidnet.service.kylin.service.partner.IKylinBuyNoticePartnerService;
import com.liquidnet.service.platform.utils.DataUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/** /**
* <p> * <p>
* 购票须知表 前端控制器 * 购票须知表 前端控制器
...@@ -21,24 +25,33 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -21,24 +25,33 @@ import org.springframework.web.bind.annotation.RestController;
* @author liquidnet * @author liquidnet
* @since 2021-05-18 * @since 2021-05-18
*/ */
@Api(tags = "第三方-购票须知",position = 1004) @Api(tags = "第三方-购票须知", position = 1004)
@RestController @RestController
@RequestMapping("partner/buyNotice") @RequestMapping("partner/buyNotice")
public class KylinBuyNoticeParnterController { public class KylinBuyNoticeParnterController {
@Autowired @Autowired
private IKylinBuyNoticePartnerService buyNoticePartnerService; private IKylinBuyNoticePartnerService buyNoticePartnerService;
@Autowired
private DataUtils dataUtils;
@GetMapping(value = "") @GetMapping(value = "")
@ApiOperation(value = "购票须知列表",position = 1) @ApiOperation(value = "购票须知列表", position = 1)
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<PageInfo<KylinBuyNoticeVo>> getBuyNotice() { public ResponseDto<List<KylinBuyNoticeVo>> getBuyNotice() {
PageInfo<KylinBuyNoticeVo> result = buyNoticePartnerService.getBuyNotice(); PageInfo<KylinBuyNoticeVo> result = buyNoticePartnerService.getBuyNotice();
if (null == result) { if (null == result) {
return ResponseDto.failure("查询失败"); return ResponseDto.failure("查询失败");
} else { } else {
return ResponseDto.success(result); return ResponseDto.success(result.getList());
}
} }
@GetMapping(value = "string")
@ApiOperation(value = "购票须知列表String", position = 1)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> getBuyNoticeJsonString(@RequestParam("buyNoticeId") String buyNoticeId) {
return ResponseDto.success(dataUtils.getBuyNoticeJsonString(buyNoticeId.split(",")));
} }
} }
...@@ -42,8 +42,9 @@ public class KylinTicketTimesPartnerController { ...@@ -42,8 +42,9 @@ public class KylinTicketTimesPartnerController {
@DeleteMapping(value = "") @DeleteMapping(value = "")
@ApiOperation(value = "删除场次",position = 2) @ApiOperation(value = "删除场次",position = 2)
@ApiResponse(response = KylinTicketTimesPartnerVo.class, code = 200, message = "接口返回对象参数") @ApiResponse(response = KylinTicketTimesPartnerVo.class, code = 200, message = "接口返回对象参数")
public ResponseDto<String> deleteTimes(@RequestParam("ticketTimesId") @NotNull(message = "场次ID不能为空") String ticketTimesId) { public ResponseDto<String> deleteTimes(@RequestParam("ticketTimesId") @NotNull(message = "场次ID不能为空") String ticketTimesId,
return ticketTimesPartnerService.deleteTimes(ticketTimesId); @RequestParam("performanceId") @NotNull(message = "演出ID不能为空") String performanceId) {
return ticketTimesPartnerService.deleteTimes(ticketTimesId,performanceId);
} }
@PutMapping(value = "") @PutMapping(value = "")
......
...@@ -49,8 +49,9 @@ public class KylinTicketsPartnerController { ...@@ -49,8 +49,9 @@ public class KylinTicketsPartnerController {
@DeleteMapping(value = "") @DeleteMapping(value = "")
@ApiOperation(value = "删除票务",position = 3) @ApiOperation(value = "删除票务",position = 3)
@ApiResponse( code = 200, message = "接口返回对象参数") @ApiResponse( code = 200, message = "接口返回对象参数")
public ResponseDto<String> deleteTicket(@RequestParam("ticketsId") @NotNull(message = "票务ID不能为空") String ticketsId) { public ResponseDto<String> deleteTicket(@RequestParam("ticketsId") @NotNull(message = "票务ID不能为空") String ticketsId,
return ticketsPartnerService.deleteTicket(ticketsId); @RequestParam("performanceId") @NotNull(message = "演出ID不能为空") String performanceId) {
return ticketsPartnerService.deleteTicket(ticketsId,performanceId);
} }
@PostMapping(value = "/copy") @PostMapping(value = "/copy")
......
...@@ -259,7 +259,7 @@ public class KylinTicketsPartnerServiceImpl extends ServiceImpl<KylinTicketsMapp ...@@ -259,7 +259,7 @@ public class KylinTicketsPartnerServiceImpl extends ServiceImpl<KylinTicketsMapp
} }
@Override @Override
public ResponseDto<String> deleteTicket(String ticketsId) { public ResponseDto<String> deleteTicket(String ticketsId,String performanceId) {
try { try {
LocalDateTime updatedAt = LocalDateTime.now(); LocalDateTime updatedAt = LocalDateTime.now();
......
...@@ -49,7 +49,7 @@ public class DataUtils { ...@@ -49,7 +49,7 @@ public class DataUtils {
* @param buyNoticeIds 购票须知 数组 * @param buyNoticeIds 购票须知 数组
* @return 购票须知 json串 * @return 购票须知 json串
*/ */
public String getBuyNoticeJsonString(List<String> buyNoticeIds) { public String getBuyNoticeJsonString(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