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

Commit 1072c427 authored by 胡佳晨's avatar 胡佳晨

admin 后端创建接口

parent f3973380
package com.liquidnet.service.kylin.dto.param;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.liquidnet.commons.lang.util.IDGenSnow;
import com.liquidnet.service.kylin.entity.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.BeanUtils;
import springfox.documentation.annotations.ApiIgnore;
import java.io.Serializable;
import java.time.LocalDateTime;
// 参数
@Data
public class FieldsParam implements Serializable {
@JsonIgnore
private String fieldsId;
@ApiModelProperty(value = "场地名称", example = "测试场地")
private String name;
@ApiModelProperty(value = "英文名", example = "ceshi")
private String nameEng;
@ApiModelProperty(value = "拼音", example = "ceshi")
private String pinyin;
@ApiModelProperty(value = "封面图", example = "https://img.zhengzai.tv/partner/2019/05/14/5cda2d0520177.png")
private String coverImg;
@ApiModelProperty(value = "详细地址", example = "北京市北京朝阳区摩登天空")
private String address;
@ApiModelProperty(value = "经度", example = "100.00")
private String longitude;
@ApiModelProperty(value = "纬度", example = "100.00")
private String latitude;
@ApiModelProperty(value = "联系电话", example = "15901093014")
private String phone;
@ApiModelProperty(value = "描述", example = "这是一个描述")
private String description;
@ApiModelProperty(value = "省id", example = "1")
private int provinceId;
@ApiModelProperty(value = "省名称", example = "北京")
private String provinceName;
@ApiModelProperty(value = "城市id", example = "1")
private int cityId;
@ApiModelProperty(value = "城市名称", example = "北京")
private String cityName;
@ApiModelProperty(value = "县id", example = "1")
private int districtId;
@ApiModelProperty(value = "县名称", example = "朝阳区")
private String districtName;
@ApiModelProperty(value = "拒绝理由", example = "")
private String refuseMessage;
@ApiModelProperty(value = "认证状态 0未认证 1已认证", example = "0")
private int validStatus;
@ApiModelProperty(value = "是否显示 0不显示 1显示", example = "1")
private int isDisplay;
@ApiModelProperty(value = "是否营业 0不营业 1营业中", example = "1")
private int isBusiness;
@ApiModelProperty(value = "审核状态 0待审核 1已审核 2被拒绝", example = "0")
private int changeStatus;
@ApiModelProperty(value = "补充字段", example = "")
private String comment;
@JsonIgnore
public KylinFields getFields(String fieldsId,LocalDateTime createdAt) {
KylinFields fields = new KylinFields();
BeanUtils.copyProperties(this, fields);
fields.setFieldsId(fieldsId);
fields.setCreatedAt(createdAt);
return fields;
}
@JsonIgnore
public KylinFieldStatus getFieldStatus(String fieldsId,LocalDateTime createdAt) {
KylinFieldStatus fieldStatus = new KylinFieldStatus();
BeanUtils.copyProperties(this, fieldStatus);
fieldStatus.setFieldStatusId(IDGenSnow.nextId().toString());
fieldStatus.setFieldId(fieldsId);
fieldStatus.setCreatedAt(createdAt);
return fieldStatus;
}
@JsonIgnore
public KylinFieldRelations getFieldRelations(String fieldsId,LocalDateTime createdAt) {
KylinFieldRelations fieldRelations = new KylinFieldRelations();
BeanUtils.copyProperties(this, fieldRelations);
fieldRelations.setFieldRelationsId(IDGenSnow.nextId().toString());
fieldRelations.setFieldId(fieldsId);
fieldRelations.setCreatedAt(createdAt);
return fieldRelations;
}
}
package com.liquidnet.service.kylin.model; package com.liquidnet.service.kylin.dto.vo;
import com.liquidnet.service.kylin.entity.FieldRelations;
import com.liquidnet.service.kylin.entity.FieldStatus;
import com.liquidnet.service.kylin.entity.Fields;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
//返回
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class FieldsModule implements Serializable { public class FieldsVo implements Serializable {
@ApiModelProperty(value = "自增id")
private int id;
@ApiModelProperty(value = "主键id") @ApiModelProperty(value = "主键id")
private String fields_id; private String fieldsId;
@ApiModelProperty(value = "场地名称") @ApiModelProperty(value = "场地名称")
private String name; private String name;
@ApiModelProperty(value = "英文名") @ApiModelProperty(value = "英文名")
private String name_eng; private String nameEng;
@ApiModelProperty(value = "拼音") @ApiModelProperty(value = "拼音")
private String pinyin; private String pinyin;
@ApiModelProperty(value = "封面图") @ApiModelProperty(value = "封面图")
private String cover_img; private String coverImg;
@ApiModelProperty(value = "详细地址") @ApiModelProperty(value = "详细地址")
private String address; private String address;
...@@ -46,56 +43,44 @@ public class FieldsModule implements Serializable { ...@@ -46,56 +43,44 @@ public class FieldsModule implements Serializable {
private String description; private String description;
@ApiModelProperty(value = "省id") @ApiModelProperty(value = "省id")
private int province_id; private int provinceId;
@ApiModelProperty(value = "省名称") @ApiModelProperty(value = "省名称")
private String province_name; private String provinceName;
@ApiModelProperty(value = "城市id") @ApiModelProperty(value = "城市id")
private int city_id; private int cityId;
@ApiModelProperty(value = "城市名称") @ApiModelProperty(value = "城市名称")
private String city_name; private String cityName;
@ApiModelProperty(value = "县id") @ApiModelProperty(value = "县id")
private int district_id; private int districtId;
@ApiModelProperty(value = "县名称") @ApiModelProperty(value = "县名称")
private String district_name; private String districtName;
@ApiModelProperty(value = "拒绝理由") @ApiModelProperty(value = "拒绝理由")
private String refuse_message; private String refuseMessage;
@ApiModelProperty(value = "认证状态 0未认证 1已认证") @ApiModelProperty(value = "认证状态 0未认证 1已认证")
private int valid_status; private int validStatus;
@ApiModelProperty(value = "是否显示 0不显示 1显示") @ApiModelProperty(value = "是否显示 0不显示 1显示")
private int is_display; private int isDisplay;
@ApiModelProperty(value = "是否营业 0不营业 1营业中") @ApiModelProperty(value = "是否营业 0不营业 1营业中")
private int is_business; private int isBusiness;
@ApiModelProperty(value = "审核状态 0待审核 1已审核 2被拒绝") @ApiModelProperty(value = "审核状态 0待审核 1已审核 2被拒绝")
private int change_status; private int changeStatus;
@ApiModelProperty(value = "补充字段") @ApiModelProperty(value = "补充字段")
private String comment; private String comment;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private String created_at; private LocalDateTime createdAt;
@ApiModelProperty(value = "修改时间") @ApiModelProperty(value = "修改时间")
private String updated_at; private LocalDateTime updatedAt;
public Fields getFields(){
return new Fields();
}
public FieldStatus getFieldStatus(){
return new FieldStatus();
}
public FieldRelations getFieldRelations(){
return new FieldRelations();
}
} }
package com.liquidnet.service.kylin.service; package com.liquidnet.service.kylin.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.liquidnet.service.kylin.model.FieldsModule; import com.liquidnet.service.kylin.dto.param.FieldsParam;
import com.liquidnet.service.kylin.dto.vo.FieldsVo;
import com.thoughtworks.xstream.core.util.Fields; import com.thoughtworks.xstream.core.util.Fields;
/** /**
...@@ -12,14 +13,10 @@ import com.thoughtworks.xstream.core.util.Fields; ...@@ -12,14 +13,10 @@ import com.thoughtworks.xstream.core.util.Fields;
* @author hujiachen * @author hujiachen
* @since 2021-04-28 * @since 2021-04-28
*/ */
public interface FieldsService extends IService<Fields> { public interface KylinFieldsService{
// adam
int fieldCreate(FieldsModule fields);
// App
int fieldList(int page,int size); int fieldList(int page,int size);
int fieldDetails(int field_id); int fieldDetails(int fieldId);
} }
package com.liquidnet.service.kylin.service.admin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.liquidnet.service.kylin.dto.param.FieldsParam;
import com.thoughtworks.xstream.core.util.Fields;
/**
* <p>
* 服务类
* </p>
*
* @author hujiachen
* @since 2021-04-28
*/
public interface KylinFieldsAdminService{
boolean fieldCreate(FieldsParam fieldsParam);
}
package com.liquidnet.service.kylin;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.*;
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
import java.util.ArrayList;
import java.util.List;
public class MybatisPlusCodeGenerator {
/**
* @param moduleRootPath 项目模块根路径 到 /src 之前 ex:E:\projects\trlabs-bus-v1\trlabs-bus-service\trlabs-common\trlabs-mybatis
* @param dsc 数据源
* @param parentName 相当于业务模块名 com.liquidnet.service.adam 全限定类名
* @param tableNames 表名
*/
public static void doGenerator(String moduleRootPath,
DataSourceConfig dsc,
String parentName,
String[] tableNames) {
AutoGenerator mpg = new AutoGenerator();
// 全局配置BankMybatisPlusCodeGenerator
GlobalConfig gc = new GlobalConfig();
gc.setOutputDir(moduleRootPath + "/src/main/java");
gc.setAuthor("liquidnet");
gc.setOpen(false);
// gc.setSwagger2(true); 实体属性 Swagger2 注解
mpg.setGlobalConfig(gc);
// 数据源配置
mpg.setDataSource(dsc);
// 包配置
PackageConfig pc = new PackageConfig();
pc.setParent(parentName);
mpg.setPackageInfo(pc);
// 自定义配置
InjectionConfig cfg = new InjectionConfig() {
@Override
public void initMap() {
// to do nothing
}
};
// 如果模板引擎是 freemarker
String templatePath = "/templates/mapper.xml.ftl";
// 自定义输出配置
List<FileOutConfig> focList = new ArrayList<>();
// 自定义配置会被优先输出
focList.add(new FileOutConfig(templatePath) {
@Override
public String outputFile(TableInfo tableInfo) {
// 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
return moduleRootPath + "/src/main/resources/com/liquidnet/service/kylin/mapper/" + pc.getModuleName()
+ "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
}
});
cfg.setFileOutConfigList(focList);
mpg.setCfg(cfg);
// 配置模板
TemplateConfig templateConfig = new TemplateConfig();
templateConfig.setXml(null);
mpg.setTemplate(templateConfig);
// 策略配置
StrategyConfig strategy = new StrategyConfig();
strategy.setNaming(NamingStrategy.underline_to_camel);
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
// strategy.setSuperEntityClass("你自己的父类实体,没有就不用设置!");
strategy.setEntityLombokModel(true);
strategy.setRestControllerStyle(true);
strategy.setInclude(tableNames);
strategy.setControllerMappingHyphenStyle(true);
strategy.setTablePrefix(pc.getModuleName() + "_");
mpg.setStrategy(strategy);
mpg.setTemplateEngine(new FreemarkerTemplateEngine());
mpg.execute();
}
public static void main(String[] args) {
DataSourceConfig dsc = new DataSourceConfig();
// dsc.setSchemaName("public");
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
dsc.setUrl("jdbc:mysql://39.106.122.201:3308/ln_kylin?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=CST");
dsc.setUsername("testmall");
dsc.setPassword("zhengzai!mYT");
String resourcePath = "/Users/hujiachen/Downloads/tmp";
String directory = "com.liquidnet.service.kylin";
String[] dbTableArray = new String[]{"kylin_fields","kylin_field_status","kylin_field_relations"};
doGenerator(resourcePath, dsc, directory, dbTableArray);
}
}
package com.liquidnet.service.kylin.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
public class FieldRelations implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "自增id")
private int id;
@ApiModelProperty(value = "主键id")
private String fields_relations_id;
@ApiModelProperty(value = "场地id")
private String field_id;
@ApiModelProperty(value = "补充字段")
private String comment;
@ApiModelProperty(value = "创建时间")
private String created_at;
@ApiModelProperty(value = "修改时间")
private String updated_at;
}
package com.liquidnet.service.kylin.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
public class FieldStatus implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "自增id")
private int id;
@ApiModelProperty(value = "主键id")
private String fields_status_id;
@ApiModelProperty(value = "场地关联id")
private String field_id;
@ApiModelProperty(value = "认证状态 0未认证 1已认证")
private int valid_status;
@ApiModelProperty(value = "是否显示 0不显示 1显示")
private int is_display;
@ApiModelProperty(value = "是否营业 0不营业 1营业中")
private int is_business;
@ApiModelProperty(value = "审核状态 0待审核 1已审核 2被拒绝")
private int change_status;
@ApiModelProperty(value = "补充字段")
private String comment;
@ApiModelProperty(value = "创建时间")
private String created_at;
@ApiModelProperty(value = "修改时间")
private String updated_at;
}
package com.liquidnet.service.kylin.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
public class Fields implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "自增id")
private int id;
@ApiModelProperty(value = "主键id")
private String fields_id;
@ApiModelProperty(value = "场地名称")
private String name;
@ApiModelProperty(value = "英文名")
private String name_eng;
@ApiModelProperty(value = "拼音")
private String pinyin;
@ApiModelProperty(value = "封面图")
private String cover_img;
@ApiModelProperty(value = "详细地址")
private String address;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "联系电话")
private String phone;
@ApiModelProperty(value = "描述")
private String description;
@ApiModelProperty(value = "省id")
private int province_id;
@ApiModelProperty(value = "省名称")
private String province_name;
@ApiModelProperty(value = "城市id")
private int city_id;
@ApiModelProperty(value = "城市名称")
private String city_name;
@ApiModelProperty(value = "县id")
private int district_id;
@ApiModelProperty(value = "县名称")
private String district_name;
@ApiModelProperty(value = "拒绝理由")
private String refuse_message;
@ApiModelProperty(value = "补充字段")
private String comment;
@ApiModelProperty(value = "创建时间")
private String created_at;
@ApiModelProperty(value = "修改时间")
private String updated_at;
}
package com.liquidnet.service.kylin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 场地关系
* </p>
*
* @author liquidnet
* @since 2021-04-29
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinFieldRelations implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Integer mid;
/**
* field_relations_id
*/
private String fieldRelationsId;
/**
* 场地关联id
*/
private String fieldId;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 修改时间
*/
private LocalDateTime updatedAt;
}
package com.liquidnet.service.kylin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 场地状态
* </p>
*
* @author liquidnet
* @since 2021-04-29
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinFieldStatus implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Integer mid;
/**
* field_status_id
*/
private String fieldStatusId;
/**
* 场地关联id
*/
private String fieldId;
/**
* 认证状态 0未认证 1已认证
*/
private Integer validStatus;
/**
* 是否显示 0不显示 1显示
*/
private Integer isDisplay;
/**
* 是否营业 0不营业 1营业中
*/
private Integer isBusiness;
/**
* 审核状态 0待审核 1已审核 2被拒绝
*/
private Integer changeStatus;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 修改时间
*/
private LocalDateTime updatedAt;
}
package com.liquidnet.service.kylin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 场地数据
* </p>
*
* @author liquidnet
* @since 2021-04-29
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinFields implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Integer mid;
/**
* fields_id
*/
private String fieldsId;
/**
* 场地名称
*/
private String name;
/**
* 英文名
*/
private String nameEng;
/**
* 拼音
*/
private String pinyin;
/**
* 封面图
*/
private String coverImg;
/**
* 详细地址
*/
private String address;
/**
* 经度
*/
private String longitude;
/**
* 维度
*/
private String latitude;
/**
* 联系电话
*/
private String phone;
/**
* 描述
*/
private String description;
/**
* 省id
*/
private Integer provinceId;
/**
* 省名称
*/
private String provinceName;
/**
* 城市id
*/
private Integer cityId;
/**
* 城市名称
*/
private String cityName;
/**
* 县id
*/
private Integer districtId;
/**
* 县名称
*/
private String districtName;
/**
* 拒绝理由
*/
private String refuseMessage;
/**
* comment
*/
private String comment;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 修改时间
*/
private LocalDateTime updatedAt;
}
package com.liquidnet.service.kylin.mapper; package com.liquidnet.service.kylin.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.kylin.entity.FieldRelations; import com.liquidnet.service.kylin.entity.KylinFieldRelations;
public interface FieldRelationMapper extends BaseMapper<FieldRelations> { public interface KylinFieldRelationMapper extends BaseMapper<KylinFieldRelations> {
String createFieldRelations(FieldRelations fieldRelations); // int createFieldRelations(KylinFieldRelations fieldRelations);
} }
package com.liquidnet.service.kylin.mapper; package com.liquidnet.service.kylin.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.kylin.entity.Fields; import com.liquidnet.service.kylin.entity.KylinFieldStatus;
public interface FieldsMapper extends BaseMapper<Fields> { public interface KylinFieldStatusMapper extends BaseMapper<KylinFieldStatus> {
String createFields(Fields fields); // int createFieldStatus(KylinFieldStatus fieldStatus);
} }
package com.liquidnet.service.kylin.mapper; package com.liquidnet.service.kylin.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.kylin.entity.FieldStatus; import com.liquidnet.service.kylin.entity.KylinFields;
public interface FieldStatusMapper extends BaseMapper<FieldStatus> { public interface KylinFieldsMapper extends BaseMapper<KylinFields> {
String createFieldStatus(FieldStatus fieldStatus); // int createFields(KylinFields fields);
} }
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.kylin.mapper.FieldsMapper"> <mapper namespace="com.liquidnet.service.kylin.mapper.KylinFieldRelationMapper">
<insert id="createFieldRelations" parameterType="FieldRelations"> <!-- <insert id="createFieldRelations" parameterType="com.liquidnet.service.kylin.entity.KylinFieldRelations">-->
insert into kylin_field_relations <!-- insert into kylin_field_relations-->
(field_relations_id, field_id, created_at, updated_at) <!-- (field_relations_id, field_id, created_at, updated_at)-->
values (#{field_relations_id}, #{field_id}, #{comment}, #{created_at}, #{updated_at}) <!-- values (#{field_relations_id}, #{field_id}, #{created_at}, #{updated_at})-->
</insert> <!-- </insert>-->
</mapper> </mapper>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.kylin.mapper.FieldStatusMapper"> <mapper namespace="com.liquidnet.service.kylin.mapper.KylinFieldStatusMapper">
<insert id="createFieldStatus" parameterType="FieldStatus"> <!-- <insert id="createFieldStatus" parameterType="com.liquidnet.service.kylin.entity.KylinFieldStatus">-->
insert into kylin_field_status <!-- insert into kylin_field_status-->
(field_status_id, field_id, valid_status, is_display, is_business, change_status, created_at, updated_at) <!-- (field_status_id, field_id, valid_status, is_display, is_business, change_status, created_at, updated_at)-->
values (#{field_status_id}, #{field_id}, #{valid_status}, #{is_display}, #{is_business}, #{change_status}, <!-- values (#{field_status_id}, #{field_id}, #{valid_status}, #{is_display}, #{is_business}, #{change_status},-->
#{created_at}, #{updated_at}) <!-- #{created_at}, #{updated_at})-->
</insert> <!-- </insert>-->
</mapper> </mapper>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.kylin.mapper.FieldsMapper"> <mapper namespace="com.liquidnet.service.kylin.mapper.KylinFieldsMapper" >
<insert id="createFields" parameterType="Fields"> <!-- <insert id="createFields" parameterType="com.liquidnet.service.kylin.entity.KylinFields" >-->
insert into kylin_fields <!-- insert into kylin_fields-->
(fields_id, name, name_eng, pinyin, cover_img, address, longitude, latitude, phone, description, <!-- (fields_id, name, name_eng, pinyin, cover_img, address, longitude, latitude, phone, description,-->
province_id, province_name, city_id, city_name, district_id, district_name, refuse_message, comment, <!-- province_id, province_name, city_id, city_name, district_id, district_name, refuse_message, comment,-->
created_at, updated_at) <!-- created_at, updated_at)-->
values (#{fields_id}, #{name}, #{name_eng}, #{pinyin}, #{cover_img}, #{address}, #{longitude}, #{latitude}, <!-- values (#{fields_id}, #{name}, #{name_eng}, #{pinyin}, #{cover_img}, #{address}, #{longitude}, #{latitude},-->
#{phone}, #{description},#{province_id}, #{province_name}, #{city_id}, #{city_name}, #{district_id}, <!-- #{phone}, #{description},#{province_id}, #{province_name}, #{city_id}, #{city_name}, #{district_id},-->
#{district_name},#{refuse_message}, #{comment},#{created_at}, #{updated_at}) <!-- #{district_name},#{refuse_message}, #{comment},#{created_at}, #{updated_at})-->
</insert> <!-- </insert>-->
</mapper> </mapper>
...@@ -8,7 +8,7 @@ SET NAMES utf8mb4; ...@@ -8,7 +8,7 @@ SET NAMES utf8mb4;
drop TABLE if exists `kylin_banners`; drop TABLE if exists `kylin_banners`;
CREATE TABLE `kylin_banners` CREATE TABLE `kylin_banners`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`banners_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'banners_id', `banners_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'banners_id',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '标题', `name` varchar(50) NOT NULL DEFAULT '' COMMENT '标题',
`cover_img` varchar(255) NOT NULL DEFAULT '' COMMENT '封面图', `cover_img` varchar(255) NOT NULL DEFAULT '' COMMENT '封面图',
...@@ -18,10 +18,10 @@ CREATE TABLE `kylin_banners` ...@@ -18,10 +18,10 @@ CREATE TABLE `kylin_banners`
`position` int(11) NOT NULL DEFAULT 0 COMMENT '展示位置', `position` int(11) NOT NULL DEFAULT 0 COMMENT '展示位置',
`sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序权重', `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序权重',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_banners_uid_index` (`banners_id`), KEY `kylin_banners_uid_index` (`banners_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '轮播图'; DEFAULT CHARSET = utf8mb4 COMMENT '轮播图';
...@@ -29,7 +29,7 @@ CREATE TABLE `kylin_banners` ...@@ -29,7 +29,7 @@ CREATE TABLE `kylin_banners`
drop TABLE if exists `kylin_fields`; drop TABLE if exists `kylin_fields`;
CREATE TABLE `kylin_fields` CREATE TABLE `kylin_fields`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`fields_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'fields_id', `fields_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'fields_id',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '场地名称', `name` varchar(255) NOT NULL DEFAULT '' COMMENT '场地名称',
`name_eng` varchar(255) NOT NULL DEFAULT '' COMMENT '英文名', `name_eng` varchar(255) NOT NULL DEFAULT '' COMMENT '英文名',
...@@ -48,40 +48,40 @@ CREATE TABLE `kylin_fields` ...@@ -48,40 +48,40 @@ CREATE TABLE `kylin_fields`
`district_name` varchar(255) NOT NULL DEFAULT '' COMMENT '县名称', `district_name` varchar(255) NOT NULL DEFAULT '' COMMENT '县名称',
`refuse_message` varchar(255) NOT NULL DEFAULT '' COMMENT '拒绝理由', `refuse_message` varchar(255) NOT NULL DEFAULT '' COMMENT '拒绝理由',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_fields_uid_index` (`fields_id`), KEY `kylin_fields_uid_index` (`fields_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '场地数据'; DEFAULT CHARSET = utf8mb4 COMMENT '场地数据';
-- 场地状态 -- 场地状态
drop TABLE if exists `kylin_field_status`; drop TABLE if exists `kylin_field_status`;
CREATE TABLE `kylin_field_status` CREATE TABLE `kylin_field_status`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`field_status_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'field_status_id', `field_status_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'field_status_id',
`field_id` varchar(255) NOT NULL DEFAULT '' COMMENT '场地关联id', `field_id` varchar(255) NOT NULL DEFAULT '' COMMENT '场地关联id',
`valid_status` tinyint NOT NULL DEFAULT 0 COMMENT '认证状态 0未认证 1已认证', `valid_status` tinyint NOT NULL DEFAULT 0 COMMENT '认证状态 0未认证 1已认证',
`is_display` tinyint NOT NULL DEFAULT 1 COMMENT '是否显示 0不显示 1显示', `is_display` tinyint NOT NULL DEFAULT 1 COMMENT '是否显示 0不显示 1显示',
`is_business` tinyint NOT NULL DEFAULT 0 COMMENT '是否营业 0不营业 1营业中', `is_business` tinyint NOT NULL DEFAULT 0 COMMENT '是否营业 0不营业 1营业中',
`change_status` tinyint NOT NULL DEFAULT 0 COMMENT '审核状态 0待审核 1已审核 2被拒绝', `change_status` tinyint NOT NULL DEFAULT 0 COMMENT '审核状态 0待审核 1已审核 2被拒绝',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_field_status_uid_index` (`field_status_id`), KEY `kylin_field_status_uid_index` (`field_status_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '场地状态'; DEFAULT CHARSET = utf8mb4 COMMENT '场地状态';
-- 场地关联关系关系 -- 场地关联关系关系
drop TABLE if exists `kylin_field_relations`; drop TABLE if exists `kylin_field_relations`;
CREATE TABLE `kylin_field_relations` CREATE TABLE `kylin_field_relations`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`field_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'field_relations_id', `field_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'field_relations_id',
`field_id` varchar(255) NOT NULL DEFAULT '' COMMENT '场地关联id', `field_id` varchar(255) NOT NULL DEFAULT '' COMMENT '场地关联id',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_field_relations_uid_index` (`field_relations_id`), KEY `kylin_field_relations_uid_index` (`field_relations_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '场地关系'; DEFAULT CHARSET = utf8mb4 COMMENT '场地关系';
...@@ -90,7 +90,7 @@ CREATE TABLE `kylin_field_relations` ...@@ -90,7 +90,7 @@ CREATE TABLE `kylin_field_relations`
drop TABLE if exists `kylin_performances`; drop TABLE if exists `kylin_performances`;
CREATE TABLE `kylin_performances` CREATE TABLE `kylin_performances`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`performances_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'performances_id', `performances_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'performances_id',
`title` varchar(255) NOT NULL DEFAULT '' COMMENT '演出名称', `title` varchar(255) NOT NULL DEFAULT '' COMMENT '演出名称',
`type` tinyint NOT NULL DEFAULT 3 COMMENT '1音乐节 2演唱会 3小型演出 4展览 6舞台剧', `type` tinyint NOT NULL DEFAULT 3 COMMENT '1音乐节 2演唱会 3小型演出 4展览 6舞台剧',
...@@ -116,17 +116,17 @@ CREATE TABLE `kylin_performances` ...@@ -116,17 +116,17 @@ CREATE TABLE `kylin_performances`
`reject_txt` varchar(255) NOT NULL DEFAULT '' COMMENT '拒绝理由', `reject_txt` varchar(255) NOT NULL DEFAULT '' COMMENT '拒绝理由',
`sort` int(11) NOT NULL DEFAULT 0 COMMENT '权重 高则在上', `sort` int(11) NOT NULL DEFAULT 0 COMMENT '权重 高则在上',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_performances_uid_index` (`performances_id`), KEY `kylin_performances_uid_index` (`performances_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '演出'; DEFAULT CHARSET = utf8mb4 COMMENT '演出';
-- 演出状态 -- 演出状态
drop TABLE if exists `kylin_performance_status`; drop TABLE if exists `kylin_performance_status`;
CREATE TABLE `kylin_performance_status` CREATE TABLE `kylin_performance_status`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`performance_status_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'performance_status_id', `performance_status_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'performance_status_id',
`performance_id` varchar(255) NOT NULL DEFAULT '' COMMENT '演出关联id', `performance_id` varchar(255) NOT NULL DEFAULT '' COMMENT '演出关联id',
`is_show` tinyint NOT NULL DEFAULT 1 COMMENT '是否显示 0全部用户可见 1白名单可见 2任何不显示', `is_show` tinyint NOT NULL DEFAULT 1 COMMENT '是否显示 0全部用户可见 1白名单可见 2任何不显示',
...@@ -135,17 +135,17 @@ CREATE TABLE `kylin_performance_status` ...@@ -135,17 +135,17 @@ CREATE TABLE `kylin_performance_status`
`is_distribution` tinyint NOT NULL DEFAULT 0 COMMENT '是否开启分销 0关闭 1开启', `is_distribution` tinyint NOT NULL DEFAULT 0 COMMENT '是否开启分销 0关闭 1开启',
`sync_agent` tinyint NOT NULL DEFAULT 0 COMMENT '是否关联小程序 0不关联 1关联', `sync_agent` tinyint NOT NULL DEFAULT 0 COMMENT '是否关联小程序 0不关联 1关联',
`audit_status` tinyint NOT NULL DEFAULT -1 COMMENT '-1未提交审核,0提交审核,1审核通过,2审核拒绝', `audit_status` tinyint NOT NULL DEFAULT -1 COMMENT '-1未提交审核,0提交审核,1审核通过,2审核拒绝',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_performance_status_uid_index` (`performance_status_id`), KEY `kylin_performance_status_uid_index` (`performance_status_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '演出状态'; DEFAULT CHARSET = utf8mb4 COMMENT '演出状态';
-- 演出关联关系 -- 演出关联关系
drop TABLE if exists `kylin_performance_relations`; drop TABLE if exists `kylin_performance_relations`;
CREATE TABLE `kylin_performance_relations` CREATE TABLE `kylin_performance_relations`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`performance_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'performance_relations_id', `performance_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'performance_relations_id',
`performance_id` varchar(255) NOT NULL DEFAULT '' COMMENT '演出关联id', `performance_id` varchar(255) NOT NULL DEFAULT '' COMMENT '演出关联id',
`copy_id` varchar(255) NOT NULL DEFAULT '' COMMENT '复制来源演出id', `copy_id` varchar(255) NOT NULL DEFAULT '' COMMENT '复制来源演出id',
...@@ -154,17 +154,17 @@ CREATE TABLE `kylin_performance_relations` ...@@ -154,17 +154,17 @@ CREATE TABLE `kylin_performance_relations`
`road_show_id` varchar(255) NOT NULL DEFAULT '' COMMENT '巡演id', `road_show_id` varchar(255) NOT NULL DEFAULT '' COMMENT '巡演id',
`project_id` varchar(255) NOT NULL DEFAULT '' COMMENT '专题id', `project_id` varchar(255) NOT NULL DEFAULT '' COMMENT '专题id',
`video_id` varchar(255) NOT NULL DEFAULT '' COMMENT '视频id', `video_id` varchar(255) NOT NULL DEFAULT '' COMMENT '视频id',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `performance_relations_uid_index` (`performance_relations_id`), KEY `performance_relations_uid_index` (`performance_relations_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '演出状态'; DEFAULT CHARSET = utf8mb4 COMMENT '演出状态';
-- 演出分销数据 票逻辑 -- 演出分销数据 票逻辑
drop TABLE if exists `kylin_performance_distributions`; drop TABLE if exists `kylin_performance_distributions`;
CREATE TABLE `kylin_performance_distributions` CREATE TABLE `kylin_performance_distributions`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`performance_distributions_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'performance_distributions_id', `performance_distributions_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'performance_distributions_id',
`ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票关联id', `ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票关联id',
`ticket_scale` varchar(5) NOT NULL DEFAULT '0' COMMENT '演出票提单位%', `ticket_scale` varchar(5) NOT NULL DEFAULT '0' COMMENT '演出票提单位%',
...@@ -174,10 +174,10 @@ CREATE TABLE `kylin_performance_distributions` ...@@ -174,10 +174,10 @@ CREATE TABLE `kylin_performance_distributions`
`second_agent_scale_money` varchar(5) NOT NULL DEFAULT '0' COMMENT '1级现金奖励占比', `second_agent_scale_money` varchar(5) NOT NULL DEFAULT '0' COMMENT '1级现金奖励占比',
`second_agent_scale_barter` varchar(5) NOT NULL DEFAULT '0' COMMENT '2级积分奖励占比', `second_agent_scale_barter` varchar(5) NOT NULL DEFAULT '0' COMMENT '2级积分奖励占比',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_performance_distributions_uid_index` (`performance_distributions_id`), KEY `kylin_performance_distributions_uid_index` (`performance_distributions_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '演出状态'; DEFAULT CHARSET = utf8mb4 COMMENT '演出状态';
...@@ -186,16 +186,16 @@ CREATE TABLE `kylin_performance_distributions` ...@@ -186,16 +186,16 @@ CREATE TABLE `kylin_performance_distributions`
drop TABLE if exists `kylin_ticket_times`; drop TABLE if exists `kylin_ticket_times`;
CREATE TABLE `kylin_ticket_times` CREATE TABLE `kylin_ticket_times`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`ticket_times_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_times_id', `ticket_times_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_times_id',
`title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题', `title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题',
`time_start` datetime NOT NULL DEFAULT '2000-01-01 12:00:00' COMMENT '售票开始时间', `time_start` datetime NOT NULL DEFAULT '2000-01-01 12:00:00' COMMENT '售票开始时间',
`time_end` datetime NOT NULL DEFAULT '2000-01-01 12:00:00' COMMENT '售票结束时间', `time_end` datetime NOT NULL DEFAULT '2000-01-01 12:00:00' COMMENT '售票结束时间',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_ticket_times_uid_index` (`ticket_times_id`), KEY `kylin_ticket_times_uid_index` (`ticket_times_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '场次'; DEFAULT CHARSET = utf8mb4 COMMENT '场次';
...@@ -203,14 +203,14 @@ CREATE TABLE `kylin_ticket_times` ...@@ -203,14 +203,14 @@ CREATE TABLE `kylin_ticket_times`
drop TABLE if exists `kylin_ticket_time_relation`; drop TABLE if exists `kylin_ticket_time_relation`;
CREATE TABLE `kylin_ticket_time_relation` CREATE TABLE `kylin_ticket_time_relation`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`ticket_time_relation_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_time_relation_id', `ticket_time_relation_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_time_relation_id',
`times_id` varchar(255) NOT NULL DEFAULT '' COMMENT '场次id', `times_id` varchar(255) NOT NULL DEFAULT '' COMMENT '场次id',
`performance_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联演出id', `performance_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联演出id',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_ticket_time_relation_uid_index` (`ticket_time_relation_id`), KEY `kylin_ticket_time_relation_uid_index` (`ticket_time_relation_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '场次关联'; DEFAULT CHARSET = utf8mb4 COMMENT '场次关联';
...@@ -218,7 +218,7 @@ CREATE TABLE `kylin_ticket_time_relation` ...@@ -218,7 +218,7 @@ CREATE TABLE `kylin_ticket_time_relation`
drop TABLE if exists `kylin_tickets`; drop TABLE if exists `kylin_tickets`;
CREATE TABLE `kylin_tickets` CREATE TABLE `kylin_tickets`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`tickets_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'tickets_id', `tickets_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'tickets_id',
`title` varchar(255) NOT NULL DEFAULT '' COMMENT '票名称', `title` varchar(255) NOT NULL DEFAULT '' COMMENT '票名称',
`type` tinyint NOT NULL DEFAULT 1 COMMENT '票类型 1单日票 2通票', `type` tinyint NOT NULL DEFAULT 1 COMMENT '票类型 1单日票 2通票',
...@@ -238,17 +238,17 @@ CREATE TABLE `kylin_tickets` ...@@ -238,17 +238,17 @@ CREATE TABLE `kylin_tickets`
`pay_countdown_minute` int(11) NOT NULL DEFAULT 5 COMMENT '支付倒计时时间', `pay_countdown_minute` int(11) NOT NULL DEFAULT 5 COMMENT '支付倒计时时间',
`sale_remind_minute` int(11) NOT NULL DEFAULT 60 COMMENT '开票提醒倒计时(分钟数)', `sale_remind_minute` int(11) NOT NULL DEFAULT 60 COMMENT '开票提醒倒计时(分钟数)',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_tickets_uid_index` (`tickets_id`), KEY `kylin_tickets_uid_index` (`tickets_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '票'; DEFAULT CHARSET = utf8mb4 COMMENT '票';
-- 票状态 -- 票状态
drop TABLE if exists `kylin_ticket_status`; drop TABLE if exists `kylin_ticket_status`;
CREATE TABLE `kylin_ticket_status` CREATE TABLE `kylin_ticket_status`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`ticket_status_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_status_id', `ticket_status_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_status_id',
`ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票关联id', `ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票关联id',
`is_student` tinyint NOT NULL DEFAULT 0 COMMENT '是否学生票 0否 1是', `is_student` tinyint NOT NULL DEFAULT 0 COMMENT '是否学生票 0否 1是',
...@@ -268,24 +268,24 @@ CREATE TABLE `kylin_ticket_status` ...@@ -268,24 +268,24 @@ CREATE TABLE `kylin_ticket_status`
`is_transfer` tinyint NOT NULL DEFAULT 0 COMMENT '是否开启转赠 0关闭 1开启', `is_transfer` tinyint NOT NULL DEFAULT 0 COMMENT '是否开启转赠 0关闭 1开启',
`is_exclusive` tinyint NOT NULL DEFAULT 0 COMMENT '是否会员专属 0不是 1是', `is_exclusive` tinyint NOT NULL DEFAULT 0 COMMENT '是否会员专属 0不是 1是',
`is_member` tinyint NOT NULL DEFAULT 0 COMMENT '是否关联会员 0不是 1是', `is_member` tinyint NOT NULL DEFAULT 0 COMMENT '是否关联会员 0不是 1是',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_ticket_status_uid_index` (`ticket_status_id`), KEY `kylin_ticket_status_uid_index` (`ticket_status_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '票'; DEFAULT CHARSET = utf8mb4 COMMENT '票';
-- 票关系 -- 票关系
drop TABLE if exists `kylin_ticket_relations`; drop TABLE if exists `kylin_ticket_relations`;
CREATE TABLE `kylin_ticket_relations` CREATE TABLE `kylin_ticket_relations`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`ticket_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_relations_id', `ticket_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_relations_id',
`ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票关联id', `ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票关联id',
`times_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联场次id', `times_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联场次id',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `ticket_relations_uid_index` (`ticket_relations_id`), KEY `ticket_relations_uid_index` (`ticket_relations_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '票'; DEFAULT CHARSET = utf8mb4 COMMENT '票';
...@@ -293,15 +293,15 @@ CREATE TABLE `kylin_ticket_relations` ...@@ -293,15 +293,15 @@ CREATE TABLE `kylin_ticket_relations`
drop TABLE if exists `kylin_road_shows`; drop TABLE if exists `kylin_road_shows`;
CREATE TABLE `kylin_road_shows` CREATE TABLE `kylin_road_shows`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`road_shows_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'road_shows_id', `road_shows_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'road_shows_id',
`img_poster` varchar(255) NOT NULL DEFAULT '' COMMENT '巡演封面图', `img_poster` varchar(255) NOT NULL DEFAULT '' COMMENT '巡演封面图',
`status` tinyint NOT NULL DEFAULT 1 COMMENT '状态 0停用 1启用', `status` tinyint NOT NULL DEFAULT 1 COMMENT '状态 0停用 1启用',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_road_shows_uid_index` (`road_shows_id`), KEY `kylin_road_shows_uid_index` (`road_shows_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '巡演'; DEFAULT CHARSET = utf8mb4 COMMENT '巡演';
...@@ -310,7 +310,7 @@ CREATE TABLE `kylin_road_shows` ...@@ -310,7 +310,7 @@ CREATE TABLE `kylin_road_shows`
drop TABLE if exists `kylin_lack_registers`; drop TABLE if exists `kylin_lack_registers`;
CREATE TABLE `kylin_lack_registers` CREATE TABLE `kylin_lack_registers`
( (
`id` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`lack_registers_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'lack_registers_id', `lack_registers_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'lack_registers_id',
`ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票种id', `ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票种id',
`user_id` varchar(255) NOT NULL DEFAULT '' COMMENT '用户id', `user_id` varchar(255) NOT NULL DEFAULT '' COMMENT '用户id',
...@@ -318,10 +318,10 @@ CREATE TABLE `kylin_lack_registers` ...@@ -318,10 +318,10 @@ CREATE TABLE `kylin_lack_registers`
`user_mobile` varchar(255) NOT NULL DEFAULT '' COMMENT '用户手机号', `user_mobile` varchar(255) NOT NULL DEFAULT '' COMMENT '用户手机号',
`send_status` tinyint NOT NULL DEFAULT 0 COMMENT '是否发送短信', `send_status` tinyint NOT NULL DEFAULT 0 COMMENT '是否发送短信',
`ip_address` varchar(255) NOT NULL DEFAULT '' COMMENT 'IP 地址', `ip_address` varchar(255) NOT NULL DEFAULT '' COMMENT 'IP 地址',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_lack_registers_uid_index` (`lack_registers_id`), KEY `kylin_lack_registers_uid_index` (`lack_registers_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '缺票登记'; DEFAULT CHARSET = utf8mb4 COMMENT '缺票登记';
...@@ -329,7 +329,7 @@ CREATE TABLE `kylin_lack_registers` ...@@ -329,7 +329,7 @@ CREATE TABLE `kylin_lack_registers`
drop TABLE if exists `kylin_projects`; drop TABLE if exists `kylin_projects`;
CREATE TABLE `kylin_projects` CREATE TABLE `kylin_projects`
( (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`projects_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'projects_id', `projects_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'projects_id',
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '专题名称', `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '专题名称',
`time_limit` int(11) DEFAULT NULL COMMENT '限购时间 单位分钟', `time_limit` int(11) DEFAULT NULL COMMENT '限购时间 单位分钟',
...@@ -338,17 +338,17 @@ CREATE TABLE `kylin_projects` ...@@ -338,17 +338,17 @@ CREATE TABLE `kylin_projects`
`open_goods` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开启 推荐商品', `open_goods` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开启 推荐商品',
`open_tied` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开启 推荐搭售', `open_tied` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开启 推荐搭售',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
`created_at` timestamp NULL DEFAULT NULL, `created_at` datetime NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL, `updated_at` datetime NULL DEFAULT NULL,
KEY `kylin_projects_uid_index` (`projects_id`), KEY `kylin_projects_uid_index` (`projects_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '专题'; DEFAULT CHARSET = utf8mb4 COMMENT '专题';
-- 专题关系 -- 专题关系
drop TABLE if exists `kylin_project_relations`; drop TABLE if exists `kylin_project_relations`;
CREATE TABLE `kylin_project_relations` CREATE TABLE `kylin_project_relations`
( (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`project_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'project_relations_id', `project_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'project_relations_id',
`project_id` int(11) NOT NULL DEFAULT '0' COMMENT '专题id', `project_id` int(11) NOT NULL DEFAULT '0' COMMENT '专题id',
`type` int(11) NOT NULL DEFAULT '0' COMMENT '关联类型 1演出 2商品 3限时商品', `type` int(11) NOT NULL DEFAULT '0' COMMENT '关联类型 1演出 2商品 3限时商品',
...@@ -359,9 +359,9 @@ CREATE TABLE `kylin_project_relations` ...@@ -359,9 +359,9 @@ CREATE TABLE `kylin_project_relations`
`tied_price` decimal(8, 2) NOT NULL DEFAULT '0.00' COMMENT '搭售价格', `tied_price` decimal(8, 2) NOT NULL DEFAULT '0.00' COMMENT '搭售价格',
`is_limit` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否限购', `is_limit` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否限购',
`limit_num` int(11) NOT NULL DEFAULT '0' COMMENT '限购数量 0不限购', `limit_num` int(11) NOT NULL DEFAULT '0' COMMENT '限购数量 0不限购',
`created_at` timestamp NULL DEFAULT NULL, `created_at` datetime NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL, `updated_at` datetime NULL DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`mid`),
KEY `kylin_project_relations_uid_index` (`project_relations_id`), KEY `kylin_project_relations_uid_index` (`project_relations_id`),
KEY `kylin_project_relations_project_id_index` (`project_id`), KEY `kylin_project_relations_project_id_index` (`project_id`),
KEY `kylin_project_relations_target_id_index` (`target_id`), KEY `kylin_project_relations_target_id_index` (`target_id`),
...@@ -374,7 +374,7 @@ CREATE TABLE `kylin_project_relations` ...@@ -374,7 +374,7 @@ CREATE TABLE `kylin_project_relations`
drop TABLE if exists `kylin_order_tickets`; drop TABLE if exists `kylin_order_tickets`;
CREATE TABLE `kylin_order_tickets` CREATE TABLE `kylin_order_tickets`
( (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`order_tickets_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'order_tickets_id', `order_tickets_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'order_tickets_id',
`user_id` varchar(255) NOT NULL DEFAULT '' COMMENT '用户id', `user_id` varchar(255) NOT NULL DEFAULT '' COMMENT '用户id',
`user_name` varchar(255) NOT NULL DEFAULT '' COMMENT '用户昵称', `user_name` varchar(255) NOT NULL DEFAULT '' COMMENT '用户昵称',
...@@ -402,43 +402,43 @@ CREATE TABLE `kylin_order_tickets` ...@@ -402,43 +402,43 @@ CREATE TABLE `kylin_order_tickets`
`get_ticket_describe` varchar(255) NOT NULL DEFAULT '' COMMENT '直播用取票观演码,隔开', `get_ticket_describe` varchar(255) NOT NULL DEFAULT '' COMMENT '直播用取票观演码,隔开',
`pay_countdown_minute` varchar(255) NOT NULL DEFAULT '' COMMENT '订单过期时间', `pay_countdown_minute` varchar(255) NOT NULL DEFAULT '' COMMENT '订单过期时间',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_order_tickets_uid_index` (`order_tickets_id`), KEY `kylin_order_tickets_uid_index` (`order_tickets_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '订单'; DEFAULT CHARSET = utf8mb4 COMMENT '订单';
-- 订单关系 -- 订单关系
drop TABLE if exists `kylin_order_ticket_relations`; drop TABLE if exists `kylin_order_ticket_relations`;
CREATE TABLE `kylin_order_ticket_relations` CREATE TABLE `kylin_order_ticket_relations`
( (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`order_ticket_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'order_ticket_relations_id', `order_ticket_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'order_ticket_relations_id',
`order_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单id', `order_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单id',
`transfer_id` varchar(255) NOT NULL DEFAULT '' COMMENT '转增订单id', `transfer_id` varchar(255) NOT NULL DEFAULT '' COMMENT '转增订单id',
`live_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联直播id', `live_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联直播id',
`is_member` varchar(255) NOT NULL DEFAULT '' COMMENT '购买者是否是会员', `is_member` varchar(255) NOT NULL DEFAULT '' COMMENT '购买者是否是会员',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_order_ticket_relations_uid_index` (`order_ticket_relations_id`), KEY `kylin_order_ticket_relations_uid_index` (`order_ticket_relations_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '订单关系'; DEFAULT CHARSET = utf8mb4 COMMENT '订单关系';
-- 订单状态 -- 订单状态
drop TABLE if exists `kylin_order_ticket_status`; drop TABLE if exists `kylin_order_ticket_status`;
CREATE TABLE `kylin_order_ticket_status` CREATE TABLE `kylin_order_ticket_status`
( (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`order_ticket_status_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'order_ticket_status_id', `order_ticket_status_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'order_ticket_status_id',
`order_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单id', `order_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单id',
`express_type` tinyint NOT NULL DEFAULT 1 COMMENT '快递方式 1寄付 2到付', `express_type` tinyint NOT NULL DEFAULT 1 COMMENT '快递方式 1寄付 2到付',
`transfer_status` tinyint NOT NULL DEFAULT 0 COMMENT '转移状态,0未转移,1收到他人转赠,2已转赠给他人', `transfer_status` tinyint NOT NULL DEFAULT 0 COMMENT '转移状态,0未转移,1收到他人转赠,2已转赠给他人',
`status` tinyint NOT NULL DEFAULT 0 COMMENT '订单状态:0待付款,1已付款,2已关闭,3正在退款,4已退款, 5待关闭 6部分退款', `status` tinyint NOT NULL DEFAULT 0 COMMENT '订单状态:0待付款,1已付款,2已关闭,3正在退款,4已退款, 5待关闭 6部分退款',
`pay_status` tinyint NOT NULL DEFAULT 0 COMMENT '支付状态:0未支付 1已支付 2支付失败', `pay_status` tinyint NOT NULL DEFAULT 0 COMMENT '支付状态:0未支付 1已支付 2支付失败',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_order_ticket_status_uid_index` (`order_ticket_status_id`), KEY `kylin_order_ticket_status_uid_index` (`order_ticket_status_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '订单状态'; DEFAULT CHARSET = utf8mb4 COMMENT '订单状态';
...@@ -447,7 +447,7 @@ CREATE TABLE `kylin_order_ticket_status` ...@@ -447,7 +447,7 @@ CREATE TABLE `kylin_order_ticket_status`
drop TABLE if exists `kylin_order_ticket_entities`; drop TABLE if exists `kylin_order_ticket_entities`;
CREATE TABLE `kylin_order_ticket_entities` CREATE TABLE `kylin_order_ticket_entities`
( (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`order_ticket_entities_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'order_ticket_entities_id', `order_ticket_entities_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'order_ticket_entities_id',
`order_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单详情关联id', `order_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单详情关联id',
`ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票务id', `ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票务id',
...@@ -460,10 +460,10 @@ CREATE TABLE `kylin_order_ticket_entities` ...@@ -460,10 +460,10 @@ CREATE TABLE `kylin_order_ticket_entities`
`status` int(11) NOT NULL DEFAULT 0 COMMENT '出票状态: 0未出票 1已出票', `status` int(11) NOT NULL DEFAULT 0 COMMENT '出票状态: 0未出票 1已出票',
`is_payment` int(11) NOT NULL DEFAULT 0 COMMENT '支付状态: 0未支付 1已支付 2退款中 3已退款 ', `is_payment` int(11) NOT NULL DEFAULT 0 COMMENT '支付状态: 0未支付 1已支付 2退款中 3已退款 ',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_order_ticket_entities_uid_index` (`order_ticket_entities_id`), KEY `kylin_order_ticket_entities_uid_index` (`order_ticket_entities_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '订单详情'; DEFAULT CHARSET = utf8mb4 COMMENT '订单详情';
...@@ -475,7 +475,7 @@ CREATE TABLE `kylin_order_ticket_entities` ...@@ -475,7 +475,7 @@ CREATE TABLE `kylin_order_ticket_entities`
drop TABLE if exists `kylin_order_tickets_refund`; drop TABLE if exists `kylin_order_tickets_refund`;
CREATE TABLE `kylin_order_tickets_refund` CREATE TABLE `kylin_order_tickets_refund`
( (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`order_tickets_refund_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'order_tickets_refund_id', `order_tickets_refund_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'order_tickets_refund_id',
`order_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单id', `order_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单id',
`reason` varchar(255) NOT NULL DEFAULT '' COMMENT '退款原因', `reason` varchar(255) NOT NULL DEFAULT '' COMMENT '退款原因',
...@@ -486,9 +486,9 @@ CREATE TABLE `kylin_order_tickets_refund` ...@@ -486,9 +486,9 @@ CREATE TABLE `kylin_order_tickets_refund`
`coupon_type` varchar(10) NOT NULL DEFAULT '' COMMENT '优惠券类型', `coupon_type` varchar(10) NOT NULL DEFAULT '' COMMENT '优惠券类型',
`coupon_id` varchar(255) NOT NULL DEFAULT '' COMMENT '优惠券id', `coupon_id` varchar(255) NOT NULL DEFAULT '' COMMENT '优惠券id',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'comment',
`created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_order_tickets_refund_uid_index` (`order_tickets_refund_id`), KEY `kylin_order_tickets_refund_uid_index` (`order_tickets_refund_id`),
PRIMARY KEY (`id`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT '订单退款'; DEFAULT CHARSET = utf8mb4 COMMENT '订单退款';
\ No newline at end of file
...@@ -40,6 +40,10 @@ ...@@ -40,6 +40,10 @@
</dependency> </dependency>
<!-- other --> <!-- other -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
</dependencies> </dependencies>
......
...@@ -5,6 +5,7 @@ import org.mybatis.spring.annotation.MapperScan; ...@@ -5,6 +5,7 @@ import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
......
package com.liquidnet.service.kylin.controller; package com.liquidnet.service.kylin.controller;
import com.liquidnet.service.kylin.model.FieldsModule; import com.liquidnet.service.ResponseDto;
import com.liquidnet.service.kylin.dto.param.FieldsParam;
import com.liquidnet.service.kylin.dto.vo.FieldsVo;
import com.liquidnet.service.kylin.service.impl.FieldsServiceImpl; import com.liquidnet.service.kylin.service.impl.FieldsServiceImpl;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -8,7 +10,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -8,7 +10,7 @@ import org.springframework.web.bind.annotation.*;
@Api @Api
@RestController @RestController
@RequestMapping("/user/kylin/fields") @RequestMapping("/user/fields")
public class FieldsController { public class FieldsController {
@Autowired @Autowired
...@@ -16,16 +18,13 @@ public class FieldsController { ...@@ -16,16 +18,13 @@ public class FieldsController {
@PostMapping(value = "") @PostMapping(value = "")
@ApiOperation(value = "创建场地") @ApiOperation(value = "创建场地")
@ApiImplicitParams({ @ApiResponse(response = FieldsVo.class, code = 200, message = "接口返回对象参数")
@ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"), public ResponseDto<FieldsVo> createFields(@RequestBody FieldsParam fieldsParam) {
@ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"), // boolean result=fieldsService.fieldCreate(fieldsParam);
@ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"), // if(result) {
@ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"), // return ResponseDto.success();
@ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"), // }else{
}) return ResponseDto.failure("场地创建失败");
@ApiResponse(response = FieldsModule.class, code = 200, message = "接口返回对象参数") // }
public void createFields(@RequestBody FieldsModule fieldsModule) {
System.out.println(fieldsModule.toString());
fieldsService.createFiles(fieldsModule);
} }
} }
package com.liquidnet.service.kylin.controller.admin;
import com.liquidnet.service.ResponseDto;
import com.liquidnet.service.kylin.dto.param.FieldsParam;
import com.liquidnet.service.kylin.dto.vo.FieldsVo;
import com.liquidnet.service.kylin.service.impl.FieldsServiceImpl;
import com.liquidnet.service.kylin.service.impl.admin.FieldsAdminServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api
@RestController
@RequestMapping("/admin/fields")
public class FieldsAdminController {
@Autowired
private FieldsAdminServiceImpl fieldsAdminService;
@PostMapping(value = "")
@ApiOperation(value = "创建场地")
@ApiResponse(response = FieldsVo.class, code = 200, message = "接口返回对象参数")
public ResponseDto<FieldsVo> createFields(@RequestBody FieldsParam fieldsParam) {
boolean result=fieldsAdminService.fieldCreate(fieldsParam);
if(result) {
return ResponseDto.success();
}else{
return ResponseDto.failure("场地创建失败");
}
}
}
...@@ -2,28 +2,50 @@ package com.liquidnet.service.kylin.service.impl; ...@@ -2,28 +2,50 @@ package com.liquidnet.service.kylin.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.service.kylin.entity.Fields; import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.service.kylin.mapper.FieldRelationMapper; import com.liquidnet.commons.lang.util.IDGenSnow;
import com.liquidnet.service.kylin.mapper.FieldStatusMapper; import com.liquidnet.service.kylin.dto.param.FieldsParam;
import com.liquidnet.service.kylin.mapper.FieldsMapper; import com.liquidnet.service.kylin.dto.vo.FieldsVo;
import com.liquidnet.service.kylin.model.FieldsModule; import com.liquidnet.service.kylin.entity.KylinFields;
import com.liquidnet.service.kylin.mapper.KylinFieldRelationMapper;
import com.liquidnet.service.kylin.mapper.KylinFieldStatusMapper;
import com.liquidnet.service.kylin.mapper.KylinFieldsMapper;
import com.liquidnet.service.kylin.service.KylinFieldsService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
public class FieldsServiceImpl extends ServiceImpl<FieldsMapper, Fields> { import java.util.Collection;
import java.util.Collections;
@Service
public class FieldsServiceImpl extends ServiceImpl<KylinFieldsMapper, KylinFields> implements KylinFieldsService {
@Autowired
MongoTemplate mongoTemplate;
@Autowired
private RedisUtil redisUtil;
@Autowired @Autowired
private FieldsMapper fieldsMapper; private KylinFieldsMapper fieldsMapper;
@Autowired @Autowired
private FieldStatusMapper fieldStatusMapper; private KylinFieldStatusMapper kylinFieldStatusMapper;
@Autowired @Autowired
private FieldRelationMapper fieldRelationsMapper; private KylinFieldRelationMapper fieldRelationsMapper;
@Override
public int fieldList(int page, int size) {
return 0;
}
public String createFiles(FieldsModule fieldsModule) { @Override
fieldsMapper.createFields(fieldsModule.getFields()); public int fieldDetails(int fieldId) {
fieldStatusMapper.createFieldStatus(fieldsModule.getFieldStatus()); return 0;
fieldRelationsMapper.createFieldRelations(fieldsModule.getFieldRelations());
return "success";
} }
} }
package com.liquidnet.service.kylin.service.impl.admin;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.commons.lang.util.IDGenSnow;
import com.liquidnet.service.kylin.dto.param.FieldsParam;
import com.liquidnet.service.kylin.dto.vo.FieldsVo;
import com.liquidnet.service.kylin.entity.KylinFields;
import com.liquidnet.service.kylin.mapper.KylinFieldRelationMapper;
import com.liquidnet.service.kylin.mapper.KylinFieldStatusMapper;
import com.liquidnet.service.kylin.mapper.KylinFieldsMapper;
import com.liquidnet.service.kylin.service.KylinFieldsService;
import com.liquidnet.service.kylin.service.admin.KylinFieldsAdminService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.Collections;
@Service
public class FieldsAdminServiceImpl implements KylinFieldsAdminService {
@Autowired
MongoTemplate mongoTemplate;
@Autowired
private RedisUtil redisUtil;
@Autowired
private KylinFieldsMapper fieldsMapper;
@Autowired
private KylinFieldStatusMapper kylinFieldStatusMapper;
@Autowired
private KylinFieldRelationMapper fieldRelationsMapper;
@Override
@Transactional
public boolean fieldCreate(FieldsParam fieldsParam) {
try {
String fieldsId = IDGenSnow.nextId().toString();
LocalDateTime createdAt = LocalDateTime.now();
fieldsMapper.insert(fieldsParam.getFields(fieldsId,createdAt));
kylinFieldStatusMapper.insert(fieldsParam.getFieldStatus(fieldsId,createdAt));
fieldRelationsMapper.insert(fieldsParam.getFieldRelations(fieldsId,createdAt));
FieldsVo fieldsVo = new FieldsVo();
BeanUtils.copyProperties(fieldsParam, fieldsVo);
fieldsVo.setFieldsId(fieldsId);
fieldsVo.setCreatedAt(createdAt);
Collection<FieldsVo> insertRst = mongoTemplate.insert(
Collections.singletonList(fieldsVo), FieldsVo.class.getSimpleName()
);
redisUtil.hset("kylin:fields:id", fieldsId, fieldsVo);
return true;
} catch (Exception e) {
return false;
}
}
}
...@@ -6,7 +6,7 @@ liquidnet: ...@@ -6,7 +6,7 @@ liquidnet:
username: user username: user
password: user123 password: user123
eureka: eureka:
host: 127.0.0.1:7001 host: 172.16.2.15:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
spring: spring:
......
...@@ -18,7 +18,7 @@ liquidnet: ...@@ -18,7 +18,7 @@ liquidnet:
username: admin username: admin
password: admin password: admin
config: config:
location: /Users/zhanggb/IdeaProjects/liquidnet-bus-v1/liquidnet-bus-config/liquidnet-config location: /Users/hujiachen/JavaProject/liquidnet-bus-v1/liquidnet-bus-config/liquidnet-config
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
spring: spring:
......
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