优惠券接口修改
This commit is contained in:
parent
483721db8f
commit
7d3b72bd93
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -73,6 +73,14 @@ public class PmsProductController {
|
|||||||
return new CommonResult().pageSuccess(productList);
|
return new CommonResult().pageSuccess(productList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据商品名称或货号模糊查询")
|
||||||
|
@RequestMapping(value = "/simpleList", method = RequestMethod.GET)
|
||||||
|
@ResponseBody
|
||||||
|
public Object getList(String keyword) {
|
||||||
|
List<PmsProduct> productList = productService.list(keyword);
|
||||||
|
return new CommonResult().success(productList);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("批量修改审核状态")
|
@ApiOperation("批量修改审核状态")
|
||||||
@RequestMapping(value = "/update/verifyStatus",method = RequestMethod.POST)
|
@RequestMapping(value = "/update/verifyStatus",method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@ -46,11 +46,28 @@ public interface PmsProductService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
int updateVerifyStatus(List<Long> ids, Integer verifyStatus, String detail);
|
int updateVerifyStatus(List<Long> ids, Integer verifyStatus, String detail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量修改商品上架状态
|
||||||
|
*/
|
||||||
int updatePublishStatus(List<Long> ids, Integer publishStatus);
|
int updatePublishStatus(List<Long> ids, Integer publishStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量修改商品推荐状态
|
||||||
|
*/
|
||||||
int updateRecommendStatus(List<Long> ids, Integer recommendStatus);
|
int updateRecommendStatus(List<Long> ids, Integer recommendStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量修改新品状态
|
||||||
|
*/
|
||||||
int updateNewStatus(List<Long> ids, Integer newStatus);
|
int updateNewStatus(List<Long> ids, Integer newStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除商品
|
||||||
|
*/
|
||||||
int updateDeleteStatus(List<Long> ids, Integer deleteStatus);
|
int updateDeleteStatus(List<Long> ids, Integer deleteStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据商品名称或者货号模糊查询
|
||||||
|
*/
|
||||||
|
List<PmsProduct> list(String keyword);
|
||||||
}
|
}
|
||||||
|
@ -248,6 +248,18 @@ public class PmsProductServiceImpl implements PmsProductService {
|
|||||||
return productMapper.updateByExampleSelective(record, example);
|
return productMapper.updateByExampleSelective(record, example);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PmsProduct> list(String keyword) {
|
||||||
|
PmsProductExample productExample = new PmsProductExample();
|
||||||
|
PmsProductExample.Criteria criteria = productExample.createCriteria();
|
||||||
|
criteria.andDeleteStatusEqualTo(0);
|
||||||
|
if(!StringUtils.isEmpty(keyword)){
|
||||||
|
criteria.andNameLike("%" + keyword + "%");
|
||||||
|
productExample.or().andDeleteStatusEqualTo(0).andProductSnLike("%" + keyword + "%");
|
||||||
|
}
|
||||||
|
return productMapper.selectByExample(productExample);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 旧版创建
|
* @deprecated 旧版创建
|
||||||
*/
|
*/
|
||||||
|
@ -12,8 +12,12 @@
|
|||||||
c.*,
|
c.*,
|
||||||
cpr.id cpr_id,
|
cpr.id cpr_id,
|
||||||
cpr.product_id cpr_product_id,
|
cpr.product_id cpr_product_id,
|
||||||
|
cpr.product_name cpr_product_name,
|
||||||
|
cpr.product_sn cpr_product_sn,
|
||||||
cpcr.id cpcr_id,
|
cpcr.id cpcr_id,
|
||||||
cpcr.product_category_id cpcr_product_category_id
|
cpcr.product_category_id cpcr_product_category_id,
|
||||||
|
cpcr.product_category_name cpcr_product_category_name,
|
||||||
|
cpcr.parent_category_name cpcr_parent_category_name
|
||||||
FROM
|
FROM
|
||||||
sms_coupon c
|
sms_coupon c
|
||||||
LEFT JOIN sms_coupon_product_relation cpr ON c.id = cpr.coupon_id
|
LEFT JOIN sms_coupon_product_relation cpr ON c.id = cpr.coupon_id
|
||||||
|
@ -2,10 +2,12 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.macro.mall.dao.SmsCouponProductCategoryRelationDao">
|
<mapper namespace="com.macro.mall.dao.SmsCouponProductCategoryRelationDao">
|
||||||
<insert id="insertList">
|
<insert id="insertList">
|
||||||
INSERT INTO sms_coupon_product_category_relation (product_category_id,coupon_id) VALUES
|
INSERT INTO sms_coupon_product_category_relation (product_category_id,product_category_name,parent_category_name,coupon_id) VALUES
|
||||||
<foreach collection="list" item="item" index="index" separator=",">
|
<foreach collection="list" item="item" index="index" separator=",">
|
||||||
(#{item.productCategoryId,jdbcType=BIGINT},
|
(#{item.productCategoryId,jdbcType=BIGINT},
|
||||||
#{item.couponId,jdbcType=INTEGER})
|
#{item.productCategoryName,jdbcType=VARCHAR},
|
||||||
|
#{item.parentCategoryName,jdbcType=VARCHAR},
|
||||||
|
#{item.couponId,jdbcType=BIGINT})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
@ -2,9 +2,11 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.macro.mall.dao.SmsCouponProductRelationDao">
|
<mapper namespace="com.macro.mall.dao.SmsCouponProductRelationDao">
|
||||||
<insert id="insertList">
|
<insert id="insertList">
|
||||||
INSERT INTO sms_coupon_product_relation (product_id,coupon_id) VALUES
|
INSERT INTO sms_coupon_product_relation (product_id,product_name,product_sn,coupon_id) VALUES
|
||||||
<foreach collection="list" item="item" index="index" separator=",">
|
<foreach collection="list" item="item" index="index" separator=",">
|
||||||
(#{item.productId,jdbcType=BIGINT},
|
(#{item.productId,jdbcType=BIGINT},
|
||||||
|
#{item.productName,jdbcType=VARCHAR},
|
||||||
|
#{item.productSn,jdbcType=VARCHAR},
|
||||||
#{item.couponId,jdbcType=INTEGER})
|
#{item.couponId,jdbcType=INTEGER})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
@ -9,6 +9,20 @@ public class SmsCouponProductCategoryRelation implements Serializable {
|
|||||||
|
|
||||||
private Long productCategoryId;
|
private Long productCategoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品分类名称
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String productCategoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父分类名称
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String parentCategoryName;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
@ -35,6 +49,22 @@ public class SmsCouponProductCategoryRelation implements Serializable {
|
|||||||
this.productCategoryId = productCategoryId;
|
this.productCategoryId = productCategoryId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getProductCategoryName() {
|
||||||
|
return productCategoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductCategoryName(String productCategoryName) {
|
||||||
|
this.productCategoryName = productCategoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParentCategoryName() {
|
||||||
|
return parentCategoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentCategoryName(String parentCategoryName) {
|
||||||
|
this.parentCategoryName = parentCategoryName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@ -44,6 +74,8 @@ public class SmsCouponProductCategoryRelation implements Serializable {
|
|||||||
sb.append(", id=").append(id);
|
sb.append(", id=").append(id);
|
||||||
sb.append(", couponId=").append(couponId);
|
sb.append(", couponId=").append(couponId);
|
||||||
sb.append(", productCategoryId=").append(productCategoryId);
|
sb.append(", productCategoryId=").append(productCategoryId);
|
||||||
|
sb.append(", productCategoryName=").append(productCategoryName);
|
||||||
|
sb.append(", parentCategoryName=").append(parentCategoryName);
|
||||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
sb.append("]");
|
sb.append("]");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
@ -283,6 +283,146 @@ public class SmsCouponProductCategoryRelationExample {
|
|||||||
addCriterion("product_category_id not between", value1, value2, "productCategoryId");
|
addCriterion("product_category_id not between", value1, value2, "productCategoryId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameIsNull() {
|
||||||
|
addCriterion("product_category_name is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameIsNotNull() {
|
||||||
|
addCriterion("product_category_name is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameEqualTo(String value) {
|
||||||
|
addCriterion("product_category_name =", value, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameNotEqualTo(String value) {
|
||||||
|
addCriterion("product_category_name <>", value, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameGreaterThan(String value) {
|
||||||
|
addCriterion("product_category_name >", value, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("product_category_name >=", value, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameLessThan(String value) {
|
||||||
|
addCriterion("product_category_name <", value, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("product_category_name <=", value, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameLike(String value) {
|
||||||
|
addCriterion("product_category_name like", value, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameNotLike(String value) {
|
||||||
|
addCriterion("product_category_name not like", value, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameIn(List<String> values) {
|
||||||
|
addCriterion("product_category_name in", values, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameNotIn(List<String> values) {
|
||||||
|
addCriterion("product_category_name not in", values, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameBetween(String value1, String value2) {
|
||||||
|
addCriterion("product_category_name between", value1, value2, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductCategoryNameNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("product_category_name not between", value1, value2, "productCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameIsNull() {
|
||||||
|
addCriterion("parent_category_name is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameIsNotNull() {
|
||||||
|
addCriterion("parent_category_name is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameEqualTo(String value) {
|
||||||
|
addCriterion("parent_category_name =", value, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameNotEqualTo(String value) {
|
||||||
|
addCriterion("parent_category_name <>", value, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameGreaterThan(String value) {
|
||||||
|
addCriterion("parent_category_name >", value, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("parent_category_name >=", value, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameLessThan(String value) {
|
||||||
|
addCriterion("parent_category_name <", value, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("parent_category_name <=", value, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameLike(String value) {
|
||||||
|
addCriterion("parent_category_name like", value, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameNotLike(String value) {
|
||||||
|
addCriterion("parent_category_name not like", value, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameIn(List<String> values) {
|
||||||
|
addCriterion("parent_category_name in", values, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameNotIn(List<String> values) {
|
||||||
|
addCriterion("parent_category_name not in", values, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameBetween(String value1, String value2) {
|
||||||
|
addCriterion("parent_category_name between", value1, value2, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentCategoryNameNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("parent_category_name not between", value1, value2, "parentCategoryName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Criteria extends GeneratedCriteria {
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
@ -9,6 +9,20 @@ public class SmsCouponProductRelation implements Serializable {
|
|||||||
|
|
||||||
private Long productId;
|
private Long productId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品名称
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品编码
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String productSn;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
@ -35,6 +49,22 @@ public class SmsCouponProductRelation implements Serializable {
|
|||||||
this.productId = productId;
|
this.productId = productId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductSn() {
|
||||||
|
return productSn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductSn(String productSn) {
|
||||||
|
this.productSn = productSn;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@ -44,6 +74,8 @@ public class SmsCouponProductRelation implements Serializable {
|
|||||||
sb.append(", id=").append(id);
|
sb.append(", id=").append(id);
|
||||||
sb.append(", couponId=").append(couponId);
|
sb.append(", couponId=").append(couponId);
|
||||||
sb.append(", productId=").append(productId);
|
sb.append(", productId=").append(productId);
|
||||||
|
sb.append(", productName=").append(productName);
|
||||||
|
sb.append(", productSn=").append(productSn);
|
||||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
sb.append("]");
|
sb.append("]");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
@ -283,6 +283,146 @@ public class SmsCouponProductRelationExample {
|
|||||||
addCriterion("product_id not between", value1, value2, "productId");
|
addCriterion("product_id not between", value1, value2, "productId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameIsNull() {
|
||||||
|
addCriterion("product_name is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameIsNotNull() {
|
||||||
|
addCriterion("product_name is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameEqualTo(String value) {
|
||||||
|
addCriterion("product_name =", value, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameNotEqualTo(String value) {
|
||||||
|
addCriterion("product_name <>", value, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameGreaterThan(String value) {
|
||||||
|
addCriterion("product_name >", value, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("product_name >=", value, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameLessThan(String value) {
|
||||||
|
addCriterion("product_name <", value, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("product_name <=", value, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameLike(String value) {
|
||||||
|
addCriterion("product_name like", value, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameNotLike(String value) {
|
||||||
|
addCriterion("product_name not like", value, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameIn(List<String> values) {
|
||||||
|
addCriterion("product_name in", values, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameNotIn(List<String> values) {
|
||||||
|
addCriterion("product_name not in", values, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameBetween(String value1, String value2) {
|
||||||
|
addCriterion("product_name between", value1, value2, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductNameNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("product_name not between", value1, value2, "productName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnIsNull() {
|
||||||
|
addCriterion("product_sn is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnIsNotNull() {
|
||||||
|
addCriterion("product_sn is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnEqualTo(String value) {
|
||||||
|
addCriterion("product_sn =", value, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnNotEqualTo(String value) {
|
||||||
|
addCriterion("product_sn <>", value, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnGreaterThan(String value) {
|
||||||
|
addCriterion("product_sn >", value, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("product_sn >=", value, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnLessThan(String value) {
|
||||||
|
addCriterion("product_sn <", value, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("product_sn <=", value, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnLike(String value) {
|
||||||
|
addCriterion("product_sn like", value, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnNotLike(String value) {
|
||||||
|
addCriterion("product_sn not like", value, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnIn(List<String> values) {
|
||||||
|
addCriterion("product_sn in", values, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnNotIn(List<String> values) {
|
||||||
|
addCriterion("product_sn not in", values, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnBetween(String value1, String value2) {
|
||||||
|
addCriterion("product_sn between", value1, value2, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andProductSnNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("product_sn not between", value1, value2, "productSn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Criteria extends GeneratedCriteria {
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
<result column="coupon_id" jdbcType="BIGINT" property="couponId" />
|
<result column="coupon_id" jdbcType="BIGINT" property="couponId" />
|
||||||
<result column="product_category_id" jdbcType="BIGINT" property="productCategoryId" />
|
<result column="product_category_id" jdbcType="BIGINT" property="productCategoryId" />
|
||||||
|
<result column="product_category_name" jdbcType="VARCHAR" property="productCategoryName" />
|
||||||
|
<result column="parent_category_name" jdbcType="VARCHAR" property="parentCategoryName" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
@ -65,7 +67,7 @@
|
|||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, coupon_id, product_category_id
|
id, coupon_id, product_category_id, product_category_name, parent_category_name
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelationExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelationExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@ -101,8 +103,10 @@
|
|||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||||
SELECT LAST_INSERT_ID()
|
SELECT LAST_INSERT_ID()
|
||||||
</selectKey>
|
</selectKey>
|
||||||
insert into sms_coupon_product_category_relation (coupon_id, product_category_id)
|
insert into sms_coupon_product_category_relation (coupon_id, product_category_id, product_category_name,
|
||||||
values (#{couponId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT})
|
parent_category_name)
|
||||||
|
values (#{couponId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}, #{productCategoryName,jdbcType=VARCHAR},
|
||||||
|
#{parentCategoryName,jdbcType=VARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelation">
|
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelation">
|
||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||||
@ -116,6 +120,12 @@
|
|||||||
<if test="productCategoryId != null">
|
<if test="productCategoryId != null">
|
||||||
product_category_id,
|
product_category_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="productCategoryName != null">
|
||||||
|
product_category_name,
|
||||||
|
</if>
|
||||||
|
<if test="parentCategoryName != null">
|
||||||
|
parent_category_name,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="couponId != null">
|
<if test="couponId != null">
|
||||||
@ -124,6 +134,12 @@
|
|||||||
<if test="productCategoryId != null">
|
<if test="productCategoryId != null">
|
||||||
#{productCategoryId,jdbcType=BIGINT},
|
#{productCategoryId,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="productCategoryName != null">
|
||||||
|
#{productCategoryName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parentCategoryName != null">
|
||||||
|
#{parentCategoryName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelationExample" resultType="java.lang.Integer">
|
<select id="countByExample" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelationExample" resultType="java.lang.Integer">
|
||||||
@ -144,6 +160,12 @@
|
|||||||
<if test="record.productCategoryId != null">
|
<if test="record.productCategoryId != null">
|
||||||
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
|
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.productCategoryName != null">
|
||||||
|
product_category_name = #{record.productCategoryName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.parentCategoryName != null">
|
||||||
|
parent_category_name = #{record.parentCategoryName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
@ -153,7 +175,9 @@
|
|||||||
update sms_coupon_product_category_relation
|
update sms_coupon_product_category_relation
|
||||||
set id = #{record.id,jdbcType=BIGINT},
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
coupon_id = #{record.couponId,jdbcType=BIGINT},
|
coupon_id = #{record.couponId,jdbcType=BIGINT},
|
||||||
product_category_id = #{record.productCategoryId,jdbcType=BIGINT}
|
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
|
||||||
|
product_category_name = #{record.productCategoryName,jdbcType=VARCHAR},
|
||||||
|
parent_category_name = #{record.parentCategoryName,jdbcType=VARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
@ -167,13 +191,21 @@
|
|||||||
<if test="productCategoryId != null">
|
<if test="productCategoryId != null">
|
||||||
product_category_id = #{productCategoryId,jdbcType=BIGINT},
|
product_category_id = #{productCategoryId,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="productCategoryName != null">
|
||||||
|
product_category_name = #{productCategoryName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parentCategoryName != null">
|
||||||
|
parent_category_name = #{parentCategoryName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelation">
|
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.SmsCouponProductCategoryRelation">
|
||||||
update sms_coupon_product_category_relation
|
update sms_coupon_product_category_relation
|
||||||
set coupon_id = #{couponId,jdbcType=BIGINT},
|
set coupon_id = #{couponId,jdbcType=BIGINT},
|
||||||
product_category_id = #{productCategoryId,jdbcType=BIGINT}
|
product_category_id = #{productCategoryId,jdbcType=BIGINT},
|
||||||
|
product_category_name = #{productCategoryName,jdbcType=VARCHAR},
|
||||||
|
parent_category_name = #{parentCategoryName,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
@ -5,6 +5,8 @@
|
|||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
<result column="coupon_id" jdbcType="BIGINT" property="couponId" />
|
<result column="coupon_id" jdbcType="BIGINT" property="couponId" />
|
||||||
<result column="product_id" jdbcType="BIGINT" property="productId" />
|
<result column="product_id" jdbcType="BIGINT" property="productId" />
|
||||||
|
<result column="product_name" jdbcType="VARCHAR" property="productName" />
|
||||||
|
<result column="product_sn" jdbcType="VARCHAR" property="productSn" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
@ -65,7 +67,7 @@
|
|||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, coupon_id, product_id
|
id, coupon_id, product_id, product_name, product_sn
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="com.macro.mall.model.SmsCouponProductRelationExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="com.macro.mall.model.SmsCouponProductRelationExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@ -101,8 +103,10 @@
|
|||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||||
SELECT LAST_INSERT_ID()
|
SELECT LAST_INSERT_ID()
|
||||||
</selectKey>
|
</selectKey>
|
||||||
insert into sms_coupon_product_relation (coupon_id, product_id)
|
insert into sms_coupon_product_relation (coupon_id, product_id, product_name,
|
||||||
values (#{couponId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
|
product_sn)
|
||||||
|
values (#{couponId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR},
|
||||||
|
#{productSn,jdbcType=VARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsCouponProductRelation">
|
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsCouponProductRelation">
|
||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||||
@ -116,6 +120,12 @@
|
|||||||
<if test="productId != null">
|
<if test="productId != null">
|
||||||
product_id,
|
product_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="productName != null">
|
||||||
|
product_name,
|
||||||
|
</if>
|
||||||
|
<if test="productSn != null">
|
||||||
|
product_sn,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="couponId != null">
|
<if test="couponId != null">
|
||||||
@ -124,6 +134,12 @@
|
|||||||
<if test="productId != null">
|
<if test="productId != null">
|
||||||
#{productId,jdbcType=BIGINT},
|
#{productId,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="productName != null">
|
||||||
|
#{productName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="productSn != null">
|
||||||
|
#{productSn,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="com.macro.mall.model.SmsCouponProductRelationExample" resultType="java.lang.Integer">
|
<select id="countByExample" parameterType="com.macro.mall.model.SmsCouponProductRelationExample" resultType="java.lang.Integer">
|
||||||
@ -144,6 +160,12 @@
|
|||||||
<if test="record.productId != null">
|
<if test="record.productId != null">
|
||||||
product_id = #{record.productId,jdbcType=BIGINT},
|
product_id = #{record.productId,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.productName != null">
|
||||||
|
product_name = #{record.productName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.productSn != null">
|
||||||
|
product_sn = #{record.productSn,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
@ -153,7 +175,9 @@
|
|||||||
update sms_coupon_product_relation
|
update sms_coupon_product_relation
|
||||||
set id = #{record.id,jdbcType=BIGINT},
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
coupon_id = #{record.couponId,jdbcType=BIGINT},
|
coupon_id = #{record.couponId,jdbcType=BIGINT},
|
||||||
product_id = #{record.productId,jdbcType=BIGINT}
|
product_id = #{record.productId,jdbcType=BIGINT},
|
||||||
|
product_name = #{record.productName,jdbcType=VARCHAR},
|
||||||
|
product_sn = #{record.productSn,jdbcType=VARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
@ -167,13 +191,21 @@
|
|||||||
<if test="productId != null">
|
<if test="productId != null">
|
||||||
product_id = #{productId,jdbcType=BIGINT},
|
product_id = #{productId,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="productName != null">
|
||||||
|
product_name = #{productName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="productSn != null">
|
||||||
|
product_sn = #{productSn,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.SmsCouponProductRelation">
|
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.SmsCouponProductRelation">
|
||||||
update sms_coupon_product_relation
|
update sms_coupon_product_relation
|
||||||
set coupon_id = #{couponId,jdbcType=BIGINT},
|
set coupon_id = #{couponId,jdbcType=BIGINT},
|
||||||
product_id = #{productId,jdbcType=BIGINT}
|
product_id = #{productId,jdbcType=BIGINT},
|
||||||
|
product_name = #{productName,jdbcType=VARCHAR},
|
||||||
|
product_sn = #{productSn,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user