- 删除 target
parent
434ed6f2f3
commit
fc4a56401e
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,8 +0,0 @@
|
|||
##################### 业务模块 #####################
|
||||
## MobileCodeService
|
||||
modules.mobile-code-service.code-expire-time-millis = 600000
|
||||
modules.mobile-code-service.send-maximum-quantity-per-day = 10
|
||||
modules.mobile-code-service.send-frequency = 60000
|
||||
## OAuth2CodeService
|
||||
modules.oauth2-code-service.access-token-expire-time-millis = 2880000
|
||||
modules.oauth2-code-service.refresh-token-expire-time-millis = 43200000
|
|
@ -1,32 +0,0 @@
|
|||
spring:
|
||||
# datasource
|
||||
datasource:
|
||||
url: jdbc:mysql://127.0.0.1:33061/mall_user?useSSL=false
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: 123456
|
||||
|
||||
# server
|
||||
server:
|
||||
port: 8082
|
||||
|
||||
# mybatis
|
||||
mybatis:
|
||||
config-location: classpath:mybatis-config.xml
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
type-aliases-package: cn.iocoder.mall.user.dataobject
|
||||
|
||||
# dubbo
|
||||
dubbo:
|
||||
application:
|
||||
name: user-service
|
||||
registry:
|
||||
address: zookeeper://127.0.0.1:2181
|
||||
protocol:
|
||||
port: -1
|
||||
name: dubbo
|
||||
scan:
|
||||
base-packages: cn.iocoder.mall.user.service
|
||||
demo:
|
||||
service:
|
||||
version: 1.0.0
|
|
@ -1,35 +0,0 @@
|
|||
<?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="cn.iocoder.mall.user.dao.MobileCodeMapper">
|
||||
|
||||
<insert id="insert" parameterType="MobileCodeDO">
|
||||
INSERT INTO mobile_code (
|
||||
id, mobile, code, today_index, used,
|
||||
used_uid, used_time, create_time
|
||||
) VALUES (
|
||||
#{id}, #{mobile}, #{code}, #{todayIndex}, #{used},
|
||||
#{usedUid}, #{usedTime}, #{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="MobileCodeDO">
|
||||
UPDATE mobile_code
|
||||
<set>
|
||||
<if test="used != null"> used = #{used}, </if>
|
||||
<if test="usedUid != null"> used_uid = #{usedUid}, </if>
|
||||
<if test="usedTime != null"> used_time = #{usedTime}, </if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectLast1ByMobile" parameterType="String" resultType="MobileCodeDO">
|
||||
SELECT
|
||||
id, mobile, code, today_index, used,
|
||||
used_uid, used_time, create_time
|
||||
FROM mobile_code
|
||||
WHERE mobile = #{mobile}
|
||||
ORDER BY id DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,22 +0,0 @@
|
|||
<?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="cn.iocoder.mall.user.dao.OAuth2AccessTokenMapper">
|
||||
|
||||
<insert id="insert" parameterType="OAuth2AccessTokenDO">
|
||||
INSERT INTO oauth2_access_token (
|
||||
id, refresh_token, adminId, valid, expires_time,
|
||||
create_time
|
||||
) VALUES (
|
||||
#{id}, #{refreshToken}, #{adminId}, #{valid}, #{expiresTime},
|
||||
#{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="selectByTokenId" parameterType="String" resultType="OAuth2AccessTokenDO">
|
||||
SELECT
|
||||
id, adminId, valid, expires_time
|
||||
FROM oauth2_access_token
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,13 +0,0 @@
|
|||
<?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="cn.iocoder.mall.user.dao.OAuth2RefreshTokenMapper">
|
||||
|
||||
<insert id="insert" parameterType="OAuth2RefreshTokenDO">
|
||||
INSERT INTO oauth2_refresh_token (
|
||||
id, adminId, valid, expires_time, create_time
|
||||
) VALUES (
|
||||
#{id}, #{adminId}, #{valid}, #{expiresTime}, #{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
|
@ -1,20 +0,0 @@
|
|||
<?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="cn.iocoder.mall.user.dao.UserMapper">
|
||||
|
||||
<insert id="insert" parameterType="UserDO" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO users (
|
||||
id, mobile, create_time
|
||||
) VALUES (
|
||||
#{id}, #{mobile}, #{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="selectByMobile" parameterType="String" resultType="UserDO">
|
||||
SELECT
|
||||
id, mobile
|
||||
FROM users
|
||||
WHERE mobile = #{mobile}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,13 +0,0 @@
|
|||
<?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="cn.iocoder.mall.user.dao.UserRegisterMapper">
|
||||
|
||||
<insert id="insert" parameterType="UserRegisterDO">
|
||||
INSERT INTO user_register (
|
||||
id, create_time
|
||||
) VALUES (
|
||||
#{id}, #{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
|
||||
<settings>
|
||||
<!-- 使用驼峰命名法转换字段。 -->
|
||||
<setting name="mapUnderscoreToCamelCase" value="true"/>
|
||||
</settings>
|
||||
|
||||
<typeAliases>
|
||||
<typeAlias alias="Integer" type="java.lang.Integer"/>
|
||||
<typeAlias alias="Long" type="java.lang.Long"/>
|
||||
<typeAlias alias="HashMap" type="java.util.HashMap"/>
|
||||
<typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap"/>
|
||||
<typeAlias alias="ArrayList" type="java.util.ArrayList"/>
|
||||
<typeAlias alias="LinkedList" type="java.util.LinkedList"/>
|
||||
</typeAliases>
|
||||
|
||||
</configuration>
|
|
@ -1,41 +0,0 @@
|
|||
package cn.iocoder.mall.user.convert;
|
||||
|
||||
import cn.iocoder.mall.user.dataobject.OAuth2AccessTokenDO;
|
||||
import cn.iocoder.mall.user.service.api.bo.OAuth2AccessTokenBO;
|
||||
import cn.iocoder.mall.user.service.api.bo.OAuth2AuthenticationBO;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-03-08T17:14:01+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 11.0.1 (Oracle Corporation)"
|
||||
)
|
||||
public class OAuth2ConvertImpl implements OAuth2Convert {
|
||||
|
||||
@Override
|
||||
public OAuth2AccessTokenBO convertToAccessToken(OAuth2AccessTokenDO oauth2AccessTokenDO) {
|
||||
if ( oauth2AccessTokenDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OAuth2AccessTokenBO oAuth2AccessTokenBO = new OAuth2AccessTokenBO();
|
||||
|
||||
oAuth2AccessTokenBO.setAccessToken( oauth2AccessTokenDO.getId() );
|
||||
oAuth2AccessTokenBO.setRefreshToken( oauth2AccessTokenDO.getRefreshToken() );
|
||||
|
||||
return oAuth2AccessTokenBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OAuth2AuthenticationBO convertToAuthentication(OAuth2AccessTokenDO oauth2AccessTokenDO) {
|
||||
if ( oauth2AccessTokenDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OAuth2AuthenticationBO oAuth2AuthenticationBO = new OAuth2AuthenticationBO();
|
||||
|
||||
oAuth2AuthenticationBO.setUid( oauth2AccessTokenDO.getUid() );
|
||||
|
||||
return oAuth2AuthenticationBO;
|
||||
}
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
package cn.iocoder.mall.user.convert;
|
||||
|
||||
import cn.iocoder.mall.user.dataobject.UserDO;
|
||||
import cn.iocoder.mall.user.service.api.bo.UserBO;
|
||||
import cn.iocoder.mall.user.service.api.dto.UserUpdateDTO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-03-10T20:36:11+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 11.0.1 (Oracle Corporation)"
|
||||
)
|
||||
public class UserConvertImpl implements UserConvert {
|
||||
|
||||
@Override
|
||||
public UserBO convert(UserDO userDO) {
|
||||
if ( userDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UserBO userBO = new UserBO();
|
||||
|
||||
userBO.setId( userDO.getId() );
|
||||
userBO.setMobile( userDO.getMobile() );
|
||||
userBO.setNickname( userDO.getNickname() );
|
||||
userBO.setAvatar( userDO.getAvatar() );
|
||||
userBO.setStatus( userDO.getStatus() );
|
||||
userBO.setCreateTime( userDO.getCreateTime() );
|
||||
|
||||
return userBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserDO convert(UserUpdateDTO userUpdateDTO) {
|
||||
if ( userUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UserDO userDO = new UserDO();
|
||||
|
||||
userDO.setId( userUpdateDTO.getId() );
|
||||
userDO.setNickname( userUpdateDTO.getNickname() );
|
||||
userDO.setAvatar( userUpdateDTO.getAvatar() );
|
||||
|
||||
return userDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserBO> convert(List<UserDO> userDOs) {
|
||||
if ( userDOs == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<UserBO> list = new ArrayList<UserBO>( userDOs.size() );
|
||||
for ( UserDO userDO : userDOs ) {
|
||||
list.add( convert( userDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue