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
c1dcc266
Commit
c1dcc266
authored
Mar 30, 2021
by
codezwjava
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
6d29445b
74862b8b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
317 additions
and
48 deletions
+317
-48
ShopZxMapper.java
...apper/src/main/java/cn/wisenergy/mapper/ShopZxMapper.java
+2
-1
ShopZxMapper.xml
wisenergy-mapper/src/main/resources/mapper/ShopZxMapper.xml
+2
-2
TradeRecordMapper.xml
...gy-mapper/src/main/resources/mapper/TradeRecordMapper.xml
+3
-3
ZxUserDto.java
...model/src/main/java/cn/wisenergy/model/dto/ZxUserDto.java
+71
-0
TradeRecordEnum.java
...c/main/java/cn/wisenergy/model/enums/TradeRecordEnum.java
+3
-3
MoneyPackageDetailVo.java
...main/java/cn/wisenergy/model/vo/MoneyPackageDetailVo.java
+2
-2
UploadService.java
...src/main/java/cn/wisenergy/service/app/UploadService.java
+1
-1
AccountServiceImpl.java
...ava/cn/wisenergy/service/app/impl/AccountServiceImpl.java
+1
-1
BankServiceImpl.java
...n/java/cn/wisenergy/service/app/impl/BankServiceImpl.java
+0
-7
UploadServiceImpl.java
...java/cn/wisenergy/service/app/impl/UploadServiceImpl.java
+26
-14
WalletServiceImpl.java
...java/cn/wisenergy/service/app/impl/WalletServiceImpl.java
+1
-1
wisenergy-service.iml
wisenergy-service/wisenergy-service.iml
+202
-10
UploadController.java
.../wisenergy/web/admin/controller/app/UploadController.java
+3
-3
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/ShopZxMapper.java
View file @
c1dcc266
...
...
@@ -2,6 +2,7 @@ package cn.wisenergy.mapper;
import
cn.wisenergy.model.app.shopZx
;
import
cn.wisenergy.model.dto.ZxUserDto
;
import
cn.wisenergy.model.vo.ShopZxUserVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -34,7 +35,7 @@ public interface ShopZxMapper extends BaseMapper<shopZx> {
/**
* 倒叙查询资讯与用户发布数据
*/
List
<
ShopZxUserV
o
>
selectPage
(
@Param
(
"pageNum"
)
Integer
pageNum
,
@Param
(
"pageSize"
)
Integer
pageSize
);
List
<
ZxUserDt
o
>
selectPage
(
@Param
(
"pageNum"
)
Integer
pageNum
,
@Param
(
"pageSize"
)
Integer
pageSize
);
//
// /**
// * 用于查询资讯单表全部信息
...
...
wisenergy-mapper/src/main/resources/mapper/ShopZxMapper.xml
View file @
c1dcc266
...
...
@@ -55,7 +55,8 @@
<!--资讯内容倒叙查询-->
<select
id=
"selectPage"
parameterType=
"java.lang.Integer"
resultType=
"cn.wisenergy.model.vo.UserVo"
>
<!--资讯内容倒叙查询-->
<select
id=
"selectPage"
parameterType=
"java.lang.Integer"
resultType=
"cn.wisenergy.model.dto.ZxUserDto"
>
select
b.zx_id as zxid,
b.zx_url as zxUrl,
...
...
@@ -68,7 +69,6 @@
from shop_zx b left join user_info a ON a.invite_code=b.invite_code
WHERE zx_to_examine != 0
AND a.user_id !=0
and a.user_id !=null
order by zxid desc limit #{pageNum},#{pageSize}
</select>
<!--资讯总记录数查询-->
...
...
wisenergy-mapper/src/main/resources/mapper/TradeRecordMapper.xml
View file @
c1dcc266
...
...
@@ -113,9 +113,9 @@
date_format(create_time,'%Y-%m') as yearMonth
FROM
<include
refid=
"table"
/>
WHERE date_format(create_time,'%Y-%m')
<
date_format(now(),'%Y-%m')
and date_format(create_time,'%Y-%m') >= date_format(now() - interval
7
month,'%Y-%m')
and (status=1 or status=
3
)
WHERE date_format(create_time,'%Y-%m')
<
=
date_format(now(),'%Y-%m')
and date_format(create_time,'%Y-%m') >= date_format(now() - interval
5
month,'%Y-%m')
and (status=1 or status=
0
)
and user_id=#{userId}
group by user_id ,create_time;
</select>
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/dto/ZxUserDto.java
0 → 100644
View file @
c1dcc266
package
cn
.
wisenergy
.
model
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* Created by m1991 on 2021/3/29 15:38
*/
@Data
public
class
ZxUserDto
{
/**
* 手机号作为用户账号
*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
name
=
"user_id"
,
value
=
"用户id"
)
private
String
userId
;
/*
* 用户头像
*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
name
=
"headImage"
,
value
=
"用户头像"
)
private
String
headImage
;
/**
* 资讯主键id
*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
name
=
"zx_id"
,
value
=
"资讯主键id"
)
private
Integer
zxid
;
/**
* 视频存放地址
*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
name
=
"zx_url"
,
value
=
"视频/图片存放地址"
)
private
String
zxUrl
;
/**
* 用户本人邀请码
*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
name
=
"invite_code"
,
value
=
"用户本人邀请码"
)
private
String
inviteCode
;
/**
* 获赞数
*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
name
=
"zx_likes"
,
value
=
"获赞数"
)
private
Integer
zxLikes
;
@ApiModelProperty
(
name
=
"liked_status"
,
value
=
"点赞状态"
)
private
Integer
likedStatus
;
/**
* 资讯文字输入字段
*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
name
=
"zx_field"
,
value
=
"资讯文字输入字段"
)
private
String
zxField
;
/**
* 资讯数据创建时间
*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
name
=
"zx_date"
,
value
=
"资讯数据创建时间"
)
private
Long
zxDate
;
@TableField
(
exist
=
false
)
private
List
<
String
>
askImgList
;
}
wisenergy-model/src/main/java/cn/wisenergy/model/enums/TradeRecordEnum.java
View file @
c1dcc266
...
...
@@ -12,17 +12,17 @@ public enum TradeRecordEnum {
*/
WITHDRAW_DEPOSIT
(
1
,
"提现"
),
ORDER_REBATE
(
2
,
"
订单返佣
"
),
ORDER_REBATE
(
2
,
"
返佣奖
"
),
PLACE_ORDER
(
3
,
"订单下单"
),
MONTHLY_FERTILIZER
(
4
,
"月度肥料"
),
MONTHLY_FERTILIZER
(
4
,
"月度肥料
奖
"
),
CULTIVATING_PRIZE
(
5
,
"培育奖"
),
SALARY_REWARD
(
6
,
"工资奖励"
),
PROGRESS_PRIZE
(
7
,
"
最大
进步奖"
),
PROGRESS_PRIZE
(
7
,
"进步奖"
),
RUN_CENTER_SUBSIDY
(
8
,
"运营中心补贴"
);
private
Integer
code
;
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/vo/MoneyPackageDetailVo.java
View file @
c1dcc266
...
...
@@ -29,9 +29,9 @@ public class MoneyPackageDetailVo {
List
<
IncomeDetailVo
>
list
;
/**
* 累计收益
*
本月
累计收益
*/
@ApiModelProperty
(
value
=
"累计收益"
,
name
=
"totalIncome"
)
@ApiModelProperty
(
value
=
"
本月
累计收益"
,
name
=
"totalIncome"
)
private
BigDecimal
totalIncome
;
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/UploadService.java
View file @
c1dcc266
...
...
@@ -52,7 +52,7 @@ public interface UploadService {
* @param pageSize
* @return
*/
Map
selectPage
(
Integer
pageNum
,
Integer
pageSize
,
String
inviteCode
);
Map
selectPage
(
int
pageNum
,
int
pageSize
,
String
inviteCode
);
/**
* TODO 资讯单表分页全部信息展示
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/AccountServiceImpl.java
View file @
c1dcc266
...
...
@@ -95,7 +95,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
if
(!
tradeRecord
.
getTradeNo
().
equals
(
version
))
{
return
R
.
ok
(
DOWNLOAD_URL
);
}
return
R
.
ok
(
"当前已是最新版本!"
);
return
R
.
error
(
1
,
"当前已是最新版本!"
);
}
/**
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/BankServiceImpl.java
View file @
c1dcc266
...
...
@@ -198,13 +198,6 @@ public class BankServiceImpl extends ServiceImpl<BankInfoMapper, BankInfo> imple
BigDecimal
frozenMoney
=
accountInfo
.
getFrozenMoney
().
add
(
money
);
accountInfo
.
setFrozenMoney
(
frozenMoney
);
BigDecimal
earningsMonth
=
accountInfo
.
getEarningsMonth
().
subtract
(
money
);
accountInfo
.
setEarningsMonth
(
earningsMonth
);
BigDecimal
earningsTotal
=
accountInfo
.
getEarningsTotal
().
subtract
(
money
);
accountInfo
.
setEarningsTotal
(
earningsTotal
);
//4、添加提现交易流水记录
TradeRecord
tradeRecord
=
new
TradeRecord
();
tradeRecord
.
setUserId
(
accountInfo
.
getUserId
());
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UploadServiceImpl.java
View file @
c1dcc266
...
...
@@ -10,6 +10,7 @@ import cn.wisenergy.mapper.UsersMapper;
import
cn.wisenergy.mapper.userLikesMapper
;
import
cn.wisenergy.model.app.*
;
import
cn.wisenergy.model.dto.ShopZxUserDto
;
import
cn.wisenergy.model.dto.ZxUserDto
;
import
cn.wisenergy.model.vo.ShopZxUserVo
;
import
com.github.pagehelper.PageInfo
;
import
org.springframework.core.io.Resource
;
...
...
@@ -180,7 +181,7 @@ public class UploadServiceImpl implements UploadService {
//过滤传入的邀请码带有“”的符号
inviteCode
=
inviteCode
.
replace
(
"\""
,
""
).
replace
(
"\""
,
""
);
//获取上传图片数量,打印在控制台
if
(
null
!=
files
&&
""
.
equals
(
files
)){
if
(
null
!=
files
&&
!
""
.
equals
(
files
)){
System
.
out
.
println
(
"上传图片数量"
+
files
.
length
);
//创建集合
List
<
Map
<
String
,
Object
>>
root
=
new
ArrayList
<
Map
<
String
,
Object
>>();
...
...
@@ -191,11 +192,11 @@ public class UploadServiceImpl implements UploadService {
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>();
//一个文件上传的结果
String
msg
=
""
;
//上传结果信息
//上传图片不为空时
long
sa
=
0
;
for
(
MultipartFile
file
:
files
)
{
sa
=
file
.
getSize
();
}
if
(
sa
>
0
)
{
//
long sa = 0;
//
for (MultipartFile file : files) {
//
sa = file.getSize();
//
}
if
(
null
!=
files
&&!
""
.
equals
(
files
)
)
{
//遍历图片数据
for
(
MultipartFile
file
:
files
)
{
...
...
@@ -263,13 +264,13 @@ public class UploadServiceImpl implements UploadService {
// zxUrl="0";
shopZxMapper
.
zxadd
(
zxUrl
,
zxField
,
inviteCode
,
zxDate
);
//图片与文字都为null的时候,给前端返回提示!
}
else
{
}
else
if
(
null
==
files
&&
null
==
zxField
)
{
map
.
put
(
"code"
,
1
);
map
.
put
(
"msg"
,
"上传资讯不能为空,请重新上传!"
);
return
map
;
}
}
map
.
put
(
"code"
,
0
);
map
.
put
(
"msg"
,
"资讯上传成功!"
);
return
map
;
...
...
@@ -334,21 +335,29 @@ public class UploadServiceImpl implements UploadService {
* 资讯文件展示
*/
@Override
public
Map
selectPage
(
Integer
pageNum
,
Integer
pageSize
,
String
inviteCode
)
{
public
Map
selectPage
(
int
pageNum
,
int
pageSize
,
String
inviteCode
)
{
Map
map
=
new
HashMap
();
pageNum
=
pageNum
-
1
;
List
<
ShopZxUserVo
>
shopZxList
=
shopZxMapper
.
selectPage
(
pageNum
,
pageSize
);
List
<
ZxUserDto
>
shopZxList
=
shopZxMapper
.
selectPage
(
pageNum
,
pageSize
);
for
(
ZxUserDto
shopZx
:
shopZxList
)
{
for
(
ShopZxUserVo
shopZx
:
shopZxList
)
{
String
[]
zxUrl
=
shopZx
.
getZxUrl
().
split
(
","
);
ArrayList
list
=
new
ArrayList
();
if
(
null
!=
zxUrl
)
{
if
(
!
""
.
equals
(
zxUrl
)
)
{
for
(
String
split
:
zxUrl
)
{
boolean
arrayList
=
Collections
.
addAll
(
list
,
split
);
shopZx
.
setAskImgList
(
list
);
if
(
""
.
equals
(
split
)){
shopZx
.
setAskImgList
(
null
);
}
else
{
boolean
arrayList
=
Collections
.
addAll
(
list
,
split
);
shopZx
.
setAskImgList
(
list
);
}
}
}
int
likedId
=
shopZx
.
getZxid
();
if
(
shopZx
.
getUserId
()
==
null
&&
""
!=
shopZx
.
getUserId
())
{
map
.
put
(
"code"
,
1
);
...
...
@@ -374,6 +383,7 @@ public class UploadServiceImpl implements UploadService {
}
}
}
map
.
put
(
"data"
,
shopZxList
);
return
map
;
}
...
...
@@ -407,6 +417,8 @@ public class UploadServiceImpl implements UploadService {
return
R
.
ok
(
info
);
}
/**
* 分页处理方法
*
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/WalletServiceImpl.java
View file @
c1dcc266
...
...
@@ -132,7 +132,7 @@ public class WalletServiceImpl implements WalletService {
MoneyPackageDetailVo
detailVo
=
new
MoneyPackageDetailVo
();
detailVo
.
setUserId
(
userId
);
detailVo
.
setTotalIncome
(
accountInfo
.
getEarnings
Total
());
detailVo
.
setTotalIncome
(
accountInfo
.
getEarnings
Month
());
//获取本月交易记录
List
<
TradeRecord
>
list
=
getTradeRecordList
(
userId
);
...
...
wisenergy-service/wisenergy-service.iml
View file @
c1dcc266
This diff is collapsed.
Click to expand it.
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UploadController.java
View file @
c1dcc266
...
...
@@ -102,11 +102,11 @@ public class UploadController {
* @param pageSize
* @return
*/
@ApiOperation
(
value
=
"用户发布已审核资讯信息倒叙展示"
,
notes
=
"倒叙展示"
,
httpMethod
=
"POST"
,
produces
=
"application/json; charset=UTF-8"
)
@ApiOperation
(
value
=
"用户发布已审核资讯信息倒叙展示"
,
notes
=
"倒叙展示"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"从几开始"
,
required
=
true
,
dataType
=
"integer"
),
@ApiImplicitParam
(
name
=
"inviteCode"
,
value
=
"用户本人邀请码(发布人)"
,
required
=
false
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"一页展示数量"
,
required
=
true
,
dataType
=
"Integger"
)})
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"从几开始"
,
required
=
true
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"一页展示数量"
,
required
=
true
,
dataType
=
"Integer"
)})
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/zxAll"
)
public
Map
selectPage
(
int
pageNum
,
int
pageSize
,
String
inviteCode
){
...
...
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