Commit 35d874ef authored by Junling Bu's avatar Junling Bu
Browse files

chore: 删除微信模板实现(微信官方已经不支持)

parent fa51b868
......@@ -71,7 +71,7 @@ litemall = Spring Boot后端 + Vue管理员前端 + 微信小程序用户前端
* 品牌列表、品牌详情
* 新品首发、人气推荐
* 优惠券列表、优惠券选择
* 团购(团购业务有待完善)
* 团购
* 搜索
* 商品详情、商品评价、商品分享
* 购物车
......
......@@ -82,20 +82,6 @@ litemall:
accessKeyId: xxx
accessKeySecret: xxx
# 微信模版通知配置
# 微信模版用于通知客户或者运营者,注意配置格式;template-name,template-templateId 请参考 NotifyType 枚举值
wx:
enable: false
template:
- name: paySucceed
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- name: captcha
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- name: ship
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- name: refund
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# 快鸟物流查询配置
express:
enable: false
......
......@@ -636,42 +636,6 @@ litemall:
例如“你好,验证码是{code},时间是{code1}"。开发者可以查看`AliyunSmsSender`类的`sendWithTemplate`方法的
源代码即可理解。如果觉得不合理,可以自行调整相关代码。
#### 1.4.5.7 微信通知配置
微信通知是微信上收到的服务通知。
在litemall-core模块的`application-core.yml`文件中配置微信通知服务:
```
litemall:
notify:
# 微信模版通知配置
# 微信模版用于通知客户或者运营者,注意配置格式;template-name,template-templateId 请参考 NotifyType 枚举值
wx:
enable: false
template:
- name: paySucceed
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- name: captcha
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- name: ship
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- name: refund
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```
配置方式:
1. 微信公众平台申请,然后在`模板消息`中设置四个场景的微信模板;
2. 开发者在配置文件设置`enable`的值`true`,然后其他信息设置
微信公众平台中所设置模板ID。
应用场景:
目前微信通知场景只支持支付成功、验证码、订单发送、退款成功四种情况。
以后可能需要继续优化扩展。
验证配置成功:
这里没有实现测试类,因为微信通知需要小程序前端的formId作为参数,因此需要
小商城前端配合。开发者可以在实际场景中DBEUG看看。
#### 1.4.5.8 物流配置
物流配置是查询商品物流信息,这里主要是基于[第三方快递鸟服务](http://www.kdniao.com/api-track)。
......
......@@ -19,7 +19,6 @@ public class NotifyService {
private SmsSender smsSender;
private List<Map<String, String>> smsTemplate = new ArrayList<>();
private WxTemplateSender wxTemplateSender;
private List<Map<String, String>> wxTemplate = new ArrayList<>();
public boolean isMailEnable() {
......@@ -30,10 +29,6 @@ public class NotifyService {
return smsSender != null;
}
public boolean isWxEnable() {
return wxTemplateSender != null;
}
/**
* 短信消息通知
*
......@@ -84,43 +79,6 @@ public class NotifyService {
return smsSender.sendWithTemplate(phoneNumber, getTemplateId(notifyType, smsTemplate), params);
}
/**
* 微信模版消息通知,不跳转
* <p>
* 该方法会尝试从数据库获取缓存的FormId去发送消息
*
* @param touser 接收者openId
* @param notifyType 通知类别,通过该枚举值在配置文件中获取相应的模版ID
* @param params 通知模版内容里的参数,类似"您的验证码为{1}"中{1}的值
*/
@Async
public void notifyWxTemplate(String touser, NotifyType notifyType, String[] params) {
if (wxTemplateSender == null)
return;
String templateId = getTemplateId(notifyType, wxTemplate);
wxTemplateSender.sendWechatMsg(touser, templateId, params);
}
/**
* 微信模版消息通知,带跳转
* <p>
* 该方法会尝试从数据库获取缓存的FormId去发送消息
*
* @param touser 接收者openId
* @param notifyType 通知类别,通过该枚举值在配置文件中获取相应的模版ID
* @param params 通知模版内容里的参数,类似"您的验证码为{1}"中{1}的值
* @param page 点击消息跳转的页面
*/
@Async
public void notifyWxTemplate(String touser, NotifyType notifyType, String[] params, String page) {
if (wxTemplateSender == null)
return;
String templateId = getTemplateId(notifyType, wxTemplate);
wxTemplateSender.sendWechatMsg(touser, templateId, params, page);
}
/**
* 邮件消息通知,
* 接收者在spring.mail.sendto中指定
......@@ -171,10 +129,6 @@ public class NotifyService {
this.smsTemplate = smsTemplate;
}
public void setWxTemplateSender(WxTemplateSender wxTemplateSender) {
this.wxTemplateSender = wxTemplateSender;
}
public void setWxTemplate(List<Map<String, String>> wxTemplate) {
this.wxTemplate = wxTemplate;
}
......
package org.linlinjava.litemall.core.notify;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.WxMaTemplateData;
import cn.binarywang.wx.miniapp.bean.WxMaTemplateMessage;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.linlinjava.litemall.db.domain.LitemallUserFormid;
import org.linlinjava.litemall.db.service.LitemallUserFormIdService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.List;
/**
* 微信模版消息通知
*/
public class WxTemplateSender {
private final Log logger = LogFactory.getLog(WxTemplateSender.class);
@Autowired
private WxMaService wxMaService;
@Autowired
private LitemallUserFormIdService formIdService;
/**
* 发送微信消息(模板消息),不带跳转
*
* @param touser 用户 OpenID
* @param templatId 模板消息ID
* @param parms 详细内容
*/
public void sendWechatMsg(String touser, String templatId, String[] parms) {
sendMsg(touser, templatId, parms, "", "", "");
}
/**
* 发送微信消息(模板消息),带跳转
*
* @param touser 用户 OpenID
* @param templatId 模板消息ID
* @param parms 详细内容
* @param page 跳转页面
*/
public void sendWechatMsg(String touser, String templatId, String[] parms, String page) {
sendMsg(touser, templatId, parms, page, "", "");
}
private void sendMsg(String touser, String templatId, String[] parms, String page, String color,
String emphasisKeyword) {
LitemallUserFormid userFormid = formIdService.queryByOpenId(touser);
if (userFormid == null)
return;
WxMaTemplateMessage msg = new WxMaTemplateMessage();
msg.setTemplateId(templatId);
msg.setToUser(touser);
msg.setFormId(userFormid.getFormid());
msg.setPage(page);
msg.setColor(color);
msg.setEmphasisKeyword(emphasisKeyword);
msg.setData(createMsgData(parms));
try {
wxMaService.getMsgService().sendTemplateMsg(msg);
if (formIdService.updateUserFormId(userFormid) == 0) {
logger.warn("更新数据已失效");
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
}
private List<WxMaTemplateData> createMsgData(String[] parms) {
List<WxMaTemplateData> dataList = new ArrayList<WxMaTemplateData>();
for (int i = 1; i <= parms.length; i++) {
dataList.add(new WxMaTemplateData("keyword" + i, parms[i - 1]));
}
return dataList;
}
}
......@@ -4,7 +4,6 @@ import com.github.qcloudsms.SmsSingleSender;
import org.linlinjava.litemall.core.notify.AliyunSmsSender;
import org.linlinjava.litemall.core.notify.NotifyService;
import org.linlinjava.litemall.core.notify.TencentSmsSender;
import org.linlinjava.litemall.core.notify.WxTemplateSender;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -46,11 +45,6 @@ public class NotifyAutoConfiguration {
notifyService.setSmsTemplate(smsConfig.getTemplate());
}
NotifyProperties.Wx wxConfig = properties.getWx();
if (wxConfig.isEnable()) {
notifyService.setWxTemplateSender(wxTemplateSender());
notifyService.setWxTemplate(wxConfig.getTemplate());
}
return notifyService;
}
......@@ -75,12 +69,6 @@ public class NotifyAutoConfiguration {
return mailSender;
}
@Bean
public WxTemplateSender wxTemplateSender() {
WxTemplateSender wxTemplateSender = new WxTemplateSender();
return wxTemplateSender;
}
@Bean
public TencentSmsSender tencentSmsSender() {
NotifyProperties.Sms smsConfig = properties.getSms();
......
......@@ -10,7 +10,6 @@ import java.util.Map;
public class NotifyProperties {
private Mail mail;
private Sms sms;
private Wx wx;
public Mail getMail() {
return mail;
......@@ -28,14 +27,6 @@ public class NotifyProperties {
this.sms = sms;
}
public Wx getWx() {
return wx;
}
public void setWx(Wx wx) {
this.wx = wx;
}
public static class Mail {
private boolean enable;
private String host;
......@@ -209,25 +200,4 @@ public class NotifyProperties {
}
}
public static class Wx {
private boolean enable;
private List<Map<String, String>> template = new ArrayList<>();
public boolean isEnable() {
return enable;
}
public void setEnable(boolean enable) {
this.enable = enable;
}
public List<Map<String, String>> getTemplate() {
return template;
}
public void setTemplate(List<Map<String, String>> template) {
this.template = template;
}
}
}
......@@ -46,21 +46,6 @@ litemall:
accessKeyId: xxx
accessKeySecret: xxx
# 微信模版通知配置
# 微信模版用于通知客户或者运营者,注意配置格式;template-name,template-templateId 请参考 NotifyType 枚举值
wx:
enable: false
template:
- name: paySucceed
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- name: captcha
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- name: ship
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- name: refund
templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# 快鸟物流查询配置
express:
enable: false
......
......@@ -150,10 +150,6 @@
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="litemall_user_formid">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
<table tableName="litemall_groupon_rules">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>
......
......@@ -316,14 +316,6 @@ INSERT INTO `litemall_user` VALUES (1,'user123','$2a$10$lTu9qi0hr19OC800Db.eludF
/*!40000 ALTER TABLE `litemall_user` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Dumping data for table `litemall_user_formid`
--
LOCK TABLES `litemall_user_formid` WRITE;
/*!40000 ALTER TABLE `litemall_user_formid` DISABLE KEYS */;
/*!40000 ALTER TABLE `litemall_user_formid` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
 
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
......@@ -753,26 +753,6 @@ CREATE TABLE `litemall_user` (
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='用户表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_user_formid`
--
DROP TABLE IF EXISTS `litemall_user_formid`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_user_formid` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`formId` varchar(63) NOT NULL COMMENT '缓存的FormId',
`isprepay` tinyint(1) NOT NULL COMMENT '是FormId还是prepayId',
`useAmount` int(2) NOT NULL COMMENT '可用次数,fromId为1,prepay为3,用1次减1',
`expire_time` datetime NOT NULL COMMENT '过期时间,腾讯规定为7天',
`openId` varchar(63) NOT NULL COMMENT '微信登录openid',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
......
package org.linlinjava.litemall.db.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.domain.LitemallUserFormid;
import org.linlinjava.litemall.db.domain.LitemallUserFormidExample;
public interface LitemallUserFormidMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
long countByExample(LitemallUserFormidExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
int deleteByExample(LitemallUserFormidExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
int insert(LitemallUserFormid record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
int insertSelective(LitemallUserFormid record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
LitemallUserFormid selectOneByExample(LitemallUserFormidExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
LitemallUserFormid selectOneByExampleSelective(@Param("example") LitemallUserFormidExample example, @Param("selective") LitemallUserFormid.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
List<LitemallUserFormid> selectByExampleSelective(@Param("example") LitemallUserFormidExample example, @Param("selective") LitemallUserFormid.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
List<LitemallUserFormid> selectByExample(LitemallUserFormidExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
LitemallUserFormid selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") LitemallUserFormid.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
LitemallUserFormid selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
LitemallUserFormid selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") LitemallUserFormid record, @Param("example") LitemallUserFormidExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
int updateByExample(@Param("record") LitemallUserFormid record, @Param("example") LitemallUserFormidExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(LitemallUserFormid record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
int updateByPrimaryKey(LitemallUserFormid record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
int logicalDeleteByExample(@Param("example") LitemallUserFormidExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
int logicalDeleteByPrimaryKey(Integer id);
}
\ No newline at end of file
package org.linlinjava.litemall.db.domain;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
public class LitemallUserFormid {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public static final Boolean IS_DELETED = Deleted.IS_DELETED.value();
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public static final Boolean NOT_DELETED = Deleted.NOT_DELETED.value();
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column litemall_user_formid.id
*
* @mbg.generated
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column litemall_user_formid.formId
*
* @mbg.generated
*/
private String formid;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column litemall_user_formid.isprepay
*
* @mbg.generated
*/
private Boolean isprepay;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column litemall_user_formid.useAmount
*
* @mbg.generated
*/
private Integer useamount;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column litemall_user_formid.expire_time
*
* @mbg.generated
*/
private LocalDateTime expireTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column litemall_user_formid.openId
*
* @mbg.generated
*/
private String openid;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column litemall_user_formid.add_time
*
* @mbg.generated
*/
private LocalDateTime addTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column litemall_user_formid.update_time
*
* @mbg.generated
*/
private LocalDateTime updateTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column litemall_user_formid.deleted
*
* @mbg.generated
*/
private Boolean deleted;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column litemall_user_formid.id
*
* @return the value of litemall_user_formid.id
*
* @mbg.generated
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column litemall_user_formid.id
*
* @param id the value for litemall_user_formid.id
*
* @mbg.generated
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column litemall_user_formid.formId
*
* @return the value of litemall_user_formid.formId
*
* @mbg.generated
*/
public String getFormid() {
return formid;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column litemall_user_formid.formId
*
* @param formid the value for litemall_user_formid.formId
*
* @mbg.generated
*/
public void setFormid(String formid) {
this.formid = formid;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column litemall_user_formid.isprepay
*
* @return the value of litemall_user_formid.isprepay
*
* @mbg.generated
*/
public Boolean getIsprepay() {
return isprepay;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column litemall_user_formid.isprepay
*
* @param isprepay the value for litemall_user_formid.isprepay
*
* @mbg.generated
*/
public void setIsprepay(Boolean isprepay) {
this.isprepay = isprepay;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column litemall_user_formid.useAmount
*
* @return the value of litemall_user_formid.useAmount
*
* @mbg.generated
*/
public Integer getUseamount() {
return useamount;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column litemall_user_formid.useAmount
*
* @param useamount the value for litemall_user_formid.useAmount
*
* @mbg.generated
*/
public void setUseamount(Integer useamount) {
this.useamount = useamount;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column litemall_user_formid.expire_time
*
* @return the value of litemall_user_formid.expire_time
*
* @mbg.generated
*/
public LocalDateTime getExpireTime() {
return expireTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column litemall_user_formid.expire_time
*
* @param expireTime the value for litemall_user_formid.expire_time
*
* @mbg.generated
*/
public void setExpireTime(LocalDateTime expireTime) {
this.expireTime = expireTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column litemall_user_formid.openId
*
* @return the value of litemall_user_formid.openId
*
* @mbg.generated
*/
public String getOpenid() {
return openid;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column litemall_user_formid.openId
*
* @param openid the value for litemall_user_formid.openId
*
* @mbg.generated
*/
public void setOpenid(String openid) {
this.openid = openid;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column litemall_user_formid.add_time
*
* @return the value of litemall_user_formid.add_time
*
* @mbg.generated
*/
public LocalDateTime getAddTime() {
return addTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column litemall_user_formid.add_time
*
* @param addTime the value for litemall_user_formid.add_time
*
* @mbg.generated
*/
public void setAddTime(LocalDateTime addTime) {
this.addTime = addTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column litemall_user_formid.update_time
*
* @return the value of litemall_user_formid.update_time
*
* @mbg.generated
*/
public LocalDateTime getUpdateTime() {
return updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column litemall_user_formid.update_time
*
* @param updateTime the value for litemall_user_formid.update_time
*
* @mbg.generated
*/
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public void andLogicalDeleted(boolean deleted) {
setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column litemall_user_formid.deleted
*
* @return the value of litemall_user_formid.deleted
*
* @mbg.generated
*/
public Boolean getDeleted() {
return deleted;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column litemall_user_formid.deleted
*
* @param deleted the value for litemall_user_formid.deleted
*
* @mbg.generated
*/
public void setDeleted(Boolean deleted) {
this.deleted = deleted;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", IS_DELETED=").append(IS_DELETED);
sb.append(", NOT_DELETED=").append(NOT_DELETED);
sb.append(", id=").append(id);
sb.append(", formid=").append(formid);
sb.append(", isprepay=").append(isprepay);
sb.append(", useamount=").append(useamount);
sb.append(", expireTime=").append(expireTime);
sb.append(", openid=").append(openid);
sb.append(", addTime=").append(addTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", deleted=").append(deleted);
sb.append("]");
return sb.toString();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
LitemallUserFormid other = (LitemallUserFormid) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getFormid() == null ? other.getFormid() == null : this.getFormid().equals(other.getFormid()))
&& (this.getIsprepay() == null ? other.getIsprepay() == null : this.getIsprepay().equals(other.getIsprepay()))
&& (this.getUseamount() == null ? other.getUseamount() == null : this.getUseamount().equals(other.getUseamount()))
&& (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()))
&& (this.getOpenid() == null ? other.getOpenid() == null : this.getOpenid().equals(other.getOpenid()))
&& (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getFormid() == null) ? 0 : getFormid().hashCode());
result = prime * result + ((getIsprepay() == null) ? 0 : getIsprepay().hashCode());
result = prime * result + ((getUseamount() == null) ? 0 : getUseamount().hashCode());
result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
result = prime * result + ((getOpenid() == null) ? 0 : getOpenid().hashCode());
result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public enum Deleted {
NOT_DELETED(new Boolean("0"), "未删除"),
IS_DELETED(new Boolean("1"), "已删除");
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
private final Boolean value;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
private final String name;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
Deleted(Boolean value, String name) {
this.value = value;
this.name = name;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Boolean getValue() {
return this.value;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Boolean value() {
return this.value;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public String getName() {
return this.name;
}
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public enum Column {
id("id", "id", "INTEGER", false),
formid("formId", "formid", "VARCHAR", false),
isprepay("isprepay", "isprepay", "BIT", false),
useamount("useAmount", "useamount", "INTEGER", false),
expireTime("expire_time", "expireTime", "TIMESTAMP", false),
openid("openId", "openid", "VARCHAR", false),
addTime("add_time", "addTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false),
deleted("deleted", "deleted", "BIT", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
private static final String BEGINNING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
private static final String ENDING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public String getAliasedEscapedColumnName() {
return this.getEscapedColumnName();
}
}
}
\ No newline at end of file
package org.linlinjava.litemall.db.domain;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
public class LitemallUserFormidExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public LitemallUserFormidExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public LitemallUserFormidExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public LitemallUserFormidExample orderBy(String ... orderByClauses) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < orderByClauses.length; i++) {
sb.append(orderByClauses[i]);
if (i < orderByClauses.length - 1) {
sb.append(" , ");
}
}
this.setOrderByClause(sb.toString());
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(this);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public static Criteria newAndCreateCriteria() {
LitemallUserFormidExample example = new LitemallUserFormidExample();
return example.createCriteria();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public LitemallUserFormidExample when(boolean condition, IExampleWhen then) {
if (condition) {
then.example(this);
}
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public LitemallUserFormidExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
if (condition) {
then.example(this);
} else {
otherwise.example(this);
}
return this;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Integer value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIdEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Integer value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIdNotEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThan(Integer value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIdGreaterThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIdGreaterThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThan(Integer value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIdLessThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIdLessThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdIn(List<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andFormidIsNull() {
addCriterion("formId is null");
return (Criteria) this;
}
public Criteria andFormidIsNotNull() {
addCriterion("formId is not null");
return (Criteria) this;
}
public Criteria andFormidEqualTo(String value) {
addCriterion("formId =", value, "formid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andFormidEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("formId = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andFormidNotEqualTo(String value) {
addCriterion("formId <>", value, "formid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andFormidNotEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("formId <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andFormidGreaterThan(String value) {
addCriterion("formId >", value, "formid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andFormidGreaterThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("formId > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andFormidGreaterThanOrEqualTo(String value) {
addCriterion("formId >=", value, "formid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andFormidGreaterThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("formId >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andFormidLessThan(String value) {
addCriterion("formId <", value, "formid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andFormidLessThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("formId < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andFormidLessThanOrEqualTo(String value) {
addCriterion("formId <=", value, "formid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andFormidLessThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("formId <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andFormidLike(String value) {
addCriterion("formId like", value, "formid");
return (Criteria) this;
}
public Criteria andFormidNotLike(String value) {
addCriterion("formId not like", value, "formid");
return (Criteria) this;
}
public Criteria andFormidIn(List<String> values) {
addCriterion("formId in", values, "formid");
return (Criteria) this;
}
public Criteria andFormidNotIn(List<String> values) {
addCriterion("formId not in", values, "formid");
return (Criteria) this;
}
public Criteria andFormidBetween(String value1, String value2) {
addCriterion("formId between", value1, value2, "formid");
return (Criteria) this;
}
public Criteria andFormidNotBetween(String value1, String value2) {
addCriterion("formId not between", value1, value2, "formid");
return (Criteria) this;
}
public Criteria andIsprepayIsNull() {
addCriterion("isprepay is null");
return (Criteria) this;
}
public Criteria andIsprepayIsNotNull() {
addCriterion("isprepay is not null");
return (Criteria) this;
}
public Criteria andIsprepayEqualTo(Boolean value) {
addCriterion("isprepay =", value, "isprepay");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIsprepayEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("isprepay = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsprepayNotEqualTo(Boolean value) {
addCriterion("isprepay <>", value, "isprepay");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIsprepayNotEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("isprepay <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsprepayGreaterThan(Boolean value) {
addCriterion("isprepay >", value, "isprepay");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIsprepayGreaterThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("isprepay > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsprepayGreaterThanOrEqualTo(Boolean value) {
addCriterion("isprepay >=", value, "isprepay");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIsprepayGreaterThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("isprepay >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsprepayLessThan(Boolean value) {
addCriterion("isprepay <", value, "isprepay");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIsprepayLessThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("isprepay < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsprepayLessThanOrEqualTo(Boolean value) {
addCriterion("isprepay <=", value, "isprepay");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andIsprepayLessThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("isprepay <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsprepayIn(List<Boolean> values) {
addCriterion("isprepay in", values, "isprepay");
return (Criteria) this;
}
public Criteria andIsprepayNotIn(List<Boolean> values) {
addCriterion("isprepay not in", values, "isprepay");
return (Criteria) this;
}
public Criteria andIsprepayBetween(Boolean value1, Boolean value2) {
addCriterion("isprepay between", value1, value2, "isprepay");
return (Criteria) this;
}
public Criteria andIsprepayNotBetween(Boolean value1, Boolean value2) {
addCriterion("isprepay not between", value1, value2, "isprepay");
return (Criteria) this;
}
public Criteria andUseamountIsNull() {
addCriterion("useAmount is null");
return (Criteria) this;
}
public Criteria andUseamountIsNotNull() {
addCriterion("useAmount is not null");
return (Criteria) this;
}
public Criteria andUseamountEqualTo(Integer value) {
addCriterion("useAmount =", value, "useamount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUseamountEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("useAmount = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUseamountNotEqualTo(Integer value) {
addCriterion("useAmount <>", value, "useamount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUseamountNotEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("useAmount <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUseamountGreaterThan(Integer value) {
addCriterion("useAmount >", value, "useamount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUseamountGreaterThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("useAmount > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUseamountGreaterThanOrEqualTo(Integer value) {
addCriterion("useAmount >=", value, "useamount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUseamountGreaterThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("useAmount >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUseamountLessThan(Integer value) {
addCriterion("useAmount <", value, "useamount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUseamountLessThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("useAmount < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUseamountLessThanOrEqualTo(Integer value) {
addCriterion("useAmount <=", value, "useamount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUseamountLessThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("useAmount <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUseamountIn(List<Integer> values) {
addCriterion("useAmount in", values, "useamount");
return (Criteria) this;
}
public Criteria andUseamountNotIn(List<Integer> values) {
addCriterion("useAmount not in", values, "useamount");
return (Criteria) this;
}
public Criteria andUseamountBetween(Integer value1, Integer value2) {
addCriterion("useAmount between", value1, value2, "useamount");
return (Criteria) this;
}
public Criteria andUseamountNotBetween(Integer value1, Integer value2) {
addCriterion("useAmount not between", value1, value2, "useamount");
return (Criteria) this;
}
public Criteria andExpireTimeIsNull() {
addCriterion("expire_time is null");
return (Criteria) this;
}
public Criteria andExpireTimeIsNotNull() {
addCriterion("expire_time is not null");
return (Criteria) this;
}
public Criteria andExpireTimeEqualTo(LocalDateTime value) {
addCriterion("expire_time =", value, "expireTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andExpireTimeEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("expire_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExpireTimeNotEqualTo(LocalDateTime value) {
addCriterion("expire_time <>", value, "expireTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andExpireTimeNotEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("expire_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExpireTimeGreaterThan(LocalDateTime value) {
addCriterion("expire_time >", value, "expireTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andExpireTimeGreaterThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("expire_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExpireTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("expire_time >=", value, "expireTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andExpireTimeGreaterThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("expire_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExpireTimeLessThan(LocalDateTime value) {
addCriterion("expire_time <", value, "expireTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andExpireTimeLessThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("expire_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExpireTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("expire_time <=", value, "expireTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andExpireTimeLessThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("expire_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExpireTimeIn(List<LocalDateTime> values) {
addCriterion("expire_time in", values, "expireTime");
return (Criteria) this;
}
public Criteria andExpireTimeNotIn(List<LocalDateTime> values) {
addCriterion("expire_time not in", values, "expireTime");
return (Criteria) this;
}
public Criteria andExpireTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("expire_time between", value1, value2, "expireTime");
return (Criteria) this;
}
public Criteria andExpireTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("expire_time not between", value1, value2, "expireTime");
return (Criteria) this;
}
public Criteria andOpenidIsNull() {
addCriterion("openId is null");
return (Criteria) this;
}
public Criteria andOpenidIsNotNull() {
addCriterion("openId is not null");
return (Criteria) this;
}
public Criteria andOpenidEqualTo(String value) {
addCriterion("openId =", value, "openid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andOpenidEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("openId = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOpenidNotEqualTo(String value) {
addCriterion("openId <>", value, "openid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andOpenidNotEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("openId <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOpenidGreaterThan(String value) {
addCriterion("openId >", value, "openid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andOpenidGreaterThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("openId > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOpenidGreaterThanOrEqualTo(String value) {
addCriterion("openId >=", value, "openid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andOpenidGreaterThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("openId >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOpenidLessThan(String value) {
addCriterion("openId <", value, "openid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andOpenidLessThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("openId < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOpenidLessThanOrEqualTo(String value) {
addCriterion("openId <=", value, "openid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andOpenidLessThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("openId <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOpenidLike(String value) {
addCriterion("openId like", value, "openid");
return (Criteria) this;
}
public Criteria andOpenidNotLike(String value) {
addCriterion("openId not like", value, "openid");
return (Criteria) this;
}
public Criteria andOpenidIn(List<String> values) {
addCriterion("openId in", values, "openid");
return (Criteria) this;
}
public Criteria andOpenidNotIn(List<String> values) {
addCriterion("openId not in", values, "openid");
return (Criteria) this;
}
public Criteria andOpenidBetween(String value1, String value2) {
addCriterion("openId between", value1, value2, "openid");
return (Criteria) this;
}
public Criteria andOpenidNotBetween(String value1, String value2) {
addCriterion("openId not between", value1, value2, "openid");
return (Criteria) this;
}
public Criteria andAddTimeIsNull() {
addCriterion("add_time is null");
return (Criteria) this;
}
public Criteria andAddTimeIsNotNull() {
addCriterion("add_time is not null");
return (Criteria) this;
}
public Criteria andAddTimeEqualTo(LocalDateTime value) {
addCriterion("add_time =", value, "addTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andAddTimeEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("add_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddTimeNotEqualTo(LocalDateTime value) {
addCriterion("add_time <>", value, "addTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andAddTimeNotEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("add_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddTimeGreaterThan(LocalDateTime value) {
addCriterion("add_time >", value, "addTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andAddTimeGreaterThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("add_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("add_time >=", value, "addTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andAddTimeGreaterThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("add_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddTimeLessThan(LocalDateTime value) {
addCriterion("add_time <", value, "addTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andAddTimeLessThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("add_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("add_time <=", value, "addTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andAddTimeLessThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("add_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddTimeIn(List<LocalDateTime> values) {
addCriterion("add_time in", values, "addTime");
return (Criteria) this;
}
public Criteria andAddTimeNotIn(List<LocalDateTime> values) {
addCriterion("add_time not in", values, "addTime");
return (Criteria) this;
}
public Criteria andAddTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("add_time between", value1, value2, "addTime");
return (Criteria) this;
}
public Criteria andAddTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("add_time not between", value1, value2, "addTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(LocalDateTime value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUpdateTimeEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("update_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUpdateTimeNotEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("update_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(LocalDateTime value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUpdateTimeGreaterThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("update_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUpdateTimeGreaterThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("update_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(LocalDateTime value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUpdateTimeLessThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("update_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andUpdateTimeLessThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("update_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<LocalDateTime> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<LocalDateTime> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andDeletedIsNull() {
addCriterion("deleted is null");
return (Criteria) this;
}
public Criteria andDeletedIsNotNull() {
addCriterion("deleted is not null");
return (Criteria) this;
}
public Criteria andDeletedEqualTo(Boolean value) {
addCriterion("deleted =", value, "deleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andDeletedEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("deleted = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeletedNotEqualTo(Boolean value) {
addCriterion("deleted <>", value, "deleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andDeletedNotEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("deleted <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeletedGreaterThan(Boolean value) {
addCriterion("deleted >", value, "deleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andDeletedGreaterThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("deleted > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeletedGreaterThanOrEqualTo(Boolean value) {
addCriterion("deleted >=", value, "deleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andDeletedGreaterThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("deleted >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeletedLessThan(Boolean value) {
addCriterion("deleted <", value, "deleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andDeletedLessThanColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("deleted < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeletedLessThanOrEqualTo(Boolean value) {
addCriterion("deleted <=", value, "deleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andDeletedLessThanOrEqualToColumn(LitemallUserFormid.Column column) {
addCriterion(new StringBuilder("deleted <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeletedIn(List<Boolean> values) {
addCriterion("deleted in", values, "deleted");
return (Criteria) this;
}
public Criteria andDeletedNotIn(List<Boolean> values) {
addCriterion("deleted not in", values, "deleted");
return (Criteria) this;
}
public Criteria andDeletedBetween(Boolean value1, Boolean value2) {
addCriterion("deleted between", value1, value2, "deleted");
return (Criteria) this;
}
public Criteria andDeletedNotBetween(Boolean value1, Boolean value2) {
addCriterion("deleted not between", value1, value2, "deleted");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table litemall_user_formid
*
* @mbg.generated do_not_delete_during_merge
*/
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
private LitemallUserFormidExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
protected Criteria(LitemallUserFormidExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public LitemallUserFormidExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
@Deprecated
public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
if (ifAdd) {
add.add(this);
}
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria when(boolean condition, ICriteriaWhen then) {
if (condition) {
then.criteria(this);
}
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
if (condition) {
then.criteria(this);
} else {
otherwise.criteria(this);
}
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public Criteria andLogicalDeleted(boolean deleted) {
return deleted ? andDeletedEqualTo(LitemallUserFormid.Deleted.IS_DELETED.value()) : andDeletedNotEqualTo(LitemallUserFormid.Deleted.IS_DELETED.value());
}
@Deprecated
public interface ICriteriaAdd {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
Criteria add(Criteria add);
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
public interface ICriteriaWhen {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
void criteria(Criteria criteria);
}
public interface IExampleWhen {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_formid
*
* @mbg.generated
*/
void example(org.linlinjava.litemall.db.domain.LitemallUserFormidExample example);
}
}
\ No newline at end of file
package org.linlinjava.litemall.db.service;
import org.linlinjava.litemall.db.dao.LitemallUserFormidMapper;
import org.linlinjava.litemall.db.domain.LitemallUserFormid;
import org.linlinjava.litemall.db.domain.LitemallUserFormidExample;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
@Service
public class LitemallUserFormIdService {
@Resource
private LitemallUserFormidMapper formidMapper;
/**
* 查找是否有可用的FormId
*
* @param openId
* @return
*/
public LitemallUserFormid queryByOpenId(String openId) {
LitemallUserFormidExample example = new LitemallUserFormidExample();
//符合找到该用户记录,且可用次数大于1,且还未过期
example.or().andOpenidEqualTo(openId).andExpireTimeGreaterThan(LocalDateTime.now());
example.setOrderByClause("add_time desc");
return formidMapper.selectOneByExample(example);
}
/**
* 更新或删除FormId
*
* @param userFormid
*/
public int updateUserFormId(LitemallUserFormid userFormid) {
//更新或者删除缓存
if (userFormid.getIsprepay() && userFormid.getUseamount() > 1) {
userFormid.setUseamount(userFormid.getUseamount() - 1);
userFormid.setUpdateTime(LocalDateTime.now());
return formidMapper.updateByPrimaryKey(userFormid);
} else {
return formidMapper.deleteByPrimaryKey(userFormid.getId());
}
}
/**
* 添加一个 FormId
*
* @param userFormid
*/
public void addUserFormid(LitemallUserFormid userFormid) {
userFormid.setAddTime(LocalDateTime.now());
userFormid.setUpdateTime(LocalDateTime.now());
formidMapper.insertSelective(userFormid);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.linlinjava.litemall.db.dao.LitemallUserFormidMapper">
<resultMap id="BaseResultMap" type="org.linlinjava.litemall.db.domain.LitemallUserFormid">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="formId" jdbcType="VARCHAR" property="formid" />
<result column="isprepay" jdbcType="BIT" property="isprepay" />
<result column="useAmount" jdbcType="INTEGER" property="useamount" />
<result column="expire_time" jdbcType="TIMESTAMP" property="expireTime" />
<result column="openId" jdbcType="VARCHAR" property="openid" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, formId, isprepay, useAmount, expire_time, openId, add_time, update_time, deleted
</sql>
<select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallUserFormidExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from litemall_user_formid
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.aliasedEscapedColumnName}
</foreach>
</when>
<otherwise>
<include refid="Base_Column_List" />
</otherwise>
</choose>
from litemall_user_formid
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from litemall_user_formid
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from litemall_user_formid
where id = #{id,jdbcType=INTEGER}
and deleted =
<choose>
<when test="andLogicalDeleted">
1
</when>
<otherwise>
0
</otherwise>
</choose>
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.aliasedEscapedColumnName}
</foreach>
</when>
<otherwise>
<include refid="Base_Column_List" />
</otherwise>
</choose>
from litemall_user_formid
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from litemall_user_formid
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallUserFormidExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from litemall_user_formid
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="org.linlinjava.litemall.db.domain.LitemallUserFormid">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into litemall_user_formid (formId, isprepay, useAmount,
expire_time, openId, add_time,
update_time, deleted)
values (#{formid,jdbcType=VARCHAR}, #{isprepay,jdbcType=BIT}, #{useamount,jdbcType=INTEGER},
#{expireTime,jdbcType=TIMESTAMP}, #{openid,jdbcType=VARCHAR}, #{addTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallUserFormid">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into litemall_user_formid
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="formid != null">
formId,
</if>
<if test="isprepay != null">
isprepay,
</if>
<if test="useamount != null">
useAmount,
</if>
<if test="expireTime != null">
expire_time,
</if>
<if test="openid != null">
openId,
</if>
<if test="addTime != null">
add_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="deleted != null">
deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="formid != null">
#{formid,jdbcType=VARCHAR},
</if>
<if test="isprepay != null">
#{isprepay,jdbcType=BIT},
</if>
<if test="useamount != null">
#{useamount,jdbcType=INTEGER},
</if>
<if test="expireTime != null">
#{expireTime,jdbcType=TIMESTAMP},
</if>
<if test="openid != null">
#{openid,jdbcType=VARCHAR},
</if>
<if test="addTime != null">
#{addTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deleted != null">
#{deleted,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallUserFormidExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from litemall_user_formid
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update litemall_user_formid
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.formid != null">
formId = #{record.formid,jdbcType=VARCHAR},
</if>
<if test="record.isprepay != null">
isprepay = #{record.isprepay,jdbcType=BIT},
</if>
<if test="record.useamount != null">
useAmount = #{record.useamount,jdbcType=INTEGER},
</if>
<if test="record.expireTime != null">
expire_time = #{record.expireTime,jdbcType=TIMESTAMP},
</if>
<if test="record.openid != null">
openId = #{record.openid,jdbcType=VARCHAR},
</if>
<if test="record.addTime != null">
add_time = #{record.addTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.deleted != null">
deleted = #{record.deleted,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update litemall_user_formid
set id = #{record.id,jdbcType=INTEGER},
formId = #{record.formid,jdbcType=VARCHAR},
isprepay = #{record.isprepay,jdbcType=BIT},
useAmount = #{record.useamount,jdbcType=INTEGER},
expire_time = #{record.expireTime,jdbcType=TIMESTAMP},
openId = #{record.openid,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="org.linlinjava.litemall.db.domain.LitemallUserFormid">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update litemall_user_formid
<set>
<if test="formid != null">
formId = #{formid,jdbcType=VARCHAR},
</if>
<if test="isprepay != null">
isprepay = #{isprepay,jdbcType=BIT},
</if>
<if test="useamount != null">
useAmount = #{useamount,jdbcType=INTEGER},
</if>
<if test="expireTime != null">
expire_time = #{expireTime,jdbcType=TIMESTAMP},
</if>
<if test="openid != null">
openId = #{openid,jdbcType=VARCHAR},
</if>
<if test="addTime != null">
add_time = #{addTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="org.linlinjava.litemall.db.domain.LitemallUserFormid">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update litemall_user_formid
set formId = #{formid,jdbcType=VARCHAR},
isprepay = #{isprepay,jdbcType=BIT},
useAmount = #{useamount,jdbcType=INTEGER},
expire_time = #{expireTime,jdbcType=TIMESTAMP},
openId = #{openid,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectOneByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallUserFormidExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from litemall_user_formid
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.aliasedEscapedColumnName}
</foreach>
</when>
<otherwise>
<include refid="Base_Column_List" />
</otherwise>
</choose>
from litemall_user_formid
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
<update id="logicalDeleteByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update litemall_user_formid set deleted = 1
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Integer">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update litemall_user_formid set deleted = 1
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
......@@ -371,8 +371,6 @@ export function feedbackAdd(data) {
const FootprintList='wx/footprint/list'; //足迹列表
const FootprintDelete='wx/footprint/delete'; //删除足迹
const UserFormIdCreate='wx/formid/create'; //用户FromId,用于发送模版消息
const GrouponList='wx/groupon/list'; //团购列表
export function grouponList(query) {
return request({
......
......@@ -91,8 +91,6 @@ public class WxOrderService {
@Autowired
private NotifyService notifyService;
@Autowired
private LitemallUserFormIdService formIdService;
@Autowired
private LitemallGrouponRulesService grouponRulesService;
@Autowired
private LitemallGrouponService grouponService;
......@@ -588,18 +586,6 @@ public class WxOrderService {
orderRequest.setSpbillCreateIp(IpUtil.getIpAddr(request));
result = wxPayService.createOrder(orderRequest);
//缓存prepayID用于后续模版通知
String prepayId = result.getPackageValue();
prepayId = prepayId.replace("prepay_id=", "");
LitemallUserFormid userFormid = new LitemallUserFormid();
userFormid.setOpenid(user.getWeixinOpenid());
userFormid.setFormid(prepayId);
userFormid.setIsprepay(true);
userFormid.setUseamount(3);
userFormid.setExpireTime(LocalDateTime.now().plusDays(7));
formIdService.addUserFormid(userFormid);
} catch (Exception e) {
e.printStackTrace();
return ResponseUtil.fail(ORDER_PAY_FAIL, "订单不能支付");
......@@ -778,8 +764,6 @@ public class WxOrderService {
order.getAddress()
};
notifyService.notifyWxTemplate(result.getOpenid(), NotifyType.PAY_SUCCEED, parms, "pages/index/index?orderId=" + order.getId());
// 取消订单超时未支付任务
taskService.removeTask(new OrderUnpaidTask(order.getId()));
......
package org.linlinjava.litemall.wx.web;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.linlinjava.litemall.core.util.ResponseUtil;
import org.linlinjava.litemall.db.domain.LitemallUser;
import org.linlinjava.litemall.db.domain.LitemallUserFormid;
import org.linlinjava.litemall.db.service.LitemallUserFormIdService;
import org.linlinjava.litemall.db.service.LitemallUserService;
import org.linlinjava.litemall.wx.annotation.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
@RestController
@RequestMapping("/wx/formid")
@Validated
public class WxUserFormId {
private final Log logger = LogFactory.getLog(WxUserFormId.class);
@Autowired
private LitemallUserService userService;
@Autowired
private LitemallUserFormIdService formIdService;
@GetMapping("create")
public Object create(@LoginUser Integer userId, @NotNull String formId) {
if (userId == null) {
return ResponseUtil.unlogin();
}
LitemallUser user = userService.findById(userId);
LitemallUserFormid userFormid = new LitemallUserFormid();
userFormid.setOpenid(user.getWeixinOpenid());
userFormid.setFormid(formId);
userFormid.setIsprepay(false);
userFormid.setUseamount(1);
userFormid.setExpireTime(LocalDateTime.now().plusDays(7));
formIdService.addUserFormid(userFormid);
return ResponseUtil.ok();
}
}
......@@ -81,8 +81,6 @@ module.exports = {
FootprintList: WxApiRoot + 'footprint/list', //足迹列表
FootprintDelete: WxApiRoot + 'footprint/delete', //删除足迹
UserFormIdCreate: WxApiRoot + 'formid/create', //用户FromId,用于发送模版消息
GroupOnList: WxApiRoot + 'groupon/list', //团购列表
GroupOnMy: WxApiRoot + 'groupon/my', //团购API-我的团购
GroupOnDetail: WxApiRoot + 'groupon/detail', //团购API-详情
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment