Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
data-server
Commits
e68a244d
Commit
e68a244d
authored
Mar 08, 2021
by
m1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决启动报错
parent
cd03597d
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
401 additions
and
179 deletions
+401
-179
PageRequest.java
.../src/main/java/cn/wisenergy/common/utils/PageRequest.java
+31
-0
PageResult.java
...n/src/main/java/cn/wisenergy/common/utils/PageResult.java
+63
-0
PageUtils.java
...on/src/main/java/cn/wisenergy/common/utils/PageUtils.java
+28
-0
pom.xml
wisenergy-mapper/pom.xml
+1
-0
ShopZxMapper.java
...apper/src/main/java/cn/wisenergy/mapper/ShopZxMapper.java
+8
-6
UsersMapper.java
...mapper/src/main/java/cn/wisenergy/mapper/UsersMapper.java
+1
-1
ShopZxMapper.xml
wisenergy-mapper/src/main/resources/mapper/ShopZxMapper.xml
+8
-1
UsersMapper.xml
wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
+2
-2
UsersDto.java
...-model/src/main/java/cn/wisenergy/model/app/UsersDto.java
+127
-1
UploadService.java
...src/main/java/cn/wisenergy/service/app/UploadService.java
+11
-1
UserService.java
...e/src/main/java/cn/wisenergy/service/app/UserService.java
+4
-18
UploadServiceImpl.java
...java/cn/wisenergy/service/app/impl/UploadServiceImpl.java
+25
-35
UserServiceImpl.java
...n/java/cn/wisenergy/service/app/impl/UserServiceImpl.java
+18
-15
LoginController.java
...n/wisenergy/web/admin/controller/app/LoginController.java
+67
-68
SmsController.java
.../cn/wisenergy/web/admin/controller/app/SmsController.java
+0
-21
UploadController.java
.../wisenergy/web/admin/controller/app/UploadController.java
+5
-8
LoginInterceptor.java
...va/cn/wisenergy/web/sms/interceptor/LoginInterceptor.java
+2
-2
No files found.
wisenergy-common/src/main/java/cn/wisenergy/common/utils/PageRequest.java
0 → 100644
View file @
e68a244d
package
cn
.
wisenergy
.
common
.
utils
;
/**
* 分页请求
* Created by m1991 on 2021/3/7 15:09
*/
public
class
PageRequest
{
/**
* 当前页码
*/
private
int
pageNum
;
/**
* 每页数量
*/
private
int
pageSize
;
public
int
getPageNum
()
{
return
pageNum
;
}
public
void
setPageNum
(
int
pageNum
)
{
this
.
pageNum
=
pageNum
;
}
public
int
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
int
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
}
wisenergy-common/src/main/java/cn/wisenergy/common/utils/PageResult.java
0 → 100644
View file @
e68a244d
package
cn
.
wisenergy
.
common
.
utils
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
/**
* Created by m1991 on 2021/3/7 15:11
*/
@Component
@EnableCaching
public
class
PageResult
{
/**
* 当前页码
*/
private
int
pageNum
;
/**
* 每页数量
*/
private
int
pageSize
;
/**
* 记录总数
*/
private
long
totalSize
;
/**
* 页码总数
*/
private
int
totalPages
;
/**
* 数据模型
*/
private
List
<?>
content
;
public
int
getPageNum
()
{
return
pageNum
;
}
public
void
setPageNum
(
int
pageNum
)
{
this
.
pageNum
=
pageNum
;
}
public
int
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
int
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
public
long
getTotalSize
()
{
return
totalSize
;
}
public
void
setTotalSize
(
long
totalSize
)
{
this
.
totalSize
=
totalSize
;
}
public
int
getTotalPages
()
{
return
totalPages
;
}
public
void
setTotalPages
(
int
totalPages
)
{
this
.
totalPages
=
totalPages
;
}
public
List
<?>
getContent
()
{
return
content
;
}
public
void
setContent
(
List
<?>
content
)
{
this
.
content
=
content
;
}
}
wisenergy-common/src/main/java/cn/wisenergy/common/utils/PageUtils.java
0 → 100644
View file @
e68a244d
package
cn
.
wisenergy
.
common
.
utils
;
import
com.github.pagehelper.PageInfo
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.stereotype.Component
;
/**
* Created by m1991 on 2021/3/7 15:12
*/
@Component
@EnableCaching
public
class
PageUtils
{
/**
* 将分页信息封装到统一的接口
* @param pageRequest
* @param
* @return
*/
public
static
PageResult
getPageResult
(
PageRequest
pageRequest
,
PageInfo
<?>
pageInfo
)
{
PageResult
pageResult
=
new
PageResult
();
pageResult
.
setPageNum
(
pageInfo
.
getPageNum
());
pageResult
.
setPageSize
(
pageInfo
.
getPageSize
());
pageResult
.
setTotalSize
(
pageInfo
.
getTotal
());
pageResult
.
setTotalPages
(
pageInfo
.
getPages
());
pageResult
.
setContent
(
pageInfo
.
getList
());
return
pageResult
;
}
}
wisenergy-mapper/pom.xml
View file @
e68a244d
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
<artifactId>
wisenergy-model
</artifactId>
<artifactId>
wisenergy-model
</artifactId>
<version>
${moduleVersion.wisenergy-model}
</version>
<version>
${moduleVersion.wisenergy-model}
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
<!-- MAVEN构建 -->
<!-- MAVEN构建 -->
...
...
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/ShopZxMapper.java
View file @
e68a244d
...
@@ -27,12 +27,14 @@ public interface ShopZxMapper extends BaseMapper<shopZx> {
...
@@ -27,12 +27,14 @@ public interface ShopZxMapper extends BaseMapper<shopZx> {
* @param
* @param
* @return
* @return
*/
*/
List
<
shopZx
>
selectAll
(
@Param
(
"PageSize"
)
int
PageSize
,
@Param
(
"beginPos"
)
int
beginPos
);
// List selectAll( @Param("beginPos") int beginPos,@Param("PageSize") int PageSize
);
// /**查询方法
// * @param
// * @return
/**
// */
* 分页查询资讯
// List<shopZx> selectAllNum(@Param("") int ,@Param("") int );
* @return
*/
// List<shopZx> selectPage();
}
}
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/UsersMapper.java
View file @
e68a244d
...
@@ -90,7 +90,7 @@ public interface UsersMapper extends BaseMapper<User> {
...
@@ -90,7 +90,7 @@ public interface UsersMapper extends BaseMapper<User> {
public
List
<
User
>
getUsersListByMap
(
Map
<
String
,
Object
>
param
);
public
List
<
User
>
getUsersListByMap
(
Map
<
String
,
Object
>
param
);
//根据手机号查询用户Integer
//根据手机号查询用户Integer
Integ
er
queryUsersByPhone
(
@Param
(
"userId"
)
String
userId
);
Us
er
queryUsersByPhone
(
@Param
(
"userId"
)
String
userId
);
//根据用户的推荐人邀请码比对推荐人的本人邀请码,查询推荐人的用户ID
//根据用户的推荐人邀请码比对推荐人的本人邀请码,查询推荐人的用户ID
Integer
inviteCodeBeInvitedCode
(
@Param
(
"beInvitedCode"
)
Integer
beInvitedCode
);
Integer
inviteCodeBeInvitedCode
(
@Param
(
"beInvitedCode"
)
Integer
beInvitedCode
);
...
...
wisenergy-mapper/src/main/resources/mapper/ShopZxMapper.xml
View file @
e68a244d
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<!--</insert>-->
<!--</insert>-->
<!--资讯内容倒叙查询-->
<!--资讯内容倒叙查询-->
<select
id=
"selectAll"
parameterType=
"
cn.wisenergy.model.app.shopZx
"
resultType=
"cn.wisenergy.model.app.shopZx"
>
<select
id=
"selectAll"
parameterType=
"
java.lang.Integer
"
resultType=
"cn.wisenergy.model.app.shopZx"
>
select zxid as zxid,zxUrl as zxUrl,
select zxid as zxid,zxUrl as zxUrl,
zxLikes as zxLikes,userid as userid,zxName as zxName,
zxLikes as zxLikes,userid as userid,zxName as zxName,
zxShenHe as zxShenHe,zxField as zxField,zxDate as zxDate,
zxShenHe as zxShenHe,zxField as zxField,zxDate as zxDate,
...
@@ -60,6 +60,13 @@
...
@@ -60,6 +60,13 @@
select count (*) from shop_zx
select count (*) from shop_zx
</select>
</select>
<select
id=
"selectPage"
resultMap=
"zxMap"
>
select zxid as zxid,zxUrl as zxUrl,
zxLikes as zxLikes,userid as userid,zxName as zxName,
zxShenHe as zxShenHe,zxField as zxField,zxDate as zxDate,
imgUrl as imgUrl,zxAddress as zxAddress from shop_zx order by zxid desc limit #{beginPos},#{pageSize}
</select>
</mapper>
</mapper>
\ No newline at end of file
wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
View file @
e68a244d
...
@@ -169,9 +169,9 @@
...
@@ -169,9 +169,9 @@
insert into user_info(user_id,be_invited_code) value (#{userId},#{beInvitedCode})
insert into user_info(user_id,be_invited_code) value (#{userId},#{beInvitedCode})
</insert>
</insert>
<select
id=
"queryUsersByPhone"
resultType=
"
java.lang.Integ
er"
>
<select
id=
"queryUsersByPhone"
resultType=
"
cn.wisenergy.model.app.Us
er"
>
select
select
user_id
<include
refid=
"vals"
/>
from
from
<include
refid=
"table"
/>
<include
refid=
"table"
/>
<where>
<where>
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/UsersDto.java
View file @
e68a244d
package
cn
.
wisenergy
.
model
.
app
;
package
cn
.
wisenergy
.
model
.
app
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
/**
* Created by m1991 on 2021/3/1 14:00
* Created by m1991 on 2021/3/1 14:00
*/
*/
public
class
UsersDto
extends
User
{
public
class
UsersDto
extends
User
implements
Serializable
{
/**
* 主键id
*/
private
Integer
id
;
/**
* 手机号作为用户账号
*/
private
String
userId
;
/**
* 用户头像
*/
private
String
headImage
;
/**
* 用户会员等级
*/
private
int
userLevel
;
/**
* 跨境额度
*/
private
BigDecimal
crossBorderLine
;
/**
* 用户本人邀请码
*/
private
String
inviteCode
;
/**
* 推荐人邀请码
*/
private
String
beInvitedCode
;
/**
* 创建时间
*/
private
Date
createTime
;
//用户token
//用户token
private
String
token
;
private
String
token
;
@Override
public
Integer
getId
()
{
return
id
;
}
@Override
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
@Override
public
String
getUserId
()
{
return
userId
;
}
@Override
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
@Override
public
String
getHeadImage
()
{
return
headImage
;
}
@Override
public
void
setHeadImage
(
String
headImage
)
{
this
.
headImage
=
headImage
;
}
@Override
public
int
getUserLevel
()
{
return
userLevel
;
}
@Override
public
void
setUserLevel
(
int
userLevel
)
{
this
.
userLevel
=
userLevel
;
}
@Override
public
BigDecimal
getCrossBorderLine
()
{
return
crossBorderLine
;
}
@Override
public
void
setCrossBorderLine
(
BigDecimal
crossBorderLine
)
{
this
.
crossBorderLine
=
crossBorderLine
;
}
@Override
public
String
getInviteCode
()
{
return
inviteCode
;
}
@Override
public
void
setInviteCode
(
String
inviteCode
)
{
this
.
inviteCode
=
inviteCode
;
}
@Override
public
String
getBeInvitedCode
()
{
return
beInvitedCode
;
}
@Override
public
void
setBeInvitedCode
(
String
beInvitedCode
)
{
this
.
beInvitedCode
=
beInvitedCode
;
}
@Override
public
Date
getCreateTime
()
{
return
createTime
;
}
@Override
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getToken
()
{
public
String
getToken
()
{
return
token
;
return
token
;
}
}
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/UploadService.java
View file @
e68a244d
package
cn
.
wisenergy
.
service
.
app
;
package
cn
.
wisenergy
.
service
.
app
;
import
cn.wisenergy.model.app.Page
;
import
cn.wisenergy.common.utils.PageRequest
;
import
cn.wisenergy.common.utils.PageResult
;
import
cn.wisenergy.model.app.shopZx
;
import
cn.wisenergy.model.app.shopZx
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -56,5 +57,14 @@ public interface UploadService {
...
@@ -56,5 +57,14 @@ public interface UploadService {
// public Page<shopZx> find();
// public Page<shopZx> find();
/**
* 分页查询接口
* 这里统一封装了分页请求和结果,避免直接引入具体框架的分页对象, 如MyBatis或JPA的分页对象
* 从而避免因为替换ORM框架而导致服务层、控制层的分页接口也需要变动的情况,替换ORM框架也不会
* 影响服务层以上的分页接口,起到了解耦的作用
* @param pageRequest 自定义,统一分页查询请求
* @return PageResult 自定义,统一分页查询结果
*/
// PageResult findPage(PageRequest pageRequest);
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/UserService.java
View file @
e68a244d
...
@@ -11,13 +11,13 @@ import java.util.Map;
...
@@ -11,13 +11,13 @@ import java.util.Map;
* @ Description: 用户接口
* @ Description: 用户接口
* @ Author : 86187
* @ Author : 86187
* @ Date : 2021/1/6 16:08
* @ Date : 2021/1/6 16:08
* @author 86187
*/
*/
public
interface
UserService
{
public
interface
UserService
{
/**
/**
* 获取用户信息
* 获取用户信息
*
* @param userId 用户id
* @param userId 用户id
* @return 用户信息
* @return 用户信息
*/
*/
...
@@ -27,7 +27,6 @@ public interface UserService {
...
@@ -27,7 +27,6 @@ public interface UserService {
/**
/**
* 获取用户信息
* 获取用户信息
*
* @param userId 用户id
* @param userId 用户id
* @return 用户信息
* @return 用户信息
*/
*/
...
@@ -38,7 +37,6 @@ public interface UserService {
...
@@ -38,7 +37,6 @@ public interface UserService {
//根据OpenId查询用户
//根据OpenId查询用户
public
User
queryUsersByOpenId
(
String
openId
);
public
User
queryUsersByOpenId
(
String
openId
);
/**
/**
*用户注册
*用户注册
*/
*/
...
@@ -48,19 +46,7 @@ public interface UserService {
...
@@ -48,19 +46,7 @@ public interface UserService {
//
//
Integer
getuserIdById
(
String
userId
);
Integer
getuserIdById
(
String
userId
);
/**
* 获取空投池列表
*
* @return 空投池列表
*/
R
<
AerialDeliveryVo
>
queryAerialDelivery
();
R
<
AerialDeliveryVo
>
queryAerialDelivery
();
/**
R
<
Boolean
>
setHeadImage
(
String
userId
,
String
headImage
);
* 设置用户头像
* @param userId 用户id
* @param headImage 头像地址
* @return true or false
*/
R
<
Boolean
>
setHeadImage
(
String
userId
,
String
headImage
);
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UploadServiceImpl.java
View file @
e68a244d
package
cn
.
wisenergy
.
service
.
app
.
impl
;
package
cn
.
wisenergy
.
service
.
app
.
impl
;
import
cn.wisenergy.common.utils.FileException
;
import
cn.wisenergy.common.utils.*
;
import
cn.wisenergy.common.utils.FileUtils
;
import
cn.wisenergy.common.utils.FrameGrabberKit
;
import
cn.wisenergy.common.utils.StringUtil
;
import
cn.wisenergy.model.app.Page
;
import
cn.wisenergy.model.app.shopZx
;
import
cn.wisenergy.model.app.shopZx
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.youzan.cloud.open.sdk.common.util.CheckUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.UrlResource
;
import
org.springframework.core.io.UrlResource
;
...
@@ -47,6 +44,7 @@ public class UploadServiceImpl implements UploadService {
...
@@ -47,6 +44,7 @@ public class UploadServiceImpl implements UploadService {
@Autowired
@Autowired
private
ShopZxMapper
shopZxMapper
;
private
ShopZxMapper
shopZxMapper
;
/**
/**
* 视频文件上传
* 视频文件上传
*/
*/
...
@@ -324,38 +322,30 @@ public class UploadServiceImpl implements UploadService {
...
@@ -324,38 +322,30 @@ public class UploadServiceImpl implements UploadService {
@Override
@Override
public
Map
getList
(
int
beginPos
,
int
pageSize
)
{
public
Map
getList
(
int
beginPos
,
int
pageSize
)
{
Map
map
=
new
HashMap
();
return
null
;
String
[]
ImgUrl
=
new
String
[
0
];
List
<
shopZx
>
date
=
shopZxMapper
.
selectAll
(
beginPos
,
pageSize
);
for
(
int
i
=
0
;
date
.
size
()>
0
;
i
++){
shopZx
s
=
(
shopZx
)
date
.
get
(
i
);
ImgUrl
=
s
.
getImgUrl
().
split
(
","
);
}
if
(
null
==
date
){
map
.
put
(
"code"
,
1
);
map
.
put
(
"msg"
,
"获取资讯分页数据失败!"
);
return
map
;
}
else
{
map
.
put
(
"date"
,
date
);
map
.
put
(
"ImgUrl"
,
ImgUrl
);
map
.
put
(
"code"
,
0
);
map
.
put
(
"msg"
,
"获取资讯分页数据成功!"
);
return
map
;
}
}
}
// @Override
// @Override
// public Page<shopZx> find() {
// public Map getList(int beginPos, int pageSize) {
// if (null == page) {
// Map map =new HashMap();
// page = 0;
// String[] ImgUrl = new String[0];
// List date=shopZxMapper.selectAll(beginPos,pageSize);
// for(int i=0;date.size()>0;i++){
// shopZx s = (shopZx)date.get(i);
// ImgUrl=s.getImgUrl().split(",");
// }
// }
// if (CheckUtils.isEmpty(size)) {
// size = 10;
// if(null==date){
// map.put("code",1);
// map.put("msg","获取资讯分页数据失败!");
// return (Map) map;
// }else {
// map.put("date",date);
// map.put("ImgUrl",ImgUrl);
// map.put("code",0);
// map.put("msg","获取资讯分页数据成功!");
// return map;
// }
// }
// PageRequest pageable = PageRequest.of(page, size, Sort.Direction.DESC, "updateTime");
// Page<User> users = userRepository.findAll(pageable);
// return users;
// }
// }
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserServiceImpl.java
View file @
e68a244d
package
cn
.
wisenergy
.
service
.
app
.
impl
;
package
cn
.
wisenergy
.
service
.
app
.
impl
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.RedisUtils
;
import
cn.wisenergy.common.utils.ResultUtils
;
import
cn.wisenergy.common.utils.ShareCodeUtil
;
import
cn.wisenergy.common.utils.ShareCodeUtil
;
import
cn.wisenergy.mapper.RecommendUserMapper
;
import
cn.wisenergy.mapper.RecommendUserMapper
;
import
cn.wisenergy.mapper.TeamUserInfoMapper
;
import
cn.wisenergy.mapper.TeamUserInfoMapper
;
...
@@ -67,6 +69,7 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
...
@@ -67,6 +69,7 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
if
(!
CollectionUtils
.
isEmpty
(
usersList
)){
if
(!
CollectionUtils
.
isEmpty
(
usersList
)){
return
usersList
.
get
(
0
);
return
usersList
.
get
(
0
);
}
}
// return ResultUtils.returnFail("","");
return
null
;
return
null
;
}
}
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/LoginController.java
View file @
e68a244d
...
@@ -130,5 +130,4 @@ public class LoginController {
...
@@ -130,5 +130,4 @@ public class LoginController {
return
usersService
.
userByZx
(
userId
,
beInvitedCode
);
return
usersService
.
userByZx
(
userId
,
beInvitedCode
);
}
}
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/SmsController.java
View file @
e68a244d
...
@@ -37,27 +37,6 @@ public class SmsController {
...
@@ -37,27 +37,6 @@ public class SmsController {
@ApiImplicitParam
(
name
=
"codeType"
,
value
=
"验证码类型用途 0注册/登录验证 1修改密码 2订单通知信息"
,
dataType
=
"Integer"
)})
@ApiImplicitParam
(
name
=
"codeType"
,
value
=
"验证码类型用途 0注册/登录验证 1修改密码 2订单通知信息"
,
dataType
=
"Integer"
)})
@RequestMapping
(
"/verifyCode"
)
@RequestMapping
(
"/verifyCode"
)
public
Result
verifyCode
(
String
phone
,
Integer
codeType
)
throws
Exception
{
public
Result
verifyCode
(
String
phone
,
Integer
codeType
)
throws
Exception
{
// //判断phone和codeType是否符合输入类型
// if(!phone.matches(Constants.RegConstant.PHONE_REGSTR)){
// throw new BaseException(ResultEnum.PHONE_ERROR);
// }
// if(codeType!=Constants.Sms.CodeType.LOGIN_OR_REGISTER && codeType!=Constants.Sms.CodeType.PASS_UPDATE && codeType!=Constants.Sms.CodeType.ORDER_NOTICE){
// throw new BaseException(ResultEnum.CODETYPE_ERROR);
// }
// String key= StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX,Constants.RedisKey.SMS_PRIFIX,phone,codeType+"");
// //判断是否超过60S
// String oldCode=redisUtils.getValue(key);
// if(!StringUtils.isBlank(oldCode)){
// throw new BaseException(ResultEnum.CODESEND_ERROR);
// }
// //生成随机数
// String code= MathUtils.random();
// //保存至Redis
// redisUtils.set(key,code,Constants.Duration.MINUTE_INT);
//
//
// boolean flag=smsUtils.sendMessage(phone,Constants.Sms.TemplateCode.LOGIN_DL_REGISTER,code);
// return flag? ResultUtils.returnSuccess():ResultUtils.returnFail();
//判断phone和codeType是否符合输入类型
//判断phone和codeType是否符合输入类型
if
(!
phone
.
matches
(
Constants
.
RegConstant
.
PHONE_REGSTR
)){
if
(!
phone
.
matches
(
Constants
.
RegConstant
.
PHONE_REGSTR
)){
throw
new
BaseException
(
ResultEnum
.
PHONE_ERROR
);
throw
new
BaseException
(
ResultEnum
.
PHONE_ERROR
);
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UploadController.java
View file @
e68a244d
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.Result
;
import
cn.wisenergy.common.utils.Result
;
import
cn.wisenergy.model.app.Page
;
import
cn.wisenergy.model.app.shopZx
;
import
cn.wisenergy.service.app.UploadService
;
import
cn.wisenergy.service.app.UploadService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
...
@@ -112,16 +110,15 @@ public class UploadController {
...
@@ -112,16 +110,15 @@ public class UploadController {
* @param pageSize
* @param pageSize
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"资讯信息
-文字/多图片上传接口"
,
notes
=
"上传图片,返回路径给前台"
,
httpMethod
=
"POS
T"
,
produces
=
"application/json; charset=UTF-8"
)
@ApiOperation
(
value
=
"资讯信息
接口"
,
notes
=
"资讯信息接口"
,
httpMethod
=
"GE
T"
,
produces
=
"application/json; charset=UTF-8"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"beginPos"
,
value
=
"从几开始"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"beginPos"
,
value
=
"从几开始"
,
required
=
true
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"展示数量(条数)"
,
required
=
true
,
dataType
=
"int"
)})
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"展示数量(条数)"
,
required
=
true
,
dataType
=
"Integer"
)})
@RequestMapping
(
value
=
"/shop"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@RequestMapping
(
value
=
"/shop"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
Result
find
(
Integer
beginPos
,
Integer
pageSize
)
{
public
Result
find
(
Integer
beginPos
,
Integer
pageSize
)
{
Page
<
shopZx
>
shopZxPage
=
(
Page
<
shopZx
>)
uploadService
.
getList
(
beginPos
,
pageSize
);
Map
shopZxPage
=
uploadService
.
getList
(
beginPos
,
pageSize
);
return
new
Result
(
String
.
valueOf
(
0
)
,
"success"
,
shopZxPage
);
return
new
Result
(
"0"
,
"success"
,
shopZxPage
);
}
}
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/interceptor/LoginInterceptor.java
View file @
e68a244d
...
@@ -32,9 +32,9 @@ public class LoginInterceptor extends HandlerInterceptorAdapter {
...
@@ -32,9 +32,9 @@ public class LoginInterceptor extends HandlerInterceptorAdapter {
* 直接放行的接口
* 直接放行的接口
*/
*/
public
static
String
[]
EXCLUDE_URI
=
new
String
[]{
public
static
String
[]
EXCLUDE_URI
=
new
String
[]{
"
/api/user/login
"
,
"
shop-mall/api/*
"
,
"/pay/alipay/notify"
,
"/pay/alipay/notify"
,
"/ZX/**"
,
"
shop-mall
/ZX/**"
,
"/pay/alipay/return"
,
"/pay/alipay/return"
,
"/user/wechat/callback"
};
"/user/wechat/callback"
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment