Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
mall
Commits
483721db
Commit
483721db
authored
Nov 08, 2018
by
zhh
Browse files
部分修改
parent
0659f26e
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
document/pdm/mall.pdb
View file @
483721db
This diff is collapsed.
Click to expand it.
document/pdm/mall.pdm
View file @
483721db
This diff is collapsed.
Click to expand it.
mall-admin/src/main/java/com/macro/mall/controller/SmsCouponController.java
View file @
483721db
...
...
@@ -23,10 +23,10 @@ public class SmsCouponController {
@Autowired
private
SmsCouponService
couponService
;
@ApiOperation
(
"添加优惠券"
)
@RequestMapping
(
value
=
"/
add
"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/
create
"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
add
(
@RequestBody
SmsCouponParam
couponParam
)
{
int
count
=
couponService
.
add
(
couponParam
);
int
count
=
couponService
.
create
(
couponParam
);
if
(
count
>
0
){
return
new
CommonResult
().
success
(
count
);
}
...
...
mall-admin/src/main/java/com/macro/mall/service/SmsCouponService.java
View file @
483721db
...
...
@@ -15,7 +15,7 @@ public interface SmsCouponService {
* 添加优惠券
*/
@Transactional
int
add
(
SmsCouponParam
couponParam
);
int
create
(
SmsCouponParam
couponParam
);
/**
* 根据优惠券id删除优惠券
...
...
mall-admin/src/main/java/com/macro/mall/service/impl/SmsCouponServiceImpl.java
View file @
483721db
...
...
@@ -35,7 +35,10 @@ public class SmsCouponServiceImpl implements SmsCouponService {
@Autowired
private
SmsCouponDao
couponDao
;
@Override
public
int
add
(
SmsCouponParam
couponParam
)
{
public
int
create
(
SmsCouponParam
couponParam
)
{
couponParam
.
setCount
(
couponParam
.
getPublishCount
());
couponParam
.
setUseCount
(
0
);
couponParam
.
setReceiveCount
(
0
);
//插入优惠券表
int
count
=
couponMapper
.
insert
(
couponParam
);
//插入优惠券和商品关系表
...
...
mall-mbg/src/main/java/com/macro/mall/model/SmsCoupon.java
View file @
483721db
...
...
@@ -111,13 +111,6 @@ public class SmsCoupon implements Serializable {
*/
private
Integer
memberLevel
;
/**
* 发行数量:0->表示无限制
*
* @mbggenerated
*/
private
Integer
distributionCount
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
...
...
@@ -264,14 +257,6 @@ public class SmsCoupon implements Serializable {
this
.
memberLevel
=
memberLevel
;
}
public
Integer
getDistributionCount
()
{
return
distributionCount
;
}
public
void
setDistributionCount
(
Integer
distributionCount
)
{
this
.
distributionCount
=
distributionCount
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
...
...
@@ -296,7 +281,6 @@ public class SmsCoupon implements Serializable {
sb
.
append
(
", enableTime="
).
append
(
enableTime
);
sb
.
append
(
", code="
).
append
(
code
);
sb
.
append
(
", memberLevel="
).
append
(
memberLevel
);
sb
.
append
(
", distributionCount="
).
append
(
distributionCount
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
...
...
mall-mbg/src/main/java/com/macro/mall/model/SmsCouponExample.java
View file @
483721db
...
...
@@ -1215,66 +1215,6 @@ public class SmsCouponExample {
addCriterion
(
"member_level not between"
,
value1
,
value2
,
"memberLevel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountIsNull
()
{
addCriterion
(
"distribution_count is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountIsNotNull
()
{
addCriterion
(
"distribution_count is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountEqualTo
(
Integer
value
)
{
addCriterion
(
"distribution_count ="
,
value
,
"distributionCount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountNotEqualTo
(
Integer
value
)
{
addCriterion
(
"distribution_count <>"
,
value
,
"distributionCount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountGreaterThan
(
Integer
value
)
{
addCriterion
(
"distribution_count >"
,
value
,
"distributionCount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"distribution_count >="
,
value
,
"distributionCount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountLessThan
(
Integer
value
)
{
addCriterion
(
"distribution_count <"
,
value
,
"distributionCount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"distribution_count <="
,
value
,
"distributionCount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"distribution_count in"
,
values
,
"distributionCount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"distribution_count not in"
,
values
,
"distributionCount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"distribution_count between"
,
value1
,
value2
,
"distributionCount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionCountNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"distribution_count not between"
,
value1
,
value2
,
"distributionCount"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/SmsCouponMapper.xml
View file @
483721db
...
...
@@ -20,7 +20,6 @@
<result
column=
"enable_time"
jdbcType=
"TIMESTAMP"
property=
"enableTime"
/>
<result
column=
"code"
jdbcType=
"VARCHAR"
property=
"code"
/>
<result
column=
"member_level"
jdbcType=
"INTEGER"
property=
"memberLevel"
/>
<result
column=
"distribution_count"
jdbcType=
"INTEGER"
property=
"distributionCount"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
...
...
@@ -82,8 +81,7 @@
</sql>
<sql
id=
"Base_Column_List"
>
id, type, name, platform, count, amount, per_limit, min_point, start_time, end_time,
use_type, note, publish_count, use_count, receive_count, enable_time, code, member_level,
distribution_count
use_type, note, publish_count, use_count, receive_count, enable_time, code, member_level
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.SmsCouponExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -124,15 +122,13 @@
min_point, start_time, end_time,
use_type, note, publish_count,
use_count, receive_count, enable_time,
code, member_level, distribution_count
)
code, member_level)
values (#{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{platform,jdbcType=INTEGER},
#{count,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{perLimit,jdbcType=INTEGER},
#{minPoint,jdbcType=DECIMAL}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{useType,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR}, #{publishCount,jdbcType=INTEGER},
#{useCount,jdbcType=INTEGER}, #{receiveCount,jdbcType=INTEGER}, #{enableTime,jdbcType=TIMESTAMP},
#{code,jdbcType=VARCHAR}, #{memberLevel,jdbcType=INTEGER}, #{distributionCount,jdbcType=INTEGER}
)
#{code,jdbcType=VARCHAR}, #{memberLevel,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.SmsCoupon"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
...
@@ -191,9 +187,6 @@
<if
test=
"memberLevel != null"
>
member_level,
</if>
<if
test=
"distributionCount != null"
>
distribution_count,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"type != null"
>
...
...
@@ -247,9 +240,6 @@
<if
test=
"memberLevel != null"
>
#{memberLevel,jdbcType=INTEGER},
</if>
<if
test=
"distributionCount != null"
>
#{distributionCount,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.SmsCouponExample"
resultType=
"java.lang.Integer"
>
...
...
@@ -315,9 +305,6 @@
<if
test=
"record.memberLevel != null"
>
member_level = #{record.memberLevel,jdbcType=INTEGER},
</if>
<if
test=
"record.distributionCount != null"
>
distribution_count = #{record.distributionCount,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -342,8 +329,7 @@
receive_count = #{record.receiveCount,jdbcType=INTEGER},
enable_time = #{record.enableTime,jdbcType=TIMESTAMP},
code = #{record.code,jdbcType=VARCHAR},
member_level = #{record.memberLevel,jdbcType=INTEGER},
distribution_count = #{record.distributionCount,jdbcType=INTEGER}
member_level = #{record.memberLevel,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -402,9 +388,6 @@
<if
test=
"memberLevel != null"
>
member_level = #{memberLevel,jdbcType=INTEGER},
</if>
<if
test=
"distributionCount != null"
>
distribution_count = #{distributionCount,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -426,8 +409,7 @@
receive_count = #{receiveCount,jdbcType=INTEGER},
enable_time = #{enableTime,jdbcType=TIMESTAMP},
code = #{code,jdbcType=VARCHAR},
member_level = #{memberLevel,jdbcType=INTEGER},
distribution_count = #{distributionCount,jdbcType=INTEGER}
member_level = #{memberLevel,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Write
Preview
Supports
Markdown
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