Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
huhu-partner
Project
Overview
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guanchen
huhu-partner
Commits
4d115eb5
Commit
4d115eb5
authored
Jun 25, 2019
by
guanchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parents
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
988 additions
and
0 deletions
+988
-0
.gitignore
.gitignore
+31
-0
pom.xml
pom.xml
+125
-0
PartnerApplication.java
...main/java/com/lanren/huhu/partner/PartnerApplication.java
+13
-0
UserController.java
...va/com/lanren/huhu/partner/controller/UserController.java
+17
-0
PartnerAccountMapper.java
...ava/com/lanren/huhu/partner/dao/PartnerAccountMapper.java
+21
-0
PartnerAccount.java
...n/java/com/lanren/huhu/partner/domain/PartnerAccount.java
+195
-0
UserManager.java
...ain/java/com/lanren/huhu/partner/manager/UserManager.java
+10
-0
.gitignore
src/main/java/com/lanren/huhu/partner/service/.gitignore
+1
-0
PartnerAccountService.java
...om/lanren/huhu/partner/service/PartnerAccountService.java
+17
-0
PartnerAccountServiceImpl.java
.../huhu/partner/service/impl/PartnerAccountServiceImpl.java
+39
-0
application.yml
src/main/resources/application.yml
+17
-0
PartnerAccountMapper.xml
src/main/resources/mapper/PartnerAccountMapper.xml
+502
-0
No files found.
.gitignore
0 → 100644
View file @
4d115eb5
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/
pom.xml
0 → 100644
View file @
4d115eb5
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.2.0.M4
</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<groupId>
com.lanren.huhu
</groupId>
<artifactId>
partner
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<name>
partner
</name>
<description>
呼呼省钱合伙人相关服务
</description>
<properties>
<java.version>
1.8
</java.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.mybatis.spring.boot
</groupId>
<artifactId>
mybatis-spring-boot-starter
</artifactId>
<version>
2.0.1
</version>
</dependency>
<!--添加通用Mapper依赖 -->
<!--<dependency>-->
<!--<groupId>tk.mybatis</groupId>-->
<!--<artifactId>mapper-spring-boot-starter</artifactId>-->
<!--<version>1.1.4</version>-->
<!--</dependency>-->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<version>
3.1.1
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-freemarker
</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-starter-test</artifactId>-->
<!--<scope>test</scope>-->
<!--<exclusions>-->
<!--<exclusion>-->
<!--<groupId>org.junit.vintage</groupId>-->
<!--<artifactId>junit-vintage-engine</artifactId>-->
<!--</exclusion>-->
<!--<exclusion>-->
<!--<groupId>junit</groupId>-->
<!--<artifactId>junit</artifactId>-->
<!--</exclusion>-->
<!--</exclusions>-->
<!--</dependency>-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>
spring-snapshots
</id>
<name>
Spring Snapshots
</name>
<url>
https://repo.spring.io/snapshot
</url>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</repository>
<repository>
<id>
spring-milestones
</id>
<name>
Spring Milestones
</name>
<url>
https://repo.spring.io/milestone
</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>
spring-snapshots
</id>
<name>
Spring Snapshots
</name>
<url>
https://repo.spring.io/snapshot
</url>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>
spring-milestones
</id>
<name>
Spring Milestones
</name>
<url>
https://repo.spring.io/milestone
</url>
</pluginRepository>
</pluginRepositories>
</project>
src/main/java/com/lanren/huhu/partner/PartnerApplication.java
0 → 100644
View file @
4d115eb5
package
com
.
lanren
.
huhu
.
partner
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
PartnerApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
PartnerApplication
.
class
,
args
);
}
}
src/main/java/com/lanren/huhu/partner/controller/UserController.java
0 → 100644
View file @
4d115eb5
package
com
.
lanren
.
huhu
.
partner
.
controller
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.web.bind.annotation.*
;
/**
* @author chen
*/
@RestController
@RequestMapping
(
"/v1/user"
)
public
class
UserController
{
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
public
String
getUserName
(
@PathVariable
(
"id"
)
Long
id
,
@RequestHeader
HttpHeaders
headers
){
return
"userId "
+
id
;
}
}
src/main/java/com/lanren/huhu/partner/dao/PartnerAccountMapper.java
0 → 100644
View file @
4d115eb5
package
com
.
lanren
.
huhu
.
partner
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.lanren.huhu.partner.domain.PartnerAccount
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
@Mapper
public
interface
PartnerAccountMapper
extends
BaseMapper
<
PartnerAccount
>
{
int
updateBatch
(
List
<
PartnerAccount
>
list
);
int
batchInsert
(
@Param
(
"list"
)
List
<
PartnerAccount
>
list
);
int
insertOrUpdate
(
PartnerAccount
record
);
int
insertOrUpdateSelective
(
PartnerAccount
record
);
}
\ No newline at end of file
src/main/java/com/lanren/huhu/partner/domain/PartnerAccount.java
0 → 100644
View file @
4d115eb5
package
com
.
lanren
.
huhu
.
partner
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
lombok.Data
;
@Data
@TableName
(
value
=
"partner_account"
)
public
class
PartnerAccount
implements
Serializable
{
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
/**
* 关联用户id
*/
@TableField
(
value
=
"user_id"
)
private
Integer
userId
;
/**
* 合伙人等级 普通10 高级20, 如果是超级合伙人这里是成为超级之前的级别
*/
@TableField
(
value
=
"partner_level"
)
private
Integer
partnerLevel
;
/**
* 如果是高级记成为高级的时间
*/
@TableField
(
value
=
"become_high_time"
)
private
LocalDateTime
becomeHighTime
;
/**
* 是否是超级合伙人 1是 0不是 默认不是
*/
@TableField
(
value
=
"is_super_partner"
)
private
Integer
isSuperPartner
;
/**
* 如果是超级合伙人记成为超级的时间
*/
@TableField
(
value
=
"become_super_time"
)
private
LocalDateTime
becomeSuperTime
;
/**
* 账户税前收入总额
*/
@TableField
(
value
=
"all_income"
)
private
BigDecimal
allIncome
;
/**
* 当前账期未记账总额
*/
@TableField
(
value
=
"curr_untaxed_income"
)
private
BigDecimal
currUntaxedIncome
;
/**
* 扣款金额
*/
@TableField
(
value
=
"revoke_balance"
)
private
BigDecimal
revokeBalance
;
/**
* 用户首月可立即提现金额: 小于等于800 属未记账
*/
@TableField
(
value
=
"first_month_free"
)
private
BigDecimal
firstMonthFree
;
/**
* 税后总收入=微信可提+已提+银行卡可提+已提
*/
@TableField
(
value
=
"income_after_tax"
)
private
BigDecimal
incomeAfterTax
;
/**
* 微信可提现总额
*/
@TableField
(
value
=
"wx_free_balance"
)
private
BigDecimal
wxFreeBalance
;
/**
* 微信已提现总额
*/
@TableField
(
value
=
"wx_withdrawn_balance"
)
private
BigDecimal
wxWithdrawnBalance
;
/**
* 银行卡可提现总额
*/
@TableField
(
value
=
"bank_free_balance"
)
private
BigDecimal
bankFreeBalance
;
/**
* 银行卡已提现总额
*/
@TableField
(
value
=
"bank_withdrawn_balance"
)
private
BigDecimal
bankWithdrawnBalance
;
/**
* 提现冻结
*/
@TableField
(
value
=
"frozen_withdraw_balance"
)
private
BigDecimal
frozenWithdrawBalance
;
/**
* 微信提现冻结
*/
@TableField
(
value
=
"frozen_wx_withdraw_balance"
)
private
BigDecimal
frozenWxWithdrawBalance
;
/**
* 银行卡提现冻结
*/
@TableField
(
value
=
"frozen_bank_withdraw_balance"
)
private
BigDecimal
frozenBankWithdrawBalance
;
/**
* 获得第一笔收入的时间戳
*/
@TableField
(
value
=
"first_income_time"
)
private
Long
firstIncomeTime
;
@TableField
(
value
=
"created_at"
)
private
Long
createdAt
;
@TableField
(
value
=
"updated_at"
)
private
Long
updatedAt
;
@TableField
(
value
=
"deleted_at"
)
private
Long
deletedAt
;
/**
* 创建时间戳
*/
@TableField
(
value
=
"create_time"
)
private
LocalDateTime
createTime
;
/**
* 会员截止日期
*/
@TableField
(
value
=
"vip_deadline"
)
private
Integer
vipDeadline
;
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
COL_USER_ID
=
"user_id"
;
public
static
final
String
COL_PARTNER_LEVEL
=
"partner_level"
;
public
static
final
String
COL_BECOME_HIGH_TIME
=
"become_high_time"
;
public
static
final
String
COL_IS_SUPER_PARTNER
=
"is_super_partner"
;
public
static
final
String
COL_BECOME_SUPER_TIME
=
"become_super_time"
;
public
static
final
String
COL_ALL_INCOME
=
"all_income"
;
public
static
final
String
COL_CURR_UNTAXED_INCOME
=
"curr_untaxed_income"
;
public
static
final
String
COL_REVOKE_BALANCE
=
"revoke_balance"
;
public
static
final
String
COL_FIRST_MONTH_FREE
=
"first_month_free"
;
public
static
final
String
COL_INCOME_AFTER_TAX
=
"income_after_tax"
;
public
static
final
String
COL_WX_FREE_BALANCE
=
"wx_free_balance"
;
public
static
final
String
COL_WX_WITHDRAWN_BALANCE
=
"wx_withdrawn_balance"
;
public
static
final
String
COL_BANK_FREE_BALANCE
=
"bank_free_balance"
;
public
static
final
String
COL_BANK_WITHDRAWN_BALANCE
=
"bank_withdrawn_balance"
;
public
static
final
String
COL_FROZEN_WITHDRAW_BALANCE
=
"frozen_withdraw_balance"
;
public
static
final
String
COL_FROZEN_WX_WITHDRAW_BALANCE
=
"frozen_wx_withdraw_balance"
;
public
static
final
String
COL_FROZEN_BANK_WITHDRAW_BALANCE
=
"frozen_bank_withdraw_balance"
;
public
static
final
String
COL_FIRST_INCOME_TIME
=
"first_income_time"
;
public
static
final
String
COL_CREATED_AT
=
"created_at"
;
public
static
final
String
COL_UPDATED_AT
=
"updated_at"
;
public
static
final
String
COL_DELETED_AT
=
"deleted_at"
;
public
static
final
String
COL_CREATE_TIME
=
"create_time"
;
public
static
final
String
COL_VIP_DEADLINE
=
"vip_deadline"
;
}
\ No newline at end of file
src/main/java/com/lanren/huhu/partner/manager/UserManager.java
0 → 100644
View file @
4d115eb5
package
com
.
lanren
.
huhu
.
partner
.
manager
;
import
com.lanren.huhu.partner.service.PartnerAccountService
;
import
org.springframework.beans.factory.annotation.Autowired
;
public
class
UserManager
{
@Autowired
private
PartnerAccountService
partnerAccountService
;
}
src/main/java/com/lanren/huhu/partner/service/.gitignore
0 → 100644
View file @
4d115eb5
# Created by .ignore support plugin (hsz.mobi)
src/main/java/com/lanren/huhu/partner/service/PartnerAccountService.java
0 → 100644
View file @
4d115eb5
package
com
.
lanren
.
huhu
.
partner
.
service
;
import
java.util.List
;
import
com.lanren.huhu.partner.domain.PartnerAccount
;
import
com.baomidou.mybatisplus.extension.service.IService
;
public
interface
PartnerAccountService
extends
IService
<
PartnerAccount
>{
int
updateBatch
(
List
<
PartnerAccount
>
list
);
int
batchInsert
(
List
<
PartnerAccount
>
list
);
int
insertOrUpdate
(
PartnerAccount
record
);
int
insertOrUpdateSelective
(
PartnerAccount
record
);
}
src/main/java/com/lanren/huhu/partner/service/impl/PartnerAccountServiceImpl.java
0 → 100644
View file @
4d115eb5
package
com
.
lanren
.
huhu
.
partner
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
java.util.List
;
import
com.lanren.huhu.partner.dao.PartnerAccountMapper
;
import
com.lanren.huhu.partner.domain.PartnerAccount
;
import
com.lanren.huhu.partner.service.PartnerAccountService
;
@Service
public
class
PartnerAccountServiceImpl
extends
ServiceImpl
<
PartnerAccountMapper
,
PartnerAccount
>
implements
PartnerAccountService
{
@Override
public
int
updateBatch
(
List
<
PartnerAccount
>
list
)
{
return
baseMapper
.
updateBatch
(
list
);
}
@Override
public
int
batchInsert
(
List
<
PartnerAccount
>
list
)
{
return
baseMapper
.
batchInsert
(
list
);
}
@Override
public
int
insertOrUpdate
(
PartnerAccount
record
)
{
return
baseMapper
.
insertOrUpdate
(
record
);
}
@Override
public
int
insertOrUpdateSelective
(
PartnerAccount
record
)
{
return
baseMapper
.
insertOrUpdateSelective
(
record
);
}
public
PartnerAccount
getOne
(
Long
userId
){
QueryWrapper
<
PartnerAccount
>
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"user_id"
,
userId
);
baseMapper
.
selectCount
(
queryWrapper
);
return
new
PartnerAccount
();
}
}
src/main/resources/application.yml
0 → 100644
View file @
4d115eb5
spring
:
datasource
:
#连接MySQL
url
:
jdbc:mysql://localhost:3306/socks?useSSL=false
username
:
root
password
:
root
driver-class-name
:
com.mysql.cj.jdbc.Driver
mybatis
:
configuration
:
#配置项:开启下划线到驼峰的自动转换. 作用:将数据库字段根据驼峰规则自动注入到对象属性。
map-underscore-to-camel-case
:
true
logging
:
level
:
#打印SQL信息
com.hehe.mapper
:
debug
src/main/resources/mapper/PartnerAccountMapper.xml
0 → 100644
View file @
4d115eb5
<?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=
"com.lanren.huhu.partner.dao.PartnerAccountMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.lanren.huhu.partner.domain.PartnerAccount"
>
<!--@mbg.generated-->
<id
column=
"id"
property=
"id"
/>
<result
column=
"user_id"
property=
"userId"
/>
<result
column=
"partner_level"
property=
"partnerLevel"
/>
<result
column=
"become_high_time"
property=
"becomeHighTime"
/>
<result
column=
"is_super_partner"
property=
"isSuperPartner"
/>
<result
column=
"become_super_time"
property=
"becomeSuperTime"
/>
<result
column=
"all_income"
property=
"allIncome"
/>
<result
column=
"curr_untaxed_income"
property=
"currUntaxedIncome"
/>
<result
column=
"revoke_balance"
property=
"revokeBalance"
/>
<result
column=
"first_month_free"
property=
"firstMonthFree"
/>
<result
column=
"income_after_tax"
property=
"incomeAfterTax"
/>
<result
column=
"wx_free_balance"
property=
"wxFreeBalance"
/>
<result
column=
"wx_withdrawn_balance"
property=
"wxWithdrawnBalance"
/>
<result
column=
"bank_free_balance"
property=
"bankFreeBalance"
/>
<result
column=
"bank_withdrawn_balance"
property=
"bankWithdrawnBalance"
/>
<result
column=
"frozen_withdraw_balance"
property=
"frozenWithdrawBalance"
/>
<result
column=
"frozen_wx_withdraw_balance"
property=
"frozenWxWithdrawBalance"
/>
<result
column=
"frozen_bank_withdraw_balance"
property=
"frozenBankWithdrawBalance"
/>
<result
column=
"first_income_time"
property=
"firstIncomeTime"
/>
<result
column=
"created_at"
property=
"createdAt"
/>
<result
column=
"updated_at"
property=
"updatedAt"
/>
<result
column=
"deleted_at"
property=
"deletedAt"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"vip_deadline"
property=
"vipDeadline"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, user_id, partner_level, become_high_time, is_super_partner, become_super_time,
all_income, curr_untaxed_income, revoke_balance, first_month_free, income_after_tax,
wx_free_balance, wx_withdrawn_balance, bank_free_balance, bank_withdrawn_balance,
frozen_withdraw_balance, frozen_wx_withdraw_balance, frozen_bank_withdraw_balance,
first_income_time, created_at, updated_at, deleted_at, create_time, vip_deadline
</sql>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update partner_account
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"user_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.userId}
</foreach>
</trim>
<trim
prefix=
"partner_level = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.partnerLevel}
</foreach>
</trim>
<trim
prefix=
"become_high_time = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.becomeHighTime}
</foreach>
</trim>
<trim
prefix=
"is_super_partner = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.isSuperPartner}
</foreach>
</trim>
<trim
prefix=
"become_super_time = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.becomeSuperTime}
</foreach>
</trim>
<trim
prefix=
"all_income = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.allIncome}
</foreach>
</trim>
<trim
prefix=
"curr_untaxed_income = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.currUntaxedIncome}
</foreach>
</trim>
<trim
prefix=
"revoke_balance = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.revokeBalance}
</foreach>
</trim>
<trim
prefix=
"first_month_free = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.firstMonthFree}
</foreach>
</trim>
<trim
prefix=
"income_after_tax = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.incomeAfterTax}
</foreach>
</trim>
<trim
prefix=
"wx_free_balance = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.wxFreeBalance}
</foreach>
</trim>
<trim
prefix=
"wx_withdrawn_balance = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.wxWithdrawnBalance}
</foreach>
</trim>
<trim
prefix=
"bank_free_balance = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.bankFreeBalance}
</foreach>
</trim>
<trim
prefix=
"bank_withdrawn_balance = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.bankWithdrawnBalance}
</foreach>
</trim>
<trim
prefix=
"frozen_withdraw_balance = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.frozenWithdrawBalance}
</foreach>
</trim>
<trim
prefix=
"frozen_wx_withdraw_balance = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.frozenWxWithdrawBalance}
</foreach>
</trim>
<trim
prefix=
"frozen_bank_withdraw_balance = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.frozenBankWithdrawBalance}
</foreach>
</trim>
<trim
prefix=
"first_income_time = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.firstIncomeTime}
</foreach>
</trim>
<trim
prefix=
"created_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.createdAt}
</foreach>
</trim>
<trim
prefix=
"updated_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.updatedAt}
</foreach>
</trim>
<trim
prefix=
"deleted_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.deletedAt}
</foreach>
</trim>
<trim
prefix=
"create_time = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.createTime}
</foreach>
</trim>
<trim
prefix=
"vip_deadline = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id} then #{item.vipDeadline}
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id}
</foreach>
</update>
<insert
id=
"batchInsert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"map"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into partner_account
(user_id, partner_level, become_high_time, is_super_partner, become_super_time, all_income,
curr_untaxed_income, revoke_balance, first_month_free, income_after_tax, wx_free_balance,
wx_withdrawn_balance, bank_free_balance, bank_withdrawn_balance, frozen_withdraw_balance,
frozen_wx_withdraw_balance, frozen_bank_withdraw_balance, first_income_time, created_at,
updated_at, deleted_at, create_time, vip_deadline)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.userId}, #{item.partnerLevel}, #{item.becomeHighTime}, #{item.isSuperPartner},
#{item.becomeSuperTime}, #{item.allIncome}, #{item.currUntaxedIncome}, #{item.revokeBalance},
#{item.firstMonthFree}, #{item.incomeAfterTax}, #{item.wxFreeBalance}, #{item.wxWithdrawnBalance},
#{item.bankFreeBalance}, #{item.bankWithdrawnBalance}, #{item.frozenWithdrawBalance},
#{item.frozenWxWithdrawBalance}, #{item.frozenBankWithdrawBalance}, #{item.firstIncomeTime},
#{item.createdAt}, #{item.updatedAt}, #{item.deletedAt}, #{item.createTime}, #{item.vipDeadline}
)
</foreach>
</insert>
<insert
id=
"insertOrUpdate"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.lanren.huhu.partner.domain.PartnerAccount"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into partner_account
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
user_id,
partner_level,
become_high_time,
is_super_partner,
become_super_time,
all_income,
curr_untaxed_income,
revoke_balance,
first_month_free,
income_after_tax,
wx_free_balance,
wx_withdrawn_balance,
bank_free_balance,
bank_withdrawn_balance,
frozen_withdraw_balance,
frozen_wx_withdraw_balance,
frozen_bank_withdraw_balance,
first_income_time,
created_at,
updated_at,
deleted_at,
create_time,
vip_deadline,
</trim>
values
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id},
</if>
#{userId},
#{partnerLevel},
#{becomeHighTime},
#{isSuperPartner},
#{becomeSuperTime},
#{allIncome},
#{currUntaxedIncome},
#{revokeBalance},
#{firstMonthFree},
#{incomeAfterTax},
#{wxFreeBalance},
#{wxWithdrawnBalance},
#{bankFreeBalance},
#{bankWithdrawnBalance},
#{frozenWithdrawBalance},
#{frozenWxWithdrawBalance},
#{frozenBankWithdrawBalance},
#{firstIncomeTime},
#{createdAt},
#{updatedAt},
#{deletedAt},
#{createTime},
#{vipDeadline},
</trim>
on duplicate key update
<trim
suffixOverrides=
","
>
<if
test=
"id != null"
>
id = #{id},
</if>
user_id = #{userId},
partner_level = #{partnerLevel},
become_high_time = #{becomeHighTime},
is_super_partner = #{isSuperPartner},
become_super_time = #{becomeSuperTime},
all_income = #{allIncome},
curr_untaxed_income = #{currUntaxedIncome},
revoke_balance = #{revokeBalance},
first_month_free = #{firstMonthFree},
income_after_tax = #{incomeAfterTax},
wx_free_balance = #{wxFreeBalance},
wx_withdrawn_balance = #{wxWithdrawnBalance},
bank_free_balance = #{bankFreeBalance},
bank_withdrawn_balance = #{bankWithdrawnBalance},
frozen_withdraw_balance = #{frozenWithdrawBalance},
frozen_wx_withdraw_balance = #{frozenWxWithdrawBalance},
frozen_bank_withdraw_balance = #{frozenBankWithdrawBalance},
first_income_time = #{firstIncomeTime},
created_at = #{createdAt},
updated_at = #{updatedAt},
deleted_at = #{deletedAt},
create_time = #{createTime},
vip_deadline = #{vipDeadline},
</trim>
</insert>
<insert
id=
"insertOrUpdateSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.lanren.huhu.partner.domain.PartnerAccount"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into partner_account
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"partnerLevel != null"
>
partner_level,
</if>
<if
test=
"becomeHighTime != null"
>
become_high_time,
</if>
<if
test=
"isSuperPartner != null"
>
is_super_partner,
</if>
<if
test=
"becomeSuperTime != null"
>
become_super_time,
</if>
<if
test=
"allIncome != null"
>
all_income,
</if>
<if
test=
"currUntaxedIncome != null"
>
curr_untaxed_income,
</if>
<if
test=
"revokeBalance != null"
>
revoke_balance,
</if>
<if
test=
"firstMonthFree != null"
>
first_month_free,
</if>
<if
test=
"incomeAfterTax != null"
>
income_after_tax,
</if>
<if
test=
"wxFreeBalance != null"
>
wx_free_balance,
</if>
<if
test=
"wxWithdrawnBalance != null"
>
wx_withdrawn_balance,
</if>
<if
test=
"bankFreeBalance != null"
>
bank_free_balance,
</if>
<if
test=
"bankWithdrawnBalance != null"
>
bank_withdrawn_balance,
</if>
<if
test=
"frozenWithdrawBalance != null"
>
frozen_withdraw_balance,
</if>
<if
test=
"frozenWxWithdrawBalance != null"
>
frozen_wx_withdraw_balance,
</if>
<if
test=
"frozenBankWithdrawBalance != null"
>
frozen_bank_withdraw_balance,
</if>
<if
test=
"firstIncomeTime != null"
>
first_income_time,
</if>
<if
test=
"createdAt != null"
>
created_at,
</if>
<if
test=
"updatedAt != null"
>
updated_at,
</if>
<if
test=
"deletedAt != null"
>
deleted_at,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"vipDeadline != null"
>
vip_deadline,
</if>
</trim>
values
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id},
</if>
<if
test=
"userId != null"
>
#{userId},
</if>
<if
test=
"partnerLevel != null"
>
#{partnerLevel},
</if>
<if
test=
"becomeHighTime != null"
>
#{becomeHighTime},
</if>
<if
test=
"isSuperPartner != null"
>
#{isSuperPartner},
</if>
<if
test=
"becomeSuperTime != null"
>
#{becomeSuperTime},
</if>
<if
test=
"allIncome != null"
>
#{allIncome},
</if>
<if
test=
"currUntaxedIncome != null"
>
#{currUntaxedIncome},
</if>
<if
test=
"revokeBalance != null"
>
#{revokeBalance},
</if>
<if
test=
"firstMonthFree != null"
>
#{firstMonthFree},
</if>
<if
test=
"incomeAfterTax != null"
>
#{incomeAfterTax},
</if>
<if
test=
"wxFreeBalance != null"
>
#{wxFreeBalance},
</if>
<if
test=
"wxWithdrawnBalance != null"
>
#{wxWithdrawnBalance},
</if>
<if
test=
"bankFreeBalance != null"
>
#{bankFreeBalance},
</if>
<if
test=
"bankWithdrawnBalance != null"
>
#{bankWithdrawnBalance},
</if>
<if
test=
"frozenWithdrawBalance != null"
>
#{frozenWithdrawBalance},
</if>
<if
test=
"frozenWxWithdrawBalance != null"
>
#{frozenWxWithdrawBalance},
</if>
<if
test=
"frozenBankWithdrawBalance != null"
>
#{frozenBankWithdrawBalance},
</if>
<if
test=
"firstIncomeTime != null"
>
#{firstIncomeTime},
</if>
<if
test=
"createdAt != null"
>
#{createdAt},
</if>
<if
test=
"updatedAt != null"
>
#{updatedAt},
</if>
<if
test=
"deletedAt != null"
>
#{deletedAt},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"vipDeadline != null"
>
#{vipDeadline},
</if>
</trim>
on duplicate key update
<trim
suffixOverrides=
","
>
<if
test=
"id != null"
>
id = #{id},
</if>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"partnerLevel != null"
>
partner_level = #{partnerLevel},
</if>
<if
test=
"becomeHighTime != null"
>
become_high_time = #{becomeHighTime},
</if>
<if
test=
"isSuperPartner != null"
>
is_super_partner = #{isSuperPartner},
</if>
<if
test=
"becomeSuperTime != null"
>
become_super_time = #{becomeSuperTime},
</if>
<if
test=
"allIncome != null"
>
all_income = #{allIncome},
</if>
<if
test=
"currUntaxedIncome != null"
>
curr_untaxed_income = #{currUntaxedIncome},
</if>
<if
test=
"revokeBalance != null"
>
revoke_balance = #{revokeBalance},
</if>
<if
test=
"firstMonthFree != null"
>
first_month_free = #{firstMonthFree},
</if>
<if
test=
"incomeAfterTax != null"
>
income_after_tax = #{incomeAfterTax},
</if>
<if
test=
"wxFreeBalance != null"
>
wx_free_balance = #{wxFreeBalance},
</if>
<if
test=
"wxWithdrawnBalance != null"
>
wx_withdrawn_balance = #{wxWithdrawnBalance},
</if>
<if
test=
"bankFreeBalance != null"
>
bank_free_balance = #{bankFreeBalance},
</if>
<if
test=
"bankWithdrawnBalance != null"
>
bank_withdrawn_balance = #{bankWithdrawnBalance},
</if>
<if
test=
"frozenWithdrawBalance != null"
>
frozen_withdraw_balance = #{frozenWithdrawBalance},
</if>
<if
test=
"frozenWxWithdrawBalance != null"
>
frozen_wx_withdraw_balance = #{frozenWxWithdrawBalance},
</if>
<if
test=
"frozenBankWithdrawBalance != null"
>
frozen_bank_withdraw_balance = #{frozenBankWithdrawBalance},
</if>
<if
test=
"firstIncomeTime != null"
>
first_income_time = #{firstIncomeTime},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt},
</if>
<if
test=
"updatedAt != null"
>
updated_at = #{updatedAt},
</if>
<if
test=
"deletedAt != null"
>
deleted_at = #{deletedAt},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"vipDeadline != null"
>
vip_deadline = #{vipDeadline},
</if>
</trim>
</insert>
</mapper>
\ No newline at end of file
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