Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fileServe
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
fileServe
Commits
62a03742
Commit
62a03742
authored
Jun 12, 2020
by
XiaHou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权星相关接口修复
parent
68176206
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
330 additions
and
0 deletions
+330
-0
OmsChoseProductMapper.java
...ain/java/com/macro/mall/mapper/OmsChoseProductMapper.java
+31
-0
OmsChoseProduct.java
...g/src/main/java/com/macro/mall/model/OmsChoseProduct.java
+87
-0
OmsChoseProductExample.java
...ain/java/com/macro/mall/model/OmsChoseProductExample.java
+0
-0
OmsChoseProductMapper.xml
...resources/com/macro/mall/mapper/OmsChoseProductMapper.xml
+212
-0
No files found.
mall-mbg/src/main/java/com/macro/mall/mapper/OmsChoseProductMapper.java
0 → 100644
View file @
62a03742
package
com
.
macro
.
mall
.
mapper
;
import
com.macro.mall.model.OmsChoseProduct
;
import
com.macro.mall.model.OmsChoseProductExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
OmsChoseProductMapper
{
long
countByExample
(
OmsChoseProductExample
example
);
int
deleteByExample
(
OmsChoseProductExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
OmsChoseProduct
record
);
int
insertSelective
(
OmsChoseProduct
record
);
List
<
OmsChoseProduct
>
selectByExample
(
OmsChoseProductExample
example
);
OmsChoseProduct
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
OmsChoseProduct
record
,
@Param
(
"example"
)
OmsChoseProductExample
example
);
int
updateByExample
(
@Param
(
"record"
)
OmsChoseProduct
record
,
@Param
(
"example"
)
OmsChoseProductExample
example
);
int
updateByPrimaryKeySelective
(
OmsChoseProduct
record
);
int
updateByPrimaryKey
(
OmsChoseProduct
record
);
}
\ No newline at end of file
mall-mbg/src/main/java/com/macro/mall/model/OmsChoseProduct.java
0 → 100644
View file @
62a03742
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
OmsChoseProduct
implements
Serializable
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@ApiModelProperty
(
value
=
"商品id"
)
private
Long
productId
;
@ApiModelProperty
(
value
=
"会员id"
)
private
Long
memberId
;
@ApiModelProperty
(
value
=
"创建时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createtime
;
@ApiModelProperty
(
value
=
"更新时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updatetime
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getProductId
()
{
return
productId
;
}
public
void
setProductId
(
Long
productId
)
{
this
.
productId
=
productId
;
}
public
Long
getMemberId
()
{
return
memberId
;
}
public
void
setMemberId
(
Long
memberId
)
{
this
.
memberId
=
memberId
;
}
public
Date
getCreatetime
()
{
return
createtime
;
}
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
}
public
Date
getUpdatetime
()
{
return
updatetime
;
}
public
void
setUpdatetime
(
Date
updatetime
)
{
this
.
updatetime
=
updatetime
;
}
@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
(
", productId="
).
append
(
productId
);
sb
.
append
(
", memberId="
).
append
(
memberId
);
sb
.
append
(
", createtime="
).
append
(
createtime
);
sb
.
append
(
", updatetime="
).
append
(
updatetime
);
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/OmsChoseProductExample.java
0 → 100644
View file @
62a03742
This diff is collapsed.
Click to expand it.
mall-mbg/src/main/resources/com/macro/mall/mapper/OmsChoseProductMapper.xml
0 → 100644
View file @
62a03742
<?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.OmsChoseProductMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.OmsChoseProduct"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"product_id"
jdbcType=
"BIGINT"
property=
"productId"
/>
<result
column=
"member_id"
jdbcType=
"BIGINT"
property=
"memberId"
/>
<result
column=
"createtime"
jdbcType=
"TIMESTAMP"
property=
"createtime"
/>
<result
column=
"updatetime"
jdbcType=
"TIMESTAMP"
property=
"updatetime"
/>
</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, product_id, member_id, createtime, updatetime
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.OmsChoseProductExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from oms_chose_product
<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 oms_chose_product
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from oms_chose_product
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.OmsChoseProductExample"
>
delete from oms_chose_product
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.OmsChoseProduct"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into oms_chose_product (product_id, member_id, createtime,
updatetime)
values (#{productId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP},
#{updatetime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.OmsChoseProduct"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into oms_chose_product
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"productId != null"
>
product_id,
</if>
<if
test=
"memberId != null"
>
member_id,
</if>
<if
test=
"createtime != null"
>
createtime,
</if>
<if
test=
"updatetime != null"
>
updatetime,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
<if
test=
"memberId != null"
>
#{memberId,jdbcType=BIGINT},
</if>
<if
test=
"createtime != null"
>
#{createtime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatetime != null"
>
#{updatetime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.OmsChoseProductExample"
resultType=
"java.lang.Long"
>
select count(*) from oms_chose_product
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update oms_chose_product
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.productId != null"
>
product_id = #{record.productId,jdbcType=BIGINT},
</if>
<if
test=
"record.memberId != null"
>
member_id = #{record.memberId,jdbcType=BIGINT},
</if>
<if
test=
"record.createtime != null"
>
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updatetime != null"
>
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update oms_chose_product
set id = #{record.id,jdbcType=BIGINT},
product_id = #{record.productId,jdbcType=BIGINT},
member_id = #{record.memberId,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.OmsChoseProduct"
>
update oms_chose_product
<set>
<if
test=
"productId != null"
>
product_id = #{productId,jdbcType=BIGINT},
</if>
<if
test=
"memberId != null"
>
member_id = #{memberId,jdbcType=BIGINT},
</if>
<if
test=
"createtime != null"
>
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatetime != null"
>
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.OmsChoseProduct"
>
update oms_chose_product
set product_id = #{productId,jdbcType=BIGINT},
member_id = #{memberId,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP},
updatetime = #{updatetime,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