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

Commit 5819a36c authored by jiangxiulong's avatar jiangxiulong

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

parents e8884ac8 3f27ff8b
......@@ -7,226 +7,13 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-tickets-edit" th:object="${orderDetailsVo.orderTicketVo}">
<input name="mid" th:field="*{mid}" type="hidden">
<!-- <input name="mid" th:field="*{mid}" type="hidden">-->
<div class="form-group">
<label class="col-sm-3 control-label is-required">order_tickets_id:</label>
<div class="col-sm-8">
<input name="orderTicketsId" th:field="*{orderTicketsId}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">用户id:</label>
<div class="col-sm-8">
<input name="userId" th:field="*{userId}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">用户昵称:</label>
<div class="col-sm-8">
<input name="userName" th:field="*{userName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">用户手机号:</label>
<div class="col-sm-8">
<input name="userMobile" th:field="*{userMobile}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">演出名称:</label>
<div class="col-sm-8">
<input name="performanceTitle" th:field="*{performanceTitle}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单号:</label>
<div class="col-sm-8">
<input name="orderCode" th:field="*{orderCode}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">支付单号:</label>
<div class="col-sm-8">
<input name="payCode" th:field="*{payCode}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">二维码地址:</label>
<div class="col-sm-8">
<input name="qrCode" th:field="*{qrCode}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">下单方式:</label>
<div class="col-sm-8">
<select name="orderType" class="form-control m-b" required>
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">下单版本:</label>
<div class="col-sm-8">
<input name="orderVersion" th:field="*{orderVersion}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">数量:</label>
<div class="col-sm-8">
<input name="number" th:field="*{number}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">单价:</label>
<div class="col-sm-8">
<input name="price" th:field="*{price}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">会员单价:</label>
<div class="col-sm-8">
<input name="priceMember" th:field="*{priceMember}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">应付价格:</label>
<div class="col-sm-8">
<input name="priceTotal" th:field="*{priceTotal}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">优惠价格:</label>
<div class="col-sm-8">
<input name="priceVoucher" th:field="*{priceVoucher}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">实付价格:</label>
<div class="col-sm-8">
<input name="priceActual" th:field="*{priceActual}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">快递价格:</label>
<div class="col-sm-8">
<input name="priceExpress" th:field="*{priceExpress}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">退款价格:</label>
<div class="col-sm-8">
<input name="priceRefund" th:field="*{priceRefund}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">退款张数:</label>
<div class="col-sm-8">
<input name="refundNumber" th:field="*{refundNumber}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">选择支付方式:</label>
<div class="col-sm-8">
<select name="payType" class="form-control m-b" required>
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实际支付方式:</label>
<div class="col-sm-8">
<select name="paymentType" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付时间:</label>
<div class="col-sm-8">
<input name="timePay" th:field="*{timePay}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">收货人:</label>
<div class="col-sm-8">
<input name="expressContacts" th:field="*{expressContacts}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">收货地址:</label>
<div class="col-sm-8">
<input name="expressAddress" th:field="*{expressAddress}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">收货人联系方式:</label>
<div class="col-sm-8">
<input name="expressPhone" th:field="*{expressPhone}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">券使用类别:</label>
<div class="col-sm-8">
<select name="couponType" class="form-control m-b" required>
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">取票方式 电子票electronic快递票express:</label>
<div class="col-sm-8">
<select name="getTicketType" class="form-control m-b" required>
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">直播用取票观演码,隔开:</label>
<div class="col-sm-8">
<input name="getTicketDescribe" th:field="*{getTicketDescribe}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单过期时间(分钟):</label>
<div class="col-sm-8">
<input name="payCountdownMinute" th:field="*{payCountdownMinute}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">comment:</label>
<div class="col-sm-8">
<input name="comment" th:field="*{comment}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="createdAt" th:value="${#dates.format(kylinOrderTickets.createdAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">修改时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="updatedAt" th:value="${#dates.format(kylinOrderTickets.updatedAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">修改时间:</label>
<div class="col-sm-8">
<input name="orderSourece" th:field="*{orderSourece}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
......
......@@ -37,23 +37,23 @@
</li>
<li>
<label>支付方式:</label>
<select name="orderType">
<select name="paymentType" th:with="type=${@dict.getType('zhengzai_pay_type')}">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>订单状态:</label>
<select name="orderType">
<select name="orderStatus" th:with="type=${@dict.getType('zhengzai_order_status')}">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>客户端:</label>
<select name="orderType">
<select name="orderSource" th:with="type=${@dict.getType('zhengzai_order_source')}">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
......
......@@ -19,7 +19,6 @@ import java.util.Arrays;
@Slf4j
@EnableFeignClients
@MapperScan(basePackages = "com.liquidnet.service.adam.mapper")
//@SpringBootApplication(scanBasePackages = {"com.liquidnet"},exclude = {MongoAutoConfiguration.class,})
@SpringBootApplication(scanBasePackages = {"com.liquidnet"})
public class ServiceAdamApplication implements CommandLineRunner {
@Autowired
......@@ -48,8 +47,8 @@ public class ServiceAdamApplication implements CommandLineRunner {
}
}
@Bean
MongoTransactionManager transactionManager(MongoDbFactory factory){
return new MongoTransactionManager(factory);
}
// @Bean
// MongoTransactionManager transactionManager(MongoDbFactory factory){
// return new MongoTransactionManager(factory);
// }
}
......@@ -48,8 +48,8 @@ public class ServiceKylinApplication implements CommandLineRunner {
}
}
@Bean
MongoTransactionManager transactionManager(MongoDbFactory factory){
return new MongoTransactionManager(factory);
}
// @Bean
// MongoTransactionManager transactionManager(MongoDbFactory factory){
// return new MongoTransactionManager(factory);
// }
}
......@@ -33,7 +33,6 @@ import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
......@@ -119,13 +118,10 @@ public class KylinStationController {
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "pageSize", value = "页记录数", example = "5"),
})
@GetMapping("performances")
public ResponseDto<PageInfo<KylinStationPerformanceVo>> performances(@Pattern(regexp = "\\d{11}", message = "手机号格式有误")
public ResponseDto<PageInfo<KylinStationPerformanceVo>> performances(@Pattern(regexp = "\\b(recent|over)\\b", message = "模块参数无效")
@RequestParam String mod,
@Size(max = 30, message = "匹配字符过长")
@RequestParam(required = false) String match,
@Size(min = 1, max = 100, message = "页码无效")
@RequestParam(defaultValue = "1", required = false) int pageNo,
@Size(min = 5, max = 10, message = "页记录数无效")
@RequestParam(defaultValue = "5", required = false) int pageSize) {
List<KylinStationPerformanceVo> voList = new ArrayList<>();
String currentUid = CurrentUtil.getCurrentUid();
......@@ -199,51 +195,51 @@ public class KylinStationController {
// 演出的所有订单票明细
List<KylinOrderTicketEntitiesVo> performanceTicketEntitiesVoList = oteVoMap.get(r.getPerformancesId());
if (!CollectionUtils.isEmpty(performanceTicketEntitiesVoList)) continue;
// 订单票明细按票种分组
Map<String, List<KylinOrderTicketEntitiesVo>> performanceTicketEntitiesVoMap =
performanceTicketEntitiesVoList.stream().collect(Collectors.groupingBy(KylinOrderTicketEntitiesVo::getTicketId));
List<KylinStationTicketVo> ticketVoList = new ArrayList<>();
BigDecimal priceSum = BigDecimal.ZERO;
int number = 0, checkedNum = 0, remainderNum = 0;
for (Map.Entry<String, List<KylinOrderTicketEntitiesVo>> entry : performanceTicketEntitiesVoMap.entrySet()) {
KylinTicketVo ticketVo = performanceTicketMap.get(entry.getKey());
KylinStationTicketVo stationTicketVo = KylinStationTicketVo.getNew();
stationTicketVo.setTicketId(ticketVo.getTicketsId());
stationTicketVo.setTitle(ticketVo.getTitle());
stationTicketVo.setPrice(ticketVo.getPrice());
stationTicketVo.setUseStart(ticketVo.getUseStart());
stationTicketVo.setUseEnd(ticketVo.getUseEnd());
List<KylinOrderTicketEntitiesVo> subPerformanceTicketEntitiesVoList = entry.getValue();
// 订单票明细按出票状态分组
Map<Integer, List<KylinOrderTicketEntitiesVo>> subStatusPerformanceTicketEntitiesVoMap
= subPerformanceTicketEntitiesVoList.stream().collect(Collectors.groupingBy(KylinOrderTicketEntitiesVo::getStatus));
stationTicketVo.setNumber(subPerformanceTicketEntitiesVoList.size());
stationTicketVo.setPriceSum(stationTicketVo.getPrice().multiply(BigDecimal.valueOf(stationTicketVo.getNumber())));
List<KylinOrderTicketEntitiesVo> checkedEntitiesVoList = subStatusPerformanceTicketEntitiesVoMap.get(1);
stationTicketVo.setCheckedNum(CollectionUtils.isEmpty(checkedEntitiesVoList) ? 0 : checkedEntitiesVoList.size());
List<KylinOrderTicketEntitiesVo> remainderEntitiesVoList = subStatusPerformanceTicketEntitiesVoMap.get(0);
stationTicketVo.setRemainderNum(CollectionUtils.isEmpty(remainderEntitiesVoList) ? 0 : remainderEntitiesVoList.size());
number += stationTicketVo.getNumber();
checkedNum += stationTicketVo.getCheckedNum();
remainderNum += stationTicketVo.getRemainderNum();
priceSum = priceSum.add(stationTicketVo.getPriceSum());
ticketVoList.add(stationTicketVo);
if (!CollectionUtils.isEmpty(performanceTicketEntitiesVoList)) {
// 订单票明细按票种分组
Map<String, List<KylinOrderTicketEntitiesVo>> performanceTicketEntitiesVoMap =
performanceTicketEntitiesVoList.stream().collect(Collectors.groupingBy(KylinOrderTicketEntitiesVo::getTicketId));
List<KylinStationTicketVo> ticketVoList = new ArrayList<>();
BigDecimal priceSum = BigDecimal.ZERO;
int number = 0, checkedNum = 0, remainderNum = 0;
for (Map.Entry<String, List<KylinOrderTicketEntitiesVo>> entry : performanceTicketEntitiesVoMap.entrySet()) {
KylinTicketVo ticketVo = performanceTicketMap.get(entry.getKey());
KylinStationTicketVo stationTicketVo = KylinStationTicketVo.getNew();
stationTicketVo.setTicketId(ticketVo.getTicketsId());
stationTicketVo.setTitle(ticketVo.getTitle());
stationTicketVo.setPrice(ticketVo.getPrice());
stationTicketVo.setUseStart(ticketVo.getUseStart());
stationTicketVo.setUseEnd(ticketVo.getUseEnd());
List<KylinOrderTicketEntitiesVo> subPerformanceTicketEntitiesVoList = entry.getValue();
// 订单票明细按出票状态分组
Map<Integer, List<KylinOrderTicketEntitiesVo>> subStatusPerformanceTicketEntitiesVoMap
= subPerformanceTicketEntitiesVoList.stream().collect(Collectors.groupingBy(KylinOrderTicketEntitiesVo::getStatus));
stationTicketVo.setNumber(subPerformanceTicketEntitiesVoList.size());
stationTicketVo.setPriceSum(stationTicketVo.getPrice().multiply(BigDecimal.valueOf(stationTicketVo.getNumber())));
List<KylinOrderTicketEntitiesVo> checkedEntitiesVoList = subStatusPerformanceTicketEntitiesVoMap.get(1);
stationTicketVo.setCheckedNum(CollectionUtils.isEmpty(checkedEntitiesVoList) ? 0 : checkedEntitiesVoList.size());
List<KylinOrderTicketEntitiesVo> remainderEntitiesVoList = subStatusPerformanceTicketEntitiesVoMap.get(0);
stationTicketVo.setRemainderNum(CollectionUtils.isEmpty(remainderEntitiesVoList) ? 0 : remainderEntitiesVoList.size());
number += stationTicketVo.getNumber();
checkedNum += stationTicketVo.getCheckedNum();
remainderNum += stationTicketVo.getRemainderNum();
priceSum = priceSum.add(stationTicketVo.getPriceSum());
ticketVoList.add(stationTicketVo);
}
r.setPriceSum(priceSum);
r.setNumber(number);
r.setCheckedNum(checkedNum);
r.setRemainderNum(remainderNum);
r.setTicketVoList(ticketVoList);
r.setCanDownTime(performanceRelationMap.get(r.getPerformancesId()));
}
r.setPriceSum(priceSum);
r.setNumber(number);
r.setCheckedNum(checkedNum);
r.setRemainderNum(remainderNum);
r.setTicketVoList(ticketVoList);
r.setCanDownTime(performanceRelationMap.get(r.getPerformancesId()));
}
}
}
......
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