30 changed files with 3807 additions and 22 deletions
@ -0,0 +1,91 @@ |
|||
package com.ccsens.ptos_tall.api; |
|||
|
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.ccsens.ptos_tall.bean.vo.UserVo; |
|||
import com.ccsens.ptos_tall.service.IWxUserService; |
|||
import com.ccsens.util.JacksonUtil; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.wechatutil.bean.dto.wxmini.NoticeDto; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiImplicitParams; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.io.BufferedReader; |
|||
import java.io.IOException; |
|||
import java.security.NoSuchAlgorithmException; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Api(tags = "微信公众号相关" ) |
|||
@RestController |
|||
@RequestMapping("/wx") |
|||
@Slf4j |
|||
public class WxUserController { |
|||
|
|||
private String token = "ccsensChuanKong"; |
|||
private String encodingAesKey = "nysgv5sKS5HPMMsHiVcDOE9BBCtX7Ho5DSv3s0qS9b9"; |
|||
|
|||
@Resource |
|||
private IWxUserService wxUserService; |
|||
|
|||
|
|||
@ApiOperation(value = "/生成公众号临时二维码",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value="createQrCode",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.AttentionOfficial> createQrCode(String equipmentId, String appId, String secret) { |
|||
log.info("生成二维码:{}",equipmentId); |
|||
UserVo.AttentionOfficial qrCodeUrl = wxUserService.createQrCode(equipmentId, appId, secret); |
|||
return JsonResponse.newInstance().ok(qrCodeUrl); |
|||
} |
|||
|
|||
|
|||
@ApiOperation(value = "接收公众号消息通知", notes = "") |
|||
@RequestMapping(value = "/notice", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|||
public String noticeGet(@Validated NoticeDto.ValidMsg validMsg) { |
|||
log.info("接收微信小程序token:{},token:{}",validMsg,token); |
|||
// boolean check = validMsg.check(token);
|
|||
// log.info("校验结果:{}", check);
|
|||
// return check ? validMsg.getEchostr() : null;
|
|||
|
|||
return validMsg.getEchostr(); |
|||
} |
|||
|
|||
@ApiOperation(value = "接收公众号消息通知", notes = "") |
|||
@RequestMapping(value = "/notice", method = RequestMethod.POST) |
|||
public String notice(HttpServletRequest request) throws IOException { |
|||
log.info("接收公众号消息通知:{}", request.getParameterMap()); |
|||
|
|||
BufferedReader reader = request.getReader(); |
|||
StringBuilder builder = new StringBuilder(); |
|||
String line; |
|||
while ((line = reader.readLine()) != null) { |
|||
builder.append(line); |
|||
} |
|||
log.info("获取参数:{}", builder.toString()); |
|||
NoticeDto.Notice notice = JSONObject.parseObject(JacksonUtil.xmlToJson(builder.toString()), NoticeDto.Notice.class); |
|||
|
|||
return wxUserService.officialLogin(notice); |
|||
} |
|||
|
|||
@ApiOperation(value = "根据eventKey获取用户登录信息", notes = "") |
|||
@RequestMapping(value = "/eventKey", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.TokenBean> getUserByEventKey(@Validated String eventKey) { |
|||
log.info("根据eventKey获取用户登录信息:{}",eventKey); |
|||
UserVo.TokenBean tokenBean = wxUserService.getUserByEventKey(eventKey); |
|||
if(ObjectUtil.isNull(tokenBean)){ |
|||
return JsonResponse.newInstance().ok(tokenBean); |
|||
} |
|||
return JsonResponse.newInstance().ok(tokenBean,tokenBean.getToken(),tokenBean.getRefreshToken()); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,95 @@ |
|||
package com.ccsens.ptos_tall.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class WxEquipment implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long officialId; |
|||
|
|||
private String name; |
|||
|
|||
private String description; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getOfficialId() { |
|||
return officialId; |
|||
} |
|||
|
|||
public void setOfficialId(Long officialId) { |
|||
this.officialId = officialId; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name == null ? null : name.trim(); |
|||
} |
|||
|
|||
public String getDescription() { |
|||
return description; |
|||
} |
|||
|
|||
public void setDescription(String description) { |
|||
this.description = description == null ? null : description.trim(); |
|||
} |
|||
|
|||
public Date getCreatedAt() { |
|||
return createdAt; |
|||
} |
|||
|
|||
public void setCreatedAt(Date createdAt) { |
|||
this.createdAt = createdAt; |
|||
} |
|||
|
|||
public Date getUpdatedAt() { |
|||
return updatedAt; |
|||
} |
|||
|
|||
public void setUpdatedAt(Date updatedAt) { |
|||
this.updatedAt = updatedAt; |
|||
} |
|||
|
|||
public Byte getRecStatus() { |
|||
return recStatus; |
|||
} |
|||
|
|||
public void setRecStatus(Byte recStatus) { |
|||
this.recStatus = recStatus; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", officialId=").append(officialId); |
|||
sb.append(", name=").append(name); |
|||
sb.append(", description=").append(description); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,641 @@ |
|||
package com.ccsens.ptos_tall.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class WxEquipmentExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public WxEquipmentExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
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(Long value) { |
|||
addCriterion("id =", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotEqualTo(Long value) { |
|||
addCriterion("id <>", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThan(Long value) { |
|||
addCriterion("id >", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("id >=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThan(Long value) { |
|||
addCriterion("id <", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("id <=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIn(List<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> values) { |
|||
addCriterion("id not in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdBetween(Long value1, Long value2) { |
|||
addCriterion("id between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("id not between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdIsNull() { |
|||
addCriterion("official_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdIsNotNull() { |
|||
addCriterion("official_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdEqualTo(Long value) { |
|||
addCriterion("official_id =", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdNotEqualTo(Long value) { |
|||
addCriterion("official_id <>", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdGreaterThan(Long value) { |
|||
addCriterion("official_id >", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("official_id >=", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdLessThan(Long value) { |
|||
addCriterion("official_id <", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("official_id <=", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdIn(List<Long> values) { |
|||
addCriterion("official_id in", values, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdNotIn(List<Long> values) { |
|||
addCriterion("official_id not in", values, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdBetween(Long value1, Long value2) { |
|||
addCriterion("official_id between", value1, value2, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("official_id not between", value1, value2, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIsNull() { |
|||
addCriterion("name is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIsNotNull() { |
|||
addCriterion("name is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameEqualTo(String value) { |
|||
addCriterion("name =", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotEqualTo(String value) { |
|||
addCriterion("name <>", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameGreaterThan(String value) { |
|||
addCriterion("name >", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameGreaterThanOrEqualTo(String value) { |
|||
addCriterion("name >=", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLessThan(String value) { |
|||
addCriterion("name <", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLessThanOrEqualTo(String value) { |
|||
addCriterion("name <=", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLike(String value) { |
|||
addCriterion("name like", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotLike(String value) { |
|||
addCriterion("name not like", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIn(List<String> values) { |
|||
addCriterion("name in", values, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotIn(List<String> values) { |
|||
addCriterion("name not in", values, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameBetween(String value1, String value2) { |
|||
addCriterion("name between", value1, value2, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotBetween(String value1, String value2) { |
|||
addCriterion("name not between", value1, value2, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionIsNull() { |
|||
addCriterion("description is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionIsNotNull() { |
|||
addCriterion("description is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionEqualTo(String value) { |
|||
addCriterion("description =", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionNotEqualTo(String value) { |
|||
addCriterion("description <>", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionGreaterThan(String value) { |
|||
addCriterion("description >", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) { |
|||
addCriterion("description >=", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionLessThan(String value) { |
|||
addCriterion("description <", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionLessThanOrEqualTo(String value) { |
|||
addCriterion("description <=", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionLike(String value) { |
|||
addCriterion("description like", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionNotLike(String value) { |
|||
addCriterion("description not like", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionIn(List<String> values) { |
|||
addCriterion("description in", values, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionNotIn(List<String> values) { |
|||
addCriterion("description not in", values, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionBetween(String value1, String value2) { |
|||
addCriterion("description between", value1, value2, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionNotBetween(String value1, String value2) { |
|||
addCriterion("description not between", value1, value2, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNull() { |
|||
addCriterion("created_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNotNull() { |
|||
addCriterion("created_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtEqualTo(Date value) { |
|||
addCriterion("created_at =", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotEqualTo(Date value) { |
|||
addCriterion("created_at <>", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThan(Date value) { |
|||
addCriterion("created_at >", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("created_at >=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThan(Date value) { |
|||
addCriterion("created_at <", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("created_at <=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIn(List<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> values) { |
|||
addCriterion("created_at not in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("created_at between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("created_at not between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNull() { |
|||
addCriterion("updated_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNotNull() { |
|||
addCriterion("updated_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtEqualTo(Date value) { |
|||
addCriterion("updated_at =", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotEqualTo(Date value) { |
|||
addCriterion("updated_at <>", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThan(Date value) { |
|||
addCriterion("updated_at >", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at >=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThan(Date value) { |
|||
addCriterion("updated_at <", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at <=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIn(List<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> values) { |
|||
addCriterion("updated_at not in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNull() { |
|||
addCriterion("rec_status is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNotNull() { |
|||
addCriterion("rec_status is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusEqualTo(Byte value) { |
|||
addCriterion("rec_status =", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotEqualTo(Byte value) { |
|||
addCriterion("rec_status <>", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThan(Byte value) { |
|||
addCriterion("rec_status >", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status >=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThan(Byte value) { |
|||
addCriterion("rec_status <", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status <=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIn(List<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> values) { |
|||
addCriterion("rec_status not in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status not between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
} |
|||
|
|||
public static class Criteria extends GeneratedCriteria { |
|||
|
|||
protected Criteria() { |
|||
super(); |
|||
} |
|||
} |
|||
|
|||
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); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,128 @@ |
|||
package com.ccsens.ptos_tall.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class WxOfficial implements Serializable { |
|||
private Long id; |
|||
|
|||
private String name; |
|||
|
|||
private String code; |
|||
|
|||
private String description; |
|||
|
|||
private String appId; |
|||
|
|||
private String secret; |
|||
|
|||
private String developerId; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name == null ? null : name.trim(); |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code == null ? null : code.trim(); |
|||
} |
|||
|
|||
public String getDescription() { |
|||
return description; |
|||
} |
|||
|
|||
public void setDescription(String description) { |
|||
this.description = description == null ? null : description.trim(); |
|||
} |
|||
|
|||
public String getAppId() { |
|||
return appId; |
|||
} |
|||
|
|||
public void setAppId(String appId) { |
|||
this.appId = appId == null ? null : appId.trim(); |
|||
} |
|||
|
|||
public String getSecret() { |
|||
return secret; |
|||
} |
|||
|
|||
public void setSecret(String secret) { |
|||
this.secret = secret == null ? null : secret.trim(); |
|||
} |
|||
|
|||
public String getDeveloperId() { |
|||
return developerId; |
|||
} |
|||
|
|||
public void setDeveloperId(String developerId) { |
|||
this.developerId = developerId == null ? null : developerId.trim(); |
|||
} |
|||
|
|||
public Date getCreatedAt() { |
|||
return createdAt; |
|||
} |
|||
|
|||
public void setCreatedAt(Date createdAt) { |
|||
this.createdAt = createdAt; |
|||
} |
|||
|
|||
public Date getUpdatedAt() { |
|||
return updatedAt; |
|||
} |
|||
|
|||
public void setUpdatedAt(Date updatedAt) { |
|||
this.updatedAt = updatedAt; |
|||
} |
|||
|
|||
public Byte getRecStatus() { |
|||
return recStatus; |
|||
} |
|||
|
|||
public void setRecStatus(Byte recStatus) { |
|||
this.recStatus = recStatus; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", name=").append(name); |
|||
sb.append(", code=").append(code); |
|||
sb.append(", description=").append(description); |
|||
sb.append(", appId=").append(appId); |
|||
sb.append(", secret=").append(secret); |
|||
sb.append(", developerId=").append(developerId); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,861 @@ |
|||
package com.ccsens.ptos_tall.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class WxOfficialExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public WxOfficialExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
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(Long value) { |
|||
addCriterion("id =", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotEqualTo(Long value) { |
|||
addCriterion("id <>", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThan(Long value) { |
|||
addCriterion("id >", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("id >=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThan(Long value) { |
|||
addCriterion("id <", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("id <=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIn(List<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> values) { |
|||
addCriterion("id not in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdBetween(Long value1, Long value2) { |
|||
addCriterion("id between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("id not between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIsNull() { |
|||
addCriterion("name is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIsNotNull() { |
|||
addCriterion("name is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameEqualTo(String value) { |
|||
addCriterion("name =", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotEqualTo(String value) { |
|||
addCriterion("name <>", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameGreaterThan(String value) { |
|||
addCriterion("name >", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameGreaterThanOrEqualTo(String value) { |
|||
addCriterion("name >=", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLessThan(String value) { |
|||
addCriterion("name <", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLessThanOrEqualTo(String value) { |
|||
addCriterion("name <=", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLike(String value) { |
|||
addCriterion("name like", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotLike(String value) { |
|||
addCriterion("name not like", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIn(List<String> values) { |
|||
addCriterion("name in", values, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotIn(List<String> values) { |
|||
addCriterion("name not in", values, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameBetween(String value1, String value2) { |
|||
addCriterion("name between", value1, value2, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotBetween(String value1, String value2) { |
|||
addCriterion("name not between", value1, value2, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeIsNull() { |
|||
addCriterion("code is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeIsNotNull() { |
|||
addCriterion("code is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeEqualTo(String value) { |
|||
addCriterion("code =", value, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeNotEqualTo(String value) { |
|||
addCriterion("code <>", value, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeGreaterThan(String value) { |
|||
addCriterion("code >", value, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeGreaterThanOrEqualTo(String value) { |
|||
addCriterion("code >=", value, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeLessThan(String value) { |
|||
addCriterion("code <", value, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeLessThanOrEqualTo(String value) { |
|||
addCriterion("code <=", value, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeLike(String value) { |
|||
addCriterion("code like", value, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeNotLike(String value) { |
|||
addCriterion("code not like", value, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeIn(List<String> values) { |
|||
addCriterion("code in", values, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeNotIn(List<String> values) { |
|||
addCriterion("code not in", values, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeBetween(String value1, String value2) { |
|||
addCriterion("code between", value1, value2, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCodeNotBetween(String value1, String value2) { |
|||
addCriterion("code not between", value1, value2, "code"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionIsNull() { |
|||
addCriterion("description is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionIsNotNull() { |
|||
addCriterion("description is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionEqualTo(String value) { |
|||
addCriterion("description =", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionNotEqualTo(String value) { |
|||
addCriterion("description <>", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionGreaterThan(String value) { |
|||
addCriterion("description >", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) { |
|||
addCriterion("description >=", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionLessThan(String value) { |
|||
addCriterion("description <", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionLessThanOrEqualTo(String value) { |
|||
addCriterion("description <=", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionLike(String value) { |
|||
addCriterion("description like", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionNotLike(String value) { |
|||
addCriterion("description not like", value, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionIn(List<String> values) { |
|||
addCriterion("description in", values, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionNotIn(List<String> values) { |
|||
addCriterion("description not in", values, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionBetween(String value1, String value2) { |
|||
addCriterion("description between", value1, value2, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDescriptionNotBetween(String value1, String value2) { |
|||
addCriterion("description not between", value1, value2, "description"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdIsNull() { |
|||
addCriterion("app_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdIsNotNull() { |
|||
addCriterion("app_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdEqualTo(String value) { |
|||
addCriterion("app_id =", value, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdNotEqualTo(String value) { |
|||
addCriterion("app_id <>", value, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdGreaterThan(String value) { |
|||
addCriterion("app_id >", value, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdGreaterThanOrEqualTo(String value) { |
|||
addCriterion("app_id >=", value, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdLessThan(String value) { |
|||
addCriterion("app_id <", value, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdLessThanOrEqualTo(String value) { |
|||
addCriterion("app_id <=", value, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdLike(String value) { |
|||
addCriterion("app_id like", value, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdNotLike(String value) { |
|||
addCriterion("app_id not like", value, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdIn(List<String> values) { |
|||
addCriterion("app_id in", values, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdNotIn(List<String> values) { |
|||
addCriterion("app_id not in", values, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdBetween(String value1, String value2) { |
|||
addCriterion("app_id between", value1, value2, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAppIdNotBetween(String value1, String value2) { |
|||
addCriterion("app_id not between", value1, value2, "appId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretIsNull() { |
|||
addCriterion("secret is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretIsNotNull() { |
|||
addCriterion("secret is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretEqualTo(String value) { |
|||
addCriterion("secret =", value, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretNotEqualTo(String value) { |
|||
addCriterion("secret <>", value, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretGreaterThan(String value) { |
|||
addCriterion("secret >", value, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretGreaterThanOrEqualTo(String value) { |
|||
addCriterion("secret >=", value, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretLessThan(String value) { |
|||
addCriterion("secret <", value, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretLessThanOrEqualTo(String value) { |
|||
addCriterion("secret <=", value, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretLike(String value) { |
|||
addCriterion("secret like", value, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretNotLike(String value) { |
|||
addCriterion("secret not like", value, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretIn(List<String> values) { |
|||
addCriterion("secret in", values, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretNotIn(List<String> values) { |
|||
addCriterion("secret not in", values, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretBetween(String value1, String value2) { |
|||
addCriterion("secret between", value1, value2, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSecretNotBetween(String value1, String value2) { |
|||
addCriterion("secret not between", value1, value2, "secret"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdIsNull() { |
|||
addCriterion("developer_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdIsNotNull() { |
|||
addCriterion("developer_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdEqualTo(String value) { |
|||
addCriterion("developer_id =", value, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdNotEqualTo(String value) { |
|||
addCriterion("developer_id <>", value, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdGreaterThan(String value) { |
|||
addCriterion("developer_id >", value, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdGreaterThanOrEqualTo(String value) { |
|||
addCriterion("developer_id >=", value, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdLessThan(String value) { |
|||
addCriterion("developer_id <", value, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdLessThanOrEqualTo(String value) { |
|||
addCriterion("developer_id <=", value, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdLike(String value) { |
|||
addCriterion("developer_id like", value, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdNotLike(String value) { |
|||
addCriterion("developer_id not like", value, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdIn(List<String> values) { |
|||
addCriterion("developer_id in", values, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdNotIn(List<String> values) { |
|||
addCriterion("developer_id not in", values, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdBetween(String value1, String value2) { |
|||
addCriterion("developer_id between", value1, value2, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeveloperIdNotBetween(String value1, String value2) { |
|||
addCriterion("developer_id not between", value1, value2, "developerId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNull() { |
|||
addCriterion("created_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNotNull() { |
|||
addCriterion("created_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtEqualTo(Date value) { |
|||
addCriterion("created_at =", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotEqualTo(Date value) { |
|||
addCriterion("created_at <>", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThan(Date value) { |
|||
addCriterion("created_at >", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("created_at >=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThan(Date value) { |
|||
addCriterion("created_at <", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("created_at <=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIn(List<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> values) { |
|||
addCriterion("created_at not in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("created_at between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("created_at not between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNull() { |
|||
addCriterion("updated_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNotNull() { |
|||
addCriterion("updated_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtEqualTo(Date value) { |
|||
addCriterion("updated_at =", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotEqualTo(Date value) { |
|||
addCriterion("updated_at <>", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThan(Date value) { |
|||
addCriterion("updated_at >", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at >=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThan(Date value) { |
|||
addCriterion("updated_at <", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at <=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIn(List<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> values) { |
|||
addCriterion("updated_at not in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNull() { |
|||
addCriterion("rec_status is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNotNull() { |
|||
addCriterion("rec_status is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusEqualTo(Byte value) { |
|||
addCriterion("rec_status =", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotEqualTo(Byte value) { |
|||
addCriterion("rec_status <>", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThan(Byte value) { |
|||
addCriterion("rec_status >", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status >=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThan(Byte value) { |
|||
addCriterion("rec_status <", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status <=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIn(List<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> values) { |
|||
addCriterion("rec_status not in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status not between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
} |
|||
|
|||
public static class Criteria extends GeneratedCriteria { |
|||
|
|||
protected Criteria() { |
|||
super(); |
|||
} |
|||
} |
|||
|
|||
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); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,95 @@ |
|||
package com.ccsens.ptos_tall.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class WxOfficialUser implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long officialId; |
|||
|
|||
private Long userId; |
|||
|
|||
private Byte attentionStatus; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getOfficialId() { |
|||
return officialId; |
|||
} |
|||
|
|||
public void setOfficialId(Long officialId) { |
|||
this.officialId = officialId; |
|||
} |
|||
|
|||
public Long getUserId() { |
|||
return userId; |
|||
} |
|||
|
|||
public void setUserId(Long userId) { |
|||
this.userId = userId; |
|||
} |
|||
|
|||
public Byte getAttentionStatus() { |
|||
return attentionStatus; |
|||
} |
|||
|
|||
public void setAttentionStatus(Byte attentionStatus) { |
|||
this.attentionStatus = attentionStatus; |
|||
} |
|||
|
|||
public Date getCreatedAt() { |
|||
return createdAt; |
|||
} |
|||
|
|||
public void setCreatedAt(Date createdAt) { |
|||
this.createdAt = createdAt; |
|||
} |
|||
|
|||
public Date getUpdatedAt() { |
|||
return updatedAt; |
|||
} |
|||
|
|||
public void setUpdatedAt(Date updatedAt) { |
|||
this.updatedAt = updatedAt; |
|||
} |
|||
|
|||
public Byte getRecStatus() { |
|||
return recStatus; |
|||
} |
|||
|
|||
public void setRecStatus(Byte recStatus) { |
|||
this.recStatus = recStatus; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", officialId=").append(officialId); |
|||
sb.append(", userId=").append(userId); |
|||
sb.append(", attentionStatus=").append(attentionStatus); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,621 @@ |
|||
package com.ccsens.ptos_tall.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class WxOfficialUserExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public WxOfficialUserExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
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(Long value) { |
|||
addCriterion("id =", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotEqualTo(Long value) { |
|||
addCriterion("id <>", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThan(Long value) { |
|||
addCriterion("id >", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("id >=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThan(Long value) { |
|||
addCriterion("id <", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("id <=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIn(List<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> values) { |
|||
addCriterion("id not in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdBetween(Long value1, Long value2) { |
|||
addCriterion("id between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("id not between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdIsNull() { |
|||
addCriterion("official_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdIsNotNull() { |
|||
addCriterion("official_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdEqualTo(Long value) { |
|||
addCriterion("official_id =", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdNotEqualTo(Long value) { |
|||
addCriterion("official_id <>", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdGreaterThan(Long value) { |
|||
addCriterion("official_id >", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("official_id >=", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdLessThan(Long value) { |
|||
addCriterion("official_id <", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("official_id <=", value, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdIn(List<Long> values) { |
|||
addCriterion("official_id in", values, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdNotIn(List<Long> values) { |
|||
addCriterion("official_id not in", values, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdBetween(Long value1, Long value2) { |
|||
addCriterion("official_id between", value1, value2, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOfficialIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("official_id not between", value1, value2, "officialId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdIsNull() { |
|||
addCriterion("user_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdIsNotNull() { |
|||
addCriterion("user_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdEqualTo(Long value) { |
|||
addCriterion("user_id =", value, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdNotEqualTo(Long value) { |
|||
addCriterion("user_id <>", value, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdGreaterThan(Long value) { |
|||
addCriterion("user_id >", value, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("user_id >=", value, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdLessThan(Long value) { |
|||
addCriterion("user_id <", value, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("user_id <=", value, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdIn(List<Long> values) { |
|||
addCriterion("user_id in", values, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdNotIn(List<Long> values) { |
|||
addCriterion("user_id not in", values, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdBetween(Long value1, Long value2) { |
|||
addCriterion("user_id between", value1, value2, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("user_id not between", value1, value2, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusIsNull() { |
|||
addCriterion("attention_status is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusIsNotNull() { |
|||
addCriterion("attention_status is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusEqualTo(Byte value) { |
|||
addCriterion("attention_status =", value, "attentionStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusNotEqualTo(Byte value) { |
|||
addCriterion("attention_status <>", value, "attentionStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusGreaterThan(Byte value) { |
|||
addCriterion("attention_status >", value, "attentionStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("attention_status >=", value, "attentionStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusLessThan(Byte value) { |
|||
addCriterion("attention_status <", value, "attentionStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusLessThanOrEqualTo(Byte value) { |
|||
addCriterion("attention_status <=", value, "attentionStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusIn(List<Byte> values) { |
|||
addCriterion("attention_status in", values, "attentionStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusNotIn(List<Byte> values) { |
|||
addCriterion("attention_status not in", values, "attentionStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusBetween(Byte value1, Byte value2) { |
|||
addCriterion("attention_status between", value1, value2, "attentionStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAttentionStatusNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("attention_status not between", value1, value2, "attentionStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNull() { |
|||
addCriterion("created_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNotNull() { |
|||
addCriterion("created_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtEqualTo(Date value) { |
|||
addCriterion("created_at =", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotEqualTo(Date value) { |
|||
addCriterion("created_at <>", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThan(Date value) { |
|||
addCriterion("created_at >", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("created_at >=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThan(Date value) { |
|||
addCriterion("created_at <", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("created_at <=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIn(List<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> values) { |
|||
addCriterion("created_at not in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("created_at between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("created_at not between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNull() { |
|||
addCriterion("updated_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNotNull() { |
|||
addCriterion("updated_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtEqualTo(Date value) { |
|||
addCriterion("updated_at =", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotEqualTo(Date value) { |
|||
addCriterion("updated_at <>", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThan(Date value) { |
|||
addCriterion("updated_at >", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at >=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThan(Date value) { |
|||
addCriterion("updated_at <", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at <=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIn(List<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> values) { |
|||
addCriterion("updated_at not in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNull() { |
|||
addCriterion("rec_status is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNotNull() { |
|||
addCriterion("rec_status is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusEqualTo(Byte value) { |
|||
addCriterion("rec_status =", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotEqualTo(Byte value) { |
|||
addCriterion("rec_status <>", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThan(Byte value) { |
|||
addCriterion("rec_status >", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status >=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThan(Byte value) { |
|||
addCriterion("rec_status <", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status <=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIn(List<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> values) { |
|||
addCriterion("rec_status not in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status not between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
} |
|||
|
|||
public static class Criteria extends GeneratedCriteria { |
|||
|
|||
protected Criteria() { |
|||
super(); |
|||
} |
|||
} |
|||
|
|||
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); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.ccsens.ptos_tall.persist.dao; |
|||
|
|||
import com.ccsens.ptos_tall.bean.po.WxOfficial; |
|||
import com.ccsens.ptos_tall.persist.mapper.WxOfficialMapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Repository |
|||
public interface WxOfficialDao extends WxOfficialMapper { |
|||
|
|||
/** |
|||
* 通过设备id查找关联的公众号信息 |
|||
* @param equipmentId 设备id |
|||
* @return 公众号信息 |
|||
*/ |
|||
WxOfficial getByEquipmentId(@Param("equipmentId") String equipmentId); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.ptos_tall.persist.mapper; |
|||
|
|||
import com.ccsens.ptos_tall.bean.po.WxEquipment; |
|||
import com.ccsens.ptos_tall.bean.po.WxEquipmentExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface WxEquipmentMapper { |
|||
long countByExample(WxEquipmentExample example); |
|||
|
|||
int deleteByExample(WxEquipmentExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(WxEquipment record); |
|||
|
|||
int insertSelective(WxEquipment record); |
|||
|
|||
List<WxEquipment> selectByExample(WxEquipmentExample example); |
|||
|
|||
WxEquipment selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") WxEquipment record, @Param("example") WxEquipmentExample example); |
|||
|
|||
int updateByExample(@Param("record") WxEquipment record, @Param("example") WxEquipmentExample example); |
|||
|
|||
int updateByPrimaryKeySelective(WxEquipment record); |
|||
|
|||
int updateByPrimaryKey(WxEquipment record); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.ptos_tall.persist.mapper; |
|||
|
|||
import com.ccsens.ptos_tall.bean.po.WxOfficial; |
|||
import com.ccsens.ptos_tall.bean.po.WxOfficialExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface WxOfficialMapper { |
|||
long countByExample(WxOfficialExample example); |
|||
|
|||
int deleteByExample(WxOfficialExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(WxOfficial record); |
|||
|
|||
int insertSelective(WxOfficial record); |
|||
|
|||
List<WxOfficial> selectByExample(WxOfficialExample example); |
|||
|
|||
WxOfficial selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") WxOfficial record, @Param("example") WxOfficialExample example); |
|||
|
|||
int updateByExample(@Param("record") WxOfficial record, @Param("example") WxOfficialExample example); |
|||
|
|||
int updateByPrimaryKeySelective(WxOfficial record); |
|||
|
|||
int updateByPrimaryKey(WxOfficial record); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.ptos_tall.persist.mapper; |
|||
|
|||
import com.ccsens.ptos_tall.bean.po.WxOfficialUser; |
|||
import com.ccsens.ptos_tall.bean.po.WxOfficialUserExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface WxOfficialUserMapper { |
|||
long countByExample(WxOfficialUserExample example); |
|||
|
|||
int deleteByExample(WxOfficialUserExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(WxOfficialUser record); |
|||
|
|||
int insertSelective(WxOfficialUser record); |
|||
|
|||
List<WxOfficialUser> selectByExample(WxOfficialUserExample example); |
|||
|
|||
WxOfficialUser selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") WxOfficialUser record, @Param("example") WxOfficialUserExample example); |
|||
|
|||
int updateByExample(@Param("record") WxOfficialUser record, @Param("example") WxOfficialUserExample example); |
|||
|
|||
int updateByPrimaryKeySelective(WxOfficialUser record); |
|||
|
|||
int updateByPrimaryKey(WxOfficialUser record); |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.ccsens.ptos_tall.service; |
|||
|
|||
import com.ccsens.ptos_tall.bean.vo.UserVo; |
|||
import com.ccsens.wechatutil.bean.dto.wxmini.NoticeDto; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
public interface IWxUserService { |
|||
/** |
|||
* 生成公众号关注二维码 |
|||
* @param equipmentId 设备id |
|||
* @param appId appId |
|||
* @param secret secret |
|||
* @return 返回二维码路径 |
|||
*/ |
|||
UserVo.AttentionOfficial createQrCode(String equipmentId, String appId, String secret); |
|||
|
|||
/** |
|||
* 关注公众号并登录 |
|||
* @param notice 微信返回的信息 |
|||
*/ |
|||
String officialLogin(NoticeDto.Notice notice); |
|||
|
|||
/** |
|||
* 通过eventKey获取用户信息 |
|||
* @param eventKey 二维码唯一key |
|||
* @return 返回用户信息 |
|||
*/ |
|||
UserVo.TokenBean getUserByEventKey(String eventKey); |
|||
|
|||
|
|||
} |
@ -0,0 +1,205 @@ |
|||
package com.ccsens.ptos_tall.service; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import cn.hutool.core.lang.Snowflake; |
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import cn.hutool.core.util.StrUtil; |
|||
import com.ccsens.ptos_tall.bean.po.*; |
|||
import com.ccsens.ptos_tall.bean.vo.UserVo; |
|||
import com.ccsens.ptos_tall.persist.dao.SysAuthDao; |
|||
import com.ccsens.ptos_tall.persist.dao.SysUserDao; |
|||
import com.ccsens.ptos_tall.persist.dao.WxOfficialDao; |
|||
import com.ccsens.ptos_tall.persist.mapper.WxOfficialUserMapper; |
|||
import com.ccsens.ptos_tall.util.PtOsConstant; |
|||
import com.ccsens.util.RedisKeyManager; |
|||
import com.ccsens.util.RedisUtil; |
|||
import com.ccsens.wechatutil.bean.dto.wxmini.NoticeDto; |
|||
import com.ccsens.wechatutil.bean.dto.wxofficial.WxQrCodeDto; |
|||
import com.ccsens.wechatutil.bean.vo.wxofficial.WxQrCodeVo; |
|||
import com.ccsens.wechatutil.wxofficial.OfficialQrCodeUtil; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Propagation; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
import java.util.UUID; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) |
|||
public class WxUserService implements IWxUserService { |
|||
|
|||
@Resource |
|||
private Snowflake snowflake; |
|||
@Resource |
|||
private SysUserDao sysUserDao; |
|||
@Resource |
|||
private SysAuthDao sysAuthDao; |
|||
@Resource |
|||
private IUserService userService; |
|||
@Resource |
|||
private WxOfficialDao wxOfficialDao; |
|||
@Resource |
|||
private WxOfficialUserMapper wxOfficialUserMapper; |
|||
@Resource |
|||
private RedisUtil redisUtil; |
|||
|
|||
@Override |
|||
public UserVo.AttentionOfficial createQrCode(String equipmentId, String appId, String secret) { |
|||
//如果设备id不为空则查找设备对应的公众号的信息
|
|||
if(StrUtil.isNotBlank(equipmentId)){ |
|||
//通过设备id查找公众号信息
|
|||
WxOfficial wxOfficial = wxOfficialDao.getByEquipmentId(equipmentId); |
|||
if(ObjectUtil.isNotNull(wxOfficial)){ |
|||
appId = wxOfficial.getAppId(); |
|||
secret = wxOfficial.getAppId(); |
|||
} |
|||
} |
|||
//如果appId和secret为空,使用默认的信息
|
|||
if(StrUtil.isBlank(appId) || StrUtil.isBlank(secret)){ |
|||
appId = PtOsConstant.DEFAULT_APP_ID; |
|||
secret = PtOsConstant.DEFAULT_SECRET; |
|||
} |
|||
//生成二维码
|
|||
String eventKey = UUID.randomUUID().toString(); |
|||
WxQrCodeVo.QrCodeUrl url = OfficialQrCodeUtil.send(new WxQrCodeDto.Create(7*24*60*60L, OfficialQrCodeUtil.QR_STR_SCENE, |
|||
null, eventKey), appId, secret); |
|||
String qrCodeUrl = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=" + url.getTicket(); |
|||
UserVo.AttentionOfficial attentionOfficial = new UserVo.AttentionOfficial(); |
|||
attentionOfficial.setQrCodeUrl(qrCodeUrl); |
|||
attentionOfficial.setEventKey(eventKey); |
|||
return attentionOfficial; |
|||
} |
|||
|
|||
@Override |
|||
public String officialLogin(NoticeDto.Notice notice) { |
|||
|
|||
log.info("接收公众号消息息通知:{}", notice); |
|||
if (notice== null) { |
|||
return "success"; |
|||
} |
|||
switch (notice.getEvent()) { |
|||
case "subscribe": |
|||
case "SCAN": |
|||
//用openId查找用户
|
|||
UserVo.UserSign userSign = sysUserDao.getUserByIdentifier(8,notice.getFromUserName()); |
|||
if(ObjectUtil.isNull(userSign)){ |
|||
userSign = new UserVo.UserSign(); |
|||
saveUser(notice, userSign); |
|||
} |
|||
//添加用户和公众号的关联关系
|
|||
saveOfficialsUser(notice, userSign); |
|||
//生成token
|
|||
UserVo.TokenBean tokenBean = userService.generateToken(userSign.getUserId(), userSign.getAuthId()); |
|||
tokenBean.setId(userSign.getUserId()); |
|||
tokenBean.setPhone(userSign.getPhone()); |
|||
tokenBean.setAvatarUrl(userSign.getAvatarUrl()); |
|||
//根据eventKey更新redis内的用户关注信息
|
|||
String key = PtOsConstant.OFFICIAL_EVENT_KEY + notice.getEventKey(); |
|||
long seconds = 60L * 100L; |
|||
redisUtil.set(key,tokenBean,seconds); |
|||
break; |
|||
case "unsubscribe": |
|||
//用openId查找用户
|
|||
UserVo.UserSign userSignOut = sysUserDao.getUserByIdentifier(8,notice.getFromUserName()); |
|||
if(ObjectUtil.isNotNull(userSignOut)){ |
|||
// //删除认证记录
|
|||
// SysAuth sysAuth = new SysAuth();
|
|||
// sysAuth.setId(userSignOut.getAuthId());
|
|||
// sysAuth.setRecStatus((byte) 2);
|
|||
// sysAuthDao.updateByPrimaryKeySelective(sysAuth);
|
|||
|
|||
//查找公众号信息
|
|||
WxOfficialExample wxOfficialExample = new WxOfficialExample(); |
|||
wxOfficialExample.createCriteria().andDeveloperIdEqualTo(notice.getToUserName()); |
|||
List<WxOfficial> wxOfficials = wxOfficialDao.selectByExample(wxOfficialExample); |
|||
if(CollectionUtil.isNotEmpty(wxOfficials)) { |
|||
//修改用户和公众号的关注状态
|
|||
WxOfficialUserExample officialUserExample = new WxOfficialUserExample(); |
|||
officialUserExample.createCriteria().andUserIdEqualTo(userSignOut.getUserId()).andOfficialIdEqualTo(wxOfficials.get(0).getId()); |
|||
List<WxOfficialUser> wxOfficialUsers = wxOfficialUserMapper.selectByExample(officialUserExample); |
|||
if(CollectionUtil.isNotEmpty(wxOfficialUsers)){ |
|||
//如果已有,修改关注状态
|
|||
WxOfficialUser wxOfficialUser = wxOfficialUsers.get(0); |
|||
wxOfficialUser.setAttentionStatus((byte) 0); |
|||
wxOfficialUserMapper.updateByPrimaryKeySelective(wxOfficialUser); |
|||
} |
|||
} |
|||
//删除token
|
|||
redisUtil.del(RedisKeyManager.getTokenCachedKey(userSignOut.getAuthId())); |
|||
} |
|||
//删除redis内的eventKey
|
|||
String delKey = PtOsConstant.OFFICIAL_EVENT_KEY + notice.getEventKey(); |
|||
redisUtil.del(delKey); |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
return "success"; |
|||
} |
|||
|
|||
@Override |
|||
public UserVo.TokenBean getUserByEventKey(String eventKey) { |
|||
UserVo.TokenBean tokenBean; |
|||
String key = PtOsConstant.OFFICIAL_EVENT_KEY + eventKey; |
|||
Object o = redisUtil.get(key); |
|||
if(ObjectUtil.isNull(o)){ |
|||
return null; |
|||
} |
|||
try { |
|||
tokenBean = (UserVo.TokenBean) o; |
|||
} catch (Exception e) { |
|||
return null; |
|||
} |
|||
return tokenBean; |
|||
} |
|||
|
|||
private void saveOfficialsUser(NoticeDto.Notice notice, UserVo.UserSign userSign) { |
|||
//查找公众号
|
|||
WxOfficialExample wxOfficialExample = new WxOfficialExample(); |
|||
wxOfficialExample.createCriteria().andDeveloperIdEqualTo(notice.getToUserName()); |
|||
List<WxOfficial> wxOfficials = wxOfficialDao.selectByExample(wxOfficialExample); |
|||
if(CollectionUtil.isNotEmpty(wxOfficials)){ |
|||
//查找用户和公众号的关联关系
|
|||
WxOfficialUserExample officialUserExample = new WxOfficialUserExample(); |
|||
officialUserExample.createCriteria().andUserIdEqualTo(userSign.getUserId()).andOfficialIdEqualTo(wxOfficials.get(0).getId()); |
|||
List<WxOfficialUser> wxOfficialUsers = wxOfficialUserMapper.selectByExample(officialUserExample); |
|||
if(CollectionUtil.isNotEmpty(wxOfficialUsers)){ |
|||
//如果已有,修改关注状态
|
|||
WxOfficialUser wxOfficialUser = wxOfficialUsers.get(0); |
|||
wxOfficialUser.setAttentionStatus((byte) 1); |
|||
wxOfficialUserMapper.updateByPrimaryKeySelective(wxOfficialUser); |
|||
}else { |
|||
//添加用户和公众号关联关系
|
|||
WxOfficialUser wxOfficialUser = new WxOfficialUser(); |
|||
wxOfficialUser.setId(snowflake.nextId()); |
|||
wxOfficialUser.setUserId(userSign.getUserId()); |
|||
wxOfficialUser.setOfficialId(wxOfficials.get(0).getId()); |
|||
wxOfficialUser.setAttentionStatus((byte) 1); |
|||
wxOfficialUserMapper.insertSelective(wxOfficialUser); |
|||
} |
|||
} |
|||
} |
|||
|
|||
private void saveUser(NoticeDto.Notice notice, UserVo.UserSign userSign) { |
|||
//添加新用户
|
|||
SysUser newUser = new SysUser(); |
|||
newUser.setId(snowflake.nextId()); |
|||
sysUserDao.insertSelective(newUser); |
|||
//添加认证方式
|
|||
SysAuth newAuth = new SysAuth(); |
|||
newAuth.setId(snowflake.nextId()); |
|||
newAuth.setUserId(newUser.getId()); |
|||
newAuth.setIdentifyType((byte) 8); |
|||
newAuth.setIdentifier(notice.getFromUserName()); |
|||
sysAuthDao.insertSelective(newAuth); |
|||
|
|||
userSign.setUserId(newUser.getId()); |
|||
userSign.setAuthId(newAuth.getId()); |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.dao.WxOfficialDao"> |
|||
|
|||
|
|||
<select id="getByEquipmentId" resultType="com.ccsens.ptos_tall.bean.po.WxOfficial"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
t_wx_official o, |
|||
t_wx_equipment e |
|||
WHERE |
|||
o.id = e.official_id |
|||
and o.rec_status = 0 |
|||
and e.rec_status = 0 |
|||
and e.id = #{equipmentId} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,243 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.mapper.WxEquipmentMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ptos_tall.bean.po.WxEquipment"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="official_id" jdbcType="BIGINT" property="officialId" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="description" jdbcType="VARCHAR" property="description" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, official_id, name, description, created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ptos_tall.bean.po.WxEquipmentExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_wx_equipment |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_wx_equipment |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_wx_equipment |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ptos_tall.bean.po.WxEquipmentExample"> |
|||
delete from t_wx_equipment |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ptos_tall.bean.po.WxEquipment"> |
|||
insert into t_wx_equipment (id, official_id, name, |
|||
description, created_at, updated_at, |
|||
rec_status) |
|||
values (#{id,jdbcType=BIGINT}, #{officialId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, |
|||
#{description,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
|||
#{recStatus,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ptos_tall.bean.po.WxEquipment"> |
|||
insert into t_wx_equipment |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="officialId != null"> |
|||
official_id, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="description != null"> |
|||
description, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="officialId != null"> |
|||
#{officialId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="description != null"> |
|||
#{description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.ptos_tall.bean.po.WxEquipmentExample" resultType="java.lang.Long"> |
|||
select count(*) from t_wx_equipment |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_wx_equipment |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.officialId != null"> |
|||
official_id = #{record.officialId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.description != null"> |
|||
description = #{record.description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_wx_equipment |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
official_id = #{record.officialId,jdbcType=BIGINT}, |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
description = #{record.description,jdbcType=VARCHAR}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptos_tall.bean.po.WxEquipment"> |
|||
update t_wx_equipment |
|||
<set> |
|||
<if test="officialId != null"> |
|||
official_id = #{officialId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="description != null"> |
|||
description = #{description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptos_tall.bean.po.WxEquipment"> |
|||
update t_wx_equipment |
|||
set official_id = #{officialId,jdbcType=BIGINT}, |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
description = #{description,jdbcType=VARCHAR}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,291 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.mapper.WxOfficialMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ptos_tall.bean.po.WxOfficial"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="code" jdbcType="VARCHAR" property="code" /> |
|||
<result column="description" jdbcType="VARCHAR" property="description" /> |
|||
<result column="app_id" jdbcType="VARCHAR" property="appId" /> |
|||
<result column="secret" jdbcType="VARCHAR" property="secret" /> |
|||
<result column="developer_id" jdbcType="VARCHAR" property="developerId" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, name, code, description, app_id, secret, developer_id, created_at, updated_at, |
|||
rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficialExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_wx_official |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_wx_official |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_wx_official |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficialExample"> |
|||
delete from t_wx_official |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficial"> |
|||
insert into t_wx_official (id, name, code, |
|||
description, app_id, secret, |
|||
developer_id, created_at, updated_at, |
|||
rec_status) |
|||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, |
|||
#{description,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, #{secret,jdbcType=VARCHAR}, |
|||
#{developerId,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
|||
#{recStatus,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficial"> |
|||
insert into t_wx_official |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="code != null"> |
|||
code, |
|||
</if> |
|||
<if test="description != null"> |
|||
description, |
|||
</if> |
|||
<if test="appId != null"> |
|||
app_id, |
|||
</if> |
|||
<if test="secret != null"> |
|||
secret, |
|||
</if> |
|||
<if test="developerId != null"> |
|||
developer_id, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="code != null"> |
|||
#{code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="description != null"> |
|||
#{description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="appId != null"> |
|||
#{appId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="secret != null"> |
|||
#{secret,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="developerId != null"> |
|||
#{developerId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficialExample" resultType="java.lang.Long"> |
|||
select count(*) from t_wx_official |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_wx_official |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.code != null"> |
|||
code = #{record.code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.description != null"> |
|||
description = #{record.description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.appId != null"> |
|||
app_id = #{record.appId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.secret != null"> |
|||
secret = #{record.secret,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.developerId != null"> |
|||
developer_id = #{record.developerId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_wx_official |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
code = #{record.code,jdbcType=VARCHAR}, |
|||
description = #{record.description,jdbcType=VARCHAR}, |
|||
app_id = #{record.appId,jdbcType=VARCHAR}, |
|||
secret = #{record.secret,jdbcType=VARCHAR}, |
|||
developer_id = #{record.developerId,jdbcType=VARCHAR}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficial"> |
|||
update t_wx_official |
|||
<set> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="code != null"> |
|||
code = #{code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="description != null"> |
|||
description = #{description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="appId != null"> |
|||
app_id = #{appId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="secret != null"> |
|||
secret = #{secret,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="developerId != null"> |
|||
developer_id = #{developerId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficial"> |
|||
update t_wx_official |
|||
set name = #{name,jdbcType=VARCHAR}, |
|||
code = #{code,jdbcType=VARCHAR}, |
|||
description = #{description,jdbcType=VARCHAR}, |
|||
app_id = #{appId,jdbcType=VARCHAR}, |
|||
secret = #{secret,jdbcType=VARCHAR}, |
|||
developer_id = #{developerId,jdbcType=VARCHAR}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,243 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.mapper.WxOfficialUserMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ptos_tall.bean.po.WxOfficialUser"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="official_id" jdbcType="BIGINT" property="officialId" /> |
|||
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
|||
<result column="attention_status" jdbcType="TINYINT" property="attentionStatus" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, official_id, user_id, attention_status, created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficialUserExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_wx_official_user |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_wx_official_user |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_wx_official_user |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficialUserExample"> |
|||
delete from t_wx_official_user |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficialUser"> |
|||
insert into t_wx_official_user (id, official_id, user_id, |
|||
attention_status, created_at, updated_at, |
|||
rec_status) |
|||
values (#{id,jdbcType=BIGINT}, #{officialId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, |
|||
#{attentionStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
|||
#{recStatus,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficialUser"> |
|||
insert into t_wx_official_user |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="officialId != null"> |
|||
official_id, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id, |
|||
</if> |
|||
<if test="attentionStatus != null"> |
|||
attention_status, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="officialId != null"> |
|||
#{officialId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
#{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="attentionStatus != null"> |
|||
#{attentionStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficialUserExample" resultType="java.lang.Long"> |
|||
select count(*) from t_wx_official_user |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_wx_official_user |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.officialId != null"> |
|||
official_id = #{record.officialId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.userId != null"> |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.attentionStatus != null"> |
|||
attention_status = #{record.attentionStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_wx_official_user |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
official_id = #{record.officialId,jdbcType=BIGINT}, |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
attention_status = #{record.attentionStatus,jdbcType=TINYINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficialUser"> |
|||
update t_wx_official_user |
|||
<set> |
|||
<if test="officialId != null"> |
|||
official_id = #{officialId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="attentionStatus != null"> |
|||
attention_status = #{attentionStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptos_tall.bean.po.WxOfficialUser"> |
|||
update t_wx_official_user |
|||
set official_id = #{officialId,jdbcType=BIGINT}, |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
attention_status = #{attentionStatus,jdbcType=TINYINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
Loading…
Reference in new issue