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

Commit d89bf177 authored by jiangxiulong's avatar jiangxiulong

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

parents f4a6ed88 37ed9522
...@@ -39,6 +39,8 @@ public class KylinStationCheckOrderVo implements Serializable { ...@@ -39,6 +39,8 @@ public class KylinStationCheckOrderVo implements Serializable {
private String checkType; private String checkType;
@ApiModelProperty(position = 23, value = "验票时间[yyyy-MM-dd HH:mm:ss]") @ApiModelProperty(position = 23, value = "验票时间[yyyy-MM-dd HH:mm:ss]")
private String checkedAt; private String checkedAt;
@ApiModelProperty(position = 24, value = "更新时间[yyyy-MM-dd HH:mm:ss]")
private String updatedAt;
private static final KylinStationCheckOrderVo obj = new KylinStationCheckOrderVo(); private static final KylinStationCheckOrderVo obj = new KylinStationCheckOrderVo();
......
package com.liquidnet.service.base; package com.liquidnet.service.base;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import org.apache.logging.log4j.util.PropertiesUtil;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import java.io.*; import java.io.IOException;
import java.net.URL; import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Serializable;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Map;
import java.util.Properties; import java.util.Properties;
public class SqlMapping { public class SqlMapping {
private static final String sqlMapDir = "sqlmap";
private static Map<String, String> sqlPropertiesMap = new HashMap<>();
static { static {
try { reload();
URL url = PropertiesUtil.class.getClassLoader().getResource(sqlMapDir);
System.out.println("sm.url:" + url);
if (null != url) {
System.out.println("sm.url:" + url.getPath() + ",file:" + url.getFile());
File file = new File(url.getFile());
if (file.exists() && file.isDirectory()) {
System.out.println("sm.url:" + file.getPath());
File[] files = file.listFiles();
for (File f : files) {
System.out.println("sm.url:" + f.getPath());
if (f.isFile() && f.getName().endsWith("properties")) {
Properties props = PropertiesLoaderUtils.loadAllProperties(sqlMapDir.concat("/") + f.getName());
for (Object key : props.keySet()) {
String keyStr = key.toString();
String value = props.getProperty(keyStr);
sqlPropertiesMap.put(keyStr, value);
}
}
}
} }
} private static Properties sqlsProperties;
System.out.printf("sqlPropertiesMap init count: %s\n", sqlPropertiesMap.size());
public static void reload() {
sqlsProperties = new Properties();
InputStream in = ErrorMapping.class.getClassLoader().getResourceAsStream("sqlmap.properties");
try {
sqlsProperties.load(new InputStreamReader(in, StandardCharsets.UTF_8));
System.out.printf("errorsProperties init count: %s\n", sqlsProperties.size());
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
public static String get(String sql) { public static String get(String sql) {
return sqlPropertiesMap.get(sql); return (String) sqlsProperties.get(sql);
} }
public static class SqlMessage implements Cloneable, Serializable { public static class SqlMessage implements Cloneable, Serializable {
...@@ -94,7 +77,7 @@ public class SqlMapping { ...@@ -94,7 +77,7 @@ public class SqlMapping {
public static String get(String sqlKey, Object... params) { public static String get(String sqlKey, Object... params) {
LinkedList<String> sqls = new LinkedList<>(); LinkedList<String> sqls = new LinkedList<>();
sqls.add(sqlPropertiesMap.get(sqlKey)); sqls.add((String) sqlsProperties.get(sqlKey));
LinkedList<Object[]> paramsList = new LinkedList<>(); LinkedList<Object[]> paramsList = new LinkedList<>();
paramsList.add(params); paramsList.add(params);
LinkedList<Object[]>[] args = new LinkedList[]{paramsList}; LinkedList<Object[]>[] args = new LinkedList[]{paramsList};
...@@ -107,7 +90,7 @@ public class SqlMapping { ...@@ -107,7 +90,7 @@ public class SqlMapping {
public static String get(String sqlKey, LinkedList<Object[]> paramsList) { public static String get(String sqlKey, LinkedList<Object[]> paramsList) {
LinkedList<String> sqls = new LinkedList<>(); LinkedList<String> sqls = new LinkedList<>();
sqls.add(sqlPropertiesMap.get(sqlKey)); sqls.add((String) sqlsProperties.get(sqlKey));
LinkedList<Object[]>[] args = new LinkedList[]{paramsList}; LinkedList<Object[]>[] args = new LinkedList[]{paramsList};
SqlMapping.SqlMessage sqlMessage = SqlMapping.SqlMessage.getInstance(); SqlMapping.SqlMessage sqlMessage = SqlMapping.SqlMessage.getInstance();
......
adam_user.add=INSERT INTO adam_user (`uid`, mobile, `state`, created_at) VALUES (?,?,?,?)
adam_user.close=UPDATE adam_user SET `state`=2, updated_at=?, closed_at=? WHERE `uid`=?
# ----------------------------------------------------
adam_user_info.add=insert into adam_user_info (nickname, sex, birthday, area, signature, avatar, background, qr_code, qr_pic, tag_me, `uid`) VALUES (?,?,?,?,?,?,?,?,?,?,?)
adam_user_info.edit=UPDATE adam_user_info SET nickname=?, sex=?, birthday=?, area=?, signature=?, avatar=?, background=?, qr_code=?, qr_pic=?, tag_me=? WHERE uid=?
# ----------------------------------------------------
adam_real_name.add=INSERT INTO adam_real_name (real_name_id, `uid`, `type`, `name`, id_card, `state`, created_at) VALUES (?,?,?,?,?,?,?)
# ----------------------------------------------------
adam_third_party.add=INSERT INTO adam_third_party (`uid`, open_id, avatar, nickname, platform, `state`, created_at) values (?,?,?,?,?,?,?)
adam_third_party.unbind=UPDATE adam_third_party SET `state`=2, updated_at=? WHERE `uid`=? AND platform=? AND `state`=1
# ----------------------------------------------------
adam_member.add=INSERT INTO `adam_member` ( `name`, `title`, `sub_title`, `icon`, `avatar`, `start_no`, `type`, `interests_detail`, `notes`, `is_notice`, `notice_info`, `notice_title`, `need_question`, `display_agreement`, `agreement`, `member_id`, `limitation`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
adam_member_order.add=INSERT INTO `adam_member_order` ( `order_no`, `uid`, `mode`, `price`, `price_paid`, `member_name`, `member_id`, `member_price_id`, `days`, `state`, `member_no`, `pay_channel`, `pay_no`, `birthday`, `payment_at`, `created_at`, `updated_at`, `client_ip`, `source`, `version`) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
adam_user_member_add=
adam_user_member_update=
# ----------------------------------------------------
adam_addresses.add=
adam_addresses.edit=
adam_addresses.update.is_default=UPDATE adam_addresses set is_default=?, updated_at=? where addresses_id=?
adam_addresses.remove=UPDATE adam_addresses SET `state`=2, updated_at=?, deleted_at=? where addresses_id=?
# ----------------------------------------------------
adam_enters.add=INSERT INTO adam_enters (enters_id, `uid`, `type`,`name`, mobile, id_card, is_default, `state`, created_at, updated_at, deleted_at, `comment`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)
adam_enters.edit=UPDATE adam_enters SET `type`=?, `name`=?, mobile=?, id_card=?, is_default=?, `state`=?, updated_at=? where enters_id=?
adam_enters.update.is_default=UPDATE adam_enters set is_default=?, updated_at=? where enters_id=?
adam_enters.remove=UPDATE adam_enters SET `state`=2, updated_at=?, deleted_at=? where enters_id=?
# ----------------------------------------------------
# ----------------------------------------------------
# ----------------------------------------------------
\ No newline at end of file
adam_addresses.add=张三
adam_addresses.edit=
adam_addresses.update.is_default=UPDATE adam_addresses set is_default=?, updated_at=? where addresses_id=?
adam_addresses.remove=UPDATE adam_addresses SET `state`=2, updated_at=?, deleted_at=? where addresses_id=?
\ No newline at end of file
adam_enters.add=INSERT INTO adam_enters (enters_id, `uid`, `type`,`name`, mobile, id_card, is_default, `state`, created_at, updated_at, deleted_at, `comment`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)
adam_enters.edit=UPDATE adam_enters SET `type`=?, `name`=?, mobile=?, id_card=?, is_default=?, `state`=?, updated_at=? where enters_id=?
adam_enters.update.is_default=UPDATE adam_enters set is_default=?, updated_at=? where enters_id=?
adam_enters.remove=UPDATE adam_enters SET `state`=2, updated_at=?, deleted_at=? where enters_id=?
\ No newline at end of file
adam_real_name.add=INSERT INTO adam_real_name (real_name_id, `uid`, `type`, `name`, id_card, `state`, created_at) VALUES (?,?,?,?,?,?,?)
\ No newline at end of file
adam_third_party.add=INSERT INTO adam_third_party (`uid`, open_id, avatar, nickname, platform, `state`, created_at) values (?,?,?,?,?,?,?)
adam_third_party.unbind=UPDATE adam_third_party SET `state`=2, updated_at=? WHERE `uid`=? AND platform=? AND `state`=1
\ No newline at end of file
adam_user.add=INSERT INTO adam_user (`uid`, mobile, `state`, created_at) VALUES (?,?,?,?)
adam_user.close=UPDATE adam_user SET `state`=2, updated_at=?, closed_at=? WHERE `uid`=?
\ No newline at end of file
adam_user_info.add=insert into adam_user_info (nickname, sex, birthday, area, signature, avatar, background, qr_code, qr_pic, tag_me, `uid`) VALUES (?,?,?,?,?,?,?,?,?,?,?)
adam_user_info.edit=UPDATE adam_user_info SET nickname=?, sex=?, birthday=?, area=?, signature=?, avatar=?, background=?, qr_code=?, qr_pic=?, tag_me=? WHERE uid=?
\ No newline at end of file
adam_member.add=INSERT INTO `adam_member` ( `name`, `title`, `sub_title`, `icon`, `avatar`, `start_no`, `type`, `interests_detail`, `notes`, `is_notice`, `notice_info`, `notice_title`, `need_question`, `display_agreement`, `agreement`, `member_id`, `limitation`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
adam_member_order.add=INSERT INTO `adam_member_order` ( `order_no`, `uid`, `mode`, `price`, `price_paid`, `member_name`, `member_id`, `member_price_id`, `days`, `state`, `member_no`, `pay_channel`, `pay_no`, `birthday`, `payment_at`, `created_at`, `updated_at`, `client_ip`, `source`, `version`) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
adam_user_member_add=
adam_user_member_update=
\ No newline at end of file
...@@ -243,12 +243,11 @@ public class KylinStationController { ...@@ -243,12 +243,11 @@ public class KylinStationController {
@ApiOperation(value = "下载验票数据") @ApiOperation(value = "下载验票数据")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "path", required = true, dataType = "String", name = "type", value = "类型[101-音乐节,102小型演出(livehouse演出),103巡演]", allowableValues = "101,102,103"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "performanceId", value = "演出ID[64]"),
@ApiImplicitParam(type = "path", required = true, dataType = "String", name = "performanceId", value = "演出ID[64]"),
}) })
@GetMapping("download/{type}/{performanceId}") @GetMapping("download")
public ResponseDto<List<KylinStationCheckOrderVo>> downloadTicketData(@PathVariable String type, @PathVariable String performanceId) { public ResponseDto<List<KylinStationCheckOrderVo>> downloadTicketData(@RequestParam String performanceId) {
log.info("type:{},performanceId:{}", type, performanceId); log.info("performanceId:{}", performanceId);
String currentUid = CurrentUtil.getCurrentUid(); String currentUid = CurrentUtil.getCurrentUid();
// 查取当前用户下关联演出ID列表 // 查取当前用户下关联演出ID列表
...@@ -302,14 +301,12 @@ public class KylinStationController { ...@@ -302,14 +301,12 @@ public class KylinStationController {
@ApiOperation(value = "刷新验票数据") @ApiOperation(value = "刷新验票数据")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "body", required = true, dataType = "String", name = "type", value = "类型[101-音乐节,102小型演出(livehouse演出),103巡演]", allowableValues = "101,102,103"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "performanceId", value = "演出ID[64]"),
@ApiImplicitParam(type = "body", required = true, dataType = "String", name = "performanceId", value = "演出ID[64]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "latestUpdateAt", value = "最近更新时间[yyyy-MM-dd HH:mm:ss]"),
@ApiImplicitParam(type = "body", required = true, dataType = "String", name = "latestUpdateAt", value = "最近更新时间[yyyy-MM-dd HH:mm:ss]"),
}) })
@PostMapping("refresh") @PostMapping("refresh")
public ResponseDto<List<KylinStationCheckOrderVo>> refreshTicketData(@PathVariable String type, public ResponseDto<List<KylinStationCheckOrderVo>> refreshTicketData(@RequestParam String performanceId, @RequestParam String latestUpdateAt) {
@PathVariable String performanceId, @PathVariable String latestUpdateAt) { log.info("refresh performanceId:{},latestUpdateAt:{}", performanceId, latestUpdateAt);
log.info("refresh type:{},performanceId:{},latestUpdateAt:{}", type, performanceId, latestUpdateAt);
String currentUid = CurrentUtil.getCurrentUid(); String currentUid = CurrentUtil.getCurrentUid();
// 查取当前用户下关联演出ID列表 // 查取当前用户下关联演出ID列表
......
kylin_order_ticket_entities.add=INSERT INTO kylin_order_ticket_entities(order_ticket_entities_id ,order_id ,ticket_id ,user_id ,time_id ,performance_id ,enter_type ,enter_name ,enter_mobile,enter_id_code,status,sys_damai,check_client,is_payment,comment,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_ticket_entities.synPay=UPDATE kylin_order_ticket_entities SET is_payment = ?,updated_at = ? WHERE order_tickets_id = ?
kylin_order_ticket_entities.updateStatusByStation=UPDATE kylin_order_ticket_status SET `status`=?, updated_at=?, checked_at=?, check_type=?, checkUserId=? WHERE order_ticket_entities_id =?
# ----------------------------------------------------
kylin_order_ticket_relation.add=INSERT INTO kylin_order_ticket_relations(order_ticket_relations_id ,order_id ,transfer_id ,live_id ,agent_id ,is_member ,performance_id ,time_id ,ticket_id ,created_at ,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?)
# ----------------------------------------------------
kylin_order_ticket_status.add=INSERT INTO kylin_order_ticket_status(order_ticket_status_id ,order_id ,express_type ,is_student ,transfer_status ,status ,pay_status ,created_at ,updated_at)VALUES(?,?,?,?,?,?,?,?,?)
kylin_order_ticket_status.synPay=UPDATE kylin_order_ticket_status SET status = ?,pay_status = ?,updated_at = ? WHERE order_tickets_id = ?
kylin_order_ticket_status.close=UPDATE kylin_order_ticket_status SET status = ?,updated_at = ? WHERE order_tickets_id = ?
# ----------------------------------------------------
kylin_order_ticket.add=INSERT INTO kylin_order_tickets(order_tickets_id,user_id,user_name,user_mobile,performance_title,order_code,qr_code,order_type,order_version,number,price,price_member,price_total,price_voucher,price_actual,priceExpress,price_refund,refund_number,pay_type,payment_type,time_pay,express_contacts,express_address,express_phone,coupon_type,get_ticket_type,get_ticket_describe,pay_count_down_minute,comment,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) kylin_order_ticket.add=INSERT INTO kylin_order_tickets(order_tickets_id,user_id,user_name,user_mobile,performance_title,order_code,qr_code,order_type,order_version,number,price,price_member,price_total,price_voucher,price_actual,priceExpress,price_refund,refund_number,pay_type,payment_type,time_pay,express_contacts,express_address,express_phone,coupon_type,get_ticket_type,get_ticket_describe,pay_count_down_minute,comment,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_ticket.payAgain=UPDATE kylin_order_tickets SET order_type = ? ,order_code = ? , updated_at = ? WHERE order_tickets_id = ? kylin_order_ticket.payAgain=UPDATE kylin_order_tickets SET order_type = ? ,order_code = ? , updated_at = ? WHERE order_tickets_id = ?
kylin_order_ticket.synPay=UPDATE kylin_order_tickets SET payment_type = ? ,pay_code = ? , time_pay = ?, qr_code = ? , updated_at = ? WHERE order_tickets_id = ? kylin_order_ticket.synPay=UPDATE kylin_order_tickets SET payment_type = ? ,pay_code = ? , time_pay = ?, qr_code = ? , updated_at = ? WHERE order_tickets_id = ?
kylin_order_ticket.close=UPDATE kylin_order_tickets SET updated_at = ? WHERE order_tickets_id = ? kylin_order_ticket.close=UPDATE kylin_order_tickets SET updated_at = ? WHERE order_tickets_id = ?
# ----------------------------------------------------
\ No newline at end of file
kylin_order_ticket_entities.add=INSERT INTO kylin_order_ticket_entities(order_ticket_entities_id ,order_id ,ticket_id ,user_id ,time_id ,performance_id ,enter_type ,enter_name ,enter_mobile,enter_id_code,status,sys_damai,check_client,is_payment,comment,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_ticket_entities.synPay=UPDATE kylin_order_ticket_entities SET is_payment = ?,updated_at = ? WHERE order_tickets_id = ?
kylin_order_ticket_entities.updateStatusByStation=UPDATE kylin_order_ticket_status SET `status`=?, updated_at=?, checked_at=?, check_type=?, checkUserId=? WHERE order_ticket_entities_id =?
\ No newline at end of file
kylin_order_ticket_relation.add=INSERT INTO kylin_order_ticket_relations(order_ticket_relations_id ,order_id ,transfer_id ,live_id ,agent_id ,is_member ,performance_id ,time_id ,ticket_id ,created_at ,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?)
\ No newline at end of file
kylin_order_ticket_status.add=INSERT INTO kylin_order_ticket_status(order_ticket_status_id ,order_id ,express_type ,is_student ,transfer_status ,status ,pay_status ,created_at ,updated_at)VALUES(?,?,?,?,?,?,?,?,?)
kylin_order_ticket_status.synPay=UPDATE kylin_order_ticket_status SET status = ?,pay_status = ?,updated_at = ? WHERE order_tickets_id = ?
kylin_order_ticket_status.close=UPDATE kylin_order_ticket_status SET status = ?,updated_at = ? WHERE order_tickets_id = ?
\ No newline at end of file
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