Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gongdc/pinche

achao 2 years ago
parent
commit
95bb9482b9

+ 2 - 2
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/IPincheMakeAppointmentAppService.java

@@ -53,10 +53,10 @@ public interface IPincheMakeAppointmentAppService {
 		@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)
 		throws ServiceException;
 
-	@HttpMethod(description = "删除", permission = "admin:unimall:pincheMakeAppointment:delete",permissionParentName = "宠物管理", permissionName = "预约信息管理")
+	@HttpMethod(description = "删除"  )
 	public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")String id)throws ServiceException;
 
-	@HttpMethod(description = "修改", permission = "admin:unimall:pincheMakeAppointment:update",permissionParentName = "宠物管理", permissionName = "预约信息管理")
+	@HttpMethod(description = "修改")
 	public Boolean update(@NotNull @HttpParam(name = "pincheMakeAppointment", type = HttpParamType.COMMON, description = "预约信息") PincheMakeAppointment pincheMakeAppointment,
 						  @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
 

+ 16 - 1
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/impl/PincheCarSharingAppServiceImpl.java

@@ -5,13 +5,16 @@ import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.iotechn.unimall.app.api.pinche.IPincheCarSharingAppService;
 import com.iotechn.unimall.core.exception.ServiceException;
 import com.iotechn.unimall.data.domain.PincheCarSharing;
+import com.iotechn.unimall.data.domain.PincheMakeAppointment;
 import com.iotechn.unimall.data.mapper.PincheCarSharingMapper;
+import com.iotechn.unimall.data.mapper.PincheMakeAppointmentMapper;
 import com.iotechn.unimall.data.model.Page;
 import com.iotechn.unimall.data.util.ExcelUtil;
 import org.apache.ibatis.session.RowBounds;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
 import java.util.Date;
@@ -27,6 +30,8 @@ import java.util.List;
 public class PincheCarSharingAppServiceImpl implements IPincheCarSharingAppService {
     @Autowired
     private PincheCarSharingMapper pincheCarSharingMapper;
+    @Autowired
+    private PincheMakeAppointmentMapper pincheMakeAppointmentMapper;
 
     @Override
     public Boolean add(PincheCarSharing pincheCarSharing, Long adminId) throws ServiceException {
@@ -108,8 +113,18 @@ public class PincheCarSharingAppServiceImpl implements IPincheCarSharingAppServi
             wrapper.eq("admin_id", adminId);
         }
         wrapper.eq("delete_flag", 0);
-        wrapper.orderBy("departure_time",false);
+        wrapper.orderBy("departure_time", false);
         List<PincheCarSharing> list = pincheCarSharingMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+        if (!CollectionUtils.isEmpty(list)) {
+            for (int i = 0; i < list.size(); i++) {
+                Integer makeCount = pincheMakeAppointmentMapper.selectCount(new EntityWrapper<PincheMakeAppointment>().eq("delete_flag", 0)
+                        .eq("remark2", list.get(i).getId())
+                        .notIn("status", "已拒绝"));
+                if (makeCount > 0) {
+                    list.get(i).setStatus("已预约");
+                }
+            }
+        }
         Integer count = pincheCarSharingMapper.selectCount(wrapper);
         return new Page<PincheCarSharing>(list, page, limit, count);
     }

+ 2 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/impl/PincheMakeAppointmentAppServiceImpl.java

@@ -31,6 +31,7 @@ public class PincheMakeAppointmentAppServiceImpl implements IPincheMakeAppointme
     @Override
     public Boolean add(PincheMakeAppointment pincheMakeAppointment, Long adminId) throws ServiceException {
         Date now = new Date();
+        pincheMakeAppointment.setStatus("已预约");
         pincheMakeAppointment.setGmtCreate(now);
         pincheMakeAppointment.setGmtUpdate(now);
         pincheMakeAppointment.setAdminId(adminId);
@@ -110,6 +111,7 @@ public class PincheMakeAppointmentAppServiceImpl implements IPincheMakeAppointme
             wrapper.eq("admin_id", adminId);
         }
         wrapper.eq("delete_flag", 0);
+        wrapper.orderBy("gmt_update",false);
         List<PincheMakeAppointment> list = pincheMakeAppointmentMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
         Integer count = pincheMakeAppointmentMapper.selectCount(wrapper);
         return new Page<PincheMakeAppointment>(list, page, limit, count);

+ 10 - 2
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/user/UserService.java

@@ -10,9 +10,10 @@ import com.iotechn.unimall.core.annotation.param.NotNull;
 import com.iotechn.unimall.core.annotation.param.TextFormat;
 import com.iotechn.unimall.core.exception.ServiceException;
 import com.iotechn.unimall.data.domain.AjaxResult;
+import com.iotechn.unimall.data.domain.UserDO;
 import com.iotechn.unimall.data.dto.UserDTO;
 
-/**
+/**+
  * Created by rize on 2019/6/30.
  */
 @HttpOpenApi(group = "user", description = "用户服务")
@@ -22,6 +23,12 @@ public interface UserService {
     public String sendVerifyCode(
             @NotNull @TextFormat(length = 11) @HttpParam(name = "phone", type = HttpParamType.COMMON, description = "用户手机号") String phone) throws ServiceException;
 
+    @HttpMethod(description = "新增用户")
+    public UserDO addUser(@HttpParam(name = "openId", type = HttpParamType.COMMON, description = "userid") String openId,
+                          @HttpParam(name = "phone", type = HttpParamType.COMMON, description = "电话") String phone,
+                          @HttpParam(name = "name", type = HttpParamType.COMMON, description = "昵称") String name,
+                          @HttpParam(name = "ip", type = HttpParamType.COMMON, description = "ip") String ip) throws Exception;
+
     @HttpMethod(description = "用户注册")
     public String register(
             @NotNull @TextFormat(length = 11) @HttpParam(name = "phone", type = HttpParamType.COMMON, description = "用户手机号") String phone,
@@ -75,6 +82,7 @@ public interface UserService {
     public Object getH5Sign(
             @NotNull @HttpParam(name = "url", type = HttpParamType.COMMON, description = "url") String url) throws ServiceException;
 
-    public AjaxResult appletLogin(@NotNull @HttpParam(name = "code", type = HttpParamType.COMMON, description = "code")JSONObject code) throws Exception;
+    @HttpMethod(description = "企业账号信息")
+    public AjaxResult appletLogin(@HttpParam(name = "code", type = HttpParamType.COMMON, description = "code")String code) throws Exception;
 
 }

+ 42 - 3
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/user/UserServiceImpl.java

@@ -88,23 +88,62 @@ public class UserServiceImpl implements UserService {
     @Value("${com.iotechn.unimall.wx.h5.app-secret}")
     private String wxH5Secret;
 
+    @Autowired
+    private WeiXinQiYeUtil weiXinQiYeUtil;
+
+
     /**
      * 企业小程序授权登录
      * @param code
      * @return
      */
     @Override
-    public AjaxResult appletLogin(JSONObject code) throws Exception {
+    public AjaxResult appletLogin(String code) throws Exception {
 
-        String accessToken = WeiXinQiYeUtil.accessToken();
+        String accessToken = weiXinQiYeUtil.accessToken();
 
-        String appletCode = code.getString("code");
+        String appletCode = code;
         String url = "https://qyapi.weixin.qq.com/cgi-bin/miniprogram/jscode2session?access_token="+accessToken+"&js_code="+appletCode+"&grant_type=authorization_code";
         String msg = HttpRequestUtil.httpGet(url,null);
 //        log.info("msg: "+msg);
         JSONObject jsonObject = JSON.parseObject(msg);
+
         return AjaxResult.success(jsonObject);
     }
+    @Override
+    public UserDO addUser(String openId, String phone,String name, String ip) throws Exception {
+        List<UserDO> userDOS = userMapper.selectList(new EntityWrapper<UserDO>().eq("phone", phone));
+        UserDO userDO;
+        if (CollectionUtils.isEmpty(userDOS)) {
+            //若用户为空,则注册此用户
+            Date now = new Date();
+            UserDO newUserDO = new UserDO();
+            newUserDO.setPhone(phone);
+            newUserDO.setNickname(name);
+            newUserDO.setLoginType(99);
+            newUserDO.setLevel(0);
+            newUserDO.setOpenId(openId);
+            newUserDO.setLastLoginIp(ip);
+            newUserDO.setGmtLastLogin(now);
+            newUserDO.setGmtUpdate(now);
+            newUserDO.setGmtCreate(now);
+            userMapper.insert(newUserDO);
+            //这一步是为了封装上数据库上配置的默认值
+            userDO = userMapper.selectById(newUserDO.getId());
+            return userDO;
+        } else {
+            userDO = userDOS.get(0);
+            UserDO userUpdateDO = new UserDO();
+            userUpdateDO.setPhone(phone);
+            userUpdateDO.setNickname(name);
+            userUpdateDO.setId(userDO.getId());
+            userUpdateDO.setGmtLastLogin(new Date());
+            userUpdateDO.setLastLoginIp(ip);
+            userMapper.updateById(userUpdateDO);
+            return userUpdateDO;
+        }
+
+    }
 
 
     @Override

+ 8 - 0
unimall-data/pom.xml

@@ -130,6 +130,14 @@
 			<groupId>com.fasterxml.jackson.core</groupId>
 			<artifactId>jackson-annotations</artifactId>
 		</dependency>
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+        </dependency>
+		<dependency>
+			<groupId>com.squareup.okhttp3</groupId>
+			<artifactId>okhttp</artifactId>
+		</dependency>
 	</dependencies>
 
 </project>

+ 1 - 1
unimall-data/src/main/java/com/iotechn/unimall/data/domain/CacheComponent.java → unimall-data/src/main/java/com/iotechn/unimall/data/domain/CacheComponentOwn.java

@@ -15,7 +15,7 @@ import java.util.concurrent.TimeUnit;
  * Created by rize on 2019/3/22.
  */
 @Component
-public class CacheComponent {
+public class CacheComponentOwn {
 
     @Autowired
     private StringRedisTemplate stringRedisTemplate;

+ 5 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/PincheMakeAppointment.java

@@ -1,5 +1,6 @@
 package com.iotechn.unimall.data.domain;
 
+import com.alibaba.fastjson.annotation.JSONField;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel;
@@ -10,6 +11,8 @@ import lombok.Data;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.enums.FieldFill;
 import com.iotechn.unimall.core.util.StringUtils;
+import org.springframework.format.annotation.DateTimeFormat;
+
 import java.util.Date;
 
 /**
@@ -75,6 +78,8 @@ public class PincheMakeAppointment extends SuperDO{
     /** 出发时间 */
     @Excel(name = "出发时间", width = 30, dateFormat = "yyyy-MM-dd")
     @TableField("departure_time")
+    @JSONField(format = "yyyy-MM-dd HH:mm")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
     private Date departureTime;
 
     /** 人数 */

+ 17 - 10
unimall-data/src/main/java/com/iotechn/unimall/data/util/WeiXinQiYeUtil.java

@@ -1,13 +1,15 @@
 package com.iotechn.unimall.data.util;
 
 import com.alibaba.fastjson.JSONObject;
+import com.iotechn.unimall.core.util.StringUtils;
 import com.iotechn.unimall.data.domain.AccessToken;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.cache.RedisCache;
-import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Component;
-
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import javax.annotation.Resource;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 
@@ -15,32 +17,37 @@ import java.util.concurrent.TimeUnit;
 @Slf4j
 public class WeiXinQiYeUtil {
 
-    @Autowired
-    private RedisTemplate redisCache;
+    private OkHttpClient okHttpClient = new OkHttpClient();
 
+    @Resource
+    private StringRedisTemplate stringRedisTemplate;
     /**
      * 获取accessToken
      *
      * @return
      */
-    public static String accessToken() throws Exception {
+    public  String accessToken() throws Exception {
         //缓存access_token
-        if (!redisCache.hasKey("qiyeweixin_access_token")) {
+        if (StringUtils.isEmpty(stringRedisTemplate.opsForValue().get("qiyeweixin_access_token"))) {
             //获取企业Id和凭证
-            String corpId = "自己企业微信corpId";
-            String corpSecret = "自己企业微信corpSecret";
+            String corpId = "ww758b780ef84a1f29";
+            String corpSecret = "5c5Wkx5FyI5Tr_h7QyWLcc-G_KSWWuU8JigATR8SrXg";
 
             //拼接调用企业微信SDK
             String qyAccessTokenUrl = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + corpId + "&corpsecret=" + corpSecret;
+//            String qyAccessTokenUrl = okHttpClient.newCall(
+//                    new Request.Builder().url("https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + corpId + "&corpsecret=" + corpSecret).build()).execute().body().string();
             // 获取企业微信 access_token
             String s = HttpRequestUtil.httpPost(qyAccessTokenUrl,null,null);
+//            JSONObject jsonObject = JSONObject.parseObject(body);
             s = "[" + s + "]";
             //把读出来的json文件换换为实体
             List<AccessToken> tokens = JSONObject.parseArray(s, AccessToken.class);
             String accessToken = tokens.get(0).getAccessToken();
+            stringRedisTemplate.opsForValue().set("qiyeweixin_access_token", accessToken,3600, TimeUnit.SECONDS);
             return accessToken;
         }
 
-      return null;
+      return stringRedisTemplate.opsForValue().get("qiyeweixin_access_token");
     }
 }

+ 54 - 54
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/tools/gen/GenTableColumnMapper.xml

@@ -3,59 +3,59 @@
 <mapper
 	namespace="com.iotechn.unimall.data.mapper.tools.gen.GenTableColumnMapper">
 
-	<resultMap type="GenTableColumn" id="GenTableColumnResult">
-		<id property="columnId" column="column_id" />
-		<result property="tableId" column="table_id" />
-		<result property="columnName" column="column_name" />
-		<result property="columnComment" column="column_comment" />
-		<result property="columnType" column="column_type" />
-		<result property="javaType" column="java_type" />
-		<result property="javaField" column="java_field" />
-		<result property="isPk" column="is_pk" />
-		<result property="isIncrement" column="is_increment" />
-		<result property="isRequired" column="is_required" />
-		<result property="isInsert" column="is_insert" />
-		<result property="isEdit" column="is_edit" />
-		<result property="isList" column="is_list" />
-		<result property="isQuery" column="is_query" />
-		<result property="queryType" column="query_type" />
-		<result property="htmlType" column="html_type" />
-		<result property="dictType" column="dict_type" />
-		<result property="sort" column="sort" />
-		<result property="createBy" column="create_by" />
-		<result property="createTime" column="create_time" />
-		<result property="updateBy" column="update_by" />
-		<result property="updateTime" column="update_time" />
-	</resultMap>
-	<sql id="selectDictTypeVo">
-		SELECT
-		table_id AS tableId,
-		`table_name` AS tableName,
-		table_comment AS tableComment,
-		class_name AS className,
-		tpl_category AS tplCategory,
-		package_name AS packageName,
-		module_name AS moduleName,
-		business_name AS businessName,
-		function_name AS functionName,
-		function_author AS functionAuthor,
-		create_by AS createBy,
-		create_time AS createTime,
-		update_by AS updateBy,
-		update_time AS updateTime,
-		`options`
-		FROM
-		sys_gen_table
-	</sql>
-	<select id="selectDbTableColumnsByName" parameterType="String" resultType="com.iotechn.unimall.data.domain.tools.gen.GenTableColumn">
-		select column_name as columnName, (case when (is_nullable = 'no' <![CDATA[ && ]]>
-		column_key != 'PRI') then '1' else null end) as isRequired, (case
-		when column_key = 'PRI' then '1' else '0' end) as isPk,
-		ordinal_position as sort, column_comment as columnComment, (case when extra =
-		'auto_increment' then '1' else '0' end) as isIncrement, column_type as columnType
-		from information_schema.columns where table_schema = (select
-		database()) and table_name = (#{tableName})
-		order by ordinal_position
-	</select>
+<!--	<resultMap type="GenTableColumn" id="GenTableColumnResult">-->
+<!--		<id property="columnId" column="column_id" />-->
+<!--		<result property="tableId" column="table_id" />-->
+<!--		<result property="columnName" column="column_name" />-->
+<!--		<result property="columnComment" column="column_comment" />-->
+<!--		<result property="columnType" column="column_type" />-->
+<!--		<result property="javaType" column="java_type" />-->
+<!--		<result property="javaField" column="java_field" />-->
+<!--		<result property="isPk" column="is_pk" />-->
+<!--		<result property="isIncrement" column="is_increment" />-->
+<!--		<result property="isRequired" column="is_required" />-->
+<!--		<result property="isInsert" column="is_insert" />-->
+<!--		<result property="isEdit" column="is_edit" />-->
+<!--		<result property="isList" column="is_list" />-->
+<!--		<result property="isQuery" column="is_query" />-->
+<!--		<result property="queryType" column="query_type" />-->
+<!--		<result property="htmlType" column="html_type" />-->
+<!--		<result property="dictType" column="dict_type" />-->
+<!--		<result property="sort" column="sort" />-->
+<!--		<result property="createBy" column="create_by" />-->
+<!--		<result property="createTime" column="create_time" />-->
+<!--		<result property="updateBy" column="update_by" />-->
+<!--		<result property="updateTime" column="update_time" />-->
+<!--	</resultMap>-->
+<!--	<sql id="selectDictTypeVo">-->
+<!--		SELECT-->
+<!--		table_id AS tableId,-->
+<!--		`table_name` AS tableName,-->
+<!--		table_comment AS tableComment,-->
+<!--		class_name AS className,-->
+<!--		tpl_category AS tplCategory,-->
+<!--		package_name AS packageName,-->
+<!--		module_name AS moduleName,-->
+<!--		business_name AS businessName,-->
+<!--		function_name AS functionName,-->
+<!--		function_author AS functionAuthor,-->
+<!--		create_by AS createBy,-->
+<!--		create_time AS createTime,-->
+<!--		update_by AS updateBy,-->
+<!--		update_time AS updateTime,-->
+<!--		`options`-->
+<!--		FROM-->
+<!--		sys_gen_table-->
+<!--	</sql>-->
+<!--	<select id="selectDbTableColumnsByName" parameterType="String" resultType="com.iotechn.unimall.data.domain.tools.gen.GenTableColumn">-->
+<!--		select column_name as columnName, (case when (is_nullable = 'no' <![CDATA[ && ]]>-->
+<!--		column_key != 'PRI') then '1' else null end) as isRequired, (case-->
+<!--		when column_key = 'PRI' then '1' else '0' end) as isPk,-->
+<!--		ordinal_position as sort, column_comment as columnComment, (case when extra =-->
+<!--		'auto_increment' then '1' else '0' end) as isIncrement, column_type as columnType-->
+<!--		from information_schema.columns where table_schema = (select-->
+<!--		database()) and table_name = (#{tableName})-->
+<!--		order by ordinal_position-->
+<!--	</select>-->
 
 </mapper>

+ 118 - 118
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/tools/gen/GenTableMapper.xml

@@ -2,124 +2,124 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.iotechn.unimall.data.mapper.tools.gen.GenTableMapper">
 
-	<resultMap type="GenTable" id="GenTableResult">
-	    <id     property="tableId"        column="table_id"        />
-		<result property="tableName"      column="table_name"      />
-		<result property="tableComment"   column="table_comment"   />
-		<result property="className"      column="class_name"      />
-		<result property="tplCategory"    column="tpl_category"    />
-		<result property="packageName"    column="package_name"    />
-		<result property="moduleName"     column="module_name"     />
-		<result property="businessName"   column="business_name"   />
-		<result property="functionName"   column="function_name"   />
-		<result property="functionAuthor" column="function_author" />
-		<result property="options"        column="options"         />
-		<result property="createBy"       column="create_by"       />
-		<result property="createTime"     column="create_time"     />
-		<result property="updateBy"       column="update_by"       />
-		<result property="updateTime"     column="update_time"     />
-		<result property="remark"         column="remark"          />
-		<collection  property="columns"  javaType="java.util.List"  resultMap="GenTableColumnResult" />
-	</resultMap>
+<!--	<resultMap type="GenTable" id="GenTableResult">-->
+<!--	    <id     property="tableId"        column="table_id"        />-->
+<!--		<result property="tableName"      column="table_name"      />-->
+<!--		<result property="tableComment"   column="table_comment"   />-->
+<!--		<result property="className"      column="class_name"      />-->
+<!--		<result property="tplCategory"    column="tpl_category"    />-->
+<!--		<result property="packageName"    column="package_name"    />-->
+<!--		<result property="moduleName"     column="module_name"     />-->
+<!--		<result property="businessName"   column="business_name"   />-->
+<!--		<result property="functionName"   column="function_name"   />-->
+<!--		<result property="functionAuthor" column="function_author" />-->
+<!--		<result property="options"        column="options"         />-->
+<!--		<result property="createBy"       column="create_by"       />-->
+<!--		<result property="createTime"     column="create_time"     />-->
+<!--		<result property="updateBy"       column="update_by"       />-->
+<!--		<result property="updateTime"     column="update_time"     />-->
+<!--		<result property="remark"         column="remark"          />-->
+<!--		<collection  property="columns"  javaType="java.util.List"  resultMap="GenTableColumnResult" />-->
+<!--	</resultMap>-->
 
-	<resultMap type="GenTableColumn" id="GenTableColumnResult">
-        <id     property="columnId"       column="column_id"      />
-        <result property="tableId"        column="table_id"       />
-        <result property="columnName"     column="column_name"    />
-        <result property="columnComment"  column="column_comment" />
-        <result property="columnType"     column="column_type"    />
-        <result property="javaType"       column="java_type"      />
-        <result property="javaField"      column="java_field"     />
-        <result property="isPk"           column="is_pk"          />
-        <result property="isIncrement"    column="is_increment"   />
-        <result property="isRequired"     column="is_required"    />
-        <result property="isInsert"       column="is_insert"      />
-        <result property="isEdit"         column="is_edit"        />
-        <result property="isList"         column="is_list"        />
-        <result property="isQuery"        column="is_query"       />
-        <result property="queryType"      column="query_type"     />
-        <result property="htmlType"       column="html_type"      />
-        <result property="dictType"       column="dict_type"      />
-        <result property="sort"           column="sort"           />
-        <result property="createBy"       column="create_by"      />
-        <result property="createTime"     column="create_time"    />
-        <result property="updateBy"       column="update_by"      />
-        <result property="updateTime"     column="update_time"    />
-    </resultMap>
-	<sql id="selectDictTypeVo">
-		SELECT
-			table_id AS tableId,
-			`table_name` AS tableName,
-			table_comment AS tableComment,
-			class_name AS className,
-			tpl_category AS tplCategory,
-			package_name AS packageName,
-			module_name AS moduleName,
-			business_name AS businessName,
-			function_name AS functionName,
-			function_author AS functionAuthor,
-			create_by AS createBy,
-			create_time AS createTime,
-			update_by AS updateBy,
-			update_time AS updateTime,
-			`options`
-		FROM
-			sys_gen_table
-	</sql>
-	<select id="selectDbTableListByNames"  resultType="com.iotechn.unimall.data.domain.tools.gen.GenTable">
-		SELECT
-        table_name as tableName,
-        table_comment as tableComment,
-        create_time as createTime,
-        update_time as updateTime
-		FROM
-			information_schema.TABLES
-		WHERE
-			table_schema = ( SELECT DATABASE ( ) )
-			AND table_name NOT LIKE 'qrtz_%'
-			AND table_name NOT LIKE 'gen_%'
-			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )
-			AND table_name in
-			<foreach  item="item" collection="array" index="index"  open="(" separator="," close=")">
-			#{item}
-			</foreach>
-	</select>
-	<select id="selectDbTableList" parameterType="GenTable" resultType="com.iotechn.unimall.data.domain.tools.gen.GenTable">
-		SELECT
-			table_name as tableName,
-			table_comment as tableComment,
-			create_time as createTime,
-			update_time as updateTime
-		FROM
-			information_schema.TABLES
-		WHERE
-			table_schema = ( SELECT DATABASE ( ) )
-			AND table_name NOT LIKE 'qrtz_%'
-			AND table_name NOT LIKE 'gen_%'
-			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )
-		<if test="tableName != null and tableName != ''">
-			AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
-		</if>
-		<if test="tableComment != null and tableComment != ''">
-			AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
-		</if>
-	</select>
-	<select id="selectDbTableCount" parameterType="GenTable" resultType="java.lang.Integer">
-		SELECT
-			COUNT(*)
-		FROM
-			information_schema.TABLES
-		WHERE
-			table_schema = ( SELECT DATABASE ( ) )
-			AND table_name NOT LIKE 'qrtz_%'
-			AND table_name NOT LIKE 'gen_%'
-			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )
-		<if test="tableName != null and tableName != ''">
-			AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
-		</if>
-		<if test="tableComment != null and tableComment != ''">
-			AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
-		</if>
-	</select>
+<!--	<resultMap type="GenTableColumn" id="GenTableColumnResult">-->
+<!--        <id     property="columnId"       column="column_id"      />-->
+<!--        <result property="tableId"        column="table_id"       />-->
+<!--        <result property="columnName"     column="column_name"    />-->
+<!--        <result property="columnComment"  column="column_comment" />-->
+<!--        <result property="columnType"     column="column_type"    />-->
+<!--        <result property="javaType"       column="java_type"      />-->
+<!--        <result property="javaField"      column="java_field"     />-->
+<!--        <result property="isPk"           column="is_pk"          />-->
+<!--        <result property="isIncrement"    column="is_increment"   />-->
+<!--        <result property="isRequired"     column="is_required"    />-->
+<!--        <result property="isInsert"       column="is_insert"      />-->
+<!--        <result property="isEdit"         column="is_edit"        />-->
+<!--        <result property="isList"         column="is_list"        />-->
+<!--        <result property="isQuery"        column="is_query"       />-->
+<!--        <result property="queryType"      column="query_type"     />-->
+<!--        <result property="htmlType"       column="html_type"      />-->
+<!--        <result property="dictType"       column="dict_type"      />-->
+<!--        <result property="sort"           column="sort"           />-->
+<!--        <result property="createBy"       column="create_by"      />-->
+<!--        <result property="createTime"     column="create_time"    />-->
+<!--        <result property="updateBy"       column="update_by"      />-->
+<!--        <result property="updateTime"     column="update_time"    />-->
+<!--    </resultMap>-->
+<!--	<sql id="selectDictTypeVo">-->
+<!--		SELECT-->
+<!--			table_id AS tableId,-->
+<!--			`table_name` AS tableName,-->
+<!--			table_comment AS tableComment,-->
+<!--			class_name AS className,-->
+<!--			tpl_category AS tplCategory,-->
+<!--			package_name AS packageName,-->
+<!--			module_name AS moduleName,-->
+<!--			business_name AS businessName,-->
+<!--			function_name AS functionName,-->
+<!--			function_author AS functionAuthor,-->
+<!--			create_by AS createBy,-->
+<!--			create_time AS createTime,-->
+<!--			update_by AS updateBy,-->
+<!--			update_time AS updateTime,-->
+<!--			`options`-->
+<!--		FROM-->
+<!--			sys_gen_table-->
+<!--	</sql>-->
+<!--	<select id="selectDbTableListByNames"  resultType="com.iotechn.unimall.data.domain.tools.gen.GenTable">-->
+<!--		SELECT-->
+<!--        table_name as tableName,-->
+<!--        table_comment as tableComment,-->
+<!--        create_time as createTime,-->
+<!--        update_time as updateTime-->
+<!--		FROM-->
+<!--			information_schema.TABLES-->
+<!--		WHERE-->
+<!--			table_schema = ( SELECT DATABASE ( ) )-->
+<!--			AND table_name NOT LIKE 'qrtz_%'-->
+<!--			AND table_name NOT LIKE 'gen_%'-->
+<!--			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )-->
+<!--			AND table_name in-->
+<!--			<foreach  item="item" collection="array" index="index"  open="(" separator="," close=")">-->
+<!--			#{item}-->
+<!--			</foreach>-->
+<!--	</select>-->
+<!--	<select id="selectDbTableList" parameterType="GenTable" resultType="com.iotechn.unimall.data.domain.tools.gen.GenTable">-->
+<!--		SELECT-->
+<!--			table_name as tableName,-->
+<!--			table_comment as tableComment,-->
+<!--			create_time as createTime,-->
+<!--			update_time as updateTime-->
+<!--		FROM-->
+<!--			information_schema.TABLES-->
+<!--		WHERE-->
+<!--			table_schema = ( SELECT DATABASE ( ) )-->
+<!--			AND table_name NOT LIKE 'qrtz_%'-->
+<!--			AND table_name NOT LIKE 'gen_%'-->
+<!--			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )-->
+<!--		<if test="tableName != null and tableName != ''">-->
+<!--			AND lower(table_name) like lower(concat('%', #{tableName}, '%'))-->
+<!--		</if>-->
+<!--		<if test="tableComment != null and tableComment != ''">-->
+<!--			AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))-->
+<!--		</if>-->
+<!--	</select>-->
+<!--	<select id="selectDbTableCount" parameterType="GenTable" resultType="java.lang.Integer">-->
+<!--		SELECT-->
+<!--			COUNT(*)-->
+<!--		FROM-->
+<!--			information_schema.TABLES-->
+<!--		WHERE-->
+<!--			table_schema = ( SELECT DATABASE ( ) )-->
+<!--			AND table_name NOT LIKE 'qrtz_%'-->
+<!--			AND table_name NOT LIKE 'gen_%'-->
+<!--			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )-->
+<!--		<if test="tableName != null and tableName != ''">-->
+<!--			AND lower(table_name) like lower(concat('%', #{tableName}, '%'))-->
+<!--		</if>-->
+<!--		<if test="tableComment != null and tableComment != ''">-->
+<!--			AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))-->
+<!--		</if>-->
+<!--	</select>-->
 
 </mapper>

+ 3 - 3
unimall-launcher/src/main/resources/application.properties

@@ -1,4 +1,4 @@
-server.port=8099
+server.port=8090
 server.servlet.multipart.max-file-size=100MB
 server.servlet.multipart.maxRequestSize=100MB
 
@@ -10,9 +10,9 @@ logging.level.root=debug
 ###MySql (MySqlConfiguration)
 ########################################################
 spring.druid.driverClassName=com.mysql.jdbc.Driver
-spring.druid.url=jdbc:mysql://123.56.171.94/pinche?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&useSSL=false
+spring.druid.url=jdbc:mysql://172.16.5.244/pinche?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&useSSL=false
 spring.druid.username=root
-spring.druid.password=B27czfiN3ZeLLxL6
+spring.druid.password=cb0ab252fdb14548
 spring.druid.maxActive=30
 spring.druid.minIdle=5
 spring.druid.maxWait=10000