Explorar el Código

Merge branch '2.0.0' of http://git.ycjcjy.com/fuxingfan/smartCommunity into 2.0.0

魏熙美 hace 6 años
padre
commit
0bccdf9bbf

+ 46
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TaVersionController.java Ver fichero

@@ -0,0 +1,46 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.huiju.service.TaVersionServicel;
5
+import io.swagger.annotations.Api;
6
+import io.swagger.annotations.ApiImplicitParam;
7
+import io.swagger.annotations.ApiImplicitParams;
8
+import io.swagger.annotations.ApiOperation;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.cloud.context.config.annotation.RefreshScope;
11
+import org.springframework.web.bind.annotation.PathVariable;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RequestMethod;
14
+import org.springframework.web.bind.annotation.RestController;
15
+
16
+import javax.servlet.http.HttpSession;
17
+
18
+/**
19
+ * version V1.0
20
+ * class_name: $METHOD_NAME$
21
+ * param: $METHOD_PARAM$
22
+ * describe: TODO
23
+ * creat_user:fuxingfan
24
+ * creat_time: 2019/5/9
25
+ **/
26
+@RestController
27
+@RefreshScope
28
+@RequestMapping("/")
29
+@Api(value = "版本相关的API", description = "版本相关的API")
30
+public class TaVersionController extends BaseController {
31
+
32
+
33
+    @Autowired
34
+    private TaVersionServicel taVersionService;
35
+
36
+
37
+    @ApiOperation(value = "获取APP版本号并对比", notes = "获取APP版本号并对比")
38
+    @ApiImplicitParams({
39
+            @ApiImplicitParam(paramType = "path",dataType = "String",name = "type",value = "ios/android"),
40
+    })
41
+    @RequestMapping(value = "/version/{type}",method = RequestMethod.GET)
42
+    public ResponseBean getVersion(@PathVariable String type, HttpSession session){
43
+        ResponseBean responseBean = taVersionService.getVersion(type);
44
+        return responseBean;
45
+    }
46
+}

+ 11
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaVersionMapper.java Ver fichero

@@ -0,0 +1,11 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TaVersion;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+
8
+@Mapper
9
+public interface TaVersionMapper {
10
+    TaVersion getVersion(@Param("type") String type);
11
+}

+ 68
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaVersion.java Ver fichero

@@ -0,0 +1,68 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+import java.util.List;
5
+
6
+public class TaVersion {
7
+    private Integer id;
8
+    
9
+    /**
10
+     * 客户端版本号
11
+     */
12
+    private String clientVersion;
13
+    
14
+    /**
15
+     *  服务端版本号
16
+     */
17
+    private String serviceVersion;
18
+    
19
+    /**
20
+     * 类型
21
+     */
22
+    private String type;
23
+    
24
+    /**
25
+     * 升级地址
26
+     */
27
+    private String updateAddress;
28
+    
29
+    public Integer getId() {
30
+        return id;
31
+    }
32
+    
33
+    public void setId(Integer id) {
34
+        this.id = id;
35
+    }
36
+    
37
+    public String getClientVersion() {
38
+        return clientVersion;
39
+    }
40
+    
41
+    public void setClientVersion(String clientVersion) {
42
+        this.clientVersion = clientVersion;
43
+    }
44
+    
45
+    public String getServiceVersion() {
46
+        return serviceVersion;
47
+    }
48
+    
49
+    public void setServiceVersion(String serviceVersion) {
50
+        this.serviceVersion = serviceVersion;
51
+    }
52
+    
53
+    public String getType() {
54
+        return type;
55
+    }
56
+    
57
+    public void setType(String type) {
58
+        this.type = type;
59
+    }
60
+    
61
+    public String getUpdateAddress() {
62
+        return updateAddress;
63
+    }
64
+    
65
+    public void setUpdateAddress(String updateAddress) {
66
+        this.updateAddress = updateAddress;
67
+    }
68
+}

+ 21
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TaVersionServicel.java Ver fichero

@@ -0,0 +1,21 @@
1
+package com.community.huiju.service;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.commom.session.UserElement;
5
+
6
+/**
7
+ * version V1.0
8
+ * class_name: $METHOD_NAME$
9
+ * param: $METHOD_PARAM$
10
+ * describe: TODO
11
+ * creat_user:fuxingfan
12
+ * creat_time: 2019/5/9
13
+ **/
14
+public interface TaVersionServicel {
15
+    /**
16
+     * 获取版本号
17
+     * @param type
18
+     * @return
19
+     */
20
+    ResponseBean getVersion(String type);
21
+}

+ 48
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaVersionServiceimpl.java Ver fichero

@@ -0,0 +1,48 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.commom.session.UserElement;
5
+import com.community.huiju.dao.TaVersionMapper;
6
+import com.community.huiju.dao.TpHotelImgMapper;
7
+import com.community.huiju.dao.TpHotelMapper;
8
+import com.community.huiju.dao.TpHotelRoomMapper;
9
+import com.community.huiju.model.TaVersion;
10
+import com.community.huiju.model.TpHotel;
11
+import com.community.huiju.model.TpHotelRoom;
12
+import com.community.huiju.service.TaVersionServicel;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.stereotype.Service;
15
+import org.springframework.transaction.annotation.Transactional;
16
+
17
+import java.util.HashMap;
18
+import java.util.List;
19
+import java.util.Map;
20
+
21
+/**
22
+ * version V1.0
23
+ * class_name: $METHOD_NAME$
24
+ * param: $METHOD_PARAM$
25
+ * describe: TODO
26
+ * creat_user:fuxingfan
27
+ * creat_time: 2019/5/9
28
+ **/
29
+@Service("taVersionService")
30
+@Transactional
31
+public class TaVersionServiceimpl implements TaVersionServicel {
32
+    
33
+    @Autowired
34
+    private TaVersionMapper taVersionMapper;
35
+    /**
36
+     * 获取版本号
37
+     *
38
+     * @param type
39
+     * @return
40
+     */
41
+    @Override
42
+    public ResponseBean getVersion(String type) {
43
+        ResponseBean responseBean = new ResponseBean();
44
+        TaVersion taVersion = taVersionMapper.getVersion(type);
45
+        responseBean.addSuccess(taVersion);
46
+        return responseBean;
47
+    }
48
+}

+ 15
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaVersionMapper.xml Ver fichero

@@ -0,0 +1,15 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TaVersionMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TaVersion" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="client_version" property="clientVersion" jdbcType="VARCHAR" />
7
+    <result column="service_version" property="serviceVersion" jdbcType="VARCHAR" />
8
+    <result column="type" property="type" jdbcType="VARCHAR" />
9
+    <result column="update_address" property="updateAddress" jdbcType="VARCHAR" />
10
+  </resultMap>
11
+
12
+  <select id="getVersion" resultMap="BaseResultMap">
13
+    select id,client_version,service_version,update_address FROM ta_version  where `type` = #{type,jdbcType=VARCHAR}
14
+  </select>
15
+</mapper>

+ 1101
- 1010
文档/MYSQL/smartCommunity.pdb
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 1113
- 1010
文档/MYSQL/smartCommunity.pdm
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero