Browse Source

Merge branch 'pt' of gitee.com:ccsens_s/ccsenscloud into pt

master
zy_Java 5 years ago
parent
commit
7514b28dc8
  1. 3
      health/src/main/java/com/ccsens/health/service/WeiXinService.java
  2. 46
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientPersional.java
  3. 210
      ht/src/main/java/com/ccsens/ht/bean/po/HtPatientPersionalExample.java
  4. 85
      ht/src/main/resources/mapper_raw/HtPatientPersionalMapper.xml
  5. 16
      tall/src/main/java/com/ccsens/tall/aspect/RobotAspect.java
  6. 59
      tall/src/main/java/com/ccsens/tall/bean/dto/ProjectMessageDto.java
  7. 150
      tall/src/main/java/com/ccsens/tall/bean/po/SysMessageSend.java
  8. 921
      tall/src/main/java/com/ccsens/tall/bean/po/SysMessageSendExample.java
  9. 106
      tall/src/main/java/com/ccsens/tall/bean/po/SysOperation.java
  10. 681
      tall/src/main/java/com/ccsens/tall/bean/po/SysOperationExample.java
  11. 117
      tall/src/main/java/com/ccsens/tall/bean/po/SysOperationMessage.java
  12. 761
      tall/src/main/java/com/ccsens/tall/bean/po/SysOperationMessageExample.java
  13. 207
      tall/src/main/java/com/ccsens/tall/bean/vo/MessageVo.java
  14. 46
      tall/src/main/java/com/ccsens/tall/bean/vo/ProjectMessageVo.java
  15. 6
      tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java
  16. 32
      tall/src/main/java/com/ccsens/tall/persist/dao/SysMessageSendDao.java
  17. 35
      tall/src/main/java/com/ccsens/tall/persist/dao/SysOperationDao.java
  18. 30
      tall/src/main/java/com/ccsens/tall/persist/mapper/SysMessageSendMapper.java
  19. 30
      tall/src/main/java/com/ccsens/tall/persist/mapper/SysOperationMapper.java
  20. 30
      tall/src/main/java/com/ccsens/tall/persist/mapper/SysOperationMessageMapper.java
  21. 7
      tall/src/main/java/com/ccsens/tall/service/AsyncService.java
  22. 10
      tall/src/main/java/com/ccsens/tall/service/IAsyncService.java
  23. 55
      tall/src/main/java/com/ccsens/tall/service/IProjectMessageService.java
  24. 9
      tall/src/main/java/com/ccsens/tall/service/IRobotService.java
  25. 2
      tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java
  26. 270
      tall/src/main/java/com/ccsens/tall/service/ProjectMessageService.java
  27. 126
      tall/src/main/java/com/ccsens/tall/service/RobotService.java
  28. 10
      tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java
  29. 6
      tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java
  30. 2
      tall/src/main/java/com/ccsens/tall/service/UserService.java
  31. 31
      tall/src/main/java/com/ccsens/tall/util/RobotUtil.java
  32. 74
      tall/src/main/java/com/ccsens/tall/web/ProjectMessageController.java
  33. 8
      tall/src/main/resources/mapper_dao/ProMemberDao.xml
  34. 40
      tall/src/main/resources/mapper_dao/SysMessageSendDao.xml
  35. 64
      tall/src/main/resources/mapper_dao/SysOperationDao.xml
  36. 323
      tall/src/main/resources/mapper_raw/SysMessageSendMapper.xml
  37. 259
      tall/src/main/resources/mapper_raw/SysOperationMapper.xml
  38. 275
      tall/src/main/resources/mapper_raw/SysOperationMessageMapper.xml
  39. 39
      util/src/main/java/com/ccsens/util/WebConstant.java
  40. 38
      util/src/main/java/com/ccsens/util/bean/message/common/InMessage.java
  41. 4
      util/src/main/java/com/ccsens/util/config/RabbitMQConfig.java
  42. 6
      util/src/main/java/com/ccsens/util/wx/WxRobotUtil.java

3
health/src/main/java/com/ccsens/health/service/WeiXinService.java

@ -273,10 +273,11 @@ public class WeiXinService implements IWeiXinService {
* @param departments
*/
private void insertBatchDepartment(List<Department> departments) {
TransactionStatus status = TransactionUtil.getTransactionStatus(transactionManager);
int size = departments.size();
int once = 100;
for (int i = 0; i < size; i+=once) {
TransactionStatus status = TransactionUtil.getTransactionStatus(transactionManager);
int end = i+once > size ? size : i+once;
try {
departmentDao.insertBatch(departments.subList(i, end));

46
ht/src/main/java/com/ccsens/ht/bean/po/HtPatientPersional.java

@ -22,7 +22,7 @@ public class HtPatientPersional implements Serializable {
private Integer drinkYear;
private Byte drinkType;
private String drinkType;
private Integer drinkAmount;
@ -30,7 +30,7 @@ public class HtPatientPersional implements Serializable {
private Integer teaCoffeeYear;
private Byte teaCoffeeType;
private String teaCoffeeType;
private Byte teaCoffeeFrequency;
@ -38,7 +38,7 @@ public class HtPatientPersional implements Serializable {
private Integer teaCoffeeQuitYear;
private Byte dietaryHabit;
private String dietaryHabit;
private Byte workoutTime;
@ -56,6 +56,10 @@ public class HtPatientPersional implements Serializable {
private Long recorder;
private Byte drinkQuit;
private Integer drinkQuitYear;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -130,12 +134,12 @@ public class HtPatientPersional implements Serializable {
this.drinkYear = drinkYear;
}
public Byte getDrinkType() {
public String getDrinkType() {
return drinkType;
}
public void setDrinkType(Byte drinkType) {
this.drinkType = drinkType;
public void setDrinkType(String drinkType) {
this.drinkType = drinkType == null ? null : drinkType.trim();
}
public Integer getDrinkAmount() {
@ -162,12 +166,12 @@ public class HtPatientPersional implements Serializable {
this.teaCoffeeYear = teaCoffeeYear;
}
public Byte getTeaCoffeeType() {
public String getTeaCoffeeType() {
return teaCoffeeType;
}
public void setTeaCoffeeType(Byte teaCoffeeType) {
this.teaCoffeeType = teaCoffeeType;
public void setTeaCoffeeType(String teaCoffeeType) {
this.teaCoffeeType = teaCoffeeType == null ? null : teaCoffeeType.trim();
}
public Byte getTeaCoffeeFrequency() {
@ -194,12 +198,12 @@ public class HtPatientPersional implements Serializable {
this.teaCoffeeQuitYear = teaCoffeeQuitYear;
}
public Byte getDietaryHabit() {
public String getDietaryHabit() {
return dietaryHabit;
}
public void setDietaryHabit(Byte dietaryHabit) {
this.dietaryHabit = dietaryHabit;
public void setDietaryHabit(String dietaryHabit) {
this.dietaryHabit = dietaryHabit == null ? null : dietaryHabit.trim();
}
public Byte getWorkoutTime() {
@ -266,6 +270,22 @@ public class HtPatientPersional implements Serializable {
this.recorder = recorder;
}
public Byte getDrinkQuit() {
return drinkQuit;
}
public void setDrinkQuit(Byte drinkQuit) {
this.drinkQuit = drinkQuit;
}
public Integer getDrinkQuitYear() {
return drinkQuitYear;
}
public void setDrinkQuitYear(Integer drinkQuitYear) {
this.drinkQuitYear = drinkQuitYear;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -298,6 +318,8 @@ public class HtPatientPersional implements Serializable {
sb.append(", updateTime=").append(updateTime);
sb.append(", isDel=").append(isDel);
sb.append(", recorder=").append(recorder);
sb.append(", drinkQuit=").append(drinkQuit);
sb.append(", drinkQuitYear=").append(drinkQuitYear);
sb.append("]");
return sb.toString();
}

210
ht/src/main/java/com/ccsens/ht/bean/po/HtPatientPersionalExample.java

@ -655,52 +655,62 @@ public class HtPatientPersionalExample {
return (Criteria) this;
}
public Criteria andDrinkTypeEqualTo(Byte value) {
public Criteria andDrinkTypeEqualTo(String value) {
addCriterion("drink_type =", value, "drinkType");
return (Criteria) this;
}
public Criteria andDrinkTypeNotEqualTo(Byte value) {
public Criteria andDrinkTypeNotEqualTo(String value) {
addCriterion("drink_type <>", value, "drinkType");
return (Criteria) this;
}
public Criteria andDrinkTypeGreaterThan(Byte value) {
public Criteria andDrinkTypeGreaterThan(String value) {
addCriterion("drink_type >", value, "drinkType");
return (Criteria) this;
}
public Criteria andDrinkTypeGreaterThanOrEqualTo(Byte value) {
public Criteria andDrinkTypeGreaterThanOrEqualTo(String value) {
addCriterion("drink_type >=", value, "drinkType");
return (Criteria) this;
}
public Criteria andDrinkTypeLessThan(Byte value) {
public Criteria andDrinkTypeLessThan(String value) {
addCriterion("drink_type <", value, "drinkType");
return (Criteria) this;
}
public Criteria andDrinkTypeLessThanOrEqualTo(Byte value) {
public Criteria andDrinkTypeLessThanOrEqualTo(String value) {
addCriterion("drink_type <=", value, "drinkType");
return (Criteria) this;
}
public Criteria andDrinkTypeIn(List<Byte> values) {
public Criteria andDrinkTypeLike(String value) {
addCriterion("drink_type like", value, "drinkType");
return (Criteria) this;
}
public Criteria andDrinkTypeNotLike(String value) {
addCriterion("drink_type not like", value, "drinkType");
return (Criteria) this;
}
public Criteria andDrinkTypeIn(List<String> values) {
addCriterion("drink_type in", values, "drinkType");
return (Criteria) this;
}
public Criteria andDrinkTypeNotIn(List<Byte> values) {
public Criteria andDrinkTypeNotIn(List<String> values) {
addCriterion("drink_type not in", values, "drinkType");
return (Criteria) this;
}
public Criteria andDrinkTypeBetween(Byte value1, Byte value2) {
public Criteria andDrinkTypeBetween(String value1, String value2) {
addCriterion("drink_type between", value1, value2, "drinkType");
return (Criteria) this;
}
public Criteria andDrinkTypeNotBetween(Byte value1, Byte value2) {
public Criteria andDrinkTypeNotBetween(String value1, String value2) {
addCriterion("drink_type not between", value1, value2, "drinkType");
return (Criteria) this;
}
@ -895,52 +905,62 @@ public class HtPatientPersionalExample {
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeEqualTo(Byte value) {
public Criteria andTeaCoffeeTypeEqualTo(String value) {
addCriterion("tea_coffee_type =", value, "teaCoffeeType");
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeNotEqualTo(Byte value) {
public Criteria andTeaCoffeeTypeNotEqualTo(String value) {
addCriterion("tea_coffee_type <>", value, "teaCoffeeType");
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeGreaterThan(Byte value) {
public Criteria andTeaCoffeeTypeGreaterThan(String value) {
addCriterion("tea_coffee_type >", value, "teaCoffeeType");
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeGreaterThanOrEqualTo(Byte value) {
public Criteria andTeaCoffeeTypeGreaterThanOrEqualTo(String value) {
addCriterion("tea_coffee_type >=", value, "teaCoffeeType");
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeLessThan(Byte value) {
public Criteria andTeaCoffeeTypeLessThan(String value) {
addCriterion("tea_coffee_type <", value, "teaCoffeeType");
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeLessThanOrEqualTo(Byte value) {
public Criteria andTeaCoffeeTypeLessThanOrEqualTo(String value) {
addCriterion("tea_coffee_type <=", value, "teaCoffeeType");
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeIn(List<Byte> values) {
public Criteria andTeaCoffeeTypeLike(String value) {
addCriterion("tea_coffee_type like", value, "teaCoffeeType");
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeNotLike(String value) {
addCriterion("tea_coffee_type not like", value, "teaCoffeeType");
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeIn(List<String> values) {
addCriterion("tea_coffee_type in", values, "teaCoffeeType");
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeNotIn(List<Byte> values) {
public Criteria andTeaCoffeeTypeNotIn(List<String> values) {
addCriterion("tea_coffee_type not in", values, "teaCoffeeType");
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeBetween(Byte value1, Byte value2) {
public Criteria andTeaCoffeeTypeBetween(String value1, String value2) {
addCriterion("tea_coffee_type between", value1, value2, "teaCoffeeType");
return (Criteria) this;
}
public Criteria andTeaCoffeeTypeNotBetween(Byte value1, Byte value2) {
public Criteria andTeaCoffeeTypeNotBetween(String value1, String value2) {
addCriterion("tea_coffee_type not between", value1, value2, "teaCoffeeType");
return (Criteria) this;
}
@ -1135,52 +1155,62 @@ public class HtPatientPersionalExample {
return (Criteria) this;
}
public Criteria andDietaryHabitEqualTo(Byte value) {
public Criteria andDietaryHabitEqualTo(String value) {
addCriterion("dietary_habit =", value, "dietaryHabit");
return (Criteria) this;
}
public Criteria andDietaryHabitNotEqualTo(Byte value) {
public Criteria andDietaryHabitNotEqualTo(String value) {
addCriterion("dietary_habit <>", value, "dietaryHabit");
return (Criteria) this;
}
public Criteria andDietaryHabitGreaterThan(Byte value) {
public Criteria andDietaryHabitGreaterThan(String value) {
addCriterion("dietary_habit >", value, "dietaryHabit");
return (Criteria) this;
}
public Criteria andDietaryHabitGreaterThanOrEqualTo(Byte value) {
public Criteria andDietaryHabitGreaterThanOrEqualTo(String value) {
addCriterion("dietary_habit >=", value, "dietaryHabit");
return (Criteria) this;
}
public Criteria andDietaryHabitLessThan(Byte value) {
public Criteria andDietaryHabitLessThan(String value) {
addCriterion("dietary_habit <", value, "dietaryHabit");
return (Criteria) this;
}
public Criteria andDietaryHabitLessThanOrEqualTo(Byte value) {
public Criteria andDietaryHabitLessThanOrEqualTo(String value) {
addCriterion("dietary_habit <=", value, "dietaryHabit");
return (Criteria) this;
}
public Criteria andDietaryHabitIn(List<Byte> values) {
public Criteria andDietaryHabitLike(String value) {
addCriterion("dietary_habit like", value, "dietaryHabit");
return (Criteria) this;
}
public Criteria andDietaryHabitNotLike(String value) {
addCriterion("dietary_habit not like", value, "dietaryHabit");
return (Criteria) this;
}
public Criteria andDietaryHabitIn(List<String> values) {
addCriterion("dietary_habit in", values, "dietaryHabit");
return (Criteria) this;
}
public Criteria andDietaryHabitNotIn(List<Byte> values) {
public Criteria andDietaryHabitNotIn(List<String> values) {
addCriterion("dietary_habit not in", values, "dietaryHabit");
return (Criteria) this;
}
public Criteria andDietaryHabitBetween(Byte value1, Byte value2) {
public Criteria andDietaryHabitBetween(String value1, String value2) {
addCriterion("dietary_habit between", value1, value2, "dietaryHabit");
return (Criteria) this;
}
public Criteria andDietaryHabitNotBetween(Byte value1, Byte value2) {
public Criteria andDietaryHabitNotBetween(String value1, String value2) {
addCriterion("dietary_habit not between", value1, value2, "dietaryHabit");
return (Criteria) this;
}
@ -1674,6 +1704,126 @@ public class HtPatientPersionalExample {
addCriterion("recorder not between", value1, value2, "recorder");
return (Criteria) this;
}
public Criteria andDrinkQuitIsNull() {
addCriterion("drink_quit is null");
return (Criteria) this;
}
public Criteria andDrinkQuitIsNotNull() {
addCriterion("drink_quit is not null");
return (Criteria) this;
}
public Criteria andDrinkQuitEqualTo(Byte value) {
addCriterion("drink_quit =", value, "drinkQuit");
return (Criteria) this;
}
public Criteria andDrinkQuitNotEqualTo(Byte value) {
addCriterion("drink_quit <>", value, "drinkQuit");
return (Criteria) this;
}
public Criteria andDrinkQuitGreaterThan(Byte value) {
addCriterion("drink_quit >", value, "drinkQuit");
return (Criteria) this;
}
public Criteria andDrinkQuitGreaterThanOrEqualTo(Byte value) {
addCriterion("drink_quit >=", value, "drinkQuit");
return (Criteria) this;
}
public Criteria andDrinkQuitLessThan(Byte value) {
addCriterion("drink_quit <", value, "drinkQuit");
return (Criteria) this;
}
public Criteria andDrinkQuitLessThanOrEqualTo(Byte value) {
addCriterion("drink_quit <=", value, "drinkQuit");
return (Criteria) this;
}
public Criteria andDrinkQuitIn(List<Byte> values) {
addCriterion("drink_quit in", values, "drinkQuit");
return (Criteria) this;
}
public Criteria andDrinkQuitNotIn(List<Byte> values) {
addCriterion("drink_quit not in", values, "drinkQuit");
return (Criteria) this;
}
public Criteria andDrinkQuitBetween(Byte value1, Byte value2) {
addCriterion("drink_quit between", value1, value2, "drinkQuit");
return (Criteria) this;
}
public Criteria andDrinkQuitNotBetween(Byte value1, Byte value2) {
addCriterion("drink_quit not between", value1, value2, "drinkQuit");
return (Criteria) this;
}
public Criteria andDrinkQuitYearIsNull() {
addCriterion("drink_quit_year is null");
return (Criteria) this;
}
public Criteria andDrinkQuitYearIsNotNull() {
addCriterion("drink_quit_year is not null");
return (Criteria) this;
}
public Criteria andDrinkQuitYearEqualTo(Integer value) {
addCriterion("drink_quit_year =", value, "drinkQuitYear");
return (Criteria) this;
}
public Criteria andDrinkQuitYearNotEqualTo(Integer value) {
addCriterion("drink_quit_year <>", value, "drinkQuitYear");
return (Criteria) this;
}
public Criteria andDrinkQuitYearGreaterThan(Integer value) {
addCriterion("drink_quit_year >", value, "drinkQuitYear");
return (Criteria) this;
}
public Criteria andDrinkQuitYearGreaterThanOrEqualTo(Integer value) {
addCriterion("drink_quit_year >=", value, "drinkQuitYear");
return (Criteria) this;
}
public Criteria andDrinkQuitYearLessThan(Integer value) {
addCriterion("drink_quit_year <", value, "drinkQuitYear");
return (Criteria) this;
}
public Criteria andDrinkQuitYearLessThanOrEqualTo(Integer value) {
addCriterion("drink_quit_year <=", value, "drinkQuitYear");
return (Criteria) this;
}
public Criteria andDrinkQuitYearIn(List<Integer> values) {
addCriterion("drink_quit_year in", values, "drinkQuitYear");
return (Criteria) this;
}
public Criteria andDrinkQuitYearNotIn(List<Integer> values) {
addCriterion("drink_quit_year not in", values, "drinkQuitYear");
return (Criteria) this;
}
public Criteria andDrinkQuitYearBetween(Integer value1, Integer value2) {
addCriterion("drink_quit_year between", value1, value2, "drinkQuitYear");
return (Criteria) this;
}
public Criteria andDrinkQuitYearNotBetween(Integer value1, Integer value2) {
addCriterion("drink_quit_year not between", value1, value2, "drinkQuitYear");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

85
ht/src/main/resources/mapper_raw/HtPatientPersionalMapper.xml

@ -11,15 +11,15 @@
<result column="smoking_quit_year" jdbcType="INTEGER" property="smokingQuitYear" />
<result column="drink_history" jdbcType="TINYINT" property="drinkHistory" />
<result column="drink_year" jdbcType="INTEGER" property="drinkYear" />
<result column="drink_type" jdbcType="TINYINT" property="drinkType" />
<result column="drink_type" jdbcType="VARCHAR" property="drinkType" />
<result column="drink_amount" jdbcType="INTEGER" property="drinkAmount" />
<result column="tea_coffee_history" jdbcType="TINYINT" property="teaCoffeeHistory" />
<result column="tea_coffee_year" jdbcType="INTEGER" property="teaCoffeeYear" />
<result column="tea_coffee_type" jdbcType="TINYINT" property="teaCoffeeType" />
<result column="tea_coffee_type" jdbcType="VARCHAR" property="teaCoffeeType" />
<result column="tea_coffee_frequency" jdbcType="TINYINT" property="teaCoffeeFrequency" />
<result column="tea_coffee_quit" jdbcType="TINYINT" property="teaCoffeeQuit" />
<result column="tea_coffee_quit_year" jdbcType="INTEGER" property="teaCoffeeQuitYear" />
<result column="dietary_habit" jdbcType="TINYINT" property="dietaryHabit" />
<result column="dietary_habit" jdbcType="VARCHAR" property="dietaryHabit" />
<result column="workout_time" jdbcType="TINYINT" property="workoutTime" />
<result column="sleep_time" jdbcType="INTEGER" property="sleepTime" />
<result column="snore" jdbcType="TINYINT" property="snore" />
@ -28,6 +28,8 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
<result column="recorder" jdbcType="BIGINT" property="recorder" />
<result column="drink_quit" jdbcType="TINYINT" property="drinkQuit" />
<result column="drink_quit_year" jdbcType="INTEGER" property="drinkQuitYear" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -91,7 +93,8 @@
id, patient_id, smoking_history, smoking_year, smoking_amount, smoking_quit, smoking_quit_year,
drink_history, drink_year, drink_type, drink_amount, tea_coffee_history, tea_coffee_year,
tea_coffee_type, tea_coffee_frequency, tea_coffee_quit, tea_coffee_quit_year, dietary_habit,
workout_time, sleep_time, snore, remark, create_time, update_time, is_del, recorder
workout_time, sleep_time, snore, remark, create_time, update_time, is_del, recorder,
drink_quit, drink_quit_year
</sql>
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientPersionalExample" resultMap="BaseResultMap">
select
@ -132,16 +135,18 @@
tea_coffee_quit, tea_coffee_quit_year, dietary_habit,
workout_time, sleep_time, snore,
remark, create_time, update_time,
is_del, recorder)
is_del, recorder, drink_quit,
drink_quit_year)
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{smokingHistory,jdbcType=TINYINT},
#{smokingYear,jdbcType=INTEGER}, #{smokingAmount,jdbcType=INTEGER}, #{smokingQuit,jdbcType=TINYINT},
#{smokingQuitYear,jdbcType=INTEGER}, #{drinkHistory,jdbcType=TINYINT}, #{drinkYear,jdbcType=INTEGER},
#{drinkType,jdbcType=TINYINT}, #{drinkAmount,jdbcType=INTEGER}, #{teaCoffeeHistory,jdbcType=TINYINT},
#{teaCoffeeYear,jdbcType=INTEGER}, #{teaCoffeeType,jdbcType=TINYINT}, #{teaCoffeeFrequency,jdbcType=TINYINT},
#{teaCoffeeQuit,jdbcType=TINYINT}, #{teaCoffeeQuitYear,jdbcType=INTEGER}, #{dietaryHabit,jdbcType=TINYINT},
#{drinkType,jdbcType=VARCHAR}, #{drinkAmount,jdbcType=INTEGER}, #{teaCoffeeHistory,jdbcType=TINYINT},
#{teaCoffeeYear,jdbcType=INTEGER}, #{teaCoffeeType,jdbcType=VARCHAR}, #{teaCoffeeFrequency,jdbcType=TINYINT},
#{teaCoffeeQuit,jdbcType=TINYINT}, #{teaCoffeeQuitYear,jdbcType=INTEGER}, #{dietaryHabit,jdbcType=VARCHAR},
#{workoutTime,jdbcType=TINYINT}, #{sleepTime,jdbcType=INTEGER}, #{snore,jdbcType=TINYINT},
#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{isDel,jdbcType=TINYINT}, #{recorder,jdbcType=BIGINT})
#{isDel,jdbcType=TINYINT}, #{recorder,jdbcType=BIGINT}, #{drinkQuit,jdbcType=TINYINT},
#{drinkQuitYear,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientPersional">
insert into t_ht_patient_persional
@ -224,6 +229,12 @@
<if test="recorder != null">
recorder,
</if>
<if test="drinkQuit != null">
drink_quit,
</if>
<if test="drinkQuitYear != null">
drink_quit_year,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -254,7 +265,7 @@
#{drinkYear,jdbcType=INTEGER},
</if>
<if test="drinkType != null">
#{drinkType,jdbcType=TINYINT},
#{drinkType,jdbcType=VARCHAR},
</if>
<if test="drinkAmount != null">
#{drinkAmount,jdbcType=INTEGER},
@ -266,7 +277,7 @@
#{teaCoffeeYear,jdbcType=INTEGER},
</if>
<if test="teaCoffeeType != null">
#{teaCoffeeType,jdbcType=TINYINT},
#{teaCoffeeType,jdbcType=VARCHAR},
</if>
<if test="teaCoffeeFrequency != null">
#{teaCoffeeFrequency,jdbcType=TINYINT},
@ -278,7 +289,7 @@
#{teaCoffeeQuitYear,jdbcType=INTEGER},
</if>
<if test="dietaryHabit != null">
#{dietaryHabit,jdbcType=TINYINT},
#{dietaryHabit,jdbcType=VARCHAR},
</if>
<if test="workoutTime != null">
#{workoutTime,jdbcType=TINYINT},
@ -304,6 +315,12 @@
<if test="recorder != null">
#{recorder,jdbcType=BIGINT},
</if>
<if test="drinkQuit != null">
#{drinkQuit,jdbcType=TINYINT},
</if>
<if test="drinkQuitYear != null">
#{drinkQuitYear,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientPersionalExample" resultType="java.lang.Long">
@ -343,7 +360,7 @@
drink_year = #{record.drinkYear,jdbcType=INTEGER},
</if>
<if test="record.drinkType != null">
drink_type = #{record.drinkType,jdbcType=TINYINT},
drink_type = #{record.drinkType,jdbcType=VARCHAR},
</if>
<if test="record.drinkAmount != null">
drink_amount = #{record.drinkAmount,jdbcType=INTEGER},
@ -355,7 +372,7 @@
tea_coffee_year = #{record.teaCoffeeYear,jdbcType=INTEGER},
</if>
<if test="record.teaCoffeeType != null">
tea_coffee_type = #{record.teaCoffeeType,jdbcType=TINYINT},
tea_coffee_type = #{record.teaCoffeeType,jdbcType=VARCHAR},
</if>
<if test="record.teaCoffeeFrequency != null">
tea_coffee_frequency = #{record.teaCoffeeFrequency,jdbcType=TINYINT},
@ -367,7 +384,7 @@
tea_coffee_quit_year = #{record.teaCoffeeQuitYear,jdbcType=INTEGER},
</if>
<if test="record.dietaryHabit != null">
dietary_habit = #{record.dietaryHabit,jdbcType=TINYINT},
dietary_habit = #{record.dietaryHabit,jdbcType=VARCHAR},
</if>
<if test="record.workoutTime != null">
workout_time = #{record.workoutTime,jdbcType=TINYINT},
@ -393,6 +410,12 @@
<if test="record.recorder != null">
recorder = #{record.recorder,jdbcType=BIGINT},
</if>
<if test="record.drinkQuit != null">
drink_quit = #{record.drinkQuit,jdbcType=TINYINT},
</if>
<if test="record.drinkQuitYear != null">
drink_quit_year = #{record.drinkQuitYear,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -409,15 +432,15 @@
smoking_quit_year = #{record.smokingQuitYear,jdbcType=INTEGER},
drink_history = #{record.drinkHistory,jdbcType=TINYINT},
drink_year = #{record.drinkYear,jdbcType=INTEGER},
drink_type = #{record.drinkType,jdbcType=TINYINT},
drink_type = #{record.drinkType,jdbcType=VARCHAR},
drink_amount = #{record.drinkAmount,jdbcType=INTEGER},
tea_coffee_history = #{record.teaCoffeeHistory,jdbcType=TINYINT},
tea_coffee_year = #{record.teaCoffeeYear,jdbcType=INTEGER},
tea_coffee_type = #{record.teaCoffeeType,jdbcType=TINYINT},
tea_coffee_type = #{record.teaCoffeeType,jdbcType=VARCHAR},
tea_coffee_frequency = #{record.teaCoffeeFrequency,jdbcType=TINYINT},
tea_coffee_quit = #{record.teaCoffeeQuit,jdbcType=TINYINT},
tea_coffee_quit_year = #{record.teaCoffeeQuitYear,jdbcType=INTEGER},
dietary_habit = #{record.dietaryHabit,jdbcType=TINYINT},
dietary_habit = #{record.dietaryHabit,jdbcType=VARCHAR},
workout_time = #{record.workoutTime,jdbcType=TINYINT},
sleep_time = #{record.sleepTime,jdbcType=INTEGER},
snore = #{record.snore,jdbcType=TINYINT},
@ -425,7 +448,9 @@
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=TINYINT},
recorder = #{record.recorder,jdbcType=BIGINT}
recorder = #{record.recorder,jdbcType=BIGINT},
drink_quit = #{record.drinkQuit,jdbcType=TINYINT},
drink_quit_year = #{record.drinkQuitYear,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -458,7 +483,7 @@
drink_year = #{drinkYear,jdbcType=INTEGER},
</if>
<if test="drinkType != null">
drink_type = #{drinkType,jdbcType=TINYINT},
drink_type = #{drinkType,jdbcType=VARCHAR},
</if>
<if test="drinkAmount != null">
drink_amount = #{drinkAmount,jdbcType=INTEGER},
@ -470,7 +495,7 @@
tea_coffee_year = #{teaCoffeeYear,jdbcType=INTEGER},
</if>
<if test="teaCoffeeType != null">
tea_coffee_type = #{teaCoffeeType,jdbcType=TINYINT},
tea_coffee_type = #{teaCoffeeType,jdbcType=VARCHAR},
</if>
<if test="teaCoffeeFrequency != null">
tea_coffee_frequency = #{teaCoffeeFrequency,jdbcType=TINYINT},
@ -482,7 +507,7 @@
tea_coffee_quit_year = #{teaCoffeeQuitYear,jdbcType=INTEGER},
</if>
<if test="dietaryHabit != null">
dietary_habit = #{dietaryHabit,jdbcType=TINYINT},
dietary_habit = #{dietaryHabit,jdbcType=VARCHAR},
</if>
<if test="workoutTime != null">
workout_time = #{workoutTime,jdbcType=TINYINT},
@ -508,6 +533,12 @@
<if test="recorder != null">
recorder = #{recorder,jdbcType=BIGINT},
</if>
<if test="drinkQuit != null">
drink_quit = #{drinkQuit,jdbcType=TINYINT},
</if>
<if test="drinkQuitYear != null">
drink_quit_year = #{drinkQuitYear,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -521,15 +552,15 @@
smoking_quit_year = #{smokingQuitYear,jdbcType=INTEGER},
drink_history = #{drinkHistory,jdbcType=TINYINT},
drink_year = #{drinkYear,jdbcType=INTEGER},
drink_type = #{drinkType,jdbcType=TINYINT},
drink_type = #{drinkType,jdbcType=VARCHAR},
drink_amount = #{drinkAmount,jdbcType=INTEGER},
tea_coffee_history = #{teaCoffeeHistory,jdbcType=TINYINT},
tea_coffee_year = #{teaCoffeeYear,jdbcType=INTEGER},
tea_coffee_type = #{teaCoffeeType,jdbcType=TINYINT},
tea_coffee_type = #{teaCoffeeType,jdbcType=VARCHAR},
tea_coffee_frequency = #{teaCoffeeFrequency,jdbcType=TINYINT},
tea_coffee_quit = #{teaCoffeeQuit,jdbcType=TINYINT},
tea_coffee_quit_year = #{teaCoffeeQuitYear,jdbcType=INTEGER},
dietary_habit = #{dietaryHabit,jdbcType=TINYINT},
dietary_habit = #{dietaryHabit,jdbcType=VARCHAR},
workout_time = #{workoutTime,jdbcType=TINYINT},
sleep_time = #{sleepTime,jdbcType=INTEGER},
snore = #{snore,jdbcType=TINYINT},
@ -537,7 +568,9 @@
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=TINYINT},
recorder = #{recorder,jdbcType=BIGINT}
recorder = #{recorder,jdbcType=BIGINT},
drink_quit = #{drinkQuit,jdbcType=TINYINT},
drink_quit_year = #{drinkQuitYear,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

16
tall/src/main/java/com/ccsens/tall/aspect/RobotAspect.java

@ -1,19 +1,16 @@
package com.ccsens.tall.aspect;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.tall.bean.vo.MessageVo;
import com.ccsens.tall.service.IAsyncService;
import com.ccsens.tall.service.IRobotService;
import com.ccsens.tall.service.RobotService;
import com.ccsens.tall.util.RobotUtil;
import com.ccsens.util.annotation.OperateType;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.*;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
@ -30,6 +27,7 @@ public class RobotAspect {
@Resource
private IAsyncService asyncService;
@Pointcut("@annotation(com.ccsens.util.annotation.OperateType)")
public void robotAdvice(){
@ -43,9 +41,15 @@ public class RobotAspect {
Method targetMethod = methodSignature.getMethod();
OperateType operateType = targetMethod.getAnnotation(OperateType.class);
//2.获取发送参数
RobotUtil.Message message = RobotUtil.get();
RobotUtil.Message message = RobotUtil.getRobotMessage();
MessageVo.Inform inform = RobotUtil.getInform();
// 3.机器人通知
asyncService.sendRobotMessage(operateType,message);
// 4.ws和公众号通知
asyncService.sendMessage(operateType, inform);
//删除线程
RobotUtil.delRobotMessage();
RobotUtil.delInform();
}
}

59
tall/src/main/java/com/ccsens/tall/bean/dto/ProjectMessageDto.java

@ -0,0 +1,59 @@
package com.ccsens.tall.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
/**
* @description:
* @author: whj
* @time: 2020/5/28 17:34
*/
@ApiModel("消息通知相关请求参数")
public class ProjectMessageDto {
@Data
@ApiModel("查询未读消息数-请求")
public static class UnreadNum{
@NotNull
@ApiModelProperty("发送类型 0:ws,1:微信公众号")
private Byte sendType;
}
@Data
@ApiModel("查询消息-请求")
public static class Query{
@NotNull
@ApiModelProperty("发送类型 0:ws,1:微信公众号")
private Byte sendType;
@ApiModelProperty("项目ID")
private Long projectId;
@ApiModelProperty("第几页")
@Min(value = 1)
private int pageNum = 1;
@ApiModelProperty("每页多少条")
@Min(value = 1)
@Max(value=100)
private int pageSize = 10;
}
@Data
@ApiModel("标记某条消息已读-请求")
public static class MarkRead{
@NotNull(message="发送消息ID不能为空")
@ApiModelProperty("发送消息ID")
private Long id;
}
@Data
@ApiModel("标记所有消息已读-请求")
public static class MarkAllRead{
@NotNull
@ApiModelProperty("消息发送类型 0:ws,1:微信公众号")
private Byte sendType;
}
}

150
tall/src/main/java/com/ccsens/tall/bean/po/SysMessageSend.java

@ -0,0 +1,150 @@
package com.ccsens.tall.bean.po;
import java.io.Serializable;
import java.util.Date;
public class SysMessageSend implements Serializable {
private Long id;
private Long operationId;
private Long receiverId;
private Byte sendType;
private Byte sendStatus;
private Byte readStatus;
private Byte initRead;
private Long sendTime;
private Byte complete;
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 getOperationId() {
return operationId;
}
public void setOperationId(Long operationId) {
this.operationId = operationId;
}
public Long getReceiverId() {
return receiverId;
}
public void setReceiverId(Long receiverId) {
this.receiverId = receiverId;
}
public Byte getSendType() {
return sendType;
}
public void setSendType(Byte sendType) {
this.sendType = sendType;
}
public Byte getSendStatus() {
return sendStatus;
}
public void setSendStatus(Byte sendStatus) {
this.sendStatus = sendStatus;
}
public Byte getReadStatus() {
return readStatus;
}
public void setReadStatus(Byte readStatus) {
this.readStatus = readStatus;
}
public Byte getInitRead() {
return initRead;
}
public void setInitRead(Byte initRead) {
this.initRead = initRead;
}
public Long getSendTime() {
return sendTime;
}
public void setSendTime(Long sendTime) {
this.sendTime = sendTime;
}
public Byte getComplete() {
return complete;
}
public void setComplete(Byte complete) {
this.complete = complete;
}
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(", operationId=").append(operationId);
sb.append(", receiverId=").append(receiverId);
sb.append(", sendType=").append(sendType);
sb.append(", sendStatus=").append(sendStatus);
sb.append(", readStatus=").append(readStatus);
sb.append(", initRead=").append(initRead);
sb.append(", sendTime=").append(sendTime);
sb.append(", complete=").append(complete);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

921
tall/src/main/java/com/ccsens/tall/bean/po/SysMessageSendExample.java

@ -0,0 +1,921 @@
package com.ccsens.tall.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysMessageSendExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysMessageSendExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andOperationIdIsNull() {
addCriterion("operation_id is null");
return (Criteria) this;
}
public Criteria andOperationIdIsNotNull() {
addCriterion("operation_id is not null");
return (Criteria) this;
}
public Criteria andOperationIdEqualTo(Long value) {
addCriterion("operation_id =", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdNotEqualTo(Long value) {
addCriterion("operation_id <>", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdGreaterThan(Long value) {
addCriterion("operation_id >", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdGreaterThanOrEqualTo(Long value) {
addCriterion("operation_id >=", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdLessThan(Long value) {
addCriterion("operation_id <", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdLessThanOrEqualTo(Long value) {
addCriterion("operation_id <=", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdIn(List<Long> values) {
addCriterion("operation_id in", values, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdNotIn(List<Long> values) {
addCriterion("operation_id not in", values, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdBetween(Long value1, Long value2) {
addCriterion("operation_id between", value1, value2, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdNotBetween(Long value1, Long value2) {
addCriterion("operation_id not between", value1, value2, "operationId");
return (Criteria) this;
}
public Criteria andReceiverIdIsNull() {
addCriterion("receiver_id is null");
return (Criteria) this;
}
public Criteria andReceiverIdIsNotNull() {
addCriterion("receiver_id is not null");
return (Criteria) this;
}
public Criteria andReceiverIdEqualTo(Long value) {
addCriterion("receiver_id =", value, "receiverId");
return (Criteria) this;
}
public Criteria andReceiverIdNotEqualTo(Long value) {
addCriterion("receiver_id <>", value, "receiverId");
return (Criteria) this;
}
public Criteria andReceiverIdGreaterThan(Long value) {
addCriterion("receiver_id >", value, "receiverId");
return (Criteria) this;
}
public Criteria andReceiverIdGreaterThanOrEqualTo(Long value) {
addCriterion("receiver_id >=", value, "receiverId");
return (Criteria) this;
}
public Criteria andReceiverIdLessThan(Long value) {
addCriterion("receiver_id <", value, "receiverId");
return (Criteria) this;
}
public Criteria andReceiverIdLessThanOrEqualTo(Long value) {
addCriterion("receiver_id <=", value, "receiverId");
return (Criteria) this;
}
public Criteria andReceiverIdIn(List<Long> values) {
addCriterion("receiver_id in", values, "receiverId");
return (Criteria) this;
}
public Criteria andReceiverIdNotIn(List<Long> values) {
addCriterion("receiver_id not in", values, "receiverId");
return (Criteria) this;
}
public Criteria andReceiverIdBetween(Long value1, Long value2) {
addCriterion("receiver_id between", value1, value2, "receiverId");
return (Criteria) this;
}
public Criteria andReceiverIdNotBetween(Long value1, Long value2) {
addCriterion("receiver_id not between", value1, value2, "receiverId");
return (Criteria) this;
}
public Criteria andSendTypeIsNull() {
addCriterion("send_type is null");
return (Criteria) this;
}
public Criteria andSendTypeIsNotNull() {
addCriterion("send_type is not null");
return (Criteria) this;
}
public Criteria andSendTypeEqualTo(Byte value) {
addCriterion("send_type =", value, "sendType");
return (Criteria) this;
}
public Criteria andSendTypeNotEqualTo(Byte value) {
addCriterion("send_type <>", value, "sendType");
return (Criteria) this;
}
public Criteria andSendTypeGreaterThan(Byte value) {
addCriterion("send_type >", value, "sendType");
return (Criteria) this;
}
public Criteria andSendTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("send_type >=", value, "sendType");
return (Criteria) this;
}
public Criteria andSendTypeLessThan(Byte value) {
addCriterion("send_type <", value, "sendType");
return (Criteria) this;
}
public Criteria andSendTypeLessThanOrEqualTo(Byte value) {
addCriterion("send_type <=", value, "sendType");
return (Criteria) this;
}
public Criteria andSendTypeIn(List<Byte> values) {
addCriterion("send_type in", values, "sendType");
return (Criteria) this;
}
public Criteria andSendTypeNotIn(List<Byte> values) {
addCriterion("send_type not in", values, "sendType");
return (Criteria) this;
}
public Criteria andSendTypeBetween(Byte value1, Byte value2) {
addCriterion("send_type between", value1, value2, "sendType");
return (Criteria) this;
}
public Criteria andSendTypeNotBetween(Byte value1, Byte value2) {
addCriterion("send_type not between", value1, value2, "sendType");
return (Criteria) this;
}
public Criteria andSendStatusIsNull() {
addCriterion("send_status is null");
return (Criteria) this;
}
public Criteria andSendStatusIsNotNull() {
addCriterion("send_status is not null");
return (Criteria) this;
}
public Criteria andSendStatusEqualTo(Byte value) {
addCriterion("send_status =", value, "sendStatus");
return (Criteria) this;
}
public Criteria andSendStatusNotEqualTo(Byte value) {
addCriterion("send_status <>", value, "sendStatus");
return (Criteria) this;
}
public Criteria andSendStatusGreaterThan(Byte value) {
addCriterion("send_status >", value, "sendStatus");
return (Criteria) this;
}
public Criteria andSendStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("send_status >=", value, "sendStatus");
return (Criteria) this;
}
public Criteria andSendStatusLessThan(Byte value) {
addCriterion("send_status <", value, "sendStatus");
return (Criteria) this;
}
public Criteria andSendStatusLessThanOrEqualTo(Byte value) {
addCriterion("send_status <=", value, "sendStatus");
return (Criteria) this;
}
public Criteria andSendStatusIn(List<Byte> values) {
addCriterion("send_status in", values, "sendStatus");
return (Criteria) this;
}
public Criteria andSendStatusNotIn(List<Byte> values) {
addCriterion("send_status not in", values, "sendStatus");
return (Criteria) this;
}
public Criteria andSendStatusBetween(Byte value1, Byte value2) {
addCriterion("send_status between", value1, value2, "sendStatus");
return (Criteria) this;
}
public Criteria andSendStatusNotBetween(Byte value1, Byte value2) {
addCriterion("send_status not between", value1, value2, "sendStatus");
return (Criteria) this;
}
public Criteria andReadStatusIsNull() {
addCriterion("read_status is null");
return (Criteria) this;
}
public Criteria andReadStatusIsNotNull() {
addCriterion("read_status is not null");
return (Criteria) this;
}
public Criteria andReadStatusEqualTo(Byte value) {
addCriterion("read_status =", value, "readStatus");
return (Criteria) this;
}
public Criteria andReadStatusNotEqualTo(Byte value) {
addCriterion("read_status <>", value, "readStatus");
return (Criteria) this;
}
public Criteria andReadStatusGreaterThan(Byte value) {
addCriterion("read_status >", value, "readStatus");
return (Criteria) this;
}
public Criteria andReadStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("read_status >=", value, "readStatus");
return (Criteria) this;
}
public Criteria andReadStatusLessThan(Byte value) {
addCriterion("read_status <", value, "readStatus");
return (Criteria) this;
}
public Criteria andReadStatusLessThanOrEqualTo(Byte value) {
addCriterion("read_status <=", value, "readStatus");
return (Criteria) this;
}
public Criteria andReadStatusIn(List<Byte> values) {
addCriterion("read_status in", values, "readStatus");
return (Criteria) this;
}
public Criteria andReadStatusNotIn(List<Byte> values) {
addCriterion("read_status not in", values, "readStatus");
return (Criteria) this;
}
public Criteria andReadStatusBetween(Byte value1, Byte value2) {
addCriterion("read_status between", value1, value2, "readStatus");
return (Criteria) this;
}
public Criteria andReadStatusNotBetween(Byte value1, Byte value2) {
addCriterion("read_status not between", value1, value2, "readStatus");
return (Criteria) this;
}
public Criteria andInitReadIsNull() {
addCriterion("init_read is null");
return (Criteria) this;
}
public Criteria andInitReadIsNotNull() {
addCriterion("init_read is not null");
return (Criteria) this;
}
public Criteria andInitReadEqualTo(Byte value) {
addCriterion("init_read =", value, "initRead");
return (Criteria) this;
}
public Criteria andInitReadNotEqualTo(Byte value) {
addCriterion("init_read <>", value, "initRead");
return (Criteria) this;
}
public Criteria andInitReadGreaterThan(Byte value) {
addCriterion("init_read >", value, "initRead");
return (Criteria) this;
}
public Criteria andInitReadGreaterThanOrEqualTo(Byte value) {
addCriterion("init_read >=", value, "initRead");
return (Criteria) this;
}
public Criteria andInitReadLessThan(Byte value) {
addCriterion("init_read <", value, "initRead");
return (Criteria) this;
}
public Criteria andInitReadLessThanOrEqualTo(Byte value) {
addCriterion("init_read <=", value, "initRead");
return (Criteria) this;
}
public Criteria andInitReadIn(List<Byte> values) {
addCriterion("init_read in", values, "initRead");
return (Criteria) this;
}
public Criteria andInitReadNotIn(List<Byte> values) {
addCriterion("init_read not in", values, "initRead");
return (Criteria) this;
}
public Criteria andInitReadBetween(Byte value1, Byte value2) {
addCriterion("init_read between", value1, value2, "initRead");
return (Criteria) this;
}
public Criteria andInitReadNotBetween(Byte value1, Byte value2) {
addCriterion("init_read not between", value1, value2, "initRead");
return (Criteria) this;
}
public Criteria andSendTimeIsNull() {
addCriterion("send_time is null");
return (Criteria) this;
}
public Criteria andSendTimeIsNotNull() {
addCriterion("send_time is not null");
return (Criteria) this;
}
public Criteria andSendTimeEqualTo(Long value) {
addCriterion("send_time =", value, "sendTime");
return (Criteria) this;
}
public Criteria andSendTimeNotEqualTo(Long value) {
addCriterion("send_time <>", value, "sendTime");
return (Criteria) this;
}
public Criteria andSendTimeGreaterThan(Long value) {
addCriterion("send_time >", value, "sendTime");
return (Criteria) this;
}
public Criteria andSendTimeGreaterThanOrEqualTo(Long value) {
addCriterion("send_time >=", value, "sendTime");
return (Criteria) this;
}
public Criteria andSendTimeLessThan(Long value) {
addCriterion("send_time <", value, "sendTime");
return (Criteria) this;
}
public Criteria andSendTimeLessThanOrEqualTo(Long value) {
addCriterion("send_time <=", value, "sendTime");
return (Criteria) this;
}
public Criteria andSendTimeIn(List<Long> values) {
addCriterion("send_time in", values, "sendTime");
return (Criteria) this;
}
public Criteria andSendTimeNotIn(List<Long> values) {
addCriterion("send_time not in", values, "sendTime");
return (Criteria) this;
}
public Criteria andSendTimeBetween(Long value1, Long value2) {
addCriterion("send_time between", value1, value2, "sendTime");
return (Criteria) this;
}
public Criteria andSendTimeNotBetween(Long value1, Long value2) {
addCriterion("send_time not between", value1, value2, "sendTime");
return (Criteria) this;
}
public Criteria andCompleteIsNull() {
addCriterion("complete is null");
return (Criteria) this;
}
public Criteria andCompleteIsNotNull() {
addCriterion("complete is not null");
return (Criteria) this;
}
public Criteria andCompleteEqualTo(Byte value) {
addCriterion("complete =", value, "complete");
return (Criteria) this;
}
public Criteria andCompleteNotEqualTo(Byte value) {
addCriterion("complete <>", value, "complete");
return (Criteria) this;
}
public Criteria andCompleteGreaterThan(Byte value) {
addCriterion("complete >", value, "complete");
return (Criteria) this;
}
public Criteria andCompleteGreaterThanOrEqualTo(Byte value) {
addCriterion("complete >=", value, "complete");
return (Criteria) this;
}
public Criteria andCompleteLessThan(Byte value) {
addCriterion("complete <", value, "complete");
return (Criteria) this;
}
public Criteria andCompleteLessThanOrEqualTo(Byte value) {
addCriterion("complete <=", value, "complete");
return (Criteria) this;
}
public Criteria andCompleteIn(List<Byte> values) {
addCriterion("complete in", values, "complete");
return (Criteria) this;
}
public Criteria andCompleteNotIn(List<Byte> values) {
addCriterion("complete not in", values, "complete");
return (Criteria) this;
}
public Criteria andCompleteBetween(Byte value1, Byte value2) {
addCriterion("complete between", value1, value2, "complete");
return (Criteria) this;
}
public Criteria andCompleteNotBetween(Byte value1, Byte value2) {
addCriterion("complete not between", value1, value2, "complete");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

106
tall/src/main/java/com/ccsens/tall/bean/po/SysOperation.java

@ -0,0 +1,106 @@
package com.ccsens.tall.bean.po;
import java.io.Serializable;
import java.util.Date;
public class SysOperation implements Serializable {
private Long id;
private Long operatorId;
private Long projectId;
private Byte operateType;
private Long operationTime;
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 getOperatorId() {
return operatorId;
}
public void setOperatorId(Long operatorId) {
this.operatorId = operatorId;
}
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public Byte getOperateType() {
return operateType;
}
public void setOperateType(Byte operateType) {
this.operateType = operateType;
}
public Long getOperationTime() {
return operationTime;
}
public void setOperationTime(Long operationTime) {
this.operationTime = operationTime;
}
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(", operatorId=").append(operatorId);
sb.append(", projectId=").append(projectId);
sb.append(", operateType=").append(operateType);
sb.append(", operationTime=").append(operationTime);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

681
tall/src/main/java/com/ccsens/tall/bean/po/SysOperationExample.java

@ -0,0 +1,681 @@
package com.ccsens.tall.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysOperationExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysOperationExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andOperatorIdIsNull() {
addCriterion("operator_id is null");
return (Criteria) this;
}
public Criteria andOperatorIdIsNotNull() {
addCriterion("operator_id is not null");
return (Criteria) this;
}
public Criteria andOperatorIdEqualTo(Long value) {
addCriterion("operator_id =", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdNotEqualTo(Long value) {
addCriterion("operator_id <>", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdGreaterThan(Long value) {
addCriterion("operator_id >", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdGreaterThanOrEqualTo(Long value) {
addCriterion("operator_id >=", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdLessThan(Long value) {
addCriterion("operator_id <", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdLessThanOrEqualTo(Long value) {
addCriterion("operator_id <=", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdIn(List<Long> values) {
addCriterion("operator_id in", values, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdNotIn(List<Long> values) {
addCriterion("operator_id not in", values, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdBetween(Long value1, Long value2) {
addCriterion("operator_id between", value1, value2, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdNotBetween(Long value1, Long value2) {
addCriterion("operator_id not between", value1, value2, "operatorId");
return (Criteria) this;
}
public Criteria andProjectIdIsNull() {
addCriterion("project_id is null");
return (Criteria) this;
}
public Criteria andProjectIdIsNotNull() {
addCriterion("project_id is not null");
return (Criteria) this;
}
public Criteria andProjectIdEqualTo(Long value) {
addCriterion("project_id =", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotEqualTo(Long value) {
addCriterion("project_id <>", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThan(Long value) {
addCriterion("project_id >", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThanOrEqualTo(Long value) {
addCriterion("project_id >=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThan(Long value) {
addCriterion("project_id <", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThanOrEqualTo(Long value) {
addCriterion("project_id <=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdIn(List<Long> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<Long> values) {
addCriterion("project_id not in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdBetween(Long value1, Long value2) {
addCriterion("project_id between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotBetween(Long value1, Long value2) {
addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andOperateTypeIsNull() {
addCriterion("operate_type is null");
return (Criteria) this;
}
public Criteria andOperateTypeIsNotNull() {
addCriterion("operate_type is not null");
return (Criteria) this;
}
public Criteria andOperateTypeEqualTo(Byte value) {
addCriterion("operate_type =", value, "operateType");
return (Criteria) this;
}
public Criteria andOperateTypeNotEqualTo(Byte value) {
addCriterion("operate_type <>", value, "operateType");
return (Criteria) this;
}
public Criteria andOperateTypeGreaterThan(Byte value) {
addCriterion("operate_type >", value, "operateType");
return (Criteria) this;
}
public Criteria andOperateTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("operate_type >=", value, "operateType");
return (Criteria) this;
}
public Criteria andOperateTypeLessThan(Byte value) {
addCriterion("operate_type <", value, "operateType");
return (Criteria) this;
}
public Criteria andOperateTypeLessThanOrEqualTo(Byte value) {
addCriterion("operate_type <=", value, "operateType");
return (Criteria) this;
}
public Criteria andOperateTypeIn(List<Byte> values) {
addCriterion("operate_type in", values, "operateType");
return (Criteria) this;
}
public Criteria andOperateTypeNotIn(List<Byte> values) {
addCriterion("operate_type not in", values, "operateType");
return (Criteria) this;
}
public Criteria andOperateTypeBetween(Byte value1, Byte value2) {
addCriterion("operate_type between", value1, value2, "operateType");
return (Criteria) this;
}
public Criteria andOperateTypeNotBetween(Byte value1, Byte value2) {
addCriterion("operate_type not between", value1, value2, "operateType");
return (Criteria) this;
}
public Criteria andOperationTimeIsNull() {
addCriterion("operation_time is null");
return (Criteria) this;
}
public Criteria andOperationTimeIsNotNull() {
addCriterion("operation_time is not null");
return (Criteria) this;
}
public Criteria andOperationTimeEqualTo(Long value) {
addCriterion("operation_time =", value, "operationTime");
return (Criteria) this;
}
public Criteria andOperationTimeNotEqualTo(Long value) {
addCriterion("operation_time <>", value, "operationTime");
return (Criteria) this;
}
public Criteria andOperationTimeGreaterThan(Long value) {
addCriterion("operation_time >", value, "operationTime");
return (Criteria) this;
}
public Criteria andOperationTimeGreaterThanOrEqualTo(Long value) {
addCriterion("operation_time >=", value, "operationTime");
return (Criteria) this;
}
public Criteria andOperationTimeLessThan(Long value) {
addCriterion("operation_time <", value, "operationTime");
return (Criteria) this;
}
public Criteria andOperationTimeLessThanOrEqualTo(Long value) {
addCriterion("operation_time <=", value, "operationTime");
return (Criteria) this;
}
public Criteria andOperationTimeIn(List<Long> values) {
addCriterion("operation_time in", values, "operationTime");
return (Criteria) this;
}
public Criteria andOperationTimeNotIn(List<Long> values) {
addCriterion("operation_time not in", values, "operationTime");
return (Criteria) this;
}
public Criteria andOperationTimeBetween(Long value1, Long value2) {
addCriterion("operation_time between", value1, value2, "operationTime");
return (Criteria) this;
}
public Criteria andOperationTimeNotBetween(Long value1, Long value2) {
addCriterion("operation_time not between", value1, value2, "operationTime");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

117
tall/src/main/java/com/ccsens/tall/bean/po/SysOperationMessage.java

@ -0,0 +1,117 @@
package com.ccsens.tall.bean.po;
import java.io.Serializable;
import java.util.Date;
public class SysOperationMessage implements Serializable {
private Long id;
private Long operationId;
private String content;
private Byte type;
private String settings;
private Byte sort;
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 getOperationId() {
return operationId;
}
public void setOperationId(Long operationId) {
this.operationId = operationId;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
public Byte getType() {
return type;
}
public void setType(Byte type) {
this.type = type;
}
public String getSettings() {
return settings;
}
public void setSettings(String settings) {
this.settings = settings == null ? null : settings.trim();
}
public Byte getSort() {
return sort;
}
public void setSort(Byte sort) {
this.sort = sort;
}
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(", operationId=").append(operationId);
sb.append(", content=").append(content);
sb.append(", type=").append(type);
sb.append(", settings=").append(settings);
sb.append(", sort=").append(sort);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

761
tall/src/main/java/com/ccsens/tall/bean/po/SysOperationMessageExample.java

@ -0,0 +1,761 @@
package com.ccsens.tall.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysOperationMessageExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysOperationMessageExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andOperationIdIsNull() {
addCriterion("operation_id is null");
return (Criteria) this;
}
public Criteria andOperationIdIsNotNull() {
addCriterion("operation_id is not null");
return (Criteria) this;
}
public Criteria andOperationIdEqualTo(Long value) {
addCriterion("operation_id =", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdNotEqualTo(Long value) {
addCriterion("operation_id <>", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdGreaterThan(Long value) {
addCriterion("operation_id >", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdGreaterThanOrEqualTo(Long value) {
addCriterion("operation_id >=", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdLessThan(Long value) {
addCriterion("operation_id <", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdLessThanOrEqualTo(Long value) {
addCriterion("operation_id <=", value, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdIn(List<Long> values) {
addCriterion("operation_id in", values, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdNotIn(List<Long> values) {
addCriterion("operation_id not in", values, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdBetween(Long value1, Long value2) {
addCriterion("operation_id between", value1, value2, "operationId");
return (Criteria) this;
}
public Criteria andOperationIdNotBetween(Long value1, Long value2) {
addCriterion("operation_id not between", value1, value2, "operationId");
return (Criteria) this;
}
public Criteria andContentIsNull() {
addCriterion("content is null");
return (Criteria) this;
}
public Criteria andContentIsNotNull() {
addCriterion("content is not null");
return (Criteria) this;
}
public Criteria andContentEqualTo(String value) {
addCriterion("content =", value, "content");
return (Criteria) this;
}
public Criteria andContentNotEqualTo(String value) {
addCriterion("content <>", value, "content");
return (Criteria) this;
}
public Criteria andContentGreaterThan(String value) {
addCriterion("content >", value, "content");
return (Criteria) this;
}
public Criteria andContentGreaterThanOrEqualTo(String value) {
addCriterion("content >=", value, "content");
return (Criteria) this;
}
public Criteria andContentLessThan(String value) {
addCriterion("content <", value, "content");
return (Criteria) this;
}
public Criteria andContentLessThanOrEqualTo(String value) {
addCriterion("content <=", value, "content");
return (Criteria) this;
}
public Criteria andContentLike(String value) {
addCriterion("content like", value, "content");
return (Criteria) this;
}
public Criteria andContentNotLike(String value) {
addCriterion("content not like", value, "content");
return (Criteria) this;
}
public Criteria andContentIn(List<String> values) {
addCriterion("content in", values, "content");
return (Criteria) this;
}
public Criteria andContentNotIn(List<String> values) {
addCriterion("content not in", values, "content");
return (Criteria) this;
}
public Criteria andContentBetween(String value1, String value2) {
addCriterion("content between", value1, value2, "content");
return (Criteria) this;
}
public Criteria andContentNotBetween(String value1, String value2) {
addCriterion("content not between", value1, value2, "content");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Byte value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Byte value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Byte value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Byte value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Byte value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Byte> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Byte> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Byte value1, Byte value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Byte value1, Byte value2) {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andSettingsIsNull() {
addCriterion("settings is null");
return (Criteria) this;
}
public Criteria andSettingsIsNotNull() {
addCriterion("settings is not null");
return (Criteria) this;
}
public Criteria andSettingsEqualTo(String value) {
addCriterion("settings =", value, "settings");
return (Criteria) this;
}
public Criteria andSettingsNotEqualTo(String value) {
addCriterion("settings <>", value, "settings");
return (Criteria) this;
}
public Criteria andSettingsGreaterThan(String value) {
addCriterion("settings >", value, "settings");
return (Criteria) this;
}
public Criteria andSettingsGreaterThanOrEqualTo(String value) {
addCriterion("settings >=", value, "settings");
return (Criteria) this;
}
public Criteria andSettingsLessThan(String value) {
addCriterion("settings <", value, "settings");
return (Criteria) this;
}
public Criteria andSettingsLessThanOrEqualTo(String value) {
addCriterion("settings <=", value, "settings");
return (Criteria) this;
}
public Criteria andSettingsLike(String value) {
addCriterion("settings like", value, "settings");
return (Criteria) this;
}
public Criteria andSettingsNotLike(String value) {
addCriterion("settings not like", value, "settings");
return (Criteria) this;
}
public Criteria andSettingsIn(List<String> values) {
addCriterion("settings in", values, "settings");
return (Criteria) this;
}
public Criteria andSettingsNotIn(List<String> values) {
addCriterion("settings not in", values, "settings");
return (Criteria) this;
}
public Criteria andSettingsBetween(String value1, String value2) {
addCriterion("settings between", value1, value2, "settings");
return (Criteria) this;
}
public Criteria andSettingsNotBetween(String value1, String value2) {
addCriterion("settings not between", value1, value2, "settings");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Byte value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Byte value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThan(Byte value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Byte value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThan(Byte value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Byte value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
public Criteria andSortIn(List<Byte> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Byte> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Byte value1, Byte value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Byte value1, Byte value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

207
tall/src/main/java/com/ccsens/tall/bean/vo/MessageVo.java

@ -0,0 +1,207 @@
package com.ccsens.tall.bean.vo;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.util.WebConstant;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @description:
* @author: whj
* @time: 2020/5/26 15:05
*/
public class MessageVo {
@Data
@ApiModel("消息通知--前端")
public static class InformToWeb{
@ApiModelProperty("消息Id")
private Long id;
@ApiModelProperty("消息列表")
private List<Message> messages;
}
@Data
@ApiModel("消息通知")
public static class Inform{
@ApiModelProperty("项目ID")
private Long projectId;
@ApiModelProperty("操作者ID")
private Long operatorId;
@ApiModelProperty("消息列表")
private List<Message> messages = new ArrayList<>();
public Inform() {
}
public Inform(Long projectId, Long operatorId) {
this.projectId = projectId;
this.operatorId = operatorId;
}
public Inform appendMessage(Message message) {
messages.add(message);
return this;
}
}
@Data
@ApiModel("消息内容")
public static class Message {
@ApiModelProperty("消息属性")
private String name;
@ApiModelProperty("消息内容")
private String content;
@ApiModelProperty("类型 0:文本 1:链接")
private Byte type = 0;
@ApiModelProperty("配置")
private String settings;
public static String getProjectSettings(Long projectId) {
JSONObject json = new JSONObject();
json.put(WebConstant.Project.PROJECT_ID, projectId);
return json.toJSONString();
}
public Message() {
}
public Message(String content) {
this.content = content;
}
public Message(String name, String content) {
this.name = name;
this.content = content;
}
public Message(String name, String content, Byte type, String settings) {
this.name = name;
this.content = content;
this.type = type;
this.settings = settings;
}
}
/**
* 组装添加任务模板
* @param userId
* @param userName
* @param projectId
* @param projectName
* @param taskName
* @param principal
* @return
*/
public static Inform addTask(Long userId, String userName, Long projectId, String projectName, String taskName, String principal) {
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId);
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId)))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Principal.value,principal))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName));
return inform;
}
/**
* 组装完成任务模板
* @param userId
* @param userName
* @param projectId
* @param projectName
* @param isFinish
* @param taskName
* @return
*/
public static Inform finishTask(Long userId, String userName, Long projectId, String projectName, String isFinish, String taskName) {
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId);
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId)))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operate.value, isFinish))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName));
return inform;
}
/**
* 上传交付物
* @param userId
* @param userName
* @param projectId
* @param projectName
* @param taskName
* @param deliverName
* @return
*/
public static Inform addDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String deliverName) {
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId);
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId)))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName));
return inform;
}
/**
* 检查交付物
* @param userId
* @param userName
* @param projectId
* @param projectName
* @param taskName
* @param principalName
* @param deliverName
* @return
*/
public static Inform checkDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String principalName, String deliverName) {
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId);
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId)))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Principal.value,principalName));
return inform;
}
public static Inform deleteDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String deliverName) {
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId);
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId)))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName));
return inform;
}
public static Inform deleteTask(Long userId, String userName, Long projectId, String projectName, String taskName) {
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId);
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId)))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName));
return inform;
}
public static Inform changeTask(Long userId, String userName, Long projectId, String projectName, String taskName, String principal) {
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId);
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId)))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Principal.value,principal));
return inform;
}
public static Inform addComment(Long userId, String userName, Long projectId, String projectName, String taskName) {
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId);
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId)))
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName));
return inform;
}
}

46
tall/src/main/java/com/ccsens/tall/bean/vo/ProjectMessageVo.java

@ -0,0 +1,46 @@
package com.ccsens.tall.bean.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @description:
* @author: whj
* @time: 2020/5/28 17:34
*/
@ApiModel("未读消息相关返回结果")
public class ProjectMessageVo {
@Data
@ApiModel("未读消息数-返回")
public static class UnreadNum{
@ApiModelProperty("发送类型 0:ws,1:微信公众号")
private Integer unreadNum;
}
@Data
@ApiModel("未读消息-返回")
@JsonIgnoreProperties(value = { "handler" })
public static class Query{
@ApiModelProperty("发送消息ID")
private Long id;
@JsonIgnore
@ApiModelProperty("消息操作ID")
private Long operationId;
@ApiModelProperty("发送类型 0:ws,1:微信公众号")
private Byte sendType;
@ApiModelProperty("阅读状态 0未读 1已读")
private Byte readStatus;
@ApiModelProperty("消息内容")
List<MessageVo.Message> messages;
@JsonFormat(pattern="yyyy-MM-dd HH:mm")
@ApiModelProperty("发送时间")
private Date createTime;
}
}

6
tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java

@ -17,4 +17,10 @@ public interface ProMemberDao extends ProMemberMapper{
List<WbsVo.Member> selectByRoleId(@Param("roleId")Long roleId);
List<WbsVo.MemberAndStakeholder> getMemberAndStakeholder(@Param("projectId")Long projectId);
/**
* 查询项目内所有成员的userid
* @param projectId
*/
List<Long> queryUserIdsByProjectId(@Param("projectId") Long projectId);
}

32
tall/src/main/java/com/ccsens/tall/persist/dao/SysMessageSendDao.java

@ -0,0 +1,32 @@
package com.ccsens.tall.persist.dao;
import com.ccsens.tall.persist.mapper.SysMessageSendMapper;
import org.apache.ibatis.annotations.Param;
public interface SysMessageSendDao extends SysMessageSendMapper {
/**
* 标记消息已读+初始读
* @param id
*/
void markInitRead(@Param("id") Long id);
/**
* 标记某人某消息的所有未读发送为已读
* @param operationId
* @param userId
*/
void markOtherSendRead(@Param("operationId") Long operationId, @Param("receiverId") Long userId);
/**
* 标记用户该方式的消息为已读+初始阅读
* @param sendType
* @param userId
*/
void markInitReadBySendType(@Param("sendType") Byte sendType, @Param("receiverId") Long userId);
/**
* 标记用户的其他未读消息为已读
* @param userId
*/
void markAllRead(@Param("receiverId") Long userId);
}

35
tall/src/main/java/com/ccsens/tall/persist/dao/SysOperationDao.java

@ -0,0 +1,35 @@
package com.ccsens.tall.persist.dao;
import com.ccsens.tall.bean.dto.ProjectMessageDto;
import com.ccsens.tall.bean.vo.MessageVo;
import com.ccsens.tall.bean.vo.ProjectMessageVo;
import com.ccsens.tall.persist.mapper.SysOperationMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SysOperationDao extends SysOperationMapper {
/**
* 查询未读消息数
* @param sendType
* @param userId
* @return
*/
ProjectMessageVo.UnreadNum queryUnreadNum(@Param("sendType") Byte sendType, @Param("userId") Long userId);
/**
* 查询消息
* @param param
* @param userId
* @return
*/
List<ProjectMessageVo.Query> queryMsg(@Param("param") ProjectMessageDto.Query param, @Param("userId")Long userId);
/**
* 查询消息的具体内容
* @param operationId
* @return
*/
List<MessageVo.Message> queryContent(@Param("operationId") Long operationId);
}

30
tall/src/main/java/com/ccsens/tall/persist/mapper/SysMessageSendMapper.java

@ -0,0 +1,30 @@
package com.ccsens.tall.persist.mapper;
import com.ccsens.tall.bean.po.SysMessageSend;
import com.ccsens.tall.bean.po.SysMessageSendExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface SysMessageSendMapper {
long countByExample(SysMessageSendExample example);
int deleteByExample(SysMessageSendExample example);
int deleteByPrimaryKey(Long id);
int insert(SysMessageSend record);
int insertSelective(SysMessageSend record);
List<SysMessageSend> selectByExample(SysMessageSendExample example);
SysMessageSend selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysMessageSend record, @Param("example") SysMessageSendExample example);
int updateByExample(@Param("record") SysMessageSend record, @Param("example") SysMessageSendExample example);
int updateByPrimaryKeySelective(SysMessageSend record);
int updateByPrimaryKey(SysMessageSend record);
}

30
tall/src/main/java/com/ccsens/tall/persist/mapper/SysOperationMapper.java

@ -0,0 +1,30 @@
package com.ccsens.tall.persist.mapper;
import com.ccsens.tall.bean.po.SysOperation;
import com.ccsens.tall.bean.po.SysOperationExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface SysOperationMapper {
long countByExample(SysOperationExample example);
int deleteByExample(SysOperationExample example);
int deleteByPrimaryKey(Long id);
int insert(SysOperation record);
int insertSelective(SysOperation record);
List<SysOperation> selectByExample(SysOperationExample example);
SysOperation selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysOperation record, @Param("example") SysOperationExample example);
int updateByExample(@Param("record") SysOperation record, @Param("example") SysOperationExample example);
int updateByPrimaryKeySelective(SysOperation record);
int updateByPrimaryKey(SysOperation record);
}

30
tall/src/main/java/com/ccsens/tall/persist/mapper/SysOperationMessageMapper.java

@ -0,0 +1,30 @@
package com.ccsens.tall.persist.mapper;
import com.ccsens.tall.bean.po.SysOperationMessage;
import com.ccsens.tall.bean.po.SysOperationMessageExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface SysOperationMessageMapper {
long countByExample(SysOperationMessageExample example);
int deleteByExample(SysOperationMessageExample example);
int deleteByPrimaryKey(Long id);
int insert(SysOperationMessage record);
int insertSelective(SysOperationMessage record);
List<SysOperationMessage> selectByExample(SysOperationMessageExample example);
SysOperationMessage selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysOperationMessage record, @Param("example") SysOperationMessageExample example);
int updateByExample(@Param("record") SysOperationMessage record, @Param("example") SysOperationMessageExample example);
int updateByPrimaryKeySelective(SysOperationMessage record);
int updateByPrimaryKey(SysOperationMessage record);
}

7
tall/src/main/java/com/ccsens/tall/service/AsyncService.java

@ -1,5 +1,6 @@
package com.ccsens.tall.service;
import com.ccsens.tall.bean.vo.MessageVo;
import com.ccsens.tall.util.RobotUtil;
import com.ccsens.util.annotation.OperateType;
import lombok.extern.slf4j.Slf4j;
@ -18,6 +19,8 @@ public class AsyncService implements IAsyncService{
@Resource
private IRobotService robotService;
@Resource
private IProjectMessageService projectMessageService;
@Override
@ -25,4 +28,8 @@ public class AsyncService implements IAsyncService{
robotService.robotMessage(operateType,message);
}
@Override
public void sendMessage(OperateType operateType, MessageVo.Inform inform) {
projectMessageService.sendProjectMessage(operateType, inform);
}
}

10
tall/src/main/java/com/ccsens/tall/service/IAsyncService.java

@ -1,5 +1,6 @@
package com.ccsens.tall.service;
import com.ccsens.tall.bean.vo.MessageVo;
import com.ccsens.tall.util.RobotUtil;
import com.ccsens.util.annotation.OperateType;
@ -8,4 +9,13 @@ import com.ccsens.util.annotation.OperateType;
*/
public interface IAsyncService {
void sendRobotMessage(OperateType operateType, RobotUtil.Message message);
/**
* 消息发送ws,公众号
* @param operateType
* @param inform
*/
void sendMessage(OperateType operateType, MessageVo.Inform inform);
}

55
tall/src/main/java/com/ccsens/tall/service/IProjectMessageService.java

@ -0,0 +1,55 @@
package com.ccsens.tall.service;
import com.ccsens.tall.bean.dto.ProjectMessageDto;
import com.ccsens.tall.bean.vo.MessageVo;
import com.ccsens.tall.bean.vo.ProjectMessageVo;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.annotation.OperateType;
import com.github.pagehelper.PageInfo;
/**
* @description:
* @author: whj
* @time: 2020/5/26 17:36
*/
public interface IProjectMessageService {
/**
* 发送消息ws/公众号
* @param operateType
* @param inform
*/
void sendProjectMessage(OperateType operateType, MessageVo.Inform inform);
/**
* 查询未读消息数
* @param sendType
* @param userId
* @return
*/
ProjectMessageVo.UnreadNum queryUnreadNum(Byte sendType, Long userId);
/**
* 分页查询未读消息数
* @param param
* @param userId
* @return
*/
PageInfo<ProjectMessageVo.Query> queryMsg(ProjectMessageDto.Query param, Long userId);
/**
* 标记某条消息已读
* @param param
* @param userId
* @return
*/
CodeEnum markRead(ProjectMessageDto.MarkRead param, Long userId);
/**
* 标记全部消息已读
* @param param
* @param userId
* @return
*/
CodeEnum markAllRead(ProjectMessageDto.MarkAllRead param, Long userId);
}

9
tall/src/main/java/com/ccsens/tall/service/IRobotService.java

@ -44,7 +44,7 @@ public interface IRobotService {
* @param currentUserId
* @param subTimeId
*/
void addDeliverRobotSend(Long currentUserId,String deliverName, Long subTimeId) throws Exception;
void addDeliverRobotSend(Long currentUserId,String deliverName, Long subTimeId,SysProject project) throws Exception;
/**
* 删除交付物信息
@ -69,4 +69,11 @@ public interface IRobotService {
* @param proTaskDetail
*/
void addCommentRobotSend(Long userId, ProTaskDetail proTaskDetail) throws Exception;
/**
* 查询模板
* @param code
* @return
*/
String getRobotTemplate(int code);
}

2
tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java

@ -1130,6 +1130,8 @@ public class ProTaskDetailService implements IProTaskDetailService {
//返回的任务详细信息
Long subTimeId = taskDeliverService.isTaskOrSubTime(taskDetail.getId());
normalTask = getTaskInfoByTaskId(currentUserId,project.getId(),subTimeId);
} else {
throw new BaseException(CodeEnum.NOT_POWER);
}
}else {
throw new BaseException(CodeEnum.NOT_POWER);

270
tall/src/main/java/com/ccsens/tall/service/ProjectMessageService.java

@ -0,0 +1,270 @@
package com.ccsens.tall.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.tall.bean.dto.ProjectMessageDto;
import com.ccsens.tall.bean.po.SysMessageSend;
import com.ccsens.tall.bean.po.SysMessageSendExample;
import com.ccsens.tall.bean.po.SysOperation;
import com.ccsens.tall.bean.po.SysOperationMessage;
import com.ccsens.tall.bean.vo.MessageVo;
import com.ccsens.tall.bean.vo.ProjectMessageVo;
import com.ccsens.tall.persist.dao.ProMemberDao;
import com.ccsens.tall.persist.dao.SysMessageSendDao;
import com.ccsens.tall.persist.dao.SysOperationDao;
import com.ccsens.tall.persist.mapper.SysOperationMessageMapper;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.TransactionUtil;
import com.ccsens.util.WebConstant;
import com.ccsens.util.annotation.OperateType;
import com.ccsens.util.bean.message.common.InMessage;
import com.ccsens.util.config.RabbitMQConfig;
import com.ccsens.util.exception.BaseException;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionException;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* @description:
* @author: whj
* @time: 2020/5/26 17:36
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
public class ProjectMessageService implements IProjectMessageService {
@Resource
private IRobotService robotService;
@Resource
private ProMemberDao proMemberDao;
@Resource
private SysOperationDao sysOperationDao;
@Resource
private SysOperationMessageMapper sysOperationMessageMapper;
@Resource
private SysMessageSendDao sysMessageSendDao;
@Resource
private AmqpTemplate rabbitTemplate;
@Resource
private Snowflake snowflake;
@Resource
private PlatformTransactionManager transactionManager;
@Override
public void sendProjectMessage(OperateType operateType, MessageVo.Inform inform) {
log.info("发送消息请求参数:类型:{},消息:{}", operateType, inform);
if (operateType == null || inform == null) {
throw new BaseException(CodeEnum.PARAM_ERROR);
}
// 模板
List<MessageVo.Message> newMessages = getMessages(operateType, inform);
log.info("模板:{}", newMessages);
// 查询项目内所有成员ID
List<Long> userIds = proMemberDao.queryUserIdsByProjectId(inform.getProjectId());
//保存消息记录
Long operationId = initMessage(operateType, inform, newMessages, userIds);
//mq-->ws
InMessage inMessage = new InMessage();
inMessage.setTos(InMessage.transTos(userIds));
inMessage.setData(JSONObject.toJSONString(newMessages));
rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, JSONObject.toJSONString(inMessage));
log.info("mq通知消息:{}", inMessage);
//更新ws消息发送成功
updateStatus(operationId, WebConstant.Message.SEND_WS);
}
/**
* 更新记录为发送成功
* @param operationId
* @param sendType
*/
private void updateStatus(Long operationId, byte sendType) {
SysMessageSend send = new SysMessageSend();
send.setComplete(WebConstant.Message.SEND_SUCCESS);
SysMessageSendExample sendExample = new SysMessageSendExample();
sendExample.createCriteria().andOperationIdEqualTo(operationId).andSendTypeEqualTo(sendType).andRecStatusEqualTo(WebConstant.REC_STATUS.Normal.value);
sysMessageSendDao.updateByExampleSelective(send, sendExample);
log.info("修改操作:{}的发送类型:{}为发送成功", operationId, sendType);
}
/**
* 保存操作记录
* @param operateType
* @param inform
* @param messages
* @param userIds
* @return
*/
private Long initMessage(OperateType operateType, MessageVo.Inform inform, List<MessageVo.Message> messages,
List<Long> userIds) {
// 操作日志
SysOperation operation = new SysOperation();
operation.setId(snowflake.nextId());
operation.setProjectId(inform.getProjectId());
operation.setOperatorId(inform.getOperatorId());
operation.setOperateType((byte)operateType.value());
log.info("保存操作记录:{}", operation);
sysOperationDao.insertSelective(operation);
// 操作内容
if(CollectionUtil.isNotEmpty(messages)) {
for (int i = 0; i < messages.size(); i++) {
MessageVo.Message message = messages.get(i);
SysOperationMessage operationMessage = new SysOperationMessage();
operationMessage.setId(snowflake.nextId());
operationMessage.setOperationId(operation.getId());
operationMessage.setContent(message.getContent());
operationMessage.setType(message.getType());
operationMessage.setSettings(message.getSettings());
operationMessage.setSort((byte)i);
log.info("第{}个消息内容:{}", i, operationMessage);
sysOperationMessageMapper.insertSelective(operationMessage);
}
}
// 操作发送
if (CollectionUtil.isNotEmpty(userIds)) {
initMessageSend(userIds, operation.getId());
}
return operation.getId();
}
/**
* 保存消息通知了谁
* @param userIds
* @param operationId
*/
private void initMessageSend(List<Long> userIds, Long operationId) {
TransactionStatus transactionStatus = TransactionUtil.getTransactionStatus(transactionManager);
int length = userIds.size() -1;
try {
for (int i = 0; i <= length ; i++) {
// 封装对象
Long userId = userIds.get(i);
SysMessageSend send = new SysMessageSend();
send.setId(snowflake.nextId());
send.setOperationId(operationId);
send.setReceiverId(userId);
send.setSendType(WebConstant.Message.SEND_WS);
sysMessageSendDao.insertSelective(send);
log.info("消息发送:{}", send);
// 判断是否需要提交事务,并开启新事务
boolean needCommit = (i > 0 && (i+1)%100==0) || i == length;
if (needCommit) {
transactionManager.commit(transactionStatus);
if (i<length) {
transactionStatus = TransactionUtil.getTransactionStatus(transactionManager);
}
}
}
} catch (TransactionException e) {
log.error("保存消息发送时出现异常", e);
transactionManager.rollback(transactionStatus);
}
}
/**
* 获取消息模板和内容
* @param operateType
* @param inform
* @return
*/
private List<MessageVo.Message> getMessages(OperateType operateType, MessageVo.Inform inform) {
String template = robotService.getRobotTemplate(operateType.value());
// 解析模板
List<MessageVo.Message> oldMessages = inform.getMessages();
List<MessageVo.Message> newMessages = new ArrayList<>();
int lastIndex = oldMessages.size() - 1;
//文本替换参数
modifyTemplate(template, oldMessages, newMessages, lastIndex);
return newMessages;
}
/**
* 将模板中的参数替换成对应的值如果参数类型不是文本类型需要将模板在参数位置分成三部分
* 递归
* @param template
* @param oldMessages
* @param newMessages
* @param lastIndex
*/
private void modifyTemplate(String template, List<MessageVo.Message> oldMessages, List<MessageVo.Message> newMessages, int lastIndex) {
for (int i = 0; i <= lastIndex; i++) {
MessageVo.Message msg = oldMessages.get(i);
if (msg.getType().byteValue() == WebConstant.Message.TYPE_TEXT) {
template=template.replace(msg.getName(), msg.getContent());
} else {
// 若非文本类,将前面的
int index = template.indexOf(msg.getName());
if (index < 0) {
continue;
}
if (index > 0) {
String text = template.substring(0, index);
if (text.contains("{{")) {
modifyTemplate(text, oldMessages, newMessages, lastIndex);
} else {
newMessages.add(new MessageVo.Message(text));
}
}
newMessages.add(msg);
template = template.substring(index + msg.getName().length());
}
}
if (StrUtil.isNotBlank(template)) {
newMessages.add(new MessageVo.Message(template));
}
}
@Override
public ProjectMessageVo.UnreadNum queryUnreadNum(Byte sendType, Long userId) {
return sysOperationDao.queryUnreadNum(sendType, userId);
}
@Override
public PageInfo<ProjectMessageVo.Query> queryMsg(ProjectMessageDto.Query param, Long userId) {
PageHelper.startPage(param.getPageNum(), param.getPageSize());
List<ProjectMessageVo.Query> list = sysOperationDao.queryMsg(param, userId);
return new PageInfo<>(list);
}
@Override
public CodeEnum markRead(ProjectMessageDto.MarkRead param, Long userId) {
SysMessageSend send = sysMessageSendDao.selectByPrimaryKey(param.getId());
log.info("消息发送:{}", send);
if (send == null) {
return CodeEnum.PARAM_ERROR;
}
// 标记已读+初始阅读为真
sysMessageSendDao.markInitRead(param.getId());
// 标记同一消息+同一接收人的不同发送方式为已读
sysMessageSendDao.markOtherSendRead(send.getOperationId(), userId);
return CodeEnum.SUCCESS;
}
@Override
public CodeEnum markAllRead(ProjectMessageDto.MarkAllRead param, Long userId) {
// 标记用户该方式的消息为已读+初始阅读
sysMessageSendDao.markInitReadBySendType(param.getSendType(), userId);
// 标记用户的其他未读消息为已读
sysMessageSendDao.markAllRead(userId);
return CodeEnum.SUCCESS;
}
}

126
tall/src/main/java/com/ccsens/tall/service/RobotService.java

@ -4,12 +4,14 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.tall.bean.po.*;
import com.ccsens.tall.bean.vo.MessageVo;
import com.ccsens.tall.bean.vo.TaskVo;
import com.ccsens.tall.persist.dao.*;
import com.ccsens.tall.util.RobotUtil;
import com.ccsens.tall.util.TallConstant;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.RedisUtil;
import com.ccsens.util.WebConstant;
import com.ccsens.util.annotation.OperateType;
import com.ccsens.util.exception.BaseException;
import com.ccsens.util.wx.WxRobotUtil;
@ -62,11 +64,9 @@ public class RobotService implements IRobotService{
if(isSend(sysProjectRobot.getId(),operateType.value())){
String content = getRobotTemplate(operateType.value());
//获取发送参数
StringBuilder builder = new StringBuilder(content);
String replace = "{{}}";
final String[] builder = {content};
message.getParams().forEach(param->{
int start = builder.indexOf(replace);
builder.replace(start, start + replace.length(),param);
builder[0] = builder[0].replace(param.getName(),param.getContent());
});
//获取机器人信息
@ -76,20 +76,15 @@ public class RobotService implements IRobotService{
switch (sysRobot.getClientType()){
case 0://微信
try {
WxRobotUtil.sendRobotInfo(sysRobot.getWebHook(),builder,message.getMsgType(),message.getMentionedList(),message.getMentionedMobileList());
WxRobotUtil.sendRobotInfo(sysRobot.getWebHook(), builder[0],message.getMsgType(),message.getMentionedList(),message.getMentionedMobileList());
} catch (Exception e) {
e.printStackTrace();
}
//删除线程
RobotUtil.del();
break;
case 1://钉钉
//删除线程
RobotUtil.del();
break;
default:
//删除线程
RobotUtil.del();
}
}
}
@ -112,7 +107,8 @@ public class RobotService implements IRobotService{
return flag.get();
}
private String getRobotTemplate(int code){
@Override
public String getRobotTemplate(int code){
String robotKey = TallConstant.getRobotTemplateKey(code);
String template = "";
template = (String)redisUtil.get(robotKey);
@ -156,35 +152,51 @@ public class RobotService implements IRobotService{
}
RobotUtil.Message message = new RobotUtil.Message(projectId);
message.appendParams(userName,projectName,isFinish,taskName);
message.appendParams(
new MessageVo.Message(WebConstant.TemplateParam.Operator.value,userName),
new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value,projectName),
new MessageVo.Message(WebConstant.TemplateParam.Operate.value,isFinish),
new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName));
//获取角色内成员的手机号
String[] memberPhone = getMemberPhonesByRoleId(executorRoleId);
if(memberPhone.length != 0){
message.appendMentionedMobileList(memberPhone);
}
RobotUtil.set(message);
RobotUtil.setRobotMessage(message);
// 添加消息通知
MessageVo.Inform inform = MessageVo.finishTask(currentUserId, userName, projectId, projectName, isFinish, taskName);
RobotUtil.setInform(inform);
}
@Override
public void addTaskRobotSend(Long currentUserId, SysProject project, String taskName, Long executorId) throws Exception {
String userName = userService.getUserNameByUserId(currentUserId);
String projectName = "";
String executorName = "";
TaskVo.RoleCheckList role = proRoleService.selectRoleByCheckOrExecutor(executorId);
if(ObjectUtil.isNotNull(role)){
executorName = role.getName();
}
if(ObjectUtil.isNotNull(project)){
projectName = project.getName();
}
// 获取角色名
TaskVo.RoleCheckList role = proRoleService.selectRoleByCheckOrExecutor(executorId);
String executorName = ObjectUtil.isNotNull(role) ? role.getName() : "";
RobotUtil.Message message = new RobotUtil.Message(project.getId());
message.appendParams(userName,projectName,taskName,executorName);
message.appendParams(
new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName),
new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName),
new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, taskName),
new MessageVo.Message(WebConstant.TemplateParam.Principal.value, executorName));
//获取角色内成员的手机号
String[] memberPhone = getMemberPhonesByRoleId(executorId);
if(memberPhone.length != 0){
message.appendMentionedMobileList(memberPhone);
}
RobotUtil.set(message);
RobotUtil.setRobotMessage(message);
// 添加消息通知
MessageVo.Inform inform = MessageVo.addTask(currentUserId, userName, project.getId(), projectName, taskName, executorName);
RobotUtil.setInform(inform);
}
@Override
@ -196,30 +208,44 @@ public class RobotService implements IRobotService{
projectName = sysProject.getName();
}
RobotUtil.Message message = new RobotUtil.Message(sysProject.getId());
message.appendParams(userName,projectName,taskDetail.getName());
message.appendParams(
new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName),
new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName),
new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, taskDetail.getName()));
//获取角色内成员的手机号
String[] memberPhone = getMemberPhonesByRoleId(taskDetail.getExecutorRole());
if(memberPhone.length != 0){
message.appendMentionedMobileList(memberPhone);
}
RobotUtil.set(message);
RobotUtil.setRobotMessage(message);
MessageVo.Inform inform = MessageVo.deleteTask(currentUserId, userName, sysProject.getId(), projectName, taskDetail.getName());
RobotUtil.setInform(inform);
}
@Override
public void changeTaskRobotSend(Long currentUserId, TaskVo.NormalTask normalTask) throws Exception {
String userName = userService.getUserNameByUserId(currentUserId);
RobotUtil.Message message = new RobotUtil.Message(normalTask.getProjectId());
message.appendParams(userName,normalTask.getProjectName(),normalTask.getName(),normalTask.getExecutorRoleName());
message.appendParams(
new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName),
new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, normalTask.getProjectName()),
new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, normalTask.getName()),
new MessageVo.Message(WebConstant.TemplateParam.Principal.value, normalTask.getExecutorRoleName()));
//获取角色内成员的手机号
String[] memberPhone = getMemberPhonesByRoleId(normalTask.getExecutorRole());
if(memberPhone.length != 0){
message.appendMentionedMobileList(memberPhone);
}
RobotUtil.set(message);
RobotUtil.setRobotMessage(message);
MessageVo.Inform inform = MessageVo.changeTask(currentUserId, userName, normalTask.getProjectId(), normalTask.getProjectName(), normalTask.getName(), normalTask.getExecutorRoleName());
RobotUtil.setInform(inform);
}
@Override
public void addDeliverRobotSend(Long currentUserId, String deliverName, Long subTimeId) throws Exception {
public void addDeliverRobotSend(Long currentUserId, String deliverName, Long subTimeId,SysProject project) throws Exception {
String userName = userService.getUserNameByUserId(currentUserId);
String projectName = "";
ProTaskSubTime proTaskSubTime = taskSubTimeDao.selectByPrimaryKey(subTimeId);
@ -230,19 +256,26 @@ public class RobotService implements IRobotService{
if(ObjectUtil.isNull(taskDetail)){
throw new BaseException(CodeEnum.NOT_TASK);
}
SysProject project = sysProjectDao.selectByPrimaryKey(taskDetail.getProjectId());
if(ObjectUtil.isNotNull(project)){
projectName = project.getName();
}
//生成消息
RobotUtil.Message message = new RobotUtil.Message(project.getId());
message.appendParams(userName,projectName,taskDetail.getName(),deliverName);
message.appendParams(
new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName),
new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName),
new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, taskDetail.getName()),
new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName));
//获取角色内成员的手机号
String[] memberPhone = getMemberPhonesByRoleId(taskDetail.getExecutorRole());
if(memberPhone.length != 0){
message.appendMentionedMobileList(memberPhone);
}
RobotUtil.set(message);
RobotUtil.setRobotMessage(message);
// 添加消息通知
MessageVo.Inform inform = MessageVo.addDeliver(currentUserId, userName, taskDetail.getProjectId(), projectName, taskDetail.getName(),deliverName);
RobotUtil.setInform(inform);
}
@Override
@ -263,13 +296,20 @@ public class RobotService implements IRobotService{
}
//生成消息
RobotUtil.Message message = new RobotUtil.Message(project.getId());
message.appendParams(userName,projectName,taskDetail.getName(),deliverName);
message.appendParams(
new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName),
new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName),
new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, taskDetail.getName()),
new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName));
//获取角色内成员的手机号
String[] memberPhone = getMemberPhonesByRoleId(taskDetail.getExecutorRole());
if(memberPhone.length != 0){
message.appendMentionedMobileList(memberPhone);
}
RobotUtil.set(message);
RobotUtil.setRobotMessage(message);
MessageVo.Inform inform = MessageVo.deleteDeliver(currentUserId, userName, project.getId(), project.getName(), taskDetail.getName(), deliverName);
RobotUtil.setInform(inform);
}
@Override
@ -286,13 +326,23 @@ public class RobotService implements IRobotService{
}
//生成消息
RobotUtil.Message message = new RobotUtil.Message(project.getId());
message.appendParams(userName,uploadUserName,projectName,task.getName(),deliverName);
message.appendParams(
new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName),
new MessageVo.Message(WebConstant.TemplateParam.Principal.value, uploadUserName),
new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName),
new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, task.getName()),
new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName));
//获取角色内成员的手机号
String[] memberPhone = getMemberPhonesByRoleId(task.getExecutorRole());
if(memberPhone.length != 0){
message.appendMentionedMobileList(memberPhone);
}
RobotUtil.set(message);
RobotUtil.setRobotMessage(message);
MessageVo.Inform inform = MessageVo.checkDeliver(currentUserId, userName, project.getId(), project.getName(), task.getName(), uploadUserName, deliverName);
RobotUtil.setInform(inform);
}
@Override
@ -305,12 +355,18 @@ public class RobotService implements IRobotService{
}
//生成消息
RobotUtil.Message message = new RobotUtil.Message(project.getId());
message.appendParams(userName,projectName,proTaskDetail.getName());
message.appendParams(
new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName),
new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName),
new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, proTaskDetail.getName()));
//获取角色内成员的手机号
String[] memberPhone = getMemberPhonesByRoleId(proTaskDetail.getExecutorRole());
if(memberPhone.length != 0){
message.appendMentionedMobileList(memberPhone);
}
RobotUtil.set(message);
RobotUtil.setRobotMessage(message);
MessageVo.Inform inform = MessageVo.addComment(userId, userName, project.getId(), project.getName(), proTaskDetail.getName());
RobotUtil.setInform(inform);
}
}

10
tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java

@ -11,9 +11,11 @@ import com.ccsens.tall.bean.dto.message.DeliverMessageWithDeleteDto;
import com.ccsens.tall.bean.dto.message.DeliverMessageWithUploadDto;
import com.ccsens.tall.bean.po.*;
import com.ccsens.tall.bean.vo.DeliverVo;
import com.ccsens.tall.bean.vo.MessageVo;
import com.ccsens.tall.bean.vo.ProjectVo;
import com.ccsens.tall.bean.vo.TaskVo;
import com.ccsens.tall.persist.dao.*;
import com.ccsens.tall.util.RobotUtil;
import com.ccsens.util.*;
import com.ccsens.util.bean.message.common.InMessage;
import com.ccsens.util.bean.message.common.MessageConstant;
@ -66,6 +68,8 @@ public class TaskDeliverService implements ITaskDeliverService {
private AmqpTemplate rabbitTemplate;
@Autowired
private IRobotService robotService;
@Autowired
private SysProjectDao sysProjectDao;
@Override
public void saveDeliver(ProTaskDeliver taskDeliver) {
@ -283,7 +287,9 @@ public class TaskDeliverService implements ITaskDeliverService {
throw new BaseException(CodeEnum.IS_NOT_EXECUTOR);
}
//用智能助手发送消息
robotService.addDeliverRobotSend(currentUserId,d.getName(),subTimeId);
SysProject project = sysProjectDao.selectByPrimaryKey(taskDetail.getProjectId());
robotService.addDeliverRobotSend(currentUserId,d.getName(),subTimeId, project);
return deliverInfo;
}
@ -560,7 +566,7 @@ public class TaskDeliverService implements ITaskDeliverService {
//检查完,返回数据
DeliverVo.DeliverInfo deliverInfo = selectDeliverInfo(currentUserId, deliver.getId(), checkDeliver.getTaskId());
//用智能助手发送消息
//用智能助手发送消息+ws/公众号发送
robotService.checkDeliverRobotSend(currentUserId,task,uploadUserId,deliver.getName());
return deliverInfo;
}

6
tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java

@ -9,6 +9,7 @@ import com.ccsens.tall.bean.dto.TaskDto;
import com.ccsens.tall.bean.dto.message.BaseMessageDto;
import com.ccsens.tall.bean.dto.message.SyncMessageWithStartDto;
import com.ccsens.tall.bean.po.*;
import com.ccsens.tall.bean.vo.MessageVo;
import com.ccsens.tall.bean.vo.TaskVo;
import com.ccsens.tall.persist.dao.*;
@ -173,6 +174,7 @@ public class TaskSubTimeService implements ITaskSubTimeService {
TaskVo.NormalTask normalTask = taskDetailService.getTaskInfoByTaskId(currentUserId,taskDetail.getProjectId(),subTimeId.getId());
//用智能助手发送消息
robotService.finishTaskRobotSend(currentUserId,normalTask.getProjectId(),normalTask.getProjectName(),normalTask.getName(),normalTask.getExecutorRole(),completedStatus);
return normalTask;
}
@ -313,6 +315,8 @@ public class TaskSubTimeService implements ITaskSubTimeService {
}else {
throw new BaseException("项目信息不正确");
}
} else {
throw new BaseException(CodeEnum.PARAM_ERROR);
}
if(ObjectUtil.isNotNull(addTask.getParentTaskId())){
// ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(addTask.getParentTaskId());
@ -409,11 +413,13 @@ public class TaskSubTimeService implements ITaskSubTimeService {
}
//返回
TaskVo.NormalTask taskDetail = taskDetailDao.selectTaskByTaskId(subTimeId, detail.getId(),detail.getExecutorRole());
if(ObjectUtil.isNotNull(taskDetail)) {
taskDetailService.managePlugin(currentUserId, detail.getExecutorRole(), taskDetail);
}
//通过智能助手发送通知
robotService.addTaskRobotSend(currentUserId,project,addTask.getTaskName(),addTask.getExecutorId());
return taskDetail;
}

2
tall/src/main/java/com/ccsens/tall/service/UserService.java

@ -246,7 +246,7 @@ public class UserService implements IUserService {
if (ObjectUtil.isNotNull(wxOauth2UserInfo)) {
SysAuthExample authExample = new SysAuthExample();
authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.OAUTH2_Wx.value)
.andIdentifierEqualTo(wxOauth2UserInfo.getOpenId());
.andIdentifierEqualTo(wxOauth2UserInfo.getOpenId()).andCredentialEqualTo(wxOauth2UserInfo.getUnionId());
List<SysAuth> authList = authDao.selectByExample(authExample);
if (CollectionUtil.isNotEmpty(authList)) {
theAuth = authList.get(0);

31
tall/src/main/java/com/ccsens/tall/util/RobotUtil.java

@ -1,5 +1,6 @@
package com.ccsens.tall.util;
import com.ccsens.tall.bean.vo.MessageVo;
import lombok.Data;
import java.util.ArrayList;
@ -8,6 +9,11 @@ import java.util.List;
public class RobotUtil {
/** 机器人推送 */
private static final ThreadLocal<Message> robotThreadLocal = new ThreadLocal<Message>();
/** 消息推送(ws/公众号) */
private static final ThreadLocal<MessageVo.Inform> informThreadLocal = new ThreadLocal<MessageVo.Inform>();
@Data
public static class Message{
private String msgType = "text";
@ -15,7 +21,7 @@ public class RobotUtil {
private List<String> mentionedMobileList = new ArrayList<>();
private boolean isAtAll = false;
private Long projectId;
private List<String> params = new ArrayList<>();
private List<MessageVo.Message> params = new ArrayList<>();
public Message(){
}
@ -43,7 +49,7 @@ public class RobotUtil {
this.mentionedMobileList.addAll(Arrays.asList(mentionedMobileList));
}
public void appendParams(String... params){
public void appendParams(MessageVo.Message... params){
if(params == null || params.length == 0){
return;
}
@ -52,20 +58,33 @@ public class RobotUtil {
}
static final ThreadLocal<Message> robotThreadLocal = new ThreadLocal<Message>();
public static Message get() {
public static Message getRobotMessage() {
return robotThreadLocal.get();
}
public static void set(Message message) {
public static void setRobotMessage(Message message) {
robotThreadLocal.set(message);
}
public static void del() {
public static void delRobotMessage() {
robotThreadLocal.remove();
}
public static MessageVo.Inform getInform() {
return informThreadLocal.get();
}
public static void setInform(MessageVo.Inform message) {
informThreadLocal.set(message);
}
public static void delInform() {
informThreadLocal.remove();
}
}

74
tall/src/main/java/com/ccsens/tall/web/ProjectMessageController.java

@ -0,0 +1,74 @@
package com.ccsens.tall.web;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.tall.bean.dto.ProjectMessageDto;
import com.ccsens.tall.bean.vo.ProjectMessageVo;
import com.ccsens.tall.service.IProjectMessageService;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @description:
* @author: whj
* @time: 2020/5/28 17:12
*/
@Slf4j
@Api(tags = "项目消息通知" , description = "")
@RestController
@RequestMapping("/projectMessage")
public class ProjectMessageController {
@Resource
private IProjectMessageService projectMessageService;
@MustLogin
@ApiOperation(value = "获取未读消息数",notes = "获取未读消息数")
@RequestMapping(value = "queryUnreadNum", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ProjectMessageVo.UnreadNum> queryUnreadNum(@RequestBody QueryDto<ProjectMessageDto.UnreadNum> param) {
log.info("未读消息请求参数:{}", param);
ProjectMessageDto.UnreadNum unreadNum = param.getParam();
ProjectMessageVo.UnreadNum num = projectMessageService.queryUnreadNum(unreadNum.getSendType(), param.getUserId());
log.info("未读消息返回结果:{}", num);
return JsonResponse.newInstance().ok(num);
}
@MustLogin
@ApiOperation(value = "分页查询消息",notes = "分页查询消息")
@RequestMapping(value = "queryMsg", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ProjectMessageVo.Query> queryMsg(@RequestBody QueryDto<ProjectMessageDto.Query> param) {
log.info("未读消息请求参数:{}", param);
PageInfo<ProjectMessageVo.Query> messages = projectMessageService.queryMsg(param.getParam(), param.getUserId());
log.info("未读消息返回结果:{}", messages);
return JsonResponse.newInstance().ok(messages);
}
@MustLogin
@ApiOperation(value = "标记某条消息已读",notes = "标记某条消息已读")
@RequestMapping(value = "markRead", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse markRead(@RequestBody QueryDto<ProjectMessageDto.MarkRead> param) {
log.info("未读消息请求参数:{}", param);
CodeEnum codeEnum = projectMessageService.markRead(param.getParam(), param.getUserId());
log.info("未读消息返回结果:{}", codeEnum);
return JsonResponse.newInstance().ok(codeEnum);
}
@MustLogin
@ApiOperation(value = "标记全部消息已读",notes = "标记全部消息已读")
@RequestMapping(value = "markAllRead", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse markAllRead(@RequestBody QueryDto<ProjectMessageDto.MarkAllRead> param) {
log.info("未读消息请求参数:{}", param);
CodeEnum codeEnum = projectMessageService.markAllRead(param.getParam(), param.getUserId());
log.info("未读消息返回结果:{}", codeEnum);
return JsonResponse.newInstance().ok(codeEnum);
}
}

8
tall/src/main/resources/mapper_dao/ProMemberDao.xml

@ -121,5 +121,13 @@
) t
on pm.id = t.stakeholderId
</select>
<select id="queryUserIdsByProjectId" resultType="Long">
(select user_id from t_pro_member where project_id = #{projectId} and rec_status = 0)
except
(select m.user_id from t_pro_member m,t_pro_member_role mr, t_pro_role r
where m.id = mr.member_id and mr.role_id = r.id and r.name = 'MoneyStakeholder'
and m.project_id = #{projectId} and m.rec_status = 0
and mr.rec_status = 0 and r.rec_status = 0)
</select>
</mapper>

40
tall/src/main/resources/mapper_dao/SysMessageSendDao.xml

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.dao.SysMessageSendDao">
<update id="markInitRead">
UPDATE t_sys_message_send
SET read_status = 1,
init_read = 1
WHERE
id = #{id}
AND rec_status = 0
</update>
<update id="markOtherSendRead">
UPDATE t_sys_message_send
SET read_status = 1
WHERE
operation_id = #{operationId}
AND receiver_id = #{receiverId}
AND read_status = 0
AND rec_status = 0
</update>
<update id="markInitReadBySendType">
UPDATE t_sys_message_send
SET read_status = 1 , init_read = 1
WHERE
receiver_id = #{receiverId}
AND send_type = #{sendType}
AND read_status = 0
AND rec_status = 0
</update>
<update id="markAllRead">
UPDATE t_sys_message_send
SET read_status = 1
WHERE
receiver_id = #{receiverId}
AND read_status = 0
AND rec_status = 0
</update>
</mapper>

64
tall/src/main/resources/mapper_dao/SysOperationDao.xml

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.dao.SysOperationDao">
<resultMap id="MessageQuery" type="com.ccsens.tall.bean.vo.ProjectMessageVo$Query">
<result column="id" jdbcType="BIGINT" property="id"></result>
<result column="operation_id" jdbcType="BIGINT" property="operationId"></result>
<result column="send_type" jdbcType="TINYINT" property="sendType"></result>
<result column="read_status" jdbcType="TINYINT" property="readStatus"></result>
<result column="created_at" jdbcType="TIMESTAMP" property="createTime"></result>
<collection property="messages" select="queryContent" column="operation_id" javaType="java.util.List" ofType="com.ccsens.tall.bean.vo.MessageVo$Message">
<result column="content" jdbcType="VARCHAR" property="content"></result>
<result column="type" jdbcType="TINYINT" property="type"></result>
<result column="settings" jdbcType="VARCHAR" property="settings"></result>
</collection>
</resultMap>
<select id="queryUnreadNum" resultType="com.ccsens.tall.bean.vo.ProjectMessageVo$UnreadNum">
SELECT
count( * ) AS unreadNum
FROM
t_sys_operation o,
t_sys_message_send s
WHERE
o.id = s.operation_id
AND s.receiver_id = #{userId}
AND s.send_type = #{sendType}
AND s.init_read =0
AND s.rec_status = 0
AND o.rec_status = 0
</select>
<select id="queryMsg" resultMap="MessageQuery">
SELECT
s.id, s.operation_id, s.send_type, s.created_at, s.read_status
FROM
t_sys_message_send s, t_sys_operation o
WHERE
s.operation_id = o.id
AND s.receiver_id = #{userId}
<if test="param.projectId != null">
AND o.project_id = #{param.projectId}
</if>
AND s.send_type = #{param.sendType}
AND s.rec_status = 0
AND o.rec_status = 0
ORDER BY
s.created_at DESC
</select>
<select id="queryContent" resultType="com.ccsens.tall.bean.vo.MessageVo$Message">
SELECT
content,
type,
settings
FROM
t_sys_operation_message
WHERE
operation_id = #{operationId}
AND rec_status = 0
ORDER BY
sort
</select>
</mapper>

323
tall/src/main/resources/mapper_raw/SysMessageSendMapper.xml

@ -0,0 +1,323 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.mapper.SysMessageSendMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysMessageSend">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="operation_id" jdbcType="BIGINT" property="operationId" />
<result column="receiver_id" jdbcType="BIGINT" property="receiverId" />
<result column="send_type" jdbcType="TINYINT" property="sendType" />
<result column="send_status" jdbcType="TINYINT" property="sendStatus" />
<result column="read_status" jdbcType="TINYINT" property="readStatus" />
<result column="init_read" jdbcType="TINYINT" property="initRead" />
<result column="send_time" jdbcType="BIGINT" property="sendTime" />
<result column="complete" jdbcType="TINYINT" property="complete" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, operation_id, receiver_id, send_type, send_status, read_status, init_read, send_time,
complete, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysMessageSendExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_sys_message_send
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_sys_message_send
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_sys_message_send
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysMessageSendExample">
delete from t_sys_message_send
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysMessageSend">
insert into t_sys_message_send (id, operation_id, receiver_id,
send_type, send_status, read_status,
init_read, send_time, complete,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{operationId,jdbcType=BIGINT}, #{receiverId,jdbcType=BIGINT},
#{sendType,jdbcType=TINYINT}, #{sendStatus,jdbcType=TINYINT}, #{readStatus,jdbcType=TINYINT},
#{initRead,jdbcType=TINYINT}, #{sendTime,jdbcType=BIGINT}, #{complete,jdbcType=TINYINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysMessageSend">
insert into t_sys_message_send
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="operationId != null">
operation_id,
</if>
<if test="receiverId != null">
receiver_id,
</if>
<if test="sendType != null">
send_type,
</if>
<if test="sendStatus != null">
send_status,
</if>
<if test="readStatus != null">
read_status,
</if>
<if test="initRead != null">
init_read,
</if>
<if test="sendTime != null">
send_time,
</if>
<if test="complete != null">
complete,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="operationId != null">
#{operationId,jdbcType=BIGINT},
</if>
<if test="receiverId != null">
#{receiverId,jdbcType=BIGINT},
</if>
<if test="sendType != null">
#{sendType,jdbcType=TINYINT},
</if>
<if test="sendStatus != null">
#{sendStatus,jdbcType=TINYINT},
</if>
<if test="readStatus != null">
#{readStatus,jdbcType=TINYINT},
</if>
<if test="initRead != null">
#{initRead,jdbcType=TINYINT},
</if>
<if test="sendTime != null">
#{sendTime,jdbcType=BIGINT},
</if>
<if test="complete != null">
#{complete,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysMessageSendExample" resultType="java.lang.Long">
select count(*) from t_sys_message_send
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_sys_message_send
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.operationId != null">
operation_id = #{record.operationId,jdbcType=BIGINT},
</if>
<if test="record.receiverId != null">
receiver_id = #{record.receiverId,jdbcType=BIGINT},
</if>
<if test="record.sendType != null">
send_type = #{record.sendType,jdbcType=TINYINT},
</if>
<if test="record.sendStatus != null">
send_status = #{record.sendStatus,jdbcType=TINYINT},
</if>
<if test="record.readStatus != null">
read_status = #{record.readStatus,jdbcType=TINYINT},
</if>
<if test="record.initRead != null">
init_read = #{record.initRead,jdbcType=TINYINT},
</if>
<if test="record.sendTime != null">
send_time = #{record.sendTime,jdbcType=BIGINT},
</if>
<if test="record.complete != null">
complete = #{record.complete,jdbcType=TINYINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_sys_message_send
set id = #{record.id,jdbcType=BIGINT},
operation_id = #{record.operationId,jdbcType=BIGINT},
receiver_id = #{record.receiverId,jdbcType=BIGINT},
send_type = #{record.sendType,jdbcType=TINYINT},
send_status = #{record.sendStatus,jdbcType=TINYINT},
read_status = #{record.readStatus,jdbcType=TINYINT},
init_read = #{record.initRead,jdbcType=TINYINT},
send_time = #{record.sendTime,jdbcType=BIGINT},
complete = #{record.complete,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysMessageSend">
update t_sys_message_send
<set>
<if test="operationId != null">
operation_id = #{operationId,jdbcType=BIGINT},
</if>
<if test="receiverId != null">
receiver_id = #{receiverId,jdbcType=BIGINT},
</if>
<if test="sendType != null">
send_type = #{sendType,jdbcType=TINYINT},
</if>
<if test="sendStatus != null">
send_status = #{sendStatus,jdbcType=TINYINT},
</if>
<if test="readStatus != null">
read_status = #{readStatus,jdbcType=TINYINT},
</if>
<if test="initRead != null">
init_read = #{initRead,jdbcType=TINYINT},
</if>
<if test="sendTime != null">
send_time = #{sendTime,jdbcType=BIGINT},
</if>
<if test="complete != null">
complete = #{complete,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysMessageSend">
update t_sys_message_send
set operation_id = #{operationId,jdbcType=BIGINT},
receiver_id = #{receiverId,jdbcType=BIGINT},
send_type = #{sendType,jdbcType=TINYINT},
send_status = #{sendStatus,jdbcType=TINYINT},
read_status = #{readStatus,jdbcType=TINYINT},
init_read = #{initRead,jdbcType=TINYINT},
send_time = #{sendTime,jdbcType=BIGINT},
complete = #{complete,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

259
tall/src/main/resources/mapper_raw/SysOperationMapper.xml

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.mapper.SysOperationMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysOperation">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="operator_id" jdbcType="BIGINT" property="operatorId" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="operate_type" jdbcType="TINYINT" property="operateType" />
<result column="operation_time" jdbcType="BIGINT" property="operationTime" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, operator_id, project_id, operate_type, operation_time, created_at, updated_at,
rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysOperationExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_sys_operation
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_sys_operation
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_sys_operation
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysOperationExample">
delete from t_sys_operation
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysOperation">
insert into t_sys_operation (id, operator_id, project_id,
operate_type, operation_time, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{operatorId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
#{operateType,jdbcType=TINYINT}, #{operationTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysOperation">
insert into t_sys_operation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="operatorId != null">
operator_id,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="operateType != null">
operate_type,
</if>
<if test="operationTime != null">
operation_time,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="operatorId != null">
#{operatorId,jdbcType=BIGINT},
</if>
<if test="projectId != null">
#{projectId,jdbcType=BIGINT},
</if>
<if test="operateType != null">
#{operateType,jdbcType=TINYINT},
</if>
<if test="operationTime != null">
#{operationTime,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysOperationExample" resultType="java.lang.Long">
select count(*) from t_sys_operation
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_sys_operation
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.operatorId != null">
operator_id = #{record.operatorId,jdbcType=BIGINT},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=BIGINT},
</if>
<if test="record.operateType != null">
operate_type = #{record.operateType,jdbcType=TINYINT},
</if>
<if test="record.operationTime != null">
operation_time = #{record.operationTime,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_sys_operation
set id = #{record.id,jdbcType=BIGINT},
operator_id = #{record.operatorId,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=BIGINT},
operate_type = #{record.operateType,jdbcType=TINYINT},
operation_time = #{record.operationTime,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysOperation">
update t_sys_operation
<set>
<if test="operatorId != null">
operator_id = #{operatorId,jdbcType=BIGINT},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=BIGINT},
</if>
<if test="operateType != null">
operate_type = #{operateType,jdbcType=TINYINT},
</if>
<if test="operationTime != null">
operation_time = #{operationTime,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysOperation">
update t_sys_operation
set operator_id = #{operatorId,jdbcType=BIGINT},
project_id = #{projectId,jdbcType=BIGINT},
operate_type = #{operateType,jdbcType=TINYINT},
operation_time = #{operationTime,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

275
tall/src/main/resources/mapper_raw/SysOperationMessageMapper.xml

@ -0,0 +1,275 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.mapper.SysOperationMessageMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysOperationMessage">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="operation_id" jdbcType="BIGINT" property="operationId" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="settings" jdbcType="VARCHAR" property="settings" />
<result column="sort" jdbcType="TINYINT" property="sort" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, operation_id, content, type, settings, sort, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysOperationMessageExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_sys_operation_message
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_sys_operation_message
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_sys_operation_message
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysOperationMessageExample">
delete from t_sys_operation_message
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysOperationMessage">
insert into t_sys_operation_message (id, operation_id, content,
type, settings, sort,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{operationId,jdbcType=BIGINT}, #{content,jdbcType=VARCHAR},
#{type,jdbcType=TINYINT}, #{settings,jdbcType=VARCHAR}, #{sort,jdbcType=TINYINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysOperationMessage">
insert into t_sys_operation_message
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="operationId != null">
operation_id,
</if>
<if test="content != null">
content,
</if>
<if test="type != null">
type,
</if>
<if test="settings != null">
settings,
</if>
<if test="sort != null">
sort,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="operationId != null">
#{operationId,jdbcType=BIGINT},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="settings != null">
#{settings,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysOperationMessageExample" resultType="java.lang.Long">
select count(*) from t_sys_operation_message
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_sys_operation_message
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.operationId != null">
operation_id = #{record.operationId,jdbcType=BIGINT},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=TINYINT},
</if>
<if test="record.settings != null">
settings = #{record.settings,jdbcType=VARCHAR},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=TINYINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_sys_operation_message
set id = #{record.id,jdbcType=BIGINT},
operation_id = #{record.operationId,jdbcType=BIGINT},
content = #{record.content,jdbcType=VARCHAR},
type = #{record.type,jdbcType=TINYINT},
settings = #{record.settings,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysOperationMessage">
update t_sys_operation_message
<set>
<if test="operationId != null">
operation_id = #{operationId,jdbcType=BIGINT},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="settings != null">
settings = #{settings,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysOperationMessage">
update t_sys_operation_message
set operation_id = #{operationId,jdbcType=BIGINT},
content = #{content,jdbcType=VARCHAR},
type = #{type,jdbcType=TINYINT},
settings = #{settings,jdbcType=VARCHAR},
sort = #{sort,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

39
util/src/main/java/com/ccsens/util/WebConstant.java

@ -3,6 +3,7 @@ package com.ccsens.util;
import cn.hutool.core.codec.Base64;
import java.io.File;
import java.util.Arrays;
public class WebConstant {
@ -12,6 +13,44 @@ public class WebConstant {
/**数据已删除*/
public static final byte STATUS_DELETE = 1;
public static enum TemplateParam {
Operator("{{operator}}", "操作者"),
ProjectName("{{projectName}}", "项目名"),
TaskName("{{taskName}}", "任务名"),
Deliverable("{{deliverable}}", "交付物"),
Operate("{{operate}}", "操作"),
Principal("{{principal}}", "负责人"),
;
public String value;
public String phase;
private TemplateParam(String value, String phase) {
this.value = value;
this.phase = phase;
}
}
public static final class Message{
public static final byte TYPE_TEXT = 0;
public static final byte TYPE_LINK = 1;
public static final byte SEND_WS = 0;
public static final byte SEND_WX_OFFICIAL = 1;
public static final byte SEND_SUCCESS = 1;
public static final byte SEND_FAIL = 0;
}
public static final class Project{
public static final String PROJECT_ID = "projectId";
public static final byte TASK_COMPLETE_YES = 2;
public static final String getTaskCompleteStatus(byte completedStatus) {
return completedStatus == WebConstant.Project.TASK_COMPLETE_YES ? "完成" : "取消完成";
}
}
public static final class Wx {
public static final String ACCESS_TOKEN = "tall_wx_access_token";
public static final long EXPIRE_TIME = 1 * 60 * 60;

38
util/src/main/java/com/ccsens/util/bean/message/common/InMessage.java

@ -1,11 +1,16 @@
package com.ccsens.util.bean.message.common;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.util.JacksonUtil;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
@ -92,4 +97,37 @@ public class InMessage {
//TODO
//添加方便链式调用的构造方法,类似builder
@Data
@ApiModel("接收消息者")
public static class To{
private Long id;
public To() {
}
public To(Long id) {
this.id = id;
}
}
/**
* 将userids列表转成tos格式
* @param userIds
* @return
*/
public static Set<String> transTos(List<Long> userIds) {
Set<String> sets = new HashSet<>();
if (CollectionUtil.isEmpty(userIds)) {
return sets;
}
userIds.forEach(userId -> {
To to = new To(userId);
sets.add(JSONObject.toJSONString(to));
});
return sets;
}
}

4
util/src/main/java/com/ccsens/util/config/RabbitMQConfig.java

@ -16,6 +16,10 @@ public class RabbitMQConfig {
public static final String GAME_STATUS_DELAY_SEND_QUEUE = "gameStatusDelaySendQueue";
public static final String GAME_STATUS_DELAY_SEND_EXCHANGE = "gameStatusDelaySendExchange";
public static final String GAME_STATUS_DELAY_SEND_ROUTING_KEY = "gameStatusDelaySendRoutingKey";
/**消息队列发送*/
public static final String MESSAGE_QUEUE_NAME = "tall_message_1";
@Bean
public Queue queue_game (){

6
util/src/main/java/com/ccsens/util/wx/WxRobotUtil.java

@ -22,13 +22,13 @@ public class WxRobotUtil {
}
@Data
public static class WxRobotText{
private StringBuilder content;
private String content;
private List<String> mentioned_list;
private List<String> mentioned_mobile_list;
}
@Data
public static class WxRobotMarkdown{
private StringBuilder content;
private String content;
}
@ -74,7 +74,7 @@ public class WxRobotUtil {
}
}
public static void sendRobotInfo(String webHook,StringBuilder content,String msgType,List<String> mentionedList,List<String> mentionedMobileList)throws Exception {
public static void sendRobotInfo(String webHook,String content,String msgType,List<String> mentionedList,List<String> mentionedMobileList)throws Exception {
WxRobotVo wxRobotVo = new WxRobotVo();
wxRobotVo.setMsgtype(msgType);
if("text".equalsIgnoreCase(msgType)){

Loading…
Cancel
Save