Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
88406dcc
Commit
88406dcc
authored
4 years ago
by
codezwjava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
培育奖功能实现
parent
327b54d9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
712 additions
and
95 deletions
+712
-95
CultivatingPrizeInfoMapper.java
.../java/cn/wisenergy/mapper/CultivatingPrizeInfoMapper.java
+17
-0
CultivatingPrizeMapper.java
...main/java/cn/wisenergy/mapper/CultivatingPrizeMapper.java
+19
-0
CultivatingPrizeInfoMapper.xml
.../src/main/resources/mapper/CultivatingPrizeInfoMapper.xml
+71
-0
CultivatingPrizeMapper.xml
...pper/src/main/resources/mapper/CultivatingPrizeMapper.xml
+53
-0
CultivatingPrize.java
...rc/main/java/cn/wisenergy/model/app/CultivatingPrize.java
+50
-0
CultivatingPrizeInfo.java
...ain/java/cn/wisenergy/model/app/CultivatingPrizeInfo.java
+95
-0
UserAndRecommendVo.java
...c/main/java/cn/wisenergy/model/vo/UserAndRecommendVo.java
+4
-0
UserLevelServiceImlp.java
...a/cn/wisenergy/service/app/impl/UserLevelServiceImlp.java
+403
-95
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/CultivatingPrizeInfoMapper.java
0 → 100644
View file @
88406dcc
package
cn
.
wisenergy
.
mapper
;
import
cn.wisenergy.model.app.CultivatingPrizeInfo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
/**
* 培育奖详情记录
* @author zw
*/
public
interface
CultivatingPrizeInfoMapper
extends
BaseMapper
<
CultivatingPrizeInfo
>
{
CultivatingPrizeInfo
getOneByUserId
(
String
userId
);
}
This diff is collapsed.
Click to expand it.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/CultivatingPrizeMapper.java
0 → 100644
View file @
88406dcc
package
cn
.
wisenergy
.
mapper
;
import
cn.wisenergy.model.app.CultivatingPrize
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
java.math.BigDecimal
;
/**
* 培育奖金额对应表
* @author zw
*/
public
interface
CultivatingPrizeMapper
extends
BaseMapper
<
CultivatingPrize
>
{
/**
* 根据用户等级获取培育奖对应金额
* @return
*/
CultivatingPrize
getcultivatingPrizeByUserLevel
(
int
userLevel
);
}
This diff is collapsed.
Click to expand it.
wisenergy-mapper/src/main/resources/mapper/CultivatingPrizeInfoMapper.xml
0 → 100644
View file @
88406dcc
<?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.wisenergy.mapper.CultivatingPrizeInfoMapper"
>
<resultMap
id=
"bankMap"
type=
"cn.wisenergy.model.app.CultivatingPrizeInfo"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"user_id"
property=
"userId"
/>
<result
column=
"seedling"
property=
"seedling"
/>
<result
column=
"bronze_tree"
property=
"bronzeTree"
/>
<result
column=
"silver_tree"
property=
"silverTree"
/>
<result
column=
"gold_tree"
property=
"goldTree"
/>
<result
column=
"farmer"
property=
"farmer"
/>
<result
column=
"forest_start"
property=
"forestStart"
/>
<result
column=
"partner"
property=
"partner"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"table"
>
cultivating_prize_info
</sql>
<sql
id=
"cols_all"
>
id,
<include
refid=
"cols_exclude_id"
/>
</sql>
<sql
id=
"cols_exclude_id"
>
user_id,seedling,bronze_tree,silver_tree,gold_tree,farmer,forest_start,partner,create_time,update_time
</sql>
<sql
id=
"vals"
>
#{userId},#{seedling},#{bronzeTree},#{silverTree},#{goldTree},#{farmer},#{forestStart},#{partner},now(),now()
</sql>
<sql
id=
"updateCondition"
>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"seedling != null"
>
seedling = #{seedling},
</if>
<if
test=
"bronzeTree != null"
>
bronze_tree = #{bronzeTree},
</if>
<if
test=
"silverTree != null"
>
silver_tree = #{silverTree},
</if>
<if
test=
"goldTree != null"
>
gold_tree = #{goldTree},
</if>
<if
test=
"farmer != null"
>
farmer = #{farmer},
</if>
<if
test=
"forestStart != null"
>
forest_start = #{forestStart},
</if>
<if
test=
"partner != null"
>
partner = #{partner},
</if>
update_time =now()
</sql>
<sql
id=
"criteria"
>
<if
test=
"id != null"
>
id = #{id}
</if>
<if
test=
"userId != null"
>
and user_id = #{userId}
</if>
<if
test=
"seedling != null"
>
and seedling = #{seedling}
</if>
<if
test=
"bronzeTree != null"
>
and bronze_tree = #{bronzeTree}
</if>
<if
test=
"silverTree != null"
>
and silver_tree = #{silverTree}
</if>
<if
test=
"goldTree != null"
>
and gold_tree = #{goldTree}
</if>
<if
test=
"farmer != null"
>
and farmer = #{farmer}
</if>
<if
test=
"forestStart != null"
>
and forest_start = #{forestStart}
</if>
<if
test=
"partner != null"
>
and partner = #{partner}
</if>
<if
test=
"createTime != null"
>
and create_time
>
= #{createTime}
</if>
<if
test=
"updateTime != null"
>
and #{updateTime}
>
= update_time
</if>
</sql>
<select
id=
"getOneByUserId"
resultType=
"cn.wisenergy.model.app.CultivatingPrizeInfo"
>
select
<include
refid=
"cols_all"
/>
from
<include
refid=
"table"
/>
<where>
user_id = #{userId}
</where>
</select>
</mapper>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
wisenergy-mapper/src/main/resources/mapper/CultivatingPrizeMapper.xml
0 → 100644
View file @
88406dcc
<?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.wisenergy.mapper.CultivatingPrizeMapper"
>
<resultMap
id=
"bankMap"
type=
"cn.wisenergy.model.app.CultivatingPrize"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"user_level"
property=
"userLevel"
/>
<result
column=
"cultivating_prize"
property=
"cultivatingPrize"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"table"
>
cultivating_prize
</sql>
<sql
id=
"cols_all"
>
id,
<include
refid=
"cols_exclude_id"
/>
</sql>
<sql
id=
"cols_exclude_id"
>
user_level,cultivating_prize,create_time,update_time
</sql>
<sql
id=
"vals"
>
#{userLevel},#{cultivatingPrize},now(),now()
</sql>
<sql
id=
"updateCondition"
>
<if
test=
"userLevel != null"
>
user_level = #{userLevel},
</if>
<if
test=
"cultivatingPrize != null"
>
cultivating_prize = #{cultivatingPrize},
</if>
update_time =now()
</sql>
<sql
id=
"criteria"
>
<if
test=
"id != null"
>
id = #{id}
</if>
<if
test=
"userLevel != null"
>
and user_level = #{userLevel}
</if>
<if
test=
"cultivatingPrize != null"
>
and cultivating_prize = #{cultivatingPrize}
</if>
<if
test=
"createTime != null"
>
and create_time
>
= #{createTime}
</if>
<if
test=
"updateTime != null"
>
and #{updateTime}
>
= update_time
</if>
</sql>
<select
id=
"getcultivatingPrizeByUserLevel"
resultType=
"cn.wisenergy.model.app.CultivatingPrize"
>
select
<include
refid=
"cols_all"
/>
from
<include
refid=
"table"
/>
<where>
user_level = #{userLevel}
</where>
</select>
</mapper>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
wisenergy-model/src/main/java/cn/wisenergy/model/app/CultivatingPrize.java
0 → 100644
View file @
88406dcc
package
cn
.
wisenergy
.
model
.
app
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @author zw
* @ Description: 培育奖实体类
* @ Author : zw
* @ Date : 2021/3/5 14:12
*/
@Data
@ApiModel
(
value
=
"CultivatingPrize"
)
public
class
CultivatingPrize
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1506184523154720202L
;
/**
* 主键id
*/
@ApiModelProperty
(
name
=
"id"
,
value
=
"主键id"
)
private
int
id
;
/**
* 用户等级
*/
@ApiModelProperty
(
name
=
"cultivatingPrize"
,
value
=
"用户等级"
)
private
int
userLevel
;
/**
* 培育奖金额
*/
@ApiModelProperty
(
name
=
"cultivatingPrize"
,
value
=
"培育奖金额"
)
private
BigDecimal
cultivatingPrize
;
/**
* 创建时间
*/
@ApiModelProperty
(
name
=
"createTime"
,
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 修改时间
*/
@ApiModelProperty
(
name
=
"updateTime"
,
value
=
"修改时间"
)
private
Date
updateTime
;
}
This diff is collapsed.
Click to expand it.
wisenergy-model/src/main/java/cn/wisenergy/model/app/CultivatingPrizeInfo.java
0 → 100644
View file @
88406dcc
package
cn
.
wisenergy
.
model
.
app
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author zw
* @ Description: 培育奖记录
* @ Author : zw
* @ Date : 2021/3/5 14:12
*/
@Data
@ApiModel
(
value
=
"CultivatingPrizeInfo"
)
public
class
CultivatingPrizeInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
8336018752382673469L
;
/**
* 主键id
*/
@ApiModelProperty
(
name
=
"id"
,
value
=
"主键id"
)
private
int
id
;
/**
* 用户id
*/
@ApiModelProperty
(
name
=
"userId"
,
value
=
"用户id"
)
private
String
userId
;
/**
* 幼苗状态培育奖记录 0:表示上级用户没有获得过当前等级的培育奖
* 1: 表示上级用户已经获得过当前等级的培育奖
*/
@ApiModelProperty
(
name
=
"seedling"
,
value
=
"幼苗等级培育奖记录"
)
private
int
seedling
;
/**
* 青铜树等级培育奖记录0:表示上级用户没有获得过当前等级的培育奖
* 1: 表示上级用户已经获得过当前等级的培育奖
*/
@ApiModelProperty
(
name
=
"bronze_tree"
,
value
=
"青铜树等级培育奖记录"
)
private
int
bronzeTree
;
/**
* 白银树等级培育奖记录0:表示上级用户没有获得过当前等级的培育奖
* 1: 表示上级用户已经获得过当前等级的培育奖
*/
@ApiModelProperty
(
name
=
"silver_tree"
,
value
=
"白银树等级培育奖记录"
)
private
int
silverTree
;
/**
* 黄金树等级培育奖记录0:表示上级用户没有获得过当前等级的培育奖
* 1: 表示上级用户已经获得过当前等级的培育奖
*/
@ApiModelProperty
(
name
=
"gold_tree"
,
value
=
"黄金树等级培育奖记录"
)
private
int
goldTree
;
/**
* 农场主等级培育奖记录0:表示上级用户没有获得过当前等级的培育奖
* 1: 表示上级用户已经获得过当前等级的培育奖
*/
@ApiModelProperty
(
name
=
"forest_start"
,
value
=
"农场主等级培育奖记录"
)
private
int
farmer
;
/**
* 森林之星等级培育奖记录0:表示上级用户没有获得过当前等级的培育奖
* 1: 表示上级用户已经获得过当前等级的培育奖
*/
@ApiModelProperty
(
name
=
"forest_start"
,
value
=
"森林之星等级培育奖记录"
)
private
int
forestStart
;
/**
* 西田森合伙人等级培育奖记录0:表示上级用户没有获得过当前等级的培育奖
* 1: 表示上级用户已经获得过当前等级的培育奖
*/
@ApiModelProperty
(
name
=
"partner"
,
value
=
"西田森合伙人等级培育奖记录"
)
private
int
partner
;
/**
* 创建时间
*/
@ApiModelProperty
(
name
=
"createTime"
,
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 修改时间
*/
@ApiModelProperty
(
name
=
"updateTime"
,
value
=
"修改时间"
)
private
Date
updateTime
;
}
This diff is collapsed.
Click to expand it.
wisenergy-model/src/main/java/cn/wisenergy/model/vo/UserAndRecommendVo.java
View file @
88406dcc
package
cn
.
wisenergy
.
model
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
...
...
@@ -12,16 +13,19 @@ public class UserAndRecommendVo {
/**
* 用户id
*/
@ApiModelProperty
(
value
=
"用户id"
,
name
=
"userId"
)
private
String
userId
;
/**
* 当月消费金额
*/
@ApiModelProperty
(
value
=
"用户本月新增业绩"
,
name
=
"monthyCount"
)
private
BigDecimal
monthyCount
;
/**
* 累计消费金额
*/
@ApiModelProperty
(
value
=
"用户累计业绩"
,
name
=
"historyCount"
)
private
BigDecimal
historyCount
;
}
This diff is collapsed.
Click to expand it.
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserLevelServiceImlp.java
View file @
88406dcc
This diff is collapsed.
Click to expand it.
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