Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
server
Overview
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vanke
server
Commits
2365657c
Commit
2365657c
authored
Jun 24, 2020
by
XiaHou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
万科接口修复
parent
0b0208a9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
843 additions
and
0 deletions
+843
-0
UmsMemberController.java
...n/java/com/macro/mall/controller/UmsMemberController.java
+11
-0
VankeGoodsStockMapper.java
...ain/java/com/macro/mall/mapper/VankeGoodsStockMapper.java
+31
-0
VankeGoodsStock.java
...g/src/main/java/com/macro/mall/model/VankeGoodsStock.java
+87
-0
VankeGoodsStockExample.java
...ain/java/com/macro/mall/model/VankeGoodsStockExample.java
+502
-0
VankeGoodsStockMapper.xml
...resources/com/macro/mall/mapper/VankeGoodsStockMapper.xml
+212
-0
No files found.
mall-admin/src/main/java/com/macro/mall/controller/UmsMemberController.java
0 → 100644
View file @
2365657c
package
com
.
macro
.
mall
.
controller
;
import
io.swagger.annotations.Api
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@Controller
@Api
(
tags
=
"万科后台_用户列表"
,
description
=
"用户列表控制器"
)
@RequestMapping
(
"/admin"
)
public
class
UmsMemberController
{
}
mall-mbg/src/main/java/com/macro/mall/mapper/VankeGoodsStockMapper.java
0 → 100644
View file @
2365657c
package
com
.
macro
.
mall
.
mapper
;
import
com.macro.mall.model.VankeGoodsStock
;
import
com.macro.mall.model.VankeGoodsStockExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
VankeGoodsStockMapper
{
long
countByExample
(
VankeGoodsStockExample
example
);
int
deleteByExample
(
VankeGoodsStockExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
VankeGoodsStock
record
);
int
insertSelective
(
VankeGoodsStock
record
);
List
<
VankeGoodsStock
>
selectByExample
(
VankeGoodsStockExample
example
);
VankeGoodsStock
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
VankeGoodsStock
record
,
@Param
(
"example"
)
VankeGoodsStockExample
example
);
int
updateByExample
(
@Param
(
"record"
)
VankeGoodsStock
record
,
@Param
(
"example"
)
VankeGoodsStockExample
example
);
int
updateByPrimaryKeySelective
(
VankeGoodsStock
record
);
int
updateByPrimaryKey
(
VankeGoodsStock
record
);
}
\ No newline at end of file
mall-mbg/src/main/java/com/macro/mall/model/VankeGoodsStock.java
0 → 100644
View file @
2365657c
package
com
.
macro
.
mall
.
model
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
org.springframework.format.annotation.DateTimeFormat
;
@Entity
public
class
VankeGoodsStock
implements
Serializable
{
@ApiModelProperty
(
value
=
"id"
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@ApiModelProperty
(
value
=
"物品id"
)
private
Long
goodsId
;
@ApiModelProperty
(
value
=
"物品库存变化量"
)
private
Integer
goodsNum
;
@ApiModelProperty
(
value
=
"物品库存变化后库存"
)
private
Integer
stockNum
;
@ApiModelProperty
(
value
=
"创建时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createtime
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getGoodsId
()
{
return
goodsId
;
}
public
void
setGoodsId
(
Long
goodsId
)
{
this
.
goodsId
=
goodsId
;
}
public
Integer
getGoodsNum
()
{
return
goodsNum
;
}
public
void
setGoodsNum
(
Integer
goodsNum
)
{
this
.
goodsNum
=
goodsNum
;
}
public
Integer
getStockNum
()
{
return
stockNum
;
}
public
void
setStockNum
(
Integer
stockNum
)
{
this
.
stockNum
=
stockNum
;
}
public
Date
getCreatetime
()
{
return
createtime
;
}
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", goodsId="
).
append
(
goodsId
);
sb
.
append
(
", goodsNum="
).
append
(
goodsNum
);
sb
.
append
(
", stockNum="
).
append
(
stockNum
);
sb
.
append
(
", createtime="
).
append
(
createtime
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
}
\ No newline at end of file
mall-mbg/src/main/java/com/macro/mall/model/VankeGoodsStockExample.java
0 → 100644
View file @
2365657c
package
com
.
macro
.
mall
.
model
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
class
VankeGoodsStockExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
VankeGoodsStockExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdIsNull
()
{
addCriterion
(
"goods_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdIsNotNull
()
{
addCriterion
(
"goods_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdEqualTo
(
Long
value
)
{
addCriterion
(
"goods_id ="
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"goods_id <>"
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdGreaterThan
(
Long
value
)
{
addCriterion
(
"goods_id >"
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"goods_id >="
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdLessThan
(
Long
value
)
{
addCriterion
(
"goods_id <"
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"goods_id <="
,
value
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"goods_id in"
,
values
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"goods_id not in"
,
values
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"goods_id between"
,
value1
,
value2
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"goods_id not between"
,
value1
,
value2
,
"goodsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumIsNull
()
{
addCriterion
(
"goods_num is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumIsNotNull
()
{
addCriterion
(
"goods_num is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumEqualTo
(
Integer
value
)
{
addCriterion
(
"goods_num ="
,
value
,
"goodsNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumNotEqualTo
(
Integer
value
)
{
addCriterion
(
"goods_num <>"
,
value
,
"goodsNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumGreaterThan
(
Integer
value
)
{
addCriterion
(
"goods_num >"
,
value
,
"goodsNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"goods_num >="
,
value
,
"goodsNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumLessThan
(
Integer
value
)
{
addCriterion
(
"goods_num <"
,
value
,
"goodsNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"goods_num <="
,
value
,
"goodsNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"goods_num in"
,
values
,
"goodsNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"goods_num not in"
,
values
,
"goodsNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"goods_num between"
,
value1
,
value2
,
"goodsNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGoodsNumNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"goods_num not between"
,
value1
,
value2
,
"goodsNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumIsNull
()
{
addCriterion
(
"stock_num is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumIsNotNull
()
{
addCriterion
(
"stock_num is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumEqualTo
(
Integer
value
)
{
addCriterion
(
"stock_num ="
,
value
,
"stockNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumNotEqualTo
(
Integer
value
)
{
addCriterion
(
"stock_num <>"
,
value
,
"stockNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumGreaterThan
(
Integer
value
)
{
addCriterion
(
"stock_num >"
,
value
,
"stockNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"stock_num >="
,
value
,
"stockNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumLessThan
(
Integer
value
)
{
addCriterion
(
"stock_num <"
,
value
,
"stockNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"stock_num <="
,
value
,
"stockNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"stock_num in"
,
values
,
"stockNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"stock_num not in"
,
values
,
"stockNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"stock_num between"
,
value1
,
value2
,
"stockNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStockNumNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"stock_num not between"
,
value1
,
value2
,
"stockNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeIsNull
()
{
addCriterion
(
"createtime is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeIsNotNull
()
{
addCriterion
(
"createtime is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeEqualTo
(
Date
value
)
{
addCriterion
(
"createtime ="
,
value
,
"createtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"createtime <>"
,
value
,
"createtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeGreaterThan
(
Date
value
)
{
addCriterion
(
"createtime >"
,
value
,
"createtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"createtime >="
,
value
,
"createtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeLessThan
(
Date
value
)
{
addCriterion
(
"createtime <"
,
value
,
"createtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"createtime <="
,
value
,
"createtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"createtime in"
,
values
,
"createtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"createtime not in"
,
values
,
"createtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"createtime between"
,
value1
,
value2
,
"createtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatetimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"createtime not between"
,
value1
,
value2
,
"createtime"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
mall-mbg/src/main/resources/com/macro/mall/mapper/VankeGoodsStockMapper.xml
0 → 100644
View file @
2365657c
<?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.macro.mall.mapper.VankeGoodsStockMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.VankeGoodsStock"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"goods_id"
jdbcType=
"BIGINT"
property=
"goodsId"
/>
<result
column=
"goods_num"
jdbcType=
"INTEGER"
property=
"goodsNum"
/>
<result
column=
"stock_num"
jdbcType=
"INTEGER"
property=
"stockNum"
/>
<result
column=
"createtime"
jdbcType=
"TIMESTAMP"
property=
"createtime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, goods_id, goods_num, stock_num, createtime
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.VankeGoodsStockExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from vanke_goods_stock
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from vanke_goods_stock
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from vanke_goods_stock
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.VankeGoodsStockExample"
>
delete from vanke_goods_stock
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.VankeGoodsStock"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into vanke_goods_stock (goods_id, goods_num, stock_num,
createtime)
values (#{goodsId,jdbcType=BIGINT}, #{goodsNum,jdbcType=INTEGER}, #{stockNum,jdbcType=INTEGER},
#{createtime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.VankeGoodsStock"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into vanke_goods_stock
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"goodsId != null"
>
goods_id,
</if>
<if
test=
"goodsNum != null"
>
goods_num,
</if>
<if
test=
"stockNum != null"
>
stock_num,
</if>
<if
test=
"createtime != null"
>
createtime,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"goodsId != null"
>
#{goodsId,jdbcType=BIGINT},
</if>
<if
test=
"goodsNum != null"
>
#{goodsNum,jdbcType=INTEGER},
</if>
<if
test=
"stockNum != null"
>
#{stockNum,jdbcType=INTEGER},
</if>
<if
test=
"createtime != null"
>
#{createtime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.VankeGoodsStockExample"
resultType=
"java.lang.Long"
>
select count(*) from vanke_goods_stock
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update vanke_goods_stock
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.goodsId != null"
>
goods_id = #{record.goodsId,jdbcType=BIGINT},
</if>
<if
test=
"record.goodsNum != null"
>
goods_num = #{record.goodsNum,jdbcType=INTEGER},
</if>
<if
test=
"record.stockNum != null"
>
stock_num = #{record.stockNum,jdbcType=INTEGER},
</if>
<if
test=
"record.createtime != null"
>
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update vanke_goods_stock
set id = #{record.id,jdbcType=BIGINT},
goods_id = #{record.goodsId,jdbcType=BIGINT},
goods_num = #{record.goodsNum,jdbcType=INTEGER},
stock_num = #{record.stockNum,jdbcType=INTEGER},
createtime = #{record.createtime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.VankeGoodsStock"
>
update vanke_goods_stock
<set>
<if
test=
"goodsId != null"
>
goods_id = #{goodsId,jdbcType=BIGINT},
</if>
<if
test=
"goodsNum != null"
>
goods_num = #{goodsNum,jdbcType=INTEGER},
</if>
<if
test=
"stockNum != null"
>
stock_num = #{stockNum,jdbcType=INTEGER},
</if>
<if
test=
"createtime != null"
>
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.VankeGoodsStock"
>
update vanke_goods_stock
set goods_id = #{goodsId,jdbcType=BIGINT},
goods_num = #{goodsNum,jdbcType=INTEGER},
stock_num = #{stockNum,jdbcType=INTEGER},
createtime = #{createtime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</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