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

Commit c2c66647 authored by 胡佳晨's avatar 胡佳晨

先屏蔽 mongo

parent 6d445317
...@@ -17,7 +17,6 @@ public interface FieldsService extends IService<Fields> { ...@@ -17,7 +17,6 @@ public interface FieldsService extends IService<Fields> {
// adam // adam
int fieldCreate(FieldsModule fields); int fieldCreate(FieldsModule fields);
// App // App
int fieldList(int page,int size); int fieldList(int page,int size);
......
...@@ -87,9 +87,15 @@ public class FieldsModule implements Serializable { ...@@ -87,9 +87,15 @@ public class FieldsModule implements Serializable {
@ApiModelProperty(value = "修改时间") @ApiModelProperty(value = "修改时间")
private String updated_at; private String updated_at;
private Fields fields; public Fields getFields(){
return new Fields();
}
private FieldStatus fieldStatus; public FieldStatus getFieldStatus(){
return new FieldStatus();
}
private FieldRelations fieldRelations; public FieldRelations getFieldRelations(){
return new FieldRelations();
}
} }
<?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">
<mapper namespace="com.liquidnet.service.kylin.mapper.FieldsMapper">
<insert id="createFieldRelations" parameterType="FieldRelations">
insert into kylin_field_relations
(field_relations_id, field_id, created_at, updated_at)
values (#{field_relations_id}, #{field_id}, #{comment}, #{created_at}, #{updated_at})
</insert>
</mapper>
<?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">
<mapper namespace="com.liquidnet.service.kylin.mapper.FieldStatusMapper">
<insert id="createFieldStatus" parameterType="FieldStatus">
insert into kylin_field_status
(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},
#{created_at}, #{updated_at})
</insert>
</mapper>
<?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">
<mapper namespace="com.liquidnet.service.kylin.mapper.FieldsMapper">
<insert id="createFields" parameterType="Fields">
insert into kylin_fields
(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,
created_at, updated_at)
values (#{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},#{created_at}, #{updated_at})
</insert>
</mapper>
...@@ -17,8 +17,8 @@ import org.springframework.context.annotation.Bean; ...@@ -17,8 +17,8 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
//mongoSSl连接配置类 //mongoSSl连接配置类
@Slf4j //@Slf4j
@Configuration //@Configuration
public class MongoSslConfig { public class MongoSslConfig {
@Value("${spring.data.mongodb.trustStore}") @Value("${spring.data.mongodb.trustStore}")
private String trustStore; private String trustStore;
...@@ -29,12 +29,12 @@ public class MongoSslConfig { ...@@ -29,12 +29,12 @@ public class MongoSslConfig {
@Value("${spring.data.mongodb.sslEnabled}") @Value("${spring.data.mongodb.sslEnabled}")
private boolean sslEnabled; private boolean sslEnabled;
@Bean // @Bean
public MongoClient createMongoClientByUri() { public MongoClient createMongoClientByUri() {
log.info("MongoSslConfig trustStore:{}",trustStore); // log.info("MongoSslConfig trustStore:{}",trustStore);
log.info("MongoSslConfig trustStorePassword:{}",trustStorePassword); // log.info("MongoSslConfig trustStorePassword:{}",trustStorePassword);
log.info("MongoSslConfig mongodbUri:{}",mongodbUri); // log.info("MongoSslConfig mongodbUri:{}",mongodbUri);
log.info("MongoSslConfig sslEnabled:{}",sslEnabled); // log.info("MongoSslConfig sslEnabled:{}",sslEnabled);
System.setProperty("javax.net.ssl.trustStore",trustStore); System.setProperty("javax.net.ssl.trustStore",trustStore);
System.setProperty("javax.net.ssl.trustStorePassword",trustStorePassword); System.setProperty("javax.net.ssl.trustStorePassword",trustStorePassword);
......
package com.liquidnet.service.kylin.controller; package com.liquidnet.service.kylin.controller;
import com.liquidnet.service.kylin.model.FieldsModule;
import com.liquidnet.service.kylin.service.impl.FieldsServiceImpl; import com.liquidnet.service.kylin.service.impl.FieldsServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api @Api
@RestController @RestController
...@@ -16,10 +14,18 @@ public class FieldsController { ...@@ -16,10 +14,18 @@ public class FieldsController {
@Autowired @Autowired
private FieldsServiceImpl fieldsService; private FieldsServiceImpl fieldsService;
@PostMapping(value = "")
@ApiOperation(value = "创建场地") @ApiOperation(value = "创建场地")
@GetMapping @ApiImplicitParams({
public void createFields() { @ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"),
// fieldsService.createFiles(); @ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"),
@ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"),
@ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"),
@ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"),
})
@ApiResponse(response = FieldsModule.class, code = 200, message = "接口返回对象参数")
public void createFields(@RequestBody FieldsModule fieldsModule) {
System.out.println(fieldsModule.toString());
fieldsService.createFiles(fieldsModule);
} }
} }
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