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
f603ca62
Commit
f603ca62
authored
Apr 26, 2018
by
zhh
Browse files
注释信息完善
parent
a41633a9
Changes
112
Expand all
Hide whitespace changes
Inline
Side-by-side
mall-admin/src/main/java/com/macro/mall/service/impl/UmsMemberLevelServiceImpl.java
View file @
f603ca62
...
@@ -11,6 +11,7 @@ import java.util.List;
...
@@ -11,6 +11,7 @@ import java.util.List;
/**
/**
* 会员等级管理Service实现类
* 会员等级管理Service实现类
* Created by macro on 2018/4/26.
*/
*/
@Service
@Service
public
class
UmsMemberLevelServiceImpl
implements
UmsMemberLevelService
{
public
class
UmsMemberLevelServiceImpl
implements
UmsMemberLevelService
{
...
...
mall-admin/src/main/java/com/macro/mall/util/JsonUtil.java
View file @
f603ca62
...
@@ -7,7 +7,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
...
@@ -7,7 +7,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 淘淘商城自定义响应结构
* Jackson json序列化和反序列化工具类
* Created by macro on 2018/4/26.
*/
*/
public
class
JsonUtil
{
public
class
JsonUtil
{
...
@@ -16,10 +17,6 @@ public class JsonUtil {
...
@@ -16,10 +17,6 @@ public class JsonUtil {
/**
/**
* 将对象转换成json字符串。
* 将对象转换成json字符串。
* <p>Title: pojoToJson</p>
* <p>Description: </p>
* @param data
* @return
*/
*/
public
static
String
objectToJson
(
Object
data
)
{
public
static
String
objectToJson
(
Object
data
)
{
try
{
try
{
...
@@ -36,7 +33,6 @@ public class JsonUtil {
...
@@ -36,7 +33,6 @@ public class JsonUtil {
*
*
* @param jsonData json数据
* @param jsonData json数据
* @param beanType 对象中的object类型
* @param beanType 对象中的object类型
* @return
*/
*/
public
static
<
T
>
T
jsonToPojo
(
String
jsonData
,
Class
<
T
>
beanType
)
{
public
static
<
T
>
T
jsonToPojo
(
String
jsonData
,
Class
<
T
>
beanType
)
{
try
{
try
{
...
@@ -50,11 +46,6 @@ public class JsonUtil {
...
@@ -50,11 +46,6 @@ public class JsonUtil {
/**
/**
* 将json数据转换成pojo对象list
* 将json数据转换成pojo对象list
* <p>Title: jsonToList</p>
* <p>Description: </p>
* @param jsonData
* @param beanType
* @return
*/
*/
public
static
<
T
>
List
<
T
>
jsonToList
(
String
jsonData
,
Class
<
T
>
beanType
)
{
public
static
<
T
>
List
<
T
>
jsonToList
(
String
jsonData
,
Class
<
T
>
beanType
)
{
JavaType
javaType
=
MAPPER
.
getTypeFactory
().
constructParametricType
(
List
.
class
,
beanType
);
JavaType
javaType
=
MAPPER
.
getTypeFactory
().
constructParametricType
(
List
.
class
,
beanType
);
...
...
mall-admin/src/main/java/com/macro/mall/util/JwtTokenUtil.java
View file @
f603ca62
...
@@ -20,6 +20,7 @@ import java.util.Map;
...
@@ -20,6 +20,7 @@ import java.util.Map;
* {"sub":"wang","created":1489079981393,"exp":1489684781}
* {"sub":"wang","created":1489079981393,"exp":1489684781}
* signature的生成算法:
* signature的生成算法:
* HMACSHA256(base64UrlEncode(header) + "." +base64UrlEncode(payload),secret)
* HMACSHA256(base64UrlEncode(header) + "." +base64UrlEncode(payload),secret)
* Created by macro on 2018/4/26.
*/
*/
@Component
@Component
public
class
JwtTokenUtil
{
public
class
JwtTokenUtil
{
...
...
mall-admin/src/main/java/com/macro/mall/util/RequestUtil.java
View file @
f603ca62
...
@@ -9,6 +9,7 @@ import java.util.Map;
...
@@ -9,6 +9,7 @@ import java.util.Map;
/**
/**
* request工具类
* request工具类
* Created by macro on 2018/4/26.
*/
*/
public
class
RequestUtil
{
public
class
RequestUtil
{
...
...
mall-admin/src/main/java/com/macro/mall/validator/FlagValidator.java
View file @
f603ca62
...
@@ -6,6 +6,7 @@ import java.lang.annotation.*;
...
@@ -6,6 +6,7 @@ import java.lang.annotation.*;
/**
/**
* 用户验证状态是否在指定范围内的注解
* 用户验证状态是否在指定范围内的注解
* Created by macro on 2018/4/26.
*/
*/
@Documented
@Documented
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
...
...
mall-admin/src/main/java/com/macro/mall/validator/FlagValidatorClass.java
View file @
f603ca62
...
@@ -5,6 +5,7 @@ import javax.validation.ConstraintValidatorContext;
...
@@ -5,6 +5,7 @@ import javax.validation.ConstraintValidatorContext;
/**
/**
* 状态标记校验器
* 状态标记校验器
* Created by macro on 2018/4/26.
*/
*/
public
class
FlagValidatorClass
implements
ConstraintValidator
<
FlagValidator
,
Integer
>
{
public
class
FlagValidatorClass
implements
ConstraintValidator
<
FlagValidator
,
Integer
>
{
private
String
[]
values
;
private
String
[]
values
;
...
...
mall-mbg/src/main/java/com/macro/mall/CommentGenerator.java
View file @
f603ca62
...
@@ -10,6 +10,7 @@ import java.util.Properties;
...
@@ -10,6 +10,7 @@ import java.util.Properties;
/**
/**
* 自定义注释生成器
* 自定义注释生成器
* Created by macro on 2018/4/26.
*/
*/
public
class
CommentGenerator
extends
DefaultCommentGenerator
{
public
class
CommentGenerator
extends
DefaultCommentGenerator
{
private
boolean
addRemarkComments
=
false
;
private
boolean
addRemarkComments
=
false
;
...
...
mall-mbg/src/main/java/com/macro/mall/Generator.java
View file @
f603ca62
...
@@ -11,6 +11,7 @@ import java.util.List;
...
@@ -11,6 +11,7 @@ import java.util.List;
/**
/**
* 用于生产MBG的代码
* 用于生产MBG的代码
* Created by macro on 2018/4/26.
*/
*/
public
class
Generator
{
public
class
Generator
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
...
...
mall-mbg/src/main/java/com/macro/mall/model/PmsProduct.java
View file @
f603ca62
...
@@ -217,7 +217,7 @@ public class PmsProduct implements Serializable {
...
@@ -217,7 +217,7 @@ public class PmsProduct implements Serializable {
private
Integer
promotionPerLimit
;
private
Integer
promotionPerLimit
;
/**
/**
* 促销类型:0->使用促销价;
1
->使用会员价;
2
->使用阶梯价格;
3
->使用满减价格
* 促销类型:0->
没有促销使用原价;1->
使用促销价;
2
->使用会员价;
3
->使用阶梯价格;
4
->使用满减价格
*
*
* @mbggenerated
* @mbggenerated
*/
*/
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/CmsHelpCategoryMapper.xml
View file @
f603ca62
...
@@ -223,4 +223,448 @@
...
@@ -223,4 +223,448 @@
sort = #{sort,jdbcType=INTEGER}
sort = #{sort,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsHelpCategory"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"icon"
jdbcType=
"VARCHAR"
property=
"icon"
/>
<result
column=
"help_count"
jdbcType=
"INTEGER"
property=
"helpCount"
/>
<result
column=
"show_status"
jdbcType=
"INTEGER"
property=
"showStatus"
/>
<result
column=
"sort"
jdbcType=
"INTEGER"
property=
"sort"
/>
</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, name, icon, help_count, show_status, sort
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsHelpCategoryExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_help_category
<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 cms_help_category
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_help_category
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsHelpCategoryExample"
>
delete from cms_help_category
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsHelpCategory"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_help_category (name, icon, help_count,
show_status, sort)
values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{helpCount,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsHelpCategory"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_help_category
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"icon != null"
>
icon,
</if>
<if
test=
"helpCount != null"
>
help_count,
</if>
<if
test=
"showStatus != null"
>
show_status,
</if>
<if
test=
"sort != null"
>
sort,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
#{icon,jdbcType=VARCHAR},
</if>
<if
test=
"helpCount != null"
>
#{helpCount,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
#{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"sort != null"
>
#{sort,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsHelpCategoryExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_help_category
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_help_category
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.name != null"
>
name = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.icon != null"
>
icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if
test=
"record.helpCount != null"
>
help_count = #{record.helpCount,jdbcType=INTEGER},
</if>
<if
test=
"record.showStatus != null"
>
show_status = #{record.showStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.sort != null"
>
sort = #{record.sort,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_help_category
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
help_count = #{record.helpCount,jdbcType=INTEGER},
show_status = #{record.showStatus,jdbcType=INTEGER},
sort = #{record.sort,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsHelpCategory"
>
update cms_help_category
<set>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
icon = #{icon,jdbcType=VARCHAR},
</if>
<if
test=
"helpCount != null"
>
help_count = #{helpCount,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
show_status = #{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsHelpCategory"
>
update cms_help_category
set name = #{name,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
help_count = #{helpCount,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsHelpCategory"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"icon"
jdbcType=
"VARCHAR"
property=
"icon"
/>
<result
column=
"help_count"
jdbcType=
"INTEGER"
property=
"helpCount"
/>
<result
column=
"show_status"
jdbcType=
"INTEGER"
property=
"showStatus"
/>
<result
column=
"sort"
jdbcType=
"INTEGER"
property=
"sort"
/>
</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, name, icon, help_count, show_status, sort
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsHelpCategoryExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_help_category
<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 cms_help_category
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_help_category
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsHelpCategoryExample"
>
delete from cms_help_category
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsHelpCategory"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_help_category (name, icon, help_count,
show_status, sort)
values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{helpCount,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsHelpCategory"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_help_category
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"icon != null"
>
icon,
</if>
<if
test=
"helpCount != null"
>
help_count,
</if>
<if
test=
"showStatus != null"
>
show_status,
</if>
<if
test=
"sort != null"
>
sort,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
#{icon,jdbcType=VARCHAR},
</if>
<if
test=
"helpCount != null"
>
#{helpCount,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
#{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"sort != null"
>
#{sort,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsHelpCategoryExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_help_category
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_help_category
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.name != null"
>
name = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.icon != null"
>
icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if
test=
"record.helpCount != null"
>
help_count = #{record.helpCount,jdbcType=INTEGER},
</if>
<if
test=
"record.showStatus != null"
>
show_status = #{record.showStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.sort != null"
>
sort = #{record.sort,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_help_category
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
help_count = #{record.helpCount,jdbcType=INTEGER},
show_status = #{record.showStatus,jdbcType=INTEGER},
sort = #{record.sort,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsHelpCategory"
>
update cms_help_category
<set>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
icon = #{icon,jdbcType=VARCHAR},
</if>
<if
test=
"helpCount != null"
>
help_count = #{helpCount,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
show_status = #{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsHelpCategory"
>
update cms_help_category
set name = #{name,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
help_count = #{helpCount,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
</mapper>
\ No newline at end of file
mall-mbg/src/main/resources/com/macro/mall/mapper/CmsHelpMapper.xml
View file @
f603ca62
This diff is collapsed.
Click to expand it.
mall-mbg/src/main/resources/com/macro/mall/mapper/CmsMemberReportMapper.xml
View file @
f603ca62
...
@@ -208,4 +208,418 @@
...
@@ -208,4 +208,418 @@
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
</update>
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsMemberReport"
>
<result
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"report_type"
jdbcType=
"INTEGER"
property=
"reportType"
/>
<result
column=
"report_member_name"
jdbcType=
"VARCHAR"
property=
"reportMemberName"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"report_object"
jdbcType=
"VARCHAR"
property=
"reportObject"
/>
<result
column=
"report_status"
jdbcType=
"INTEGER"
property=
"reportStatus"
/>
<result
column=
"handle_status"
jdbcType=
"INTEGER"
property=
"handleStatus"
/>
<result
column=
"note"
jdbcType=
"VARCHAR"
property=
"note"
/>
</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, report_type, report_member_name, create_time, report_object, report_status, handle_status,
note
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsMemberReportExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_member_report
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsMemberReportExample"
>
delete from cms_member_report
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsMemberReport"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_member_report (report_type, report_member_name, create_time,
report_object, report_status, handle_status,
note)
values (#{reportType,jdbcType=INTEGER}, #{reportMemberName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{reportObject,jdbcType=VARCHAR}, #{reportStatus,jdbcType=INTEGER}, #{handleStatus,jdbcType=INTEGER},
#{note,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsMemberReport"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_member_report
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"reportType != null"
>
report_type,
</if>
<if
test=
"reportMemberName != null"
>
report_member_name,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"reportObject != null"
>
report_object,
</if>
<if
test=
"reportStatus != null"
>
report_status,
</if>
<if
test=
"handleStatus != null"
>
handle_status,
</if>
<if
test=
"note != null"
>
note,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"reportType != null"
>
#{reportType,jdbcType=INTEGER},
</if>
<if
test=
"reportMemberName != null"
>
#{reportMemberName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"reportObject != null"
>
#{reportObject,jdbcType=VARCHAR},
</if>
<if
test=
"reportStatus != null"
>
#{reportStatus,jdbcType=INTEGER},
</if>
<if
test=
"handleStatus != null"
>
#{handleStatus,jdbcType=INTEGER},
</if>
<if
test=
"note != null"
>
#{note,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsMemberReportExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_member_report
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_member_report
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.reportType != null"
>
report_type = #{record.reportType,jdbcType=INTEGER},
</if>
<if
test=
"record.reportMemberName != null"
>
report_member_name = #{record.reportMemberName,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.reportObject != null"
>
report_object = #{record.reportObject,jdbcType=VARCHAR},
</if>
<if
test=
"record.reportStatus != null"
>
report_status = #{record.reportStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.handleStatus != null"
>
handle_status = #{record.handleStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.note != null"
>
note = #{record.note,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_member_report
set id = #{record.id,jdbcType=BIGINT},
report_type = #{record.reportType,jdbcType=INTEGER},
report_member_name = #{record.reportMemberName,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
report_object = #{record.reportObject,jdbcType=VARCHAR},
report_status = #{record.reportStatus,jdbcType=INTEGER},
handle_status = #{record.handleStatus,jdbcType=INTEGER},
note = #{record.note,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsMemberReport"
>
<result
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"report_type"
jdbcType=
"INTEGER"
property=
"reportType"
/>
<result
column=
"report_member_name"
jdbcType=
"VARCHAR"
property=
"reportMemberName"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"report_object"
jdbcType=
"VARCHAR"
property=
"reportObject"
/>
<result
column=
"report_status"
jdbcType=
"INTEGER"
property=
"reportStatus"
/>
<result
column=
"handle_status"
jdbcType=
"INTEGER"
property=
"handleStatus"
/>
<result
column=
"note"
jdbcType=
"VARCHAR"
property=
"note"
/>
</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, report_type, report_member_name, create_time, report_object, report_status, handle_status,
note
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsMemberReportExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_member_report
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsMemberReportExample"
>
delete from cms_member_report
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsMemberReport"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_member_report (report_type, report_member_name, create_time,
report_object, report_status, handle_status,
note)
values (#{reportType,jdbcType=INTEGER}, #{reportMemberName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{reportObject,jdbcType=VARCHAR}, #{reportStatus,jdbcType=INTEGER}, #{handleStatus,jdbcType=INTEGER},
#{note,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsMemberReport"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_member_report
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"reportType != null"
>
report_type,
</if>
<if
test=
"reportMemberName != null"
>
report_member_name,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"reportObject != null"
>
report_object,
</if>
<if
test=
"reportStatus != null"
>
report_status,
</if>
<if
test=
"handleStatus != null"
>
handle_status,
</if>
<if
test=
"note != null"
>
note,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"reportType != null"
>
#{reportType,jdbcType=INTEGER},
</if>
<if
test=
"reportMemberName != null"
>
#{reportMemberName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"reportObject != null"
>
#{reportObject,jdbcType=VARCHAR},
</if>
<if
test=
"reportStatus != null"
>
#{reportStatus,jdbcType=INTEGER},
</if>
<if
test=
"handleStatus != null"
>
#{handleStatus,jdbcType=INTEGER},
</if>
<if
test=
"note != null"
>
#{note,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsMemberReportExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_member_report
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_member_report
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.reportType != null"
>
report_type = #{record.reportType,jdbcType=INTEGER},
</if>
<if
test=
"record.reportMemberName != null"
>
report_member_name = #{record.reportMemberName,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.reportObject != null"
>
report_object = #{record.reportObject,jdbcType=VARCHAR},
</if>
<if
test=
"record.reportStatus != null"
>
report_status = #{record.reportStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.handleStatus != null"
>
handle_status = #{record.handleStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.note != null"
>
note = #{record.note,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_member_report
set id = #{record.id,jdbcType=BIGINT},
report_type = #{record.reportType,jdbcType=INTEGER},
report_member_name = #{record.reportMemberName,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
report_object = #{record.reportObject,jdbcType=VARCHAR},
report_status = #{record.reportStatus,jdbcType=INTEGER},
handle_status = #{record.handleStatus,jdbcType=INTEGER},
note = #{record.note,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
</mapper>
</mapper>
\ No newline at end of file
mall-mbg/src/main/resources/com/macro/mall/mapper/CmsPrefrenceAreaMapper.xml
View file @
f603ca62
...
@@ -265,4 +265,532 @@
...
@@ -265,4 +265,532 @@
show_status = #{showStatus,jdbcType=INTEGER}
show_status = #{showStatus,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsPrefrenceArea"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"sub_title"
jdbcType=
"VARCHAR"
property=
"subTitle"
/>
<result
column=
"sort"
jdbcType=
"INTEGER"
property=
"sort"
/>
<result
column=
"show_status"
jdbcType=
"INTEGER"
property=
"showStatus"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.macro.mall.model.CmsPrefrenceArea"
>
<result
column=
"pic"
jdbcType=
"VARBINARY"
property=
"pic"
/>
</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, name, sub_title, sort, show_status
</sql>
<sql
id=
"Blob_Column_List"
>
pic
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaExample"
resultMap=
"ResultMapWithBLOBs"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from cms_prefrence_area
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_prefrence_area
<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=
"ResultMapWithBLOBs"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from cms_prefrence_area
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_prefrence_area
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaExample"
>
delete from cms_prefrence_area
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsPrefrenceArea"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_prefrence_area (name, sub_title, sort,
show_status, pic)
values (#{name,jdbcType=VARCHAR}, #{subTitle,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{pic,jdbcType=VARBINARY})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsPrefrenceArea"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_prefrence_area
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"subTitle != null"
>
sub_title,
</if>
<if
test=
"sort != null"
>
sort,
</if>
<if
test=
"showStatus != null"
>
show_status,
</if>
<if
test=
"pic != null"
>
pic,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"subTitle != null"
>
#{subTitle,jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
#{sort,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
#{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"pic != null"
>
#{pic,jdbcType=VARBINARY},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_prefrence_area
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_prefrence_area
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.name != null"
>
name = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.subTitle != null"
>
sub_title = #{record.subTitle,jdbcType=VARCHAR},
</if>
<if
test=
"record.sort != null"
>
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if
test=
"record.showStatus != null"
>
show_status = #{record.showStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.pic != null"
>
pic = #{record.pic,jdbcType=VARBINARY},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update cms_prefrence_area
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
sub_title = #{record.subTitle,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER},
show_status = #{record.showStatus,jdbcType=INTEGER},
pic = #{record.pic,jdbcType=VARBINARY}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_prefrence_area
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
sub_title = #{record.subTitle,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER},
show_status = #{record.showStatus,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsPrefrenceArea"
>
update cms_prefrence_area
<set>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"subTitle != null"
>
sub_title = #{subTitle,jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
show_status = #{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"pic != null"
>
pic = #{pic,jdbcType=VARBINARY},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.macro.mall.model.CmsPrefrenceArea"
>
update cms_prefrence_area
set name = #{name,jdbcType=VARCHAR},
sub_title = #{subTitle,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER},
pic = #{pic,jdbcType=VARBINARY}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsPrefrenceArea"
>
update cms_prefrence_area
set name = #{name,jdbcType=VARCHAR},
sub_title = #{subTitle,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsPrefrenceArea"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"sub_title"
jdbcType=
"VARCHAR"
property=
"subTitle"
/>
<result
column=
"sort"
jdbcType=
"INTEGER"
property=
"sort"
/>
<result
column=
"show_status"
jdbcType=
"INTEGER"
property=
"showStatus"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.macro.mall.model.CmsPrefrenceArea"
>
<result
column=
"pic"
jdbcType=
"VARBINARY"
property=
"pic"
/>
</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, name, sub_title, sort, show_status
</sql>
<sql
id=
"Blob_Column_List"
>
pic
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaExample"
resultMap=
"ResultMapWithBLOBs"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from cms_prefrence_area
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_prefrence_area
<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=
"ResultMapWithBLOBs"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from cms_prefrence_area
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_prefrence_area
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaExample"
>
delete from cms_prefrence_area
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsPrefrenceArea"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_prefrence_area (name, sub_title, sort,
show_status, pic)
values (#{name,jdbcType=VARCHAR}, #{subTitle,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{pic,jdbcType=VARBINARY})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsPrefrenceArea"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_prefrence_area
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"subTitle != null"
>
sub_title,
</if>
<if
test=
"sort != null"
>
sort,
</if>
<if
test=
"showStatus != null"
>
show_status,
</if>
<if
test=
"pic != null"
>
pic,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"subTitle != null"
>
#{subTitle,jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
#{sort,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
#{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"pic != null"
>
#{pic,jdbcType=VARBINARY},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_prefrence_area
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_prefrence_area
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.name != null"
>
name = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.subTitle != null"
>
sub_title = #{record.subTitle,jdbcType=VARCHAR},
</if>
<if
test=
"record.sort != null"
>
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if
test=
"record.showStatus != null"
>
show_status = #{record.showStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.pic != null"
>
pic = #{record.pic,jdbcType=VARBINARY},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update cms_prefrence_area
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
sub_title = #{record.subTitle,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER},
show_status = #{record.showStatus,jdbcType=INTEGER},
pic = #{record.pic,jdbcType=VARBINARY}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_prefrence_area
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
sub_title = #{record.subTitle,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER},
show_status = #{record.showStatus,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsPrefrenceArea"
>
update cms_prefrence_area
<set>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"subTitle != null"
>
sub_title = #{subTitle,jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
show_status = #{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"pic != null"
>
pic = #{pic,jdbcType=VARBINARY},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.macro.mall.model.CmsPrefrenceArea"
>
update cms_prefrence_area
set name = #{name,jdbcType=VARCHAR},
sub_title = #{subTitle,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER},
pic = #{pic,jdbcType=VARBINARY}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsPrefrenceArea"
>
update cms_prefrence_area
set name = #{name,jdbcType=VARCHAR},
sub_title = #{subTitle,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
</mapper>
\ No newline at end of file
mall-mbg/src/main/resources/com/macro/mall/mapper/CmsPrefrenceAreaProductRelationMapper.xml
View file @
f603ca62
...
@@ -176,4 +176,354 @@
...
@@ -176,4 +176,354 @@
product_id = #{productId,jdbcType=BIGINT}
product_id = #{productId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsPrefrenceAreaProductRelation"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"prefrence_area_id"
jdbcType=
"BIGINT"
property=
"prefrenceAreaId"
/>
<result
column=
"product_id"
jdbcType=
"BIGINT"
property=
"productId"
/>
</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, prefrence_area_id, product_id
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelationExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_prefrence_area_product_relation
<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 cms_prefrence_area_product_relation
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_prefrence_area_product_relation
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelationExample"
>
delete from cms_prefrence_area_product_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelation"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_prefrence_area_product_relation (prefrence_area_id, product_id)
values (#{prefrenceAreaId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelation"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_prefrence_area_product_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"prefrenceAreaId != null"
>
prefrence_area_id,
</if>
<if
test=
"productId != null"
>
product_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"prefrenceAreaId != null"
>
#{prefrenceAreaId,jdbcType=BIGINT},
</if>
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelationExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_prefrence_area_product_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_prefrence_area_product_relation
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.prefrenceAreaId != null"
>
prefrence_area_id = #{record.prefrenceAreaId,jdbcType=BIGINT},
</if>
<if
test=
"record.productId != null"
>
product_id = #{record.productId,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_prefrence_area_product_relation
set id = #{record.id,jdbcType=BIGINT},
prefrence_area_id = #{record.prefrenceAreaId,jdbcType=BIGINT},
product_id = #{record.productId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelation"
>
update cms_prefrence_area_product_relation
<set>
<if
test=
"prefrenceAreaId != null"
>
prefrence_area_id = #{prefrenceAreaId,jdbcType=BIGINT},
</if>
<if
test=
"productId != null"
>
product_id = #{productId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelation"
>
update cms_prefrence_area_product_relation
set prefrence_area_id = #{prefrenceAreaId,jdbcType=BIGINT},
product_id = #{productId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsPrefrenceAreaProductRelation"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"prefrence_area_id"
jdbcType=
"BIGINT"
property=
"prefrenceAreaId"
/>
<result
column=
"product_id"
jdbcType=
"BIGINT"
property=
"productId"
/>
</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, prefrence_area_id, product_id
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelationExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_prefrence_area_product_relation
<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 cms_prefrence_area_product_relation
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_prefrence_area_product_relation
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelationExample"
>
delete from cms_prefrence_area_product_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelation"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_prefrence_area_product_relation (prefrence_area_id, product_id)
values (#{prefrenceAreaId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelation"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_prefrence_area_product_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"prefrenceAreaId != null"
>
prefrence_area_id,
</if>
<if
test=
"productId != null"
>
product_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"prefrenceAreaId != null"
>
#{prefrenceAreaId,jdbcType=BIGINT},
</if>
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelationExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_prefrence_area_product_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_prefrence_area_product_relation
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.prefrenceAreaId != null"
>
prefrence_area_id = #{record.prefrenceAreaId,jdbcType=BIGINT},
</if>
<if
test=
"record.productId != null"
>
product_id = #{record.productId,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_prefrence_area_product_relation
set id = #{record.id,jdbcType=BIGINT},
prefrence_area_id = #{record.prefrenceAreaId,jdbcType=BIGINT},
product_id = #{record.productId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelation"
>
update cms_prefrence_area_product_relation
<set>
<if
test=
"prefrenceAreaId != null"
>
prefrence_area_id = #{prefrenceAreaId,jdbcType=BIGINT},
</if>
<if
test=
"productId != null"
>
product_id = #{productId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsPrefrenceAreaProductRelation"
>
update cms_prefrence_area_product_relation
set prefrence_area_id = #{prefrenceAreaId,jdbcType=BIGINT},
product_id = #{productId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
</mapper>
\ No newline at end of file
mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectCategoryMapper.xml
View file @
f603ca62
...
@@ -223,4 +223,448 @@
...
@@ -223,4 +223,448 @@
sort = #{sort,jdbcType=INTEGER}
sort = #{sort,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsSubjectCategory"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"icon"
jdbcType=
"VARCHAR"
property=
"icon"
/>
<result
column=
"subject_count"
jdbcType=
"INTEGER"
property=
"subjectCount"
/>
<result
column=
"show_status"
jdbcType=
"INTEGER"
property=
"showStatus"
/>
<result
column=
"sort"
jdbcType=
"INTEGER"
property=
"sort"
/>
</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, name, icon, subject_count, show_status, sort
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCategoryExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_subject_category
<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 cms_subject_category
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_subject_category
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCategoryExample"
>
delete from cms_subject_category
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsSubjectCategory"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_category (name, icon, subject_count,
show_status, sort)
values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{subjectCount,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsSubjectCategory"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_category
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"icon != null"
>
icon,
</if>
<if
test=
"subjectCount != null"
>
subject_count,
</if>
<if
test=
"showStatus != null"
>
show_status,
</if>
<if
test=
"sort != null"
>
sort,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
#{icon,jdbcType=VARCHAR},
</if>
<if
test=
"subjectCount != null"
>
#{subjectCount,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
#{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"sort != null"
>
#{sort,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCategoryExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_subject_category
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_subject_category
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.name != null"
>
name = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.icon != null"
>
icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if
test=
"record.subjectCount != null"
>
subject_count = #{record.subjectCount,jdbcType=INTEGER},
</if>
<if
test=
"record.showStatus != null"
>
show_status = #{record.showStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.sort != null"
>
sort = #{record.sort,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_subject_category
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
subject_count = #{record.subjectCount,jdbcType=INTEGER},
show_status = #{record.showStatus,jdbcType=INTEGER},
sort = #{record.sort,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsSubjectCategory"
>
update cms_subject_category
<set>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
icon = #{icon,jdbcType=VARCHAR},
</if>
<if
test=
"subjectCount != null"
>
subject_count = #{subjectCount,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
show_status = #{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsSubjectCategory"
>
update cms_subject_category
set name = #{name,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
subject_count = #{subjectCount,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsSubjectCategory"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"icon"
jdbcType=
"VARCHAR"
property=
"icon"
/>
<result
column=
"subject_count"
jdbcType=
"INTEGER"
property=
"subjectCount"
/>
<result
column=
"show_status"
jdbcType=
"INTEGER"
property=
"showStatus"
/>
<result
column=
"sort"
jdbcType=
"INTEGER"
property=
"sort"
/>
</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, name, icon, subject_count, show_status, sort
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCategoryExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_subject_category
<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 cms_subject_category
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_subject_category
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCategoryExample"
>
delete from cms_subject_category
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsSubjectCategory"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_category (name, icon, subject_count,
show_status, sort)
values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{subjectCount,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsSubjectCategory"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_category
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"icon != null"
>
icon,
</if>
<if
test=
"subjectCount != null"
>
subject_count,
</if>
<if
test=
"showStatus != null"
>
show_status,
</if>
<if
test=
"sort != null"
>
sort,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
#{icon,jdbcType=VARCHAR},
</if>
<if
test=
"subjectCount != null"
>
#{subjectCount,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
#{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"sort != null"
>
#{sort,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCategoryExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_subject_category
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_subject_category
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.name != null"
>
name = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.icon != null"
>
icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if
test=
"record.subjectCount != null"
>
subject_count = #{record.subjectCount,jdbcType=INTEGER},
</if>
<if
test=
"record.showStatus != null"
>
show_status = #{record.showStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.sort != null"
>
sort = #{record.sort,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_subject_category
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
subject_count = #{record.subjectCount,jdbcType=INTEGER},
show_status = #{record.showStatus,jdbcType=INTEGER},
sort = #{record.sort,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsSubjectCategory"
>
update cms_subject_category
<set>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
icon = #{icon,jdbcType=VARCHAR},
</if>
<if
test=
"subjectCount != null"
>
subject_count = #{subjectCount,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
show_status = #{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsSubjectCategory"
>
update cms_subject_category
set name = #{name,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
subject_count = #{subjectCount,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
</mapper>
\ No newline at end of file
mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectCommentMapper.xml
View file @
f603ca62
...
@@ -240,4 +240,482 @@
...
@@ -240,4 +240,482 @@
show_status = #{showStatus,jdbcType=INTEGER}
show_status = #{showStatus,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsSubjectComment"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"subject_id"
jdbcType=
"BIGINT"
property=
"subjectId"
/>
<result
column=
"member_nick_name"
jdbcType=
"VARCHAR"
property=
"memberNickName"
/>
<result
column=
"member_icon"
jdbcType=
"VARCHAR"
property=
"memberIcon"
/>
<result
column=
"content"
jdbcType=
"VARCHAR"
property=
"content"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"show_status"
jdbcType=
"INTEGER"
property=
"showStatus"
/>
</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, subject_id, member_nick_name, member_icon, content, create_time, show_status
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCommentExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_subject_comment
<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 cms_subject_comment
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_subject_comment
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCommentExample"
>
delete from cms_subject_comment
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsSubjectComment"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_comment (subject_id, member_nick_name, member_icon,
content, create_time, show_status
)
values (#{subjectId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsSubjectComment"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_comment
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"subjectId != null"
>
subject_id,
</if>
<if
test=
"memberNickName != null"
>
member_nick_name,
</if>
<if
test=
"memberIcon != null"
>
member_icon,
</if>
<if
test=
"content != null"
>
content,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"showStatus != null"
>
show_status,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"subjectId != null"
>
#{subjectId,jdbcType=BIGINT},
</if>
<if
test=
"memberNickName != null"
>
#{memberNickName,jdbcType=VARCHAR},
</if>
<if
test=
"memberIcon != null"
>
#{memberIcon,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
#{content,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"showStatus != null"
>
#{showStatus,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCommentExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_subject_comment
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_subject_comment
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.subjectId != null"
>
subject_id = #{record.subjectId,jdbcType=BIGINT},
</if>
<if
test=
"record.memberNickName != null"
>
member_nick_name = #{record.memberNickName,jdbcType=VARCHAR},
</if>
<if
test=
"record.memberIcon != null"
>
member_icon = #{record.memberIcon,jdbcType=VARCHAR},
</if>
<if
test=
"record.content != null"
>
content = #{record.content,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.showStatus != null"
>
show_status = #{record.showStatus,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_subject_comment
set id = #{record.id,jdbcType=BIGINT},
subject_id = #{record.subjectId,jdbcType=BIGINT},
member_nick_name = #{record.memberNickName,jdbcType=VARCHAR},
member_icon = #{record.memberIcon,jdbcType=VARCHAR},
content = #{record.content,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
show_status = #{record.showStatus,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsSubjectComment"
>
update cms_subject_comment
<set>
<if
test=
"subjectId != null"
>
subject_id = #{subjectId,jdbcType=BIGINT},
</if>
<if
test=
"memberNickName != null"
>
member_nick_name = #{memberNickName,jdbcType=VARCHAR},
</if>
<if
test=
"memberIcon != null"
>
member_icon = #{memberIcon,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
content = #{content,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"showStatus != null"
>
show_status = #{showStatus,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsSubjectComment"
>
update cms_subject_comment
set subject_id = #{subjectId,jdbcType=BIGINT},
member_nick_name = #{memberNickName,jdbcType=VARCHAR},
member_icon = #{memberIcon,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
show_status = #{showStatus,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsSubjectComment"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"subject_id"
jdbcType=
"BIGINT"
property=
"subjectId"
/>
<result
column=
"member_nick_name"
jdbcType=
"VARCHAR"
property=
"memberNickName"
/>
<result
column=
"member_icon"
jdbcType=
"VARCHAR"
property=
"memberIcon"
/>
<result
column=
"content"
jdbcType=
"VARCHAR"
property=
"content"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"show_status"
jdbcType=
"INTEGER"
property=
"showStatus"
/>
</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, subject_id, member_nick_name, member_icon, content, create_time, show_status
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCommentExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_subject_comment
<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 cms_subject_comment
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_subject_comment
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCommentExample"
>
delete from cms_subject_comment
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsSubjectComment"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_comment (subject_id, member_nick_name, member_icon,
content, create_time, show_status
)
values (#{subjectId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsSubjectComment"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_comment
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"subjectId != null"
>
subject_id,
</if>
<if
test=
"memberNickName != null"
>
member_nick_name,
</if>
<if
test=
"memberIcon != null"
>
member_icon,
</if>
<if
test=
"content != null"
>
content,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"showStatus != null"
>
show_status,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"subjectId != null"
>
#{subjectId,jdbcType=BIGINT},
</if>
<if
test=
"memberNickName != null"
>
#{memberNickName,jdbcType=VARCHAR},
</if>
<if
test=
"memberIcon != null"
>
#{memberIcon,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
#{content,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"showStatus != null"
>
#{showStatus,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsSubjectCommentExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_subject_comment
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_subject_comment
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.subjectId != null"
>
subject_id = #{record.subjectId,jdbcType=BIGINT},
</if>
<if
test=
"record.memberNickName != null"
>
member_nick_name = #{record.memberNickName,jdbcType=VARCHAR},
</if>
<if
test=
"record.memberIcon != null"
>
member_icon = #{record.memberIcon,jdbcType=VARCHAR},
</if>
<if
test=
"record.content != null"
>
content = #{record.content,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.showStatus != null"
>
show_status = #{record.showStatus,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_subject_comment
set id = #{record.id,jdbcType=BIGINT},
subject_id = #{record.subjectId,jdbcType=BIGINT},
member_nick_name = #{record.memberNickName,jdbcType=VARCHAR},
member_icon = #{record.memberIcon,jdbcType=VARCHAR},
content = #{record.content,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
show_status = #{record.showStatus,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsSubjectComment"
>
update cms_subject_comment
<set>
<if
test=
"subjectId != null"
>
subject_id = #{subjectId,jdbcType=BIGINT},
</if>
<if
test=
"memberNickName != null"
>
member_nick_name = #{memberNickName,jdbcType=VARCHAR},
</if>
<if
test=
"memberIcon != null"
>
member_icon = #{memberIcon,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
content = #{content,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"showStatus != null"
>
show_status = #{showStatus,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsSubjectComment"
>
update cms_subject_comment
set subject_id = #{subjectId,jdbcType=BIGINT},
member_nick_name = #{memberNickName,jdbcType=VARCHAR},
member_icon = #{memberIcon,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
show_status = #{showStatus,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
</mapper>
\ No newline at end of file
mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectMapper.xml
View file @
f603ca62
This diff is collapsed.
Click to expand it.
mall-mbg/src/main/resources/com/macro/mall/mapper/CmsSubjectProductRelationMapper.xml
View file @
f603ca62
...
@@ -176,4 +176,354 @@
...
@@ -176,4 +176,354 @@
product_id = #{productId,jdbcType=BIGINT}
product_id = #{productId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsSubjectProductRelation"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"subject_id"
jdbcType=
"BIGINT"
property=
"subjectId"
/>
<result
column=
"product_id"
jdbcType=
"BIGINT"
property=
"productId"
/>
</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, subject_id, product_id
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelationExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_subject_product_relation
<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 cms_subject_product_relation
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_subject_product_relation
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelationExample"
>
delete from cms_subject_product_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelation"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_product_relation (subject_id, product_id)
values (#{subjectId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelation"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_product_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"subjectId != null"
>
subject_id,
</if>
<if
test=
"productId != null"
>
product_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"subjectId != null"
>
#{subjectId,jdbcType=BIGINT},
</if>
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelationExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_subject_product_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_subject_product_relation
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.subjectId != null"
>
subject_id = #{record.subjectId,jdbcType=BIGINT},
</if>
<if
test=
"record.productId != null"
>
product_id = #{record.productId,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_subject_product_relation
set id = #{record.id,jdbcType=BIGINT},
subject_id = #{record.subjectId,jdbcType=BIGINT},
product_id = #{record.productId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelation"
>
update cms_subject_product_relation
<set>
<if
test=
"subjectId != null"
>
subject_id = #{subjectId,jdbcType=BIGINT},
</if>
<if
test=
"productId != null"
>
product_id = #{productId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelation"
>
update cms_subject_product_relation
set subject_id = #{subjectId,jdbcType=BIGINT},
product_id = #{productId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.CmsSubjectProductRelation"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"subject_id"
jdbcType=
"BIGINT"
property=
"subjectId"
/>
<result
column=
"product_id"
jdbcType=
"BIGINT"
property=
"productId"
/>
</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, subject_id, product_id
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelationExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from cms_subject_product_relation
<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 cms_subject_product_relation
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from cms_subject_product_relation
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelationExample"
>
delete from cms_subject_product_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelation"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_product_relation (subject_id, product_id)
values (#{subjectId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelation"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into cms_subject_product_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"subjectId != null"
>
subject_id,
</if>
<if
test=
"productId != null"
>
product_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"subjectId != null"
>
#{subjectId,jdbcType=BIGINT},
</if>
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelationExample"
resultType=
"java.lang.Integer"
>
select count(*) from cms_subject_product_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update cms_subject_product_relation
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.subjectId != null"
>
subject_id = #{record.subjectId,jdbcType=BIGINT},
</if>
<if
test=
"record.productId != null"
>
product_id = #{record.productId,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update cms_subject_product_relation
set id = #{record.id,jdbcType=BIGINT},
subject_id = #{record.subjectId,jdbcType=BIGINT},
product_id = #{record.productId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelation"
>
update cms_subject_product_relation
<set>
<if
test=
"subjectId != null"
>
subject_id = #{subjectId,jdbcType=BIGINT},
</if>
<if
test=
"productId != null"
>
product_id = #{productId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.CmsSubjectProductRelation"
>
update cms_subject_product_relation
set subject_id = #{subjectId,jdbcType=BIGINT},
product_id = #{productId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
</mapper>
\ No newline at end of file
mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicCategoryMapper.xml
View file @
f603ca62
This diff is collapsed.
Click to expand it.
mall-mbg/src/main/resources/com/macro/mall/mapper/CmsTopicCommentMapper.xml
View file @
f603ca62
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
6
Next
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