From 47f531bec8bda0ccd8105ee41d4626ad147ae21c Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Tue, 15 Mar 2022 16:37:15 +0800 Subject: [PATCH] =?UTF-8?q?20220315=E6=B7=BB=E5=8A=A0=E5=85=AC=E4=BC=97?= =?UTF-8?q?=E5=8F=B7=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ptos_tall/api/BusinessController.java | 12 + .../ptos_tall/api/WxUserController.java | 91 ++ .../ptos_tall/bean/dto/BusinessDto.java | 7 + .../ccsens/ptos_tall/bean/dto/ProjectDto.java | 2 + .../ccsens/ptos_tall/bean/po/WxEquipment.java | 95 ++ .../ptos_tall/bean/po/WxEquipmentExample.java | 641 +++++++++++++ .../ccsens/ptos_tall/bean/po/WxOfficial.java | 128 +++ .../ptos_tall/bean/po/WxOfficialExample.java | 861 ++++++++++++++++++ .../ptos_tall/bean/po/WxOfficialUser.java | 95 ++ .../bean/po/WxOfficialUserExample.java | 621 +++++++++++++ .../com/ccsens/ptos_tall/bean/vo/UserVo.java | 13 + .../persist/dao/BusinessPluginDao.java | 2 + .../ptos_tall/persist/dao/SysUserDao.java | 9 + .../ptos_tall/persist/dao/WxOfficialDao.java | 20 + .../persist/mapper/WxEquipmentMapper.java | 30 + .../persist/mapper/WxOfficialMapper.java | 30 + .../persist/mapper/WxOfficialUserMapper.java | 30 + .../ptos_tall/service/BusinessService.java | 6 + .../ptos_tall/service/IBusinessService.java | 7 + .../ptos_tall/service/IWxUserService.java | 33 + .../ptos_tall/service/ProjectService.java | 49 +- .../ptos_tall/service/WxUserService.java | 205 +++++ .../ccsens/ptos_tall/util/PtOsConstant.java | 7 + .../mapper_dao/BusinessPluginDao.xml | 15 + .../main/resources/mapper_dao/SysUserDao.xml | 24 + .../resources/mapper_dao/WxOfficialDao.xml | 18 + .../mapper_raw/WxEquipmentMapper.xml | 243 +++++ .../resources/mapper_raw/WxOfficialMapper.xml | 291 ++++++ .../mapper_raw/WxOfficialUserMapper.xml | 243 +++++ .../wechatutil/bean/dto/wxmini/NoticeDto.java | 1 + 30 files changed, 3807 insertions(+), 22 deletions(-) create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/api/WxUserController.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxEquipment.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxEquipmentExample.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficial.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialExample.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialUser.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialUserExample.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/WxOfficialDao.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxEquipmentMapper.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxOfficialMapper.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxOfficialUserMapper.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IWxUserService.java create mode 100644 ptos_tall/src/main/java/com/ccsens/ptos_tall/service/WxUserService.java create mode 100644 ptos_tall/src/main/resources/mapper_dao/WxOfficialDao.xml create mode 100644 ptos_tall/src/main/resources/mapper_raw/WxEquipmentMapper.xml create mode 100644 ptos_tall/src/main/resources/mapper_raw/WxOfficialMapper.xml create mode 100644 ptos_tall/src/main/resources/mapper_raw/WxOfficialUserMapper.xml diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/BusinessController.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/BusinessController.java index e5ffcec..f2217c7 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/BusinessController.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/BusinessController.java @@ -51,6 +51,18 @@ public class BusinessController { return JsonResponse.newInstance().ok(businessInfoList); } + @ApiOperation(value = "根据businessPluginId查询插件在域内的config信息", notes = "只查在线、启用且开放的业务,不包括零号业务") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/byBusinessPluginId", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse queryByBusinessPluginId(@ApiParam @Validated @RequestBody QueryDto businessPluginId) throws Exception{ + log.info("根据businessPluginId查询插件在域内的config信息"); + BusinessVo.BusinessPluginConfig businessPluginConfig = businessService.queryByBusinessPluginId(businessPluginId.getParam().getId()); + log.info("返回插件在域内的config信息"); + return JsonResponse.newInstance().ok(businessPluginConfig); + } + + @MustLogin @ApiOperation(value = "导入时查找域内的业务列表", notes = "只查在线、启用且开放的业务,不包括零号业务") diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/WxUserController.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/WxUserController.java new file mode 100644 index 0000000..e2c77de --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/WxUserController.java @@ -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 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 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()); + } + +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/BusinessDto.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/BusinessDto.java index aaa33e3..8e6ef03 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/BusinessDto.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/BusinessDto.java @@ -20,4 +20,11 @@ public class BusinessDto { private String secret; } + @Data + @ApiModel("根据域插件id查找插件配置") + public static class BusinessPluginId{ + @ApiModelProperty("域插件关联id") + private Long id; + } + } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/ProjectDto.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/ProjectDto.java index f092f49..ee5a594 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/ProjectDto.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/ProjectDto.java @@ -22,6 +22,8 @@ public class ProjectDto { @NotNull(message = "结束时间不能为空") @ApiModelProperty("结束时间") private Long endTime; + @ApiModelProperty("服务code") + private List codes; } @Data diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxEquipment.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxEquipment.java new file mode 100644 index 0000000..8b4969a --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxEquipment.java @@ -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(); + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxEquipmentExample.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxEquipmentExample.java new file mode 100644 index 0000000..ee92e7c --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxEquipmentExample.java @@ -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 oredCriteria; + + public WxEquipmentExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("official_id in", values, "officialId"); + return (Criteria) this; + } + + public Criteria andOfficialIdNotIn(List 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 values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List 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 values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List 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 values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List 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 values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List 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 values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficial.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficial.java new file mode 100644 index 0000000..9d0a1c0 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficial.java @@ -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(); + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialExample.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialExample.java new file mode 100644 index 0000000..e6d9853 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialExample.java @@ -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 oredCriteria; + + public WxOfficialExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List 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 values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List 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 values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List 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 values) { + addCriterion("app_id in", values, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdNotIn(List 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 values) { + addCriterion("secret in", values, "secret"); + return (Criteria) this; + } + + public Criteria andSecretNotIn(List 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 values) { + addCriterion("developer_id in", values, "developerId"); + return (Criteria) this; + } + + public Criteria andDeveloperIdNotIn(List 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 values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List 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 values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List 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 values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialUser.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialUser.java new file mode 100644 index 0000000..bf746d4 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialUser.java @@ -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(); + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialUserExample.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialUserExample.java new file mode 100644 index 0000000..3295af6 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/WxOfficialUserExample.java @@ -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 oredCriteria; + + public WxOfficialUserExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("official_id in", values, "officialId"); + return (Criteria) this; + } + + public Criteria andOfficialIdNotIn(List 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 values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List 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 values) { + addCriterion("attention_status in", values, "attentionStatus"); + return (Criteria) this; + } + + public Criteria andAttentionStatusNotIn(List 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 values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List 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 values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List 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 values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/vo/UserVo.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/vo/UserVo.java index 91f4471..ebe6478 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/vo/UserVo.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/vo/UserVo.java @@ -17,6 +17,8 @@ public class UserVo { private Long id; @ApiModelProperty("手机号") private String phone; + @ApiModelProperty("头像") + private String avatarUrl; @ApiModelProperty("token") private String token; @ApiModelProperty("刷新token") @@ -38,6 +40,8 @@ public class UserVo { public static class UserSign{ private Long userId; private Long authId; + private String phone; + private String avatarUrl; } @Data @@ -79,4 +83,13 @@ public class UserVo { private String refreshToken; } + @Data + @ApiModel("生成关注公众号二维码") + public static class AttentionOfficial{ + @ApiModelProperty("二维码路径") + private String qrCodeUrl; + @ApiModelProperty("eventKey") + private String eventKey; + } + } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/BusinessPluginDao.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/BusinessPluginDao.java index fa73912..46c02c5 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/BusinessPluginDao.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/BusinessPluginDao.java @@ -27,4 +27,6 @@ public interface BusinessPluginDao { List queryBusinessPlugin(); + + BusinessVo.BusinessPluginConfig queryByBusinessPluginId(@Param("businessPluginId")Long businessPluginId); } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/SysUserDao.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/SysUserDao.java index a626208..f7d3c31 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/SysUserDao.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/SysUserDao.java @@ -1,6 +1,7 @@ package com.ccsens.ptos_tall.persist.dao; import com.ccsens.ptos_tall.bean.po.SysUser; +import com.ccsens.ptos_tall.bean.vo.UserVo; import com.ccsens.ptos_tall.persist.mapper.SysUserMapper; import org.apache.ibatis.annotations.Param; @@ -23,4 +24,12 @@ public interface SysUserDao extends SysUserMapper { * @return userId列表 */ List getUserIdByPhone(@Param("phoneList") List phoneList); + + /** + * 根据identifier获取用户信息 + * @param identifyType 认证类型 + * @param identifier 用户标识 + * @return 返回用户信息 + */ + UserVo.UserSign getUserByIdentifier(@Param("identifyType") int identifyType,@Param("identifier") String identifier); } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/WxOfficialDao.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/WxOfficialDao.java new file mode 100644 index 0000000..d4fae0e --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/WxOfficialDao.java @@ -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); +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxEquipmentMapper.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxEquipmentMapper.java new file mode 100644 index 0000000..e487f20 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxEquipmentMapper.java @@ -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 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); +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxOfficialMapper.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxOfficialMapper.java new file mode 100644 index 0000000..5818722 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxOfficialMapper.java @@ -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 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); +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxOfficialUserMapper.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxOfficialUserMapper.java new file mode 100644 index 0000000..c20bf72 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/WxOfficialUserMapper.java @@ -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 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); +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/BusinessService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/BusinessService.java index 4712588..3c6adfd 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/BusinessService.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/BusinessService.java @@ -163,4 +163,10 @@ public class BusinessService implements IBusinessService { public List queryBusinessPlugin() { return businessPluginDao.queryBusinessPlugin(); } + + @Override + public BusinessVo.BusinessPluginConfig queryByBusinessPluginId(Long businessPluginId) { + + return businessPluginDao.queryByBusinessPluginId(businessPluginId); + } } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IBusinessService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IBusinessService.java index 49b94a7..9fec2f0 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IBusinessService.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IBusinessService.java @@ -45,4 +45,11 @@ public interface IBusinessService { * @return */ List queryBusinessPlugin(); + + /** + * 通过businessPluginId查找config信息 + * @param businessPluginId 域插件关联id + * @return 返回插件在域内的信息 + */ + BusinessVo.BusinessPluginConfig queryByBusinessPluginId(Long businessPluginId); } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IWxUserService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IWxUserService.java new file mode 100644 index 0000000..3b003b4 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IWxUserService.java @@ -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); + + +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java index 977a81f..dc74293 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java @@ -52,29 +52,30 @@ public class ProjectService implements IProjectService { @Override public List queryProjectByUser(String token,String phone, ProjectDto.QueryProjectDto param) { List projectInfoList = new ArrayList<>(); - - //访问传达室,请求该用户在其他域的项目信息 - FeignProjectDto.QueryProjectByPhone queryProjectByPhone = new FeignProjectDto.QueryProjectByPhone(); - queryProjectByPhone.setStartTime(param.getStartTime()); - queryProjectByPhone.setEndTime(param.getEndTime()); - queryProjectByPhone.setPhone(new ArrayList<>(Collections.singleton(phone))); - try { - JsonResponse> response = diplomatistFeignClient.queryDomainProject(queryProjectByPhone); - - if (response != null && response.getCode().equals(PtOsCodeError.SUCCESS.getCode())) { - if(CollectionUtil.isNotEmpty(response.getData())){ - response.getData().forEach(project -> { - ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(); - BeanUtil.copyProperties(project,projectInfo); - projectInfoList.add(projectInfo); - }); + if(CollectionUtil.isEmpty(param.getCodes())) { + //访问传达室,请求该用户在其他域的项目信息 + FeignProjectDto.QueryProjectByPhone queryProjectByPhone = new FeignProjectDto.QueryProjectByPhone(); + queryProjectByPhone.setStartTime(param.getStartTime()); + queryProjectByPhone.setEndTime(param.getEndTime()); + queryProjectByPhone.setPhone(new ArrayList<>(Collections.singleton(phone))); + try { + JsonResponse> response = diplomatistFeignClient.queryDomainProject(queryProjectByPhone); + + if (response != null && response.getCode().equals(PtOsCodeError.SUCCESS.getCode())) { + if (CollectionUtil.isNotEmpty(response.getData())) { + response.getData().forEach(project -> { + ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(); + BeanUtil.copyProperties(project, projectInfo); + projectInfoList.add(projectInfo); + }); + } } + } catch (Exception e) { + log.error("查询其他域项目信息异常" + e); } - }catch (Exception e){ - log.error("查询其他域项目信息异常"+e); } //查询本域的项目信息 - queryBusinessProject(token, projectInfoList,param.getStartTime(),param.getEndTime()); + queryBusinessProject(token, projectInfoList,param.getStartTime(),param.getEndTime(),param.getCodes()); //TODO 排序 return projectInfoList; @@ -85,11 +86,15 @@ public class ProjectService implements IProjectService { * @param token token * @param projectInfoList 项目列表 */ - private void queryBusinessProject(String token, List projectInfoList,Long startTime,Long endTime) { + private void queryBusinessProject(String token, List projectInfoList,Long startTime,Long endTime,List codes) { //查询本域所有在线的业务信息 Long lastAnswerTime = System.currentTimeMillis() - PtOsConstant.LAST_ANSWER_TIME; OpenBusinessExample businessExample = new OpenBusinessExample(); - businessExample.createCriteria().andLastAnswerTimeGreaterThanOrEqualTo(lastAnswerTime).andTypeEqualTo((byte) 0); + if(CollectionUtil.isEmpty(codes)) { + businessExample.createCriteria().andLastAnswerTimeGreaterThanOrEqualTo(lastAnswerTime).andTypeEqualTo((byte) 0); + }else { + businessExample.createCriteria().andLastAnswerTimeGreaterThanOrEqualTo(lastAnswerTime).andTypeEqualTo((byte) 0).andCodeIn(codes); + } List openBusinessList = businessMapper.selectByExample(businessExample); //遍历业务 if(CollectionUtil.isNotEmpty(openBusinessList)){ @@ -144,7 +149,7 @@ public class ProjectService implements IProjectService { theMap.put("authId", String.valueOf(sysAuth.getId())); UserVo.TokenBean tokenBean = userService.generateToken(sysAuth.getUserId(), sysAuth.getId()); //查找所有在线的业务的项目 - queryBusinessProject(tokenBean.getToken(),projectInfos,param.getStartTime(),param.getEndTime()); + queryBusinessProject(tokenBean.getToken(),projectInfos,param.getStartTime(),param.getEndTime(),null); return projectInfos; } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/WxUserService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/WxUserService.java new file mode 100644 index 0000000..cddc81f --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/WxUserService.java @@ -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 wxOfficials = wxOfficialDao.selectByExample(wxOfficialExample); + if(CollectionUtil.isNotEmpty(wxOfficials)) { + //修改用户和公众号的关注状态 + WxOfficialUserExample officialUserExample = new WxOfficialUserExample(); + officialUserExample.createCriteria().andUserIdEqualTo(userSignOut.getUserId()).andOfficialIdEqualTo(wxOfficials.get(0).getId()); + List 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 wxOfficials = wxOfficialDao.selectByExample(wxOfficialExample); + if(CollectionUtil.isNotEmpty(wxOfficials)){ + //查找用户和公众号的关联关系 + WxOfficialUserExample officialUserExample = new WxOfficialUserExample(); + officialUserExample.createCriteria().andUserIdEqualTo(userSign.getUserId()).andOfficialIdEqualTo(wxOfficials.get(0).getId()); + List 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()); + } +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsConstant.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsConstant.java index 4922a36..216ce0a 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsConstant.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsConstant.java @@ -17,6 +17,13 @@ public class PtOsConstant { /**是否发送验证码 0不发送 1发送*/ public static final String SMS_CODE = "1"; + /**公众号登录的eventKey*/ + public static final String OFFICIAL_EVENT_KEY = "Official_"; + /**默认公众号appId*/ + public static final String DEFAULT_APP_ID = "wxb3be21dcd7912555"; + /**默认公众号secret*/ + public static final String DEFAULT_SECRET = "9213776254878a8065f1a29d1f58a02c"; + /**图片类型*/ public static final String FILE_TYPE_IMG = "bmp,jpg,jpeg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp"; /**文档类型*/ diff --git a/ptos_tall/src/main/resources/mapper_dao/BusinessPluginDao.xml b/ptos_tall/src/main/resources/mapper_dao/BusinessPluginDao.xml index 0bfc612..cf5da24 100644 --- a/ptos_tall/src/main/resources/mapper_dao/BusinessPluginDao.xml +++ b/ptos_tall/src/main/resources/mapper_dao/BusinessPluginDao.xml @@ -82,4 +82,19 @@ and b.start_using = 1 and b.rec_status = 0 + + + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_dao/SysUserDao.xml b/ptos_tall/src/main/resources/mapper_dao/SysUserDao.xml index 480880b..a24f012 100644 --- a/ptos_tall/src/main/resources/mapper_dao/SysUserDao.xml +++ b/ptos_tall/src/main/resources/mapper_dao/SysUserDao.xml @@ -26,4 +26,28 @@ #{item} + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_dao/WxOfficialDao.xml b/ptos_tall/src/main/resources/mapper_dao/WxOfficialDao.xml new file mode 100644 index 0000000..410e12c --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_dao/WxOfficialDao.xml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_raw/WxEquipmentMapper.xml b/ptos_tall/src/main/resources/mapper_raw/WxEquipmentMapper.xml new file mode 100644 index 0000000..644ae3a --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_raw/WxEquipmentMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, official_id, name, description, created_at, updated_at, rec_status + + + + + delete from t_wx_equipment + where id = #{id,jdbcType=BIGINT} + + + delete from t_wx_equipment + + + + + + 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 into t_wx_equipment + + + id, + + + official_id, + + + name, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{officialId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_wx_equipment + + + 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}, + + + + + + + + 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} + + + + + + update t_wx_equipment + + + 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 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} + + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_raw/WxOfficialMapper.xml b/ptos_tall/src/main/resources/mapper_raw/WxOfficialMapper.xml new file mode 100644 index 0000000..82f4c31 --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_raw/WxOfficialMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, code, description, app_id, secret, developer_id, created_at, updated_at, + rec_status + + + + + delete from t_wx_official + where id = #{id,jdbcType=BIGINT} + + + delete from t_wx_official + + + + + + 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 into t_wx_official + + + id, + + + name, + + + code, + + + description, + + + app_id, + + + secret, + + + developer_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{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}, + + + + + + update t_wx_official + + + 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}, + + + + + + + + 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} + + + + + + update t_wx_official + + + 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 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} + + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_raw/WxOfficialUserMapper.xml b/ptos_tall/src/main/resources/mapper_raw/WxOfficialUserMapper.xml new file mode 100644 index 0000000..99dd776 --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_raw/WxOfficialUserMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, official_id, user_id, attention_status, created_at, updated_at, rec_status + + + + + delete from t_wx_official_user + where id = #{id,jdbcType=BIGINT} + + + delete from t_wx_official_user + + + + + + 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 into t_wx_official_user + + + id, + + + official_id, + + + user_id, + + + attention_status, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{officialId,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{attentionStatus,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_wx_official_user + + + 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}, + + + + + + + + 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} + + + + + + update t_wx_official_user + + + 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 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} + + \ No newline at end of file diff --git a/wechatutil/src/main/java/com/ccsens/wechatutil/bean/dto/wxmini/NoticeDto.java b/wechatutil/src/main/java/com/ccsens/wechatutil/bean/dto/wxmini/NoticeDto.java index dcb275f..722a228 100644 --- a/wechatutil/src/main/java/com/ccsens/wechatutil/bean/dto/wxmini/NoticeDto.java +++ b/wechatutil/src/main/java/com/ccsens/wechatutil/bean/dto/wxmini/NoticeDto.java @@ -21,6 +21,7 @@ public class NoticeDto { */ @Data public static class ValidMsg{ + //签名 @NotEmpty private String signature; @NotEmpty