From 049552a0b22d3a60c33d6fbcaa8842a9ddf6ba3d Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Wed, 26 Jan 2022 18:20:01 +0800 Subject: [PATCH] 20220126 --- pom.xml | 2 +- .../ccsens/ptos_zero/api/ZeroController.java | 11 +- .../com/ccsens/ptos_zero/bean/po/ProUser.java | 194 +++ .../ptos_zero/bean/po/ProUserExample.java | 1241 +++++++++++++++++ .../ptos_zero/persist/dao/ProProjectDao.java | 20 + .../ccsens/ptos_zero/persist/dao/UserDao.java | 15 + .../persist/mapper/ProUserMapper.java | 30 + .../ptos_zero/service/IZeroCommonService.java | 9 +- .../ptos_zero/service/ImportService.java | 26 +- .../ccsens/ptos_zero/service/TallService.java | 34 +- .../ptos_zero/service/ZeroCommonService.java | 29 +- .../com/ccsens/ptos_zero/util/Constant.java | 2 +- .../ccsens/ptos_zero/util/ZeroCodeError.java | 1 + src/main/resources/druid-dev.yml | 1 + .../resources/mapper_dao/ProProjectDao.xml | 29 + .../resources/mapper_dao/ProTaskPluginDao.xml | 1 + src/main/resources/mapper_dao/UserDao.xml | 16 + .../resources/mapper_raw/ProUserMapper.xml | 385 +++++ src/main/resources/mbg.xml | 55 +- 19 files changed, 2058 insertions(+), 43 deletions(-) create mode 100644 src/main/java/com/ccsens/ptos_zero/bean/po/ProUser.java create mode 100644 src/main/java/com/ccsens/ptos_zero/bean/po/ProUserExample.java create mode 100644 src/main/java/com/ccsens/ptos_zero/persist/dao/ProProjectDao.java create mode 100644 src/main/java/com/ccsens/ptos_zero/persist/dao/UserDao.java create mode 100644 src/main/java/com/ccsens/ptos_zero/persist/mapper/ProUserMapper.java create mode 100644 src/main/resources/mapper_dao/ProProjectDao.xml create mode 100644 src/main/resources/mapper_dao/UserDao.xml create mode 100644 src/main/resources/mapper_raw/ProUserMapper.xml diff --git a/pom.xml b/pom.xml index 20b67d4..10760f7 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.1.8.RELEASE com.ccsens diff --git a/src/main/java/com/ccsens/ptos_zero/api/ZeroController.java b/src/main/java/com/ccsens/ptos_zero/api/ZeroController.java index 6346c2f..89cc1af 100644 --- a/src/main/java/com/ccsens/ptos_zero/api/ZeroController.java +++ b/src/main/java/com/ccsens/ptos_zero/api/ZeroController.java @@ -20,10 +20,17 @@ public class ZeroController { @Resource private IZeroCommonService guideService; +// @ApiOperation(value = "查找引导页或广告页插件", notes = "") +// @RequestMapping(value = "/guide", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse queryPermanentGlobalTask(@RequestParam(required = true) Byte type) { +// Long pluginId = guideService.getGuidePlugin(type); +// return JsonResponse.newInstance().ok(pluginId); +// } + @ApiOperation(value = "查找引导页或广告页插件", notes = "") @RequestMapping(value = "/guide", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) - public JsonResponse queryPermanentGlobalTask(@RequestParam(required = true) Byte type) { - Long pluginId = guideService.getGuidePlugin(type); + public JsonResponse queryPermanentGlobalTask(@RequestParam(required = true) Byte type) { + String pluginId = guideService.getGuidePlugin(type); return JsonResponse.newInstance().ok(pluginId); } diff --git a/src/main/java/com/ccsens/ptos_zero/bean/po/ProUser.java b/src/main/java/com/ccsens/ptos_zero/bean/po/ProUser.java new file mode 100644 index 0000000..b9fbb3d --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/bean/po/ProUser.java @@ -0,0 +1,194 @@ +package com.ccsens.ptos_zero.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProUser implements Serializable { + private Long id; + + private String name; + + private Byte gender; + + private String avatarUrl; + + private String country; + + private String province; + + private String city; + + private String phone; + + private String idCard; + + private Byte power; + + private String deviceId; + + private Byte authType; + + private Long operator; + + 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 Byte getGender() { + return gender; + } + + public void setGender(Byte gender) { + this.gender = gender; + } + + public String getAvatarUrl() { + return avatarUrl; + } + + public void setAvatarUrl(String avatarUrl) { + this.avatarUrl = avatarUrl == null ? null : avatarUrl.trim(); + } + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country == null ? null : country.trim(); + } + + public String getProvince() { + return province; + } + + public void setProvince(String province) { + this.province = province == null ? null : province.trim(); + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city == null ? null : city.trim(); + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone == null ? null : phone.trim(); + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard == null ? null : idCard.trim(); + } + + public Byte getPower() { + return power; + } + + public void setPower(Byte power) { + this.power = power; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId == null ? null : deviceId.trim(); + } + + public Byte getAuthType() { + return authType; + } + + public void setAuthType(Byte authType) { + this.authType = authType; + } + + public Long getOperator() { + return operator; + } + + public void setOperator(Long operator) { + this.operator = operator; + } + + 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(", gender=").append(gender); + sb.append(", avatarUrl=").append(avatarUrl); + sb.append(", country=").append(country); + sb.append(", province=").append(province); + sb.append(", city=").append(city); + sb.append(", phone=").append(phone); + sb.append(", idCard=").append(idCard); + sb.append(", power=").append(power); + sb.append(", deviceId=").append(deviceId); + sb.append(", authType=").append(authType); + sb.append(", operator=").append(operator); + 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/src/main/java/com/ccsens/ptos_zero/bean/po/ProUserExample.java b/src/main/java/com/ccsens/ptos_zero/bean/po/ProUserExample.java new file mode 100644 index 0000000..7c3a3f6 --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/bean/po/ProUserExample.java @@ -0,0 +1,1241 @@ +package com.ccsens.ptos_zero.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProUserExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProUserExample() { + 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 andGenderIsNull() { + addCriterion("gender is null"); + return (Criteria) this; + } + + public Criteria andGenderIsNotNull() { + addCriterion("gender is not null"); + return (Criteria) this; + } + + public Criteria andGenderEqualTo(Byte value) { + addCriterion("gender =", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotEqualTo(Byte value) { + addCriterion("gender <>", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderGreaterThan(Byte value) { + addCriterion("gender >", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderGreaterThanOrEqualTo(Byte value) { + addCriterion("gender >=", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderLessThan(Byte value) { + addCriterion("gender <", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderLessThanOrEqualTo(Byte value) { + addCriterion("gender <=", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderIn(List values) { + addCriterion("gender in", values, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotIn(List values) { + addCriterion("gender not in", values, "gender"); + return (Criteria) this; + } + + public Criteria andGenderBetween(Byte value1, Byte value2) { + addCriterion("gender between", value1, value2, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotBetween(Byte value1, Byte value2) { + addCriterion("gender not between", value1, value2, "gender"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIsNull() { + addCriterion("avatar_url is null"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIsNotNull() { + addCriterion("avatar_url is not null"); + return (Criteria) this; + } + + public Criteria andAvatarUrlEqualTo(String value) { + addCriterion("avatar_url =", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotEqualTo(String value) { + addCriterion("avatar_url <>", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlGreaterThan(String value) { + addCriterion("avatar_url >", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlGreaterThanOrEqualTo(String value) { + addCriterion("avatar_url >=", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLessThan(String value) { + addCriterion("avatar_url <", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLessThanOrEqualTo(String value) { + addCriterion("avatar_url <=", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLike(String value) { + addCriterion("avatar_url like", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotLike(String value) { + addCriterion("avatar_url not like", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIn(List values) { + addCriterion("avatar_url in", values, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotIn(List values) { + addCriterion("avatar_url not in", values, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlBetween(String value1, String value2) { + addCriterion("avatar_url between", value1, value2, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotBetween(String value1, String value2) { + addCriterion("avatar_url not between", value1, value2, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andCountryIsNull() { + addCriterion("country is null"); + return (Criteria) this; + } + + public Criteria andCountryIsNotNull() { + addCriterion("country is not null"); + return (Criteria) this; + } + + public Criteria andCountryEqualTo(String value) { + addCriterion("country =", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotEqualTo(String value) { + addCriterion("country <>", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryGreaterThan(String value) { + addCriterion("country >", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryGreaterThanOrEqualTo(String value) { + addCriterion("country >=", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryLessThan(String value) { + addCriterion("country <", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryLessThanOrEqualTo(String value) { + addCriterion("country <=", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryLike(String value) { + addCriterion("country like", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotLike(String value) { + addCriterion("country not like", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryIn(List values) { + addCriterion("country in", values, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotIn(List values) { + addCriterion("country not in", values, "country"); + return (Criteria) this; + } + + public Criteria andCountryBetween(String value1, String value2) { + addCriterion("country between", value1, value2, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotBetween(String value1, String value2) { + addCriterion("country not between", value1, value2, "country"); + return (Criteria) this; + } + + public Criteria andProvinceIsNull() { + addCriterion("province is null"); + return (Criteria) this; + } + + public Criteria andProvinceIsNotNull() { + addCriterion("province is not null"); + return (Criteria) this; + } + + public Criteria andProvinceEqualTo(String value) { + addCriterion("province =", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotEqualTo(String value) { + addCriterion("province <>", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceGreaterThan(String value) { + addCriterion("province >", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceGreaterThanOrEqualTo(String value) { + addCriterion("province >=", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceLessThan(String value) { + addCriterion("province <", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceLessThanOrEqualTo(String value) { + addCriterion("province <=", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceLike(String value) { + addCriterion("province like", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotLike(String value) { + addCriterion("province not like", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceIn(List values) { + addCriterion("province in", values, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotIn(List values) { + addCriterion("province not in", values, "province"); + return (Criteria) this; + } + + public Criteria andProvinceBetween(String value1, String value2) { + addCriterion("province between", value1, value2, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotBetween(String value1, String value2) { + addCriterion("province not between", value1, value2, "province"); + return (Criteria) this; + } + + public Criteria andCityIsNull() { + addCriterion("city is null"); + return (Criteria) this; + } + + public Criteria andCityIsNotNull() { + addCriterion("city is not null"); + return (Criteria) this; + } + + public Criteria andCityEqualTo(String value) { + addCriterion("city =", value, "city"); + return (Criteria) this; + } + + public Criteria andCityNotEqualTo(String value) { + addCriterion("city <>", value, "city"); + return (Criteria) this; + } + + public Criteria andCityGreaterThan(String value) { + addCriterion("city >", value, "city"); + return (Criteria) this; + } + + public Criteria andCityGreaterThanOrEqualTo(String value) { + addCriterion("city >=", value, "city"); + return (Criteria) this; + } + + public Criteria andCityLessThan(String value) { + addCriterion("city <", value, "city"); + return (Criteria) this; + } + + public Criteria andCityLessThanOrEqualTo(String value) { + addCriterion("city <=", value, "city"); + return (Criteria) this; + } + + public Criteria andCityLike(String value) { + addCriterion("city like", value, "city"); + return (Criteria) this; + } + + public Criteria andCityNotLike(String value) { + addCriterion("city not like", value, "city"); + return (Criteria) this; + } + + public Criteria andCityIn(List values) { + addCriterion("city in", values, "city"); + return (Criteria) this; + } + + public Criteria andCityNotIn(List values) { + addCriterion("city not in", values, "city"); + return (Criteria) this; + } + + public Criteria andCityBetween(String value1, String value2) { + addCriterion("city between", value1, value2, "city"); + return (Criteria) this; + } + + public Criteria andCityNotBetween(String value1, String value2) { + addCriterion("city not between", value1, value2, "city"); + return (Criteria) this; + } + + public Criteria andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andIdCardIsNull() { + addCriterion("id_card is null"); + return (Criteria) this; + } + + public Criteria andIdCardIsNotNull() { + addCriterion("id_card is not null"); + return (Criteria) this; + } + + public Criteria andIdCardEqualTo(String value) { + addCriterion("id_card =", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotEqualTo(String value) { + addCriterion("id_card <>", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardGreaterThan(String value) { + addCriterion("id_card >", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardGreaterThanOrEqualTo(String value) { + addCriterion("id_card >=", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLessThan(String value) { + addCriterion("id_card <", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLessThanOrEqualTo(String value) { + addCriterion("id_card <=", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLike(String value) { + addCriterion("id_card like", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotLike(String value) { + addCriterion("id_card not like", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardIn(List values) { + addCriterion("id_card in", values, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotIn(List values) { + addCriterion("id_card not in", values, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardBetween(String value1, String value2) { + addCriterion("id_card between", value1, value2, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotBetween(String value1, String value2) { + addCriterion("id_card not between", value1, value2, "idCard"); + return (Criteria) this; + } + + public Criteria andPowerIsNull() { + addCriterion("power is null"); + return (Criteria) this; + } + + public Criteria andPowerIsNotNull() { + addCriterion("power is not null"); + return (Criteria) this; + } + + public Criteria andPowerEqualTo(Byte value) { + addCriterion("power =", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerNotEqualTo(Byte value) { + addCriterion("power <>", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerGreaterThan(Byte value) { + addCriterion("power >", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerGreaterThanOrEqualTo(Byte value) { + addCriterion("power >=", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerLessThan(Byte value) { + addCriterion("power <", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerLessThanOrEqualTo(Byte value) { + addCriterion("power <=", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerIn(List values) { + addCriterion("power in", values, "power"); + return (Criteria) this; + } + + public Criteria andPowerNotIn(List values) { + addCriterion("power not in", values, "power"); + return (Criteria) this; + } + + public Criteria andPowerBetween(Byte value1, Byte value2) { + addCriterion("power between", value1, value2, "power"); + return (Criteria) this; + } + + public Criteria andPowerNotBetween(Byte value1, Byte value2) { + addCriterion("power not between", value1, value2, "power"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNull() { + addCriterion("device_id is null"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNotNull() { + addCriterion("device_id is not null"); + return (Criteria) this; + } + + public Criteria andDeviceIdEqualTo(String value) { + addCriterion("device_id =", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotEqualTo(String value) { + addCriterion("device_id <>", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThan(String value) { + addCriterion("device_id >", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThanOrEqualTo(String value) { + addCriterion("device_id >=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThan(String value) { + addCriterion("device_id <", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThanOrEqualTo(String value) { + addCriterion("device_id <=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLike(String value) { + addCriterion("device_id like", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotLike(String value) { + addCriterion("device_id not like", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdIn(List values) { + addCriterion("device_id in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotIn(List values) { + addCriterion("device_id not in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdBetween(String value1, String value2) { + addCriterion("device_id between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotBetween(String value1, String value2) { + addCriterion("device_id not between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andAuthTypeIsNull() { + addCriterion("auth_type is null"); + return (Criteria) this; + } + + public Criteria andAuthTypeIsNotNull() { + addCriterion("auth_type is not null"); + return (Criteria) this; + } + + public Criteria andAuthTypeEqualTo(Byte value) { + addCriterion("auth_type =", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeNotEqualTo(Byte value) { + addCriterion("auth_type <>", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeGreaterThan(Byte value) { + addCriterion("auth_type >", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("auth_type >=", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeLessThan(Byte value) { + addCriterion("auth_type <", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeLessThanOrEqualTo(Byte value) { + addCriterion("auth_type <=", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeIn(List values) { + addCriterion("auth_type in", values, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeNotIn(List values) { + addCriterion("auth_type not in", values, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeBetween(Byte value1, Byte value2) { + addCriterion("auth_type between", value1, value2, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeNotBetween(Byte value1, Byte value2) { + addCriterion("auth_type not between", value1, value2, "authType"); + return (Criteria) this; + } + + public Criteria andOperatorIsNull() { + addCriterion("operator is null"); + return (Criteria) this; + } + + public Criteria andOperatorIsNotNull() { + addCriterion("operator is not null"); + return (Criteria) this; + } + + public Criteria andOperatorEqualTo(Long value) { + addCriterion("operator =", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotEqualTo(Long value) { + addCriterion("operator <>", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThan(Long value) { + addCriterion("operator >", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThanOrEqualTo(Long value) { + addCriterion("operator >=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThan(Long value) { + addCriterion("operator <", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThanOrEqualTo(Long value) { + addCriterion("operator <=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorIn(List values) { + addCriterion("operator in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotIn(List values) { + addCriterion("operator not in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorBetween(Long value1, Long value2) { + addCriterion("operator between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotBetween(Long value1, Long value2) { + addCriterion("operator not between", value1, value2, "operator"); + 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/src/main/java/com/ccsens/ptos_zero/persist/dao/ProProjectDao.java b/src/main/java/com/ccsens/ptos_zero/persist/dao/ProProjectDao.java new file mode 100644 index 0000000..cfe5872 --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/persist/dao/ProProjectDao.java @@ -0,0 +1,20 @@ +package com.ccsens.ptos_zero.persist.dao; + +import com.ccsensptos.tallsdk.bean.vo.TallProjectVo; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +/** + * @author AUSU + */ +@Repository +public interface ProProjectDao { + + /** + * 根据id查找项目信息 + * @param projectId 项目id(任务详情id) + * @return 项目详情 + */ + TallProjectVo.ProjectInfo findProjectById(@Param("projectId") Long projectId); + +} diff --git a/src/main/java/com/ccsens/ptos_zero/persist/dao/UserDao.java b/src/main/java/com/ccsens/ptos_zero/persist/dao/UserDao.java new file mode 100644 index 0000000..8c842db --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/persist/dao/UserDao.java @@ -0,0 +1,15 @@ +package com.ccsens.ptos_zero.persist.dao; + +import com.ccsens.ptos_zero.bean.po.ProUser; +import com.ccsens.ptos_zero.persist.mapper.ProUserMapper; +import org.apache.ibatis.annotations.Param; + +public interface UserDao extends ProUserMapper { + + /** + * 通过手机号获取userId + * @param phone + * @return + */ + ProUser getUserIdByPhone(@Param("phone") String phone); +} diff --git a/src/main/java/com/ccsens/ptos_zero/persist/mapper/ProUserMapper.java b/src/main/java/com/ccsens/ptos_zero/persist/mapper/ProUserMapper.java new file mode 100644 index 0000000..9e5b7cf --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/persist/mapper/ProUserMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.ptos_zero.persist.mapper; + +import com.ccsens.ptos_zero.bean.po.ProUser; +import com.ccsens.ptos_zero.bean.po.ProUserExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProUserMapper { + long countByExample(ProUserExample example); + + int deleteByExample(ProUserExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProUser record); + + int insertSelective(ProUser record); + + List selectByExample(ProUserExample example); + + ProUser selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProUser record, @Param("example") ProUserExample example); + + int updateByExample(@Param("record") ProUser record, @Param("example") ProUserExample example); + + int updateByPrimaryKeySelective(ProUser record); + + int updateByPrimaryKey(ProUser record); +} \ No newline at end of file diff --git a/src/main/java/com/ccsens/ptos_zero/service/IZeroCommonService.java b/src/main/java/com/ccsens/ptos_zero/service/IZeroCommonService.java index e78975e..5ee778c 100644 --- a/src/main/java/com/ccsens/ptos_zero/service/IZeroCommonService.java +++ b/src/main/java/com/ccsens/ptos_zero/service/IZeroCommonService.java @@ -4,10 +4,17 @@ package com.ccsens.ptos_zero.service; * @author 逗 */ public interface IZeroCommonService { +// /** +// * 查找引导页或广告页插件 +// * @param type 类型 0引导页 1广告页 +// * @return 返回插件id +// */ +// Long getGuidePlugin(Byte type); + /** * 查找引导页或广告页插件 * @param type 类型 0引导页 1广告页 * @return 返回插件id */ - Long getGuidePlugin(Byte type); + String getGuidePlugin(Byte type); } diff --git a/src/main/java/com/ccsens/ptos_zero/service/ImportService.java b/src/main/java/com/ccsens/ptos_zero/service/ImportService.java index b62ce78..f61315f 100644 --- a/src/main/java/com/ccsens/ptos_zero/service/ImportService.java +++ b/src/main/java/com/ccsens/ptos_zero/service/ImportService.java @@ -68,8 +68,8 @@ public class ImportService implements IImportService { private ProParentTaskDao parentTaskMapper; @Resource private ProRoleTaskDao roleTaskMapper; -// @Resource -// private UserDao userDao; + @Resource + private UserDao userDao; @Resource private ProjectDao projectDao; @Resource @@ -501,7 +501,17 @@ public class ImportService implements IImportService { } if(ObjectUtil.isNull(memberId)){ //TODO 根据成员手机号查找userId 成员关联userId - Long userId = null; + + //根据手机号获取userId + ProUser user = userDao.getUserIdByPhone(memberPhone); + if(ObjectUtil.isNull(user)){ + //TODO 如果未查到用户则添加一条新的用户信息 + user = new ProUser(); + user.setId(snowflake.nextId()); + user.setPhone(memberPhone); + userDao.insertSelective(user); + } + Long userId = user.getId(); //添加成员至数据库 ProMember proMember = new ProMember(); proMember.setId(snowflake.nextId()); @@ -523,7 +533,15 @@ public class ImportService implements IImportService { //添加奖惩干系人 if(StrUtil.isNotEmpty(stakeholderName) && !"/".equalsIgnoreCase(roleName)){ //TODO 根据干系人手机号查找userId 奖惩干系人关联userId - Long userId = null; + ProUser user = userDao.getUserIdByPhone(stakeholderPhone); + if(ObjectUtil.isNull(user)){ + //TODO 如果未查到用户则添加一条新的用户信息 + user = new ProUser(); + user.setId(snowflake.nextId()); + user.setPhone(stakeholderPhone); + userDao.insertSelective(user); + } + Long userId = user.getId(); ProMemberStakeholder memberStakeholder = new ProMemberStakeholder(); memberStakeholder.setId(snowflake.nextId()); memberStakeholder.setMemeberId(memberId); diff --git a/src/main/java/com/ccsens/ptos_zero/service/TallService.java b/src/main/java/com/ccsens/ptos_zero/service/TallService.java index 229019d..a4d68fe 100644 --- a/src/main/java/com/ccsens/ptos_zero/service/TallService.java +++ b/src/main/java/com/ccsens/ptos_zero/service/TallService.java @@ -145,6 +145,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.ccsens.ptos_zero.bean.po.ProRole; import com.ccsens.ptos_zero.bean.po.ProRoleExample; +import com.ccsens.ptos_zero.bean.po.ProUser; import com.ccsens.ptos_zero.persist.dao.*; import com.ccsens.ptos_zero.util.Constant; import com.ccsens.ptos_zero.util.ZeroCodeError; @@ -198,13 +199,34 @@ public class TallService implements ITallService { private ProTaskPluginDao taskPluginDao; @Resource private IImportService importService; + @Resource + private ProProjectDao proProjectDao; + @Resource + private UserDao userDao; + @Override + public TallProjectVo.ProjectInfo findProjectById(String header, TallProjectDto.ProjectById params) { + TallProjectVo.ProjectInfo projectById = proProjectDao.findProjectById(params.getProjectId()); + if (ObjectUtil.isNull(projectById)){ + throw new BaseException(ZeroCodeError.PROJECT_NOT_FOUND); + } + return projectById; + } @SneakyThrows @Override public TallProjectVo.ProjectInfo importWbs(String token, MultipartFile params) { //TODO 根据token获取用户信息 TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(token, "appId", "secret")); + //通过手机号获取用户在服务内的userId + ProUser user = null; + if(ObjectUtil.isNotNull(userByToken) && StrUtil.isNotBlank(userByToken.getPhone())){ + user = userDao.getUserIdByPhone(userByToken.getPhone()); + } + if(user == null){ + throw new BaseException(CodeEnum.NOT_LOGIN); + } + if(ObjectUtil.isNull(userByToken)){ throw new BaseException(CodeEnum.NOT_LOGIN); } @@ -234,9 +256,9 @@ public class TallService implements ITallService { List projectInfos = new ArrayList<>(); TallProjectVo.ProjectInfo projectInfo = new TallProjectVo.ProjectInfo(); - projectInfo.setId(1L); + projectInfo.setId(1485932638408675328L); projectInfo.setName("零号项目"); - projectInfo.setUrl("http://127.0.0.1:7310"); + projectInfo.setUrl("http://101.201.226.163:7310"); projectInfo.setBusinessCode("zero"); projectInfo.setDomainCode("tall_dh"); projectInfos.add(projectInfo); @@ -250,14 +272,18 @@ public class TallService implements ITallService { if(ObjectUtil.isNull(userByToken)){ throw new BaseException(CodeEnum.NOT_LOGIN); } - + //通过手机号获取用户在服务内的userId + ProUser user = null; + if(ObjectUtil.isNotNull(userByToken) && StrUtil.isNotBlank(userByToken.getPhone())){ + user = userDao.getUserIdByPhone(userByToken.getPhone()); + } //返回的对象 TallRoleVo.QueryRole queryRole = new TallRoleVo.QueryRole(); List visibleList = new ArrayList<>(); List invisibleList = new ArrayList<>(); //查询当前用户在项目下的角色,没有则算作关注者 - List userRoleList = proRoleDao.queryRoleByUserId(param.getProjectId(),userByToken.getId()); + List userRoleList = proRoleDao.queryRoleByUserId(param.getProjectId(),user == null ? null : user.getId()); //查询用户可见的角色 List roleInfoList = new ArrayList<>(); if(CollectionUtil.isNotEmpty(userRoleList)){ diff --git a/src/main/java/com/ccsens/ptos_zero/service/ZeroCommonService.java b/src/main/java/com/ccsens/ptos_zero/service/ZeroCommonService.java index 517b6a2..4e1d237 100644 --- a/src/main/java/com/ccsens/ptos_zero/service/ZeroCommonService.java +++ b/src/main/java/com/ccsens/ptos_zero/service/ZeroCommonService.java @@ -30,9 +30,32 @@ public class ZeroCommonService implements IZeroCommonService { @Resource private ProTaskPluginDao taskPluginDao; +// @Override +// public Long getGuidePlugin(Byte type) { +// Long plugin = null; +// //查找零号项目 +// ProTaskDetail proTaskDetail = taskDetailDao.selectByPrimaryKey(Constant.ZERO_PROJECT_ID); +// if(ObjectUtil.isNull(proTaskDetail)){ +// return null; +// } +// //查找项目下的引导页或广告页任务 +// TaskDto.QueryTaskOfProject taskOfProject = new TaskDto.QueryTaskOfProject(); +// taskOfProject.setProjectId(Constant.ZERO_PROJECT_ID); +// taskOfProject.setName(type == 0 ? Constant.ZERO_GUIDE : Constant.ZERO_ADVERTISING); +// List taskOfProjects = taskDetailDao.queryTaskOfProject(taskOfProject); +// if(CollectionUtil.isNotEmpty(taskOfProjects)){ +// //查找任务关联的插件id +// List taskPluginInfos = taskPluginDao.queryTaskOfPlugin(taskOfProjects.get(0).getDetailId()); +// if(CollectionUtil.isNotEmpty(taskPluginInfos)){ +// plugin = taskPluginInfos.get(0).getPluginId(); +// } +// } +// return plugin; +// } + @Override - public Long getGuidePlugin(Byte type) { - Long plugin = null; + public String getGuidePlugin(Byte type) { + String plugin = null; //查找零号项目 ProTaskDetail proTaskDetail = taskDetailDao.selectByPrimaryKey(Constant.ZERO_PROJECT_ID); if(ObjectUtil.isNull(proTaskDetail)){ @@ -47,7 +70,7 @@ public class ZeroCommonService implements IZeroCommonService { //查找任务关联的插件id List taskPluginInfos = taskPluginDao.queryTaskOfPlugin(taskOfProjects.get(0).getDetailId()); if(CollectionUtil.isNotEmpty(taskPluginInfos)){ - plugin = taskPluginInfos.get(0).getPluginId(); + plugin = taskPluginInfos.get(0).getParam(); } } return plugin; diff --git a/src/main/java/com/ccsens/ptos_zero/util/Constant.java b/src/main/java/com/ccsens/ptos_zero/util/Constant.java index 8ecdcb4..eec7494 100644 --- a/src/main/java/com/ccsens/ptos_zero/util/Constant.java +++ b/src/main/java/com/ccsens/ptos_zero/util/Constant.java @@ -10,7 +10,7 @@ import java.util.Map; public class Constant { /**零号项目Id*/ - public static Long ZERO_PROJECT_ID = 1484800783814889472L; + public static Long ZERO_PROJECT_ID = 1485932638408675328L; /**引导页任务名*/ public static String ZERO_GUIDE = "引导页"; /**广告页任务名*/ diff --git a/src/main/java/com/ccsens/ptos_zero/util/ZeroCodeError.java b/src/main/java/com/ccsens/ptos_zero/util/ZeroCodeError.java index b9b574e..66d1d65 100644 --- a/src/main/java/com/ccsens/ptos_zero/util/ZeroCodeError.java +++ b/src/main/java/com/ccsens/ptos_zero/util/ZeroCodeError.java @@ -33,4 +33,5 @@ public class ZeroCodeError extends CodeError { public static final Code NOT_PERMISSION = new Code(524,"没有权限!", true); public static final Code ROLE_ERROR = new Code(525,"角色信息错误!", true); + public static final Code PROJECT_NOT_FOUND = new Code(526,"项目不存在,请检查后再试!", true); } diff --git a/src/main/resources/druid-dev.yml b/src/main/resources/druid-dev.yml index ab2f58c..dbd8767 100644 --- a/src/main/resources/druid-dev.yml +++ b/src/main/resources/druid-dev.yml @@ -28,6 +28,7 @@ spring: testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 url: jdbc:mysql://101.201.226.163:3306/tall_dh_zero?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true +# url: jdbc:mysql://test.tall.wiki/pt_ccsens?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true username: root validationQuery: SELECT 1 FROM DUAL env: CCSENS_TALL \ No newline at end of file diff --git a/src/main/resources/mapper_dao/ProProjectDao.xml b/src/main/resources/mapper_dao/ProProjectDao.xml new file mode 100644 index 0000000..cd9e8c0 --- /dev/null +++ b/src/main/resources/mapper_dao/ProProjectDao.xml @@ -0,0 +1,29 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper_dao/ProTaskPluginDao.xml b/src/main/resources/mapper_dao/ProTaskPluginDao.xml index 66d5fbf..9c02e12 100644 --- a/src/main/resources/mapper_dao/ProTaskPluginDao.xml +++ b/src/main/resources/mapper_dao/ProTaskPluginDao.xml @@ -31,6 +31,7 @@ + select + * + from + t_pro_user + where + phone = #{phone} + and rec_status = 0 + limit 1 + + \ No newline at end of file diff --git a/src/main/resources/mapper_raw/ProUserMapper.xml b/src/main/resources/mapper_raw/ProUserMapper.xml new file mode 100644 index 0000000..282a5fc --- /dev/null +++ b/src/main/resources/mapper_raw/ProUserMapper.xml @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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, gender, avatar_url, country, province, city, phone, id_card, power, device_id, + auth_type, operator, created_at, updated_at, rec_status + + + + + delete from t_pro_user + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_user + + + + + + insert into t_pro_user (id, name, gender, + avatar_url, country, province, + city, phone, id_card, + power, device_id, auth_type, + operator, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT}, + #{avatarUrl,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, + #{city,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, + #{power,jdbcType=TINYINT}, #{deviceId,jdbcType=VARCHAR}, #{authType,jdbcType=TINYINT}, + #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_pro_user + + + id, + + + name, + + + gender, + + + avatar_url, + + + country, + + + province, + + + city, + + + phone, + + + id_card, + + + power, + + + device_id, + + + auth_type, + + + operator, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{gender,jdbcType=TINYINT}, + + + #{avatarUrl,jdbcType=VARCHAR}, + + + #{country,jdbcType=VARCHAR}, + + + #{province,jdbcType=VARCHAR}, + + + #{city,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{idCard,jdbcType=VARCHAR}, + + + #{power,jdbcType=TINYINT}, + + + #{deviceId,jdbcType=VARCHAR}, + + + #{authType,jdbcType=TINYINT}, + + + #{operator,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_user + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + gender = #{record.gender,jdbcType=TINYINT}, + + + avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, + + + country = #{record.country,jdbcType=VARCHAR}, + + + province = #{record.province,jdbcType=VARCHAR}, + + + city = #{record.city,jdbcType=VARCHAR}, + + + phone = #{record.phone,jdbcType=VARCHAR}, + + + id_card = #{record.idCard,jdbcType=VARCHAR}, + + + power = #{record.power,jdbcType=TINYINT}, + + + device_id = #{record.deviceId,jdbcType=VARCHAR}, + + + auth_type = #{record.authType,jdbcType=TINYINT}, + + + operator = #{record.operator,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_user + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + gender = #{record.gender,jdbcType=TINYINT}, + avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, + country = #{record.country,jdbcType=VARCHAR}, + province = #{record.province,jdbcType=VARCHAR}, + city = #{record.city,jdbcType=VARCHAR}, + phone = #{record.phone,jdbcType=VARCHAR}, + id_card = #{record.idCard,jdbcType=VARCHAR}, + power = #{record.power,jdbcType=TINYINT}, + device_id = #{record.deviceId,jdbcType=VARCHAR}, + auth_type = #{record.authType,jdbcType=TINYINT}, + operator = #{record.operator,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_user + + + name = #{name,jdbcType=VARCHAR}, + + + gender = #{gender,jdbcType=TINYINT}, + + + avatar_url = #{avatarUrl,jdbcType=VARCHAR}, + + + country = #{country,jdbcType=VARCHAR}, + + + province = #{province,jdbcType=VARCHAR}, + + + city = #{city,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + id_card = #{idCard,jdbcType=VARCHAR}, + + + power = #{power,jdbcType=TINYINT}, + + + device_id = #{deviceId,jdbcType=VARCHAR}, + + + auth_type = #{authType,jdbcType=TINYINT}, + + + operator = #{operator,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_user + set name = #{name,jdbcType=VARCHAR}, + gender = #{gender,jdbcType=TINYINT}, + avatar_url = #{avatarUrl,jdbcType=VARCHAR}, + country = #{country,jdbcType=VARCHAR}, + province = #{province,jdbcType=VARCHAR}, + city = #{city,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + id_card = #{idCard,jdbcType=VARCHAR}, + power = #{power,jdbcType=TINYINT}, + device_id = #{deviceId,jdbcType=VARCHAR}, + auth_type = #{authType,jdbcType=TINYINT}, + operator = #{operator,jdbcType=BIGINT}, + 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/src/main/resources/mbg.xml b/src/main/resources/mbg.xml index 5665805..ba79617 100644 --- a/src/main/resources/mbg.xml +++ b/src/main/resources/mbg.xml @@ -57,34 +57,35 @@ -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ + + + + + + + + + + + + + + + + + + + + + +
-
-
-
-
-
+ + + + +