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
9f3a3168
Commit
9f3a3168
authored
Mar 07, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
290dc8c6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
9 deletions
+12
-9
UsersMapper.xml
wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
+1
-1
RecommendUser.java
...l/src/main/java/cn/wisenergy/model/app/RecommendUser.java
+2
-0
User.java
...ergy-model/src/main/java/cn/wisenergy/model/app/User.java
+2
-0
UserServiceImpl.java
...n/java/cn/wisenergy/service/app/impl/UserServiceImpl.java
+3
-2
UploadController.java
.../wisenergy/web/admin/controller/app/UploadController.java
+4
-6
No files found.
wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
View file @
9f3a3168
...
@@ -199,7 +199,7 @@
...
@@ -199,7 +199,7 @@
</where>
</where>
</select>
</select>
<select
id=
"getuserIdById"
resultType=
"
cn.wisenergy.model.app.Us
er"
>
<select
id=
"getuserIdById"
resultType=
"
java.lang.Integ
er"
>
select
select
id
id
from
from
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/RecommendUser.java
View file @
9f3a3168
package
cn
.
wisenergy
.
model
.
app
;
package
cn
.
wisenergy
.
model
.
app
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -17,6 +18,7 @@ import java.util.Date;
...
@@ -17,6 +18,7 @@ import java.util.Date;
@Data
@Data
@ApiModel
(
value
=
"RecommendUser"
)
@ApiModel
(
value
=
"RecommendUser"
)
@TableName
(
"recommend_user"
)
public
class
RecommendUser
implements
Serializable
{
public
class
RecommendUser
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7885137366850583004L
;
private
static
final
long
serialVersionUID
=
7885137366850583004L
;
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/User.java
View file @
9f3a3168
package
cn
.
wisenergy
.
model
.
app
;
package
cn
.
wisenergy
.
model
.
app
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -17,6 +18,7 @@ import java.util.Date;
...
@@ -17,6 +18,7 @@ import java.util.Date;
*/
*/
@Data
@Data
@ApiModel
(
value
=
"User"
)
@ApiModel
(
value
=
"User"
)
@TableName
(
"user_info"
)
public
class
User
extends
Model
<
User
>
implements
Serializable
{
public
class
User
extends
Model
<
User
>
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2525339404301884673L
;
private
static
final
long
serialVersionUID
=
2525339404301884673L
;
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserServiceImpl.java
View file @
9f3a3168
...
@@ -78,11 +78,11 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
...
@@ -78,11 +78,11 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
@Override
@Override
public
Map
userByZx
(
String
userId
,
String
beInvitedCode
)
{
public
Map
userByZx
(
String
userId
,
String
beInvitedCode
)
{
//查询数据库,看看是否存在该用户
//查询数据库,看看是否存在该用户
int
yh
=
usersMapper
.
getuserIdById
(
userId
);
Integer
yh
=
usersMapper
.
getuserIdById
(
userId
);
/**
/**
* 判断用户推荐人的邀请码是否为空,空的话填写1
* 判断用户推荐人的邀请码是否为空,空的话填写1
*/
*/
if
(
null
==
beInvitedCode
||
""
==
beInvitedCode
&&
0
==
yh
)
{
if
(
null
==
beInvitedCode
||
""
.
equals
(
beInvitedCode
)
&&
null
==
yh
)
{
beInvitedCode
=
"1"
;
beInvitedCode
=
"1"
;
// 插入用户手机号与推荐人邀请码
// 插入用户手机号与推荐人邀请码
...
@@ -117,6 +117,7 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
...
@@ -117,6 +117,7 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
User
user
=
new
User
();
User
user
=
new
User
();
user
.
setInviteCode
(
inviteCode
);
user
.
setInviteCode
(
inviteCode
);
user
.
setUserLevel
(
0
);
user
.
setUserLevel
(
0
);
user
.
setUserId
(
userId
);
usersMapper
.
updateById
(
user
);
usersMapper
.
updateById
(
user
);
//插入直推用户表
//插入直推用户表
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UploadController.java
View file @
9f3a3168
...
@@ -12,9 +12,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -12,9 +12,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -99,11 +97,11 @@ public class UploadController {
...
@@ -99,11 +97,11 @@ public class UploadController {
@ApiOperation
(
value
=
"资讯信息-文字/多图片上传接口"
,
notes
=
"上传图片,返回路径给前台"
,
httpMethod
=
"POST"
,
produces
=
"application/json; charset=UTF-8"
)
@ApiOperation
(
value
=
"资讯信息-文字/多图片上传接口"
,
notes
=
"上传图片,返回路径给前台"
,
httpMethod
=
"POST"
,
produces
=
"application/json; charset=UTF-8"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"zxField"
,
value
=
"资讯文字"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"zxField"
,
value
=
"资讯文字"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"file
[]"
,
value
=
"多图片"
,
dataType
=
"MultipartF
ile"
),
@ApiImplicitParam
(
name
=
"file
s"
,
value
=
"多图片"
,
paramType
=
"form"
,
allowMultiple
=
true
,
dataType
=
"__f
ile"
),
@ApiImplicitParam
(
name
=
"zxAddress"
,
value
=
"发表地址"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"zxAddress"
,
value
=
"发表地址"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户手机号"
,
required
=
true
,
dataType
=
"String"
)})
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户手机号"
,
required
=
true
,
dataType
=
"String"
)})
@RequestMapping
(
"/multipleImageUpload
"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/multipleImageUpload"
,
headers
=
"content-type=multipart/form-data
"
)
public
List
multipleImageUpload
(
MultipartFile
[]
files
,
String
userId
,
String
zxField
,
String
zxAddress
)
{
public
List
multipleImageUpload
(
@RequestParam
(
value
=
"files"
)
MultipartFile
[]
files
,
String
userId
,
String
zxField
,
String
zxAddress
)
{
return
uploadService
.
imageUpload
(
files
,
userId
,
zxField
,
zxAddress
);
return
uploadService
.
imageUpload
(
files
,
userId
,
zxField
,
zxAddress
);
}
}
...
...
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