Commit f35e3c30 authored by shiyu's avatar shiyu

1

parent fca9bf73
......@@ -99,7 +99,6 @@ public class SysExchangeApplyOrderServiceImpl implements SysExchangeApplyOrderSe
//订单更新为待发货
distributionOrderDao.updateState(targetUserOrderId, DistributionEnum.DistributionOrderStateEnum.PRE_SEND.getCode());
distributionOrderDao.updateState(userOrderId, DistributionEnum.DistributionOrderStateEnum.PRE_SEND.getCode());
//发短信通知申请单双方,平台的鉴定结果
try {
//通知提交方
......@@ -114,7 +113,6 @@ public class SysExchangeApplyOrderServiceImpl implements SysExchangeApplyOrderSe
} catch (Exception e) {
logger.info(">>>>>>>>> 交换申请单号:{}, 通过, 发送平台检查结果通知短信失败 <<<<<<<<<", exchangeApplyOrder.getExchangeApplyOrderId());
}
} else {
//平台审核不通过
exchangeApplyOrderDao.updateState(orderId, dto.getState());
......
......@@ -38,4 +38,38 @@ public class SigninEnum {
return name;
}
}
public enum DateStateEnum {
PASS(0, "过去"),
CURRENT(1, "当前"),
FUTURE(2, "将来"),
;
private Integer code;
private String name;
DateStateEnum(Integer code, String name) {
this.code = code;
this.name = name;
}
public static String getNameByCode(int code) {
for (SigninEnum.DateStateEnum dateStateEnum : SigninEnum.DateStateEnum.values()) {
if (code == dateStateEnum.getCode()) {
return dateStateEnum.getName();
}
}
return null;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
}
}
......@@ -73,6 +73,9 @@ public class DateTimeUtil {
return null;
}
/**
* 获取yyyy-MM格式月份的首末时间
* @param yearMonth
......@@ -92,6 +95,19 @@ public class DateTimeUtil {
}
/**
* 获取时间中的日期为几号
* @param dateString
* @return
*/
public static int getDayFromDateString(String dateString) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate date = LocalDate.parse(dateString, formatter);
return date.getDayOfMonth();
}
/**
......@@ -123,11 +139,6 @@ public class DateTimeUtil {
public static void main(String[] args) {
List<String> datesList = getMonthDates("2024-08");
System.out.println(datesList);
}
public static List<String> getMonthDates(String yearMonth) {
List<String> dates = new ArrayList<>();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
......@@ -142,4 +153,29 @@ public class DateTimeUtil {
}
return dates;
}
public static int getFirstDayOfMonth(int year, int month) {
if (month < 1 || month > 12) {
throw new IllegalArgumentException("月份无效,请输入1到12之间的数字。");
}
LocalDate firstDayOfMonth = LocalDate.of(year, month, 1);
return firstDayOfMonth.getDayOfWeek().getValue();
}
public static void main(String[] args) {
List<String> datesList = getMonthDates("2024-08");
System.out.println(datesList);
int year = 2024; // 示例年份
int month = 10; // 示例月份
// 调用方法并输出结果
int dayOfWeekInt = getFirstDayOfMonth(year, month);
System.out.println(year + "年 " + month + "月的一号是: " + dayOfWeekInt);
System.out.println("号" + getDayFromDateString("2024-08-09"));
LocalDate today = LocalDate.now();
System.out.println(today.getYear()+ "-" + today.getMonthValue());
}
}
package com.wwdz.ch.db.dao;
import com.wwdz.ch.db.domain.UserSignin;
import com.wwdz.ch.db.dto.request.UserSigninRequestDto;
import com.wwdz.ch.db.domain.UserSignIn;
import com.wwdz.ch.db.dto.request.UserSignInRequestDto;
import java.util.List;
public interface UserSigninDao {
boolean insert(UserSignin userSignin);
boolean insert(UserSignIn userSignin);
UserSignin findLastedRecord(long userId);
UserSignIn findLastedRecord(long userId);
List<UserSignin> findList(UserSigninRequestDto dto);
List<UserSignIn> findList(UserSignInRequestDto dto);
/**
* 查询昨天的签到记录
* @param userId
* @return
*/
UserSignin findYesterdayRecord(long userId);
UserSignIn findYesterdayRecord(long userId);
/**
* 判断某一日期是否签到过
......@@ -29,9 +29,9 @@ public interface UserSigninDao {
boolean isExisted(long userId, String date);
UserSignin findRecord(long userId, String date);
UserSignIn findRecord(long userId, String date);
boolean update(UserSignin userSignin);
boolean update(UserSignIn userSignin);
boolean updateByPrimaryKey(UserSignin userSignin);
boolean updateByPrimaryKey(UserSignIn userSignin);
}
......@@ -10,10 +10,10 @@ import lombok.Data;
/**
* @author shiyu
* @date 2024/11/15
* @date 2024/11/21
*/
@Data
public class UserSignin implements Entity {
public class UserSignIn implements Entity {
/**
* id
*/
......@@ -37,7 +37,7 @@ public class UserSignin implements Entity {
/**
* 签到日期
*/
private String signinDate;
private String signInDate;
/**
* 连续天数
......@@ -71,7 +71,7 @@ public class UserSignin implements Entity {
sb.append(", userId=").append(userId);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", signinDate=").append(signinDate);
sb.append(", signInDate=").append(signInDate);
sb.append(", consecutiveDays=").append(consecutiveDays);
sb.append(", isReward=").append(isReward);
sb.append(", rewardLevel=").append(rewardLevel);
......@@ -92,12 +92,12 @@ public class UserSignin implements Entity {
if (getClass() != that.getClass()) {
return false;
}
UserSignin other = (UserSignin) that;
UserSignIn other = (UserSignIn) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getSigninDate() == null ? other.getSigninDate() == null : this.getSigninDate().equals(other.getSigninDate()))
&& (this.getSignInDate() == null ? other.getSignInDate() == null : this.getSignInDate().equals(other.getSignInDate()))
&& (this.getConsecutiveDays() == null ? other.getConsecutiveDays() == null : this.getConsecutiveDays().equals(other.getConsecutiveDays()))
&& (this.getIsReward() == null ? other.getIsReward() == null : this.getIsReward().equals(other.getIsReward()))
&& (this.getRewardLevel() == null ? other.getRewardLevel() == null : this.getRewardLevel().equals(other.getRewardLevel()))
......@@ -112,7 +112,7 @@ public class UserSignin implements Entity {
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getSigninDate() == null) ? 0 : getSigninDate().hashCode());
result = prime * result + ((getSignInDate() == null) ? 0 : getSignInDate().hashCode());
result = prime * result + ((getConsecutiveDays() == null) ? 0 : getConsecutiveDays().hashCode());
result = prime * result + ((getIsReward() == null) ? 0 : getIsReward().hashCode());
result = prime * result + ((getRewardLevel() == null) ? 0 : getRewardLevel().hashCode());
......@@ -122,7 +122,7 @@ public class UserSignin implements Entity {
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table user_signin
* This enum corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -132,7 +132,7 @@ public class UserSignin implements Entity {
userId("user_id", "userId", "BIGINT", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false),
signinDate("signin_date", "signinDate", "VARCHAR", false),
signInDate("sign_in_date", "signInDate", "VARCHAR", false),
consecutiveDays("consecutive_days", "consecutiveDays", "INTEGER", false),
isReward("is_reward", "isReward", "BIT", false),
rewardLevel("reward_level", "rewardLevel", "INTEGER", false),
......@@ -140,7 +140,7 @@ public class UserSignin implements Entity {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_signin
* This field corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -149,7 +149,7 @@ public class UserSignin implements Entity {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_signin
* This field corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -158,7 +158,7 @@ public class UserSignin implements Entity {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_signin
* This field corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -167,7 +167,7 @@ public class UserSignin implements Entity {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_signin
* This field corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -176,7 +176,7 @@ public class UserSignin implements Entity {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_signin
* This field corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -185,7 +185,7 @@ public class UserSignin implements Entity {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_signin
* This field corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -194,7 +194,7 @@ public class UserSignin implements Entity {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -205,7 +205,7 @@ public class UserSignin implements Entity {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -216,7 +216,7 @@ public class UserSignin implements Entity {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -227,7 +227,7 @@ public class UserSignin implements Entity {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -238,7 +238,7 @@ public class UserSignin implements Entity {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -252,7 +252,7 @@ public class UserSignin implements Entity {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -263,7 +263,7 @@ public class UserSignin implements Entity {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -274,7 +274,7 @@ public class UserSignin implements Entity {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -289,7 +289,7 @@ public class UserSignin implements Entity {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......
......@@ -4,14 +4,14 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class UserSigninExample {
public class UserSignInExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public UserSigninExample() {
public UserSignInExample() {
oredCriteria = new ArrayList<Criteria>();
}
......@@ -47,24 +47,24 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public UserSigninExample orderBy(String orderByClause) {
public UserSignInExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public UserSigninExample orderBy(String ... orderByClauses) {
public UserSignInExample orderBy(String ... orderByClauses) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < orderByClauses.length; i++) {
sb.append(orderByClauses[i]);
......@@ -97,13 +97,13 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
UserSigninExample example = new UserSigninExample();
UserSignInExample example = new UserSignInExample();
return example.createCriteria();
}
......@@ -165,12 +165,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(UserSignin.Column column) {
public Criteria andIdEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -182,12 +182,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(UserSignin.Column column) {
public Criteria andIdNotEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -199,12 +199,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(UserSignin.Column column) {
public Criteria andIdGreaterThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -216,12 +216,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andIdGreaterThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -233,12 +233,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(UserSignin.Column column) {
public Criteria andIdLessThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -250,12 +250,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andIdLessThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -297,12 +297,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdEqualToColumn(UserSignin.Column column) {
public Criteria andUserIdEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("user_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -314,12 +314,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdNotEqualToColumn(UserSignin.Column column) {
public Criteria andUserIdNotEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("user_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -331,12 +331,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdGreaterThanColumn(UserSignin.Column column) {
public Criteria andUserIdGreaterThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("user_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -348,12 +348,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdGreaterThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andUserIdGreaterThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("user_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -365,12 +365,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdLessThanColumn(UserSignin.Column column) {
public Criteria andUserIdLessThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("user_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -382,12 +382,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdLessThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andUserIdLessThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("user_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -429,12 +429,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(UserSignin.Column column) {
public Criteria andCreateTimeEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("create_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -446,12 +446,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(UserSignin.Column column) {
public Criteria andCreateTimeNotEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("create_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -463,12 +463,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(UserSignin.Column column) {
public Criteria andCreateTimeGreaterThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("create_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -480,12 +480,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andCreateTimeGreaterThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("create_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -497,12 +497,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(UserSignin.Column column) {
public Criteria andCreateTimeLessThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("create_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -514,12 +514,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andCreateTimeLessThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("create_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -561,12 +561,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeEqualToColumn(UserSignin.Column column) {
public Criteria andUpdateTimeEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("update_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -578,12 +578,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeNotEqualToColumn(UserSignin.Column column) {
public Criteria andUpdateTimeNotEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("update_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -595,12 +595,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanColumn(UserSignin.Column column) {
public Criteria andUpdateTimeGreaterThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("update_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -612,12 +612,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andUpdateTimeGreaterThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("update_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -629,12 +629,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanColumn(UserSignin.Column column) {
public Criteria andUpdateTimeLessThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("update_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -646,12 +646,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andUpdateTimeLessThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("update_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -676,145 +676,145 @@ public class UserSigninExample {
return (Criteria) this;
}
public Criteria andSigninDateIsNull() {
addCriterion("signin_date is null");
public Criteria andSignInDateIsNull() {
addCriterion("sign_in_date is null");
return (Criteria) this;
}
public Criteria andSigninDateIsNotNull() {
addCriterion("signin_date is not null");
public Criteria andSignInDateIsNotNull() {
addCriterion("sign_in_date is not null");
return (Criteria) this;
}
public Criteria andSigninDateEqualTo(String value) {
addCriterion("signin_date =", value, "signinDate");
public Criteria andSignInDateEqualTo(String value) {
addCriterion("sign_in_date =", value, "signInDate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSigninDateEqualToColumn(UserSignin.Column column) {
addCriterion(new StringBuilder("signin_date = ").append(column.getEscapedColumnName()).toString());
public Criteria andSignInDateEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("sign_in_date = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSigninDateNotEqualTo(String value) {
addCriterion("signin_date <>", value, "signinDate");
public Criteria andSignInDateNotEqualTo(String value) {
addCriterion("sign_in_date <>", value, "signInDate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSigninDateNotEqualToColumn(UserSignin.Column column) {
addCriterion(new StringBuilder("signin_date <> ").append(column.getEscapedColumnName()).toString());
public Criteria andSignInDateNotEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("sign_in_date <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSigninDateGreaterThan(String value) {
addCriterion("signin_date >", value, "signinDate");
public Criteria andSignInDateGreaterThan(String value) {
addCriterion("sign_in_date >", value, "signInDate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSigninDateGreaterThanColumn(UserSignin.Column column) {
addCriterion(new StringBuilder("signin_date > ").append(column.getEscapedColumnName()).toString());
public Criteria andSignInDateGreaterThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("sign_in_date > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSigninDateGreaterThanOrEqualTo(String value) {
addCriterion("signin_date >=", value, "signinDate");
public Criteria andSignInDateGreaterThanOrEqualTo(String value) {
addCriterion("sign_in_date >=", value, "signInDate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSigninDateGreaterThanOrEqualToColumn(UserSignin.Column column) {
addCriterion(new StringBuilder("signin_date >= ").append(column.getEscapedColumnName()).toString());
public Criteria andSignInDateGreaterThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("sign_in_date >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSigninDateLessThan(String value) {
addCriterion("signin_date <", value, "signinDate");
public Criteria andSignInDateLessThan(String value) {
addCriterion("sign_in_date <", value, "signInDate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSigninDateLessThanColumn(UserSignin.Column column) {
addCriterion(new StringBuilder("signin_date < ").append(column.getEscapedColumnName()).toString());
public Criteria andSignInDateLessThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("sign_in_date < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSigninDateLessThanOrEqualTo(String value) {
addCriterion("signin_date <=", value, "signinDate");
public Criteria andSignInDateLessThanOrEqualTo(String value) {
addCriterion("sign_in_date <=", value, "signInDate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSigninDateLessThanOrEqualToColumn(UserSignin.Column column) {
addCriterion(new StringBuilder("signin_date <= ").append(column.getEscapedColumnName()).toString());
public Criteria andSignInDateLessThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("sign_in_date <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSigninDateLike(String value) {
addCriterion("signin_date like", value, "signinDate");
public Criteria andSignInDateLike(String value) {
addCriterion("sign_in_date like", value, "signInDate");
return (Criteria) this;
}
public Criteria andSigninDateNotLike(String value) {
addCriterion("signin_date not like", value, "signinDate");
public Criteria andSignInDateNotLike(String value) {
addCriterion("sign_in_date not like", value, "signInDate");
return (Criteria) this;
}
public Criteria andSigninDateIn(List<String> values) {
addCriterion("signin_date in", values, "signinDate");
public Criteria andSignInDateIn(List<String> values) {
addCriterion("sign_in_date in", values, "signInDate");
return (Criteria) this;
}
public Criteria andSigninDateNotIn(List<String> values) {
addCriterion("signin_date not in", values, "signinDate");
public Criteria andSignInDateNotIn(List<String> values) {
addCriterion("sign_in_date not in", values, "signInDate");
return (Criteria) this;
}
public Criteria andSigninDateBetween(String value1, String value2) {
addCriterion("signin_date between", value1, value2, "signinDate");
public Criteria andSignInDateBetween(String value1, String value2) {
addCriterion("sign_in_date between", value1, value2, "signInDate");
return (Criteria) this;
}
public Criteria andSigninDateNotBetween(String value1, String value2) {
addCriterion("signin_date not between", value1, value2, "signinDate");
public Criteria andSignInDateNotBetween(String value1, String value2) {
addCriterion("sign_in_date not between", value1, value2, "signInDate");
return (Criteria) this;
}
......@@ -835,12 +835,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andConsecutiveDaysEqualToColumn(UserSignin.Column column) {
public Criteria andConsecutiveDaysEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("consecutive_days = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -852,12 +852,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andConsecutiveDaysNotEqualToColumn(UserSignin.Column column) {
public Criteria andConsecutiveDaysNotEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("consecutive_days <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -869,12 +869,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andConsecutiveDaysGreaterThanColumn(UserSignin.Column column) {
public Criteria andConsecutiveDaysGreaterThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("consecutive_days > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -886,12 +886,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andConsecutiveDaysGreaterThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andConsecutiveDaysGreaterThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("consecutive_days >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -903,12 +903,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andConsecutiveDaysLessThanColumn(UserSignin.Column column) {
public Criteria andConsecutiveDaysLessThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("consecutive_days < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -920,12 +920,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andConsecutiveDaysLessThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andConsecutiveDaysLessThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("consecutive_days <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -967,12 +967,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsRewardEqualToColumn(UserSignin.Column column) {
public Criteria andIsRewardEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_reward = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -984,12 +984,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsRewardNotEqualToColumn(UserSignin.Column column) {
public Criteria andIsRewardNotEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_reward <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1001,12 +1001,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsRewardGreaterThanColumn(UserSignin.Column column) {
public Criteria andIsRewardGreaterThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_reward > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1018,12 +1018,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsRewardGreaterThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andIsRewardGreaterThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_reward >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1035,12 +1035,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsRewardLessThanColumn(UserSignin.Column column) {
public Criteria andIsRewardLessThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_reward < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1052,12 +1052,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsRewardLessThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andIsRewardLessThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_reward <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1099,12 +1099,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardLevelEqualToColumn(UserSignin.Column column) {
public Criteria andRewardLevelEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("reward_level = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1116,12 +1116,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardLevelNotEqualToColumn(UserSignin.Column column) {
public Criteria andRewardLevelNotEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("reward_level <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1133,12 +1133,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardLevelGreaterThanColumn(UserSignin.Column column) {
public Criteria andRewardLevelGreaterThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("reward_level > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1150,12 +1150,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardLevelGreaterThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andRewardLevelGreaterThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("reward_level >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1167,12 +1167,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardLevelLessThanColumn(UserSignin.Column column) {
public Criteria andRewardLevelLessThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("reward_level < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1184,12 +1184,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardLevelLessThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andRewardLevelLessThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("reward_level <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1231,12 +1231,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsGetEqualToColumn(UserSignin.Column column) {
public Criteria andIsGetEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_get = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1248,12 +1248,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsGetNotEqualToColumn(UserSignin.Column column) {
public Criteria andIsGetNotEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_get <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1265,12 +1265,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsGetGreaterThanColumn(UserSignin.Column column) {
public Criteria andIsGetGreaterThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_get > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1282,12 +1282,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsGetGreaterThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andIsGetGreaterThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_get >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1299,12 +1299,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsGetLessThanColumn(UserSignin.Column column) {
public Criteria andIsGetLessThanColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_get < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1316,12 +1316,12 @@ public class UserSigninExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsGetLessThanOrEqualToColumn(UserSignin.Column column) {
public Criteria andIsGetLessThanOrEqualToColumn(UserSignIn.Column column) {
addCriterion(new StringBuilder("is_get <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
......@@ -1350,39 +1350,39 @@ public class UserSigninExample {
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_signin
* This field corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private UserSigninExample example;
private UserSignInExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(UserSigninExample example) {
protected Criteria(UserSignInExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public UserSigninExample example() {
public UserSignInExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -1396,7 +1396,7 @@ public class UserSigninExample {
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table user_signin
* This interface corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -1404,7 +1404,7 @@ public class UserSigninExample {
public interface ICriteriaAdd {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......
......@@ -5,7 +5,11 @@ import lombok.Data;
import java.util.Date;
@Data
public class UserSigninRequestDto extends BaseRequestDto implements Entity {
public class UserSignInRequestDto extends BaseRequestDto implements Entity {
private String year;
private String month;
/**
* id
......@@ -41,7 +45,7 @@ public class UserSigninRequestDto extends BaseRequestDto implements Entity {
/**
* 签到日期
*/
private String signinDate;
private String signInDate;
/**
* 连续天数
......
package com.wwdz.ch.db.impl;
import com.wwdz.ch.db.dao.UserSigninDao;
import com.wwdz.ch.db.domain.UserSignin;
import com.wwdz.ch.db.domain.UserSigninExample;
import com.wwdz.ch.db.dto.request.UserSigninRequestDto;
import com.wwdz.ch.db.mapper.UserSigninMapper;
import com.wwdz.ch.db.domain.UserSignIn;
import com.wwdz.ch.db.domain.UserSignInExample;
import com.wwdz.ch.db.dto.request.UserSignInRequestDto;
import com.wwdz.ch.db.mapper.UserSignInMapper;
import com.xxdxxs.db.component.JdbcHelper;
import com.xxdxxs.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
@Repository
public class UserSigninDaoImpl implements UserSigninDao {
@Autowired
UserSigninMapper userSigninMapper;
UserSignInMapper userSignInMapper;
@Override
public boolean insert(UserSignin userSignin) {
return userSigninMapper.insert(userSignin) > 0;
public boolean insert(UserSignIn userSignin) {
return userSignInMapper.insert(userSignin) > 0;
}
@Override
public UserSignin findLastedRecord(long userId) {
UserSigninExample example = new UserSigninExample();
UserSigninExample.Criteria criteria = example.createCriteria();
public UserSignIn findLastedRecord(long userId) {
UserSignInExample example = new UserSignInExample();
UserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
example.setOrderByClause("create_time desc");
return userSigninMapper.selectOneByExample(example);
return userSignInMapper.selectOneByExample(example);
}
@Override
public List<UserSignin> findList(UserSigninRequestDto dto) {
UserSigninExample example = new UserSigninExample();
UserSigninExample.Criteria criteria = example.createCriteria();
public List<UserSignIn> findList(UserSignInRequestDto dto) {
UserSignInExample example = new UserSignInExample();
UserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(dto.getUserId());
JdbcHelper.ifPresent(dto.getStartQueryTime(), criteria :: andCreateTimeGreaterThanOrEqualTo);
JdbcHelper.ifPresent(dto.getEndQueryTime(), criteria :: andCreateTimeLessThanOrEqualTo);
example.setOrderByClause("create_time desc");
return userSigninMapper.selectByExample(example);
return userSignInMapper.selectByExample(example);
}
@Override
public UserSignin findYesterdayRecord(long userId) {
public UserSignIn findYesterdayRecord(long userId) {
LocalDate yesterday = LocalDate.now().minusDays(1);
String yesterdayString = DateUtils.DATE.format(yesterday);
UserSigninExample example = new UserSigninExample();
UserSigninExample.Criteria criteria = example.createCriteria();
UserSignInExample example = new UserSignInExample();
UserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andSigninDateEqualTo(yesterdayString);
return userSigninMapper.selectOneByExample(example);
criteria.andSignInDateEqualTo(yesterdayString);
return userSignInMapper.selectOneByExample(example);
}
@Override
public boolean isExisted(long userId, String date) {
UserSigninExample example = new UserSigninExample();
UserSigninExample.Criteria criteria = example.createCriteria();
UserSignInExample example = new UserSignInExample();
UserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andSigninDateEqualTo(date);
return userSigninMapper.countByExample(example) > 0;
criteria.andSignInDateEqualTo(date);
return userSignInMapper.countByExample(example) > 0;
}
@Override
public UserSignin findRecord(long userId, String date) {
UserSigninExample example = new UserSigninExample();
UserSigninExample.Criteria criteria = example.createCriteria();
public UserSignIn findRecord(long userId, String date) {
UserSignInExample example = new UserSignInExample();
UserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andSigninDateEqualTo(date);
return userSigninMapper.selectOneByExample(example);
criteria.andSignInDateEqualTo(date);
return userSignInMapper.selectOneByExample(example);
}
@Override
public boolean update(UserSignin userSignin) {
UserSigninExample example = new UserSigninExample();
UserSigninExample.Criteria criteria = example.createCriteria();
public boolean update(UserSignIn userSignin) {
UserSignInExample example = new UserSignInExample();
UserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userSignin.getUserId());
criteria.andSigninDateEqualTo(userSignin.getSigninDate());
return userSigninMapper.updateByExampleSelective(userSignin, example) > 0;
criteria.andSignInDateEqualTo(userSignin.getSignInDate());
return userSignInMapper.updateByExampleSelective(userSignin, example) > 0;
}
@Override
public boolean updateByPrimaryKey(UserSignin userSignin) {
return userSigninMapper.updateByPrimaryKeySelective(userSignin) > 0;
public boolean updateByPrimaryKey(UserSignIn userSignin) {
return userSignInMapper.updateByPrimaryKeySelective(userSignin) > 0;
}
}
package com.wwdz.ch.db.mapper;
import com.wwdz.ch.db.domain.UserSignin;
import com.wwdz.ch.db.domain.UserSigninExample;
import com.wwdz.ch.db.domain.UserSignIn;
import com.wwdz.ch.db.domain.UserSignInExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UserSigninMapper {
long countByExample(UserSigninExample example);
public interface UserSignInMapper {
long countByExample(UserSignInExample example);
int deleteByExample(UserSigninExample example);
int deleteByExample(UserSignInExample example);
int deleteByPrimaryKey(Long id);
int insert(UserSignin record);
int insert(UserSignIn record);
int insertSelective(UserSignin record);
int insertSelective(UserSignIn record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
UserSignin selectOneByExample(UserSigninExample example);
UserSignIn selectOneByExample(UserSignInExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
UserSignin selectOneByExampleSelective(@Param("example") UserSigninExample example, @Param("selective") UserSignin.Column ... selective);
UserSignIn selectOneByExampleSelective(@Param("example") UserSignInExample example, @Param("selective") UserSignIn.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<UserSignin> selectByExampleSelective(@Param("example") UserSigninExample example, @Param("selective") UserSignin.Column ... selective);
List<UserSignIn> selectByExampleSelective(@Param("example") UserSignInExample example, @Param("selective") UserSignIn.Column ... selective);
List<UserSignin> selectByExample(UserSigninExample example);
List<UserSignIn> selectByExample(UserSignInExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_signin
* This method corresponds to the database table user_sign_in
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
UserSignin selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") UserSignin.Column ... selective);
UserSignIn selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") UserSignIn.Column ... selective);
UserSignin selectByPrimaryKey(Long id);
UserSignIn selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") UserSignin record, @Param("example") UserSigninExample example);
int updateByExampleSelective(@Param("record") UserSignIn record, @Param("example") UserSignInExample example);
int updateByExample(@Param("record") UserSignin record, @Param("example") UserSigninExample example);
int updateByExample(@Param("record") UserSignIn record, @Param("example") UserSignInExample example);
int updateByPrimaryKeySelective(UserSignin record);
int updateByPrimaryKeySelective(UserSignIn record);
int updateByPrimaryKey(UserSignin record);
int updateByPrimaryKey(UserSignIn record);
}
\ No newline at end of file
<?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.wwdz.ch.db.mapper.UserSigninMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.UserSignin">
<mapper namespace="com.wwdz.ch.db.mapper.UserSignInMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.UserSignIn">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="signin_date" jdbcType="VARCHAR" property="signinDate" />
<result column="sign_in_date" jdbcType="VARCHAR" property="signInDate" />
<result column="consecutive_days" jdbcType="INTEGER" property="consecutiveDays" />
<result column="is_reward" jdbcType="BIT" property="isReward" />
<result column="reward_level" jdbcType="INTEGER" property="rewardLevel" />
......@@ -71,17 +71,17 @@
</where>
</sql>
<sql id="Base_Column_List">
id, user_id, create_time, update_time, signin_date, consecutive_days, is_reward,
id, user_id, create_time, update_time, sign_in_date, consecutive_days, is_reward,
reward_level, is_get
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.UserSigninExample" resultMap="BaseResultMap">
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.UserSignInExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from user_signin
from user_sign_in
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -107,11 +107,11 @@
</foreach>
</when>
<otherwise>
id, user_id, create_time, update_time, signin_date, consecutive_days, is_reward,
id, user_id, create_time, update_time, sign_in_date, consecutive_days, is_reward,
reward_level, is_get
</otherwise>
</choose>
from user_signin
from user_sign_in
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -122,7 +122,7 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from user_signin
from user_sign_in
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
......@@ -139,39 +139,39 @@
</foreach>
</when>
<otherwise>
id, user_id, create_time, update_time, signin_date, consecutive_days, is_reward,
id, user_id, create_time, update_time, sign_in_date, consecutive_days, is_reward,
reward_level, is_get
</otherwise>
</choose>
from user_signin
from user_sign_in
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from user_signin
delete from user_sign_in
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.UserSigninExample">
delete from user_signin
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.UserSignInExample">
delete from user_sign_in
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.UserSignin">
<insert id="insert" parameterType="com.wwdz.ch.db.domain.UserSignIn">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_signin (user_id, create_time, update_time,
signin_date, consecutive_days, is_reward,
insert into user_sign_in (user_id, create_time, update_time,
sign_in_date, consecutive_days, is_reward,
reward_level, is_get)
values (#{userId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{signinDate,jdbcType=VARCHAR}, #{consecutiveDays,jdbcType=INTEGER}, #{isReward,jdbcType=BIT},
#{signInDate,jdbcType=VARCHAR}, #{consecutiveDays,jdbcType=INTEGER}, #{isReward,jdbcType=BIT},
#{rewardLevel,jdbcType=INTEGER}, #{isGet,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.UserSignin">
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.UserSignIn">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_signin
insert into user_sign_in
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
......@@ -182,8 +182,8 @@
<if test="updateTime != null">
update_time,
</if>
<if test="signinDate != null">
signin_date,
<if test="signInDate != null">
sign_in_date,
</if>
<if test="consecutiveDays != null">
consecutive_days,
......@@ -208,8 +208,8 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="signinDate != null">
#{signinDate,jdbcType=VARCHAR},
<if test="signInDate != null">
#{signInDate,jdbcType=VARCHAR},
</if>
<if test="consecutiveDays != null">
#{consecutiveDays,jdbcType=INTEGER},
......@@ -225,14 +225,14 @@
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.UserSigninExample" resultType="java.lang.Long">
select count(*) from user_signin
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.UserSignInExample" resultType="java.lang.Long">
select count(*) from user_sign_in
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update user_signin
update user_sign_in
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
......@@ -246,8 +246,8 @@
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.signinDate != null">
signin_date = #{record.signinDate,jdbcType=VARCHAR},
<if test="record.signInDate != null">
sign_in_date = #{record.signInDate,jdbcType=VARCHAR},
</if>
<if test="record.consecutiveDays != null">
consecutive_days = #{record.consecutiveDays,jdbcType=INTEGER},
......@@ -267,12 +267,12 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
update user_signin
update user_sign_in
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
signin_date = #{record.signinDate,jdbcType=VARCHAR},
sign_in_date = #{record.signInDate,jdbcType=VARCHAR},
consecutive_days = #{record.consecutiveDays,jdbcType=INTEGER},
is_reward = #{record.isReward,jdbcType=BIT},
reward_level = #{record.rewardLevel,jdbcType=INTEGER},
......@@ -281,8 +281,8 @@
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.UserSignin">
update user_signin
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.UserSignIn">
update user_sign_in
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
......@@ -293,8 +293,8 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="signinDate != null">
signin_date = #{signinDate,jdbcType=VARCHAR},
<if test="signInDate != null">
sign_in_date = #{signInDate,jdbcType=VARCHAR},
</if>
<if test="consecutiveDays != null">
consecutive_days = #{consecutiveDays,jdbcType=INTEGER},
......@@ -311,19 +311,19 @@
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.UserSignin">
update user_signin
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.UserSignIn">
update user_sign_in
set user_id = #{userId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
signin_date = #{signinDate,jdbcType=VARCHAR},
sign_in_date = #{signInDate,jdbcType=VARCHAR},
consecutive_days = #{consecutiveDays,jdbcType=INTEGER},
is_reward = #{isReward,jdbcType=BIT},
reward_level = #{rewardLevel,jdbcType=INTEGER},
is_get = #{isGet,jdbcType=BIT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.UserSigninExample" resultMap="BaseResultMap">
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.UserSignInExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
......@@ -332,7 +332,7 @@
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from user_signin
from user_sign_in
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -356,11 +356,11 @@
</foreach>
</when>
<otherwise>
id, user_id, create_time, update_time, signin_date, consecutive_days, is_reward,
id, user_id, create_time, update_time, sign_in_date, consecutive_days, is_reward,
reward_level, is_get
</otherwise>
</choose>
from user_signin
from user_sign_in
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -369,4 +369,546 @@
</if>
limit 1
</select>
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.UserSignIn">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="sign_in_date" jdbcType="VARCHAR" property="signInDate" />
<result column="consecutive_days" jdbcType="INTEGER" property="consecutiveDays" />
<result column="is_reward" jdbcType="BIT" property="isReward" />
<result column="reward_level" jdbcType="INTEGER" property="rewardLevel" />
<result column="is_get" jdbcType="BIT" property="isGet" />
</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, user_id, create_time, update_time, sign_in_date, consecutive_days, is_reward,
reward_level, is_get
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.UserSignInExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from user_sign_in
<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 user_sign_in
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from user_sign_in
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.UserSignInExample">
delete from user_sign_in
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.UserSignIn">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_sign_in (user_id, create_time, update_time,
sign_in_date, consecutive_days, is_reward,
reward_level, is_get)
values (#{userId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{signInDate,jdbcType=VARCHAR}, #{consecutiveDays,jdbcType=INTEGER}, #{isReward,jdbcType=BIT},
#{rewardLevel,jdbcType=INTEGER}, #{isGet,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.UserSignIn">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_sign_in
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="signInDate != null">
sign_in_date,
</if>
<if test="consecutiveDays != null">
consecutive_days,
</if>
<if test="isReward != null">
is_reward,
</if>
<if test="rewardLevel != null">
reward_level,
</if>
<if test="isGet != null">
is_get,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="signInDate != null">
#{signInDate,jdbcType=VARCHAR},
</if>
<if test="consecutiveDays != null">
#{consecutiveDays,jdbcType=INTEGER},
</if>
<if test="isReward != null">
#{isReward,jdbcType=BIT},
</if>
<if test="rewardLevel != null">
#{rewardLevel,jdbcType=INTEGER},
</if>
<if test="isGet != null">
#{isGet,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.UserSignInExample" resultType="java.lang.Long">
select count(*) from user_sign_in
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update user_sign_in
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.signInDate != null">
sign_in_date = #{record.signInDate,jdbcType=VARCHAR},
</if>
<if test="record.consecutiveDays != null">
consecutive_days = #{record.consecutiveDays,jdbcType=INTEGER},
</if>
<if test="record.isReward != null">
is_reward = #{record.isReward,jdbcType=BIT},
</if>
<if test="record.rewardLevel != null">
reward_level = #{record.rewardLevel,jdbcType=INTEGER},
</if>
<if test="record.isGet != null">
is_get = #{record.isGet,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update user_sign_in
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
sign_in_date = #{record.signInDate,jdbcType=VARCHAR},
consecutive_days = #{record.consecutiveDays,jdbcType=INTEGER},
is_reward = #{record.isReward,jdbcType=BIT},
reward_level = #{record.rewardLevel,jdbcType=INTEGER},
is_get = #{record.isGet,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.UserSignIn">
update user_sign_in
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="signInDate != null">
sign_in_date = #{signInDate,jdbcType=VARCHAR},
</if>
<if test="consecutiveDays != null">
consecutive_days = #{consecutiveDays,jdbcType=INTEGER},
</if>
<if test="isReward != null">
is_reward = #{isReward,jdbcType=BIT},
</if>
<if test="rewardLevel != null">
reward_level = #{rewardLevel,jdbcType=INTEGER},
</if>
<if test="isGet != null">
is_get = #{isGet,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.UserSignIn">
update user_sign_in
set user_id = #{userId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
sign_in_date = #{signInDate,jdbcType=VARCHAR},
consecutive_days = #{consecutiveDays,jdbcType=INTEGER},
is_reward = #{isReward,jdbcType=BIT},
reward_level = #{rewardLevel,jdbcType=INTEGER},
is_get = #{isGet,jdbcType=BIT}
where id = #{id,jdbcType=BIGINT}
</update>
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.UserSignIn">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="signin_date" jdbcType="VARCHAR" property="signinDate" />
<result column="consecutive_days" jdbcType="INTEGER" property="consecutiveDays" />
<result column="is_reward" jdbcType="BIT" property="isReward" />
<result column="reward_level" jdbcType="INTEGER" property="rewardLevel" />
<result column="is_get" jdbcType="BIT" property="isGet" />
</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, user_id, create_time, update_time, signin_date, consecutive_days, is_reward,
reward_level, is_get
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.UserSigninExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from user_signin
<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 user_signin
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from user_signin
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.UserSigninExample">
delete from user_signin
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.UserSignIn">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_signin (user_id, create_time, update_time,
signin_date, consecutive_days, is_reward,
reward_level, is_get)
values (#{userId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{signinDate,jdbcType=VARCHAR}, #{consecutiveDays,jdbcType=INTEGER}, #{isReward,jdbcType=BIT},
#{rewardLevel,jdbcType=INTEGER}, #{isGet,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.UserSignIn">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_signin
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="signinDate != null">
signin_date,
</if>
<if test="consecutiveDays != null">
consecutive_days,
</if>
<if test="isReward != null">
is_reward,
</if>
<if test="rewardLevel != null">
reward_level,
</if>
<if test="isGet != null">
is_get,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="signinDate != null">
#{signinDate,jdbcType=VARCHAR},
</if>
<if test="consecutiveDays != null">
#{consecutiveDays,jdbcType=INTEGER},
</if>
<if test="isReward != null">
#{isReward,jdbcType=BIT},
</if>
<if test="rewardLevel != null">
#{rewardLevel,jdbcType=INTEGER},
</if>
<if test="isGet != null">
#{isGet,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.UserSigninExample" resultType="java.lang.Long">
select count(*) from user_signin
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update user_signin
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.signinDate != null">
signin_date = #{record.signinDate,jdbcType=VARCHAR},
</if>
<if test="record.consecutiveDays != null">
consecutive_days = #{record.consecutiveDays,jdbcType=INTEGER},
</if>
<if test="record.isReward != null">
is_reward = #{record.isReward,jdbcType=BIT},
</if>
<if test="record.rewardLevel != null">
reward_level = #{record.rewardLevel,jdbcType=INTEGER},
</if>
<if test="record.isGet != null">
is_get = #{record.isGet,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update user_signin
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
signin_date = #{record.signinDate,jdbcType=VARCHAR},
consecutive_days = #{record.consecutiveDays,jdbcType=INTEGER},
is_reward = #{record.isReward,jdbcType=BIT},
reward_level = #{record.rewardLevel,jdbcType=INTEGER},
is_get = #{record.isGet,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.UserSignIn">
update user_signin
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="signinDate != null">
signin_date = #{signinDate,jdbcType=VARCHAR},
</if>
<if test="consecutiveDays != null">
consecutive_days = #{consecutiveDays,jdbcType=INTEGER},
</if>
<if test="isReward != null">
is_reward = #{isReward,jdbcType=BIT},
</if>
<if test="rewardLevel != null">
reward_level = #{rewardLevel,jdbcType=INTEGER},
</if>
<if test="isGet != null">
is_get = #{isGet,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.UserSignIn">
update user_signin
set user_id = #{userId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
signin_date = #{signinDate,jdbcType=VARCHAR},
consecutive_days = #{consecutiveDays,jdbcType=INTEGER},
is_reward = #{isReward,jdbcType=BIT},
reward_level = #{rewardLevel,jdbcType=INTEGER},
is_get = #{isGet,jdbcType=BIT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
......@@ -72,7 +72,7 @@
<javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper"
targetProject="ch-dao/src/main/java"/>
<table tableName="user_signin" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<table tableName="user_sign_in" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table>
......
......@@ -3,16 +3,18 @@ package com.wwdz.ch.wx.impl;
import com.wwdz.ch.core.consts.CommConsts;
import com.wwdz.ch.core.consts.DistributionEnum;
import com.wwdz.ch.core.consts.SigninEnum;
import com.wwdz.ch.core.entity.SignDateRecord;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.DateTimeUtil;
import com.wwdz.ch.core.util.IdUtils;
import com.wwdz.ch.db.dao.UserSigninDao;
import com.wwdz.ch.db.dao.distribution.DistributionOrderDao;
import com.wwdz.ch.db.domain.UserSignin;
import com.wwdz.ch.db.domain.UserSignIn;
import com.wwdz.ch.db.domain.distribution.DistributionOrder;
import com.wwdz.ch.db.dto.request.UserSigninRequestDto;
import com.wwdz.ch.db.dto.request.UserSignInRequestDto;
import com.wwdz.ch.wx.service.UserSigninService;
import com.xxdxxs.utils.DateUtils;
import com.xxdxxs.utils.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -20,8 +22,10 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class UserSigninServiceImpl implements UserSigninService {
......@@ -35,7 +39,7 @@ public class UserSigninServiceImpl implements UserSigninService {
DistributionOrderDao distributionOrderDao;
@Override
public Result signin(UserSigninRequestDto dto) {
public Result signin(UserSignInRequestDto dto) {
try {
long userId = dto.getUserId();
//检查是否已签到过
......@@ -44,11 +48,11 @@ public class UserSigninServiceImpl implements UserSigninService {
return Result.failed("您今天已签到过");
}
//今天尚未签到,则进行记录,先查询昨天的打卡记录,有则再连续打卡天数上+1,没有则算签到第一天
UserSignin yesterdaySignin = userSigninDao.findYesterdayRecord(userId);
UserSignIn yesterdaySignin = userSigninDao.findYesterdayRecord(userId);
if (yesterdaySignin == null) {
UserSignin userSignin = new UserSignin();
UserSignIn userSignin = new UserSignIn();
userSignin.setUserId(userId);
userSignin.setSigninDate(todayStr);
userSignin.setSignInDate(todayStr);
userSignin.setCreateTime(new Date());
userSignin.setUpdateTime(new Date());
userSignin.setConsecutiveDays(1);
......@@ -57,9 +61,9 @@ public class UserSigninServiceImpl implements UserSigninService {
userSignin.setRewardLevel(SigninEnum.LevelEnum.ZERO.getCode());
userSigninDao.insert(userSignin);
} else {
UserSignin userSignin = new UserSignin();
UserSignIn userSignin = new UserSignIn();
userSignin.setUserId(userId);
userSignin.setSigninDate(todayStr);
userSignin.setSignInDate(todayStr);
userSignin.setCreateTime(new Date());
userSignin.setUpdateTime(new Date());
//连续签到天数
......@@ -92,17 +96,17 @@ public class UserSigninServiceImpl implements UserSigninService {
@Transactional
@Override
public Result getReward(UserSigninRequestDto dto) {
public Result getReward(UserSignInRequestDto dto) {
try {
//查询签到记录
UserSignin userSignin = userSigninDao.findRecord(dto.getUserId(), dto.getSigninDate());
UserSignIn userSignin = userSigninDao.findRecord(dto.getUserId(), dto.getSignInDate());
if (!userSignin.getIsReward()) {
return Result.failed("尚未完成连续签到的天数");
}
if (userSignin.getIsGet()) {
return Result.failed("该奖励已领取");
}
UserSignin updateDto = new UserSignin();
UserSignIn updateDto = new UserSignIn();
updateDto.setId(userSignin.getId());
updateDto.setIsGet(true);
updateDto.setUpdateTime(new Date());
......@@ -137,20 +141,45 @@ public class UserSigninServiceImpl implements UserSigninService {
@Override
public Result findList(UserSigninRequestDto dto) {
public Result findList(UserSignInRequestDto dto) {
try {
//当前是几号
LocalDate today = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
String formattedDate = today.format(formatter);
//格式如20241101的日期,int类型用户比较
int currentDay = Integer.parseInt(formattedDate);
//当前的年和月
int year = today.getYear();
int month = today.getMonthValue();
if (StringUtils.isEmpty(dto.getYear()) || StringUtils.isEmpty(dto.getMonth())) {
dto.setYearMonth(year + "-" + month);
} else {
dto.setYearMonth(dto.getYear() + "-" + dto.getMonth());
}
//该月份所有的日期
List<String> dateList = DateTimeUtil.getMonthDates(dto.getYearMonth());
Date startTime = DateTimeUtil.getDateWithMinTime(dateList.get(0));
Date endTime = DateTimeUtil.getDateWithMaxTime(dateList.get((dateList.size() - 1)));
dto.setStartQueryTime(startTime);
dto.setEndQueryTime(endTime);
List<UserSignin> userSigninList = userSigninDao.findList(dto);
/* for (String dateStr : dateList) {
if () {
List<UserSignIn> userSignInList = userSigninDao.findList(dto);
List<String> signDateList = userSignInList.stream().map(UserSignIn::getSignInDate).collect(Collectors.toList());
for (String dateStr : dateList) {
SignDateRecord signDateRecord = new SignDateRecord();
int day = Integer.parseInt(dateStr.replace("-", ""));
if (day < currentDay) {
signDateRecord.setDateState(SigninEnum.DateStateEnum.PASS.getCode());
} else if (day == currentDay) {
signDateRecord.setDateState(SigninEnum.DateStateEnum.CURRENT.getCode());
} else {
signDateRecord.setDateState(SigninEnum.DateStateEnum.FUTURE.getCode());
}
//签到记录里包含该日期则表示已签到
if (signDateList.contains(dateStr)) {
signDateRecord.setIsSignIn(true);
}
}
}*/
return Result.success();
} catch (Exception e) {
......@@ -159,6 +188,18 @@ public class UserSigninServiceImpl implements UserSigninService {
return Result.failed();
}
@Override
public Result getShareInfo(UserSignInRequestDto dto) {
try {
} catch (Exception e) {
logger.error("获取分享信息失败 error : {}", e);
}
return Result.failed();
}
public static void main(String[] args) {
List<String> dateList = DateTimeUtil.getMonthDates("2024-11");
Date startTime = DateTimeUtil.getDateWithMinTime(dateList.get(0));
......
package com.wwdz.ch.wx.impl.distribution;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.alibaba.dubbo.config.annotation.Reference;
import com.github.pagehelper.PageInfo;
......@@ -22,7 +21,6 @@ import com.wwdz.ch.core.entity.SupplierItemVo;
import com.wwdz.ch.wx.aspect.AddBrowseLog;
import com.wwdz.ch.wx.constant.CollectionBookConstants;
import com.wwdz.ch.wx.entity.GroupPurchaseInfo;
import com.wwdz.ch.wx.entity.request.ItemTagOperateRequestDto;
import com.wwdz.ch.wx.entity.vo.distribution.AuctionDetailVo;
import com.wwdz.ch.wx.entity.vo.distribution.AuctionRecordRowVo;
import com.wwdz.ch.wx.service.FollowFansRecordService;
......@@ -30,9 +28,6 @@ import com.wwdz.ch.wx.service.distribution.CollectionItemsRelationService;
import com.wwdz.ch.wx.service.distribution.DistributionOrderService;
import com.wwdz.ch.wx.service.distribution.GroupPurchaseService;
import com.wwdz.ch.wx.service.distribution.SupplierItemService;
import com.wwdz.mall.common.vo.response.CloudServerResponse;
import com.wwdz.shop.api.DTO.ShopDTO;
import com.wwdz.shop.api.query.ShopQueryOption;
import com.wwdz.shop.api.service.ShopReadService;
import com.xxdxxs.utils.*;
import org.redisson.api.RLock;
......
package com.wwdz.ch.wx.service;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.UserSigninRequestDto;
import com.wwdz.ch.db.dto.request.UserSignInRequestDto;
public interface UserSigninService {
......@@ -10,20 +10,26 @@ public interface UserSigninService {
* @param dto
* @return
*/
Result signin(UserSigninRequestDto dto);
Result signin(UserSignInRequestDto dto);
/**
* 领取奖励
* @param dto
* @return
*/
Result getReward(UserSigninRequestDto dto);
Result getReward(UserSignInRequestDto dto);
/**
* 查询签到记录
* @param dto
* @return
*/
Result findList(UserSigninRequestDto dto);
Result findList(UserSignInRequestDto dto);
/**
* 获取分享信息
* @param dto
* @return
*/
Result getShareInfo(UserSignInRequestDto dto);
}
......@@ -3,7 +3,7 @@ package com.wwdz.ch.wx.web;
import com.alibaba.fastjson.JSON;
import com.wwdz.ch.core.consts.ResultCode;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.UserSigninRequestDto;
import com.wwdz.ch.db.dto.request.UserSignInRequestDto;
import com.wwdz.ch.wx.service.UserSigninService;
import com.xxdxxs.service.FormHandler;
import com.xxdxxs.validation.Validator;
......@@ -27,7 +27,7 @@ public class UserSigninController {
@ApiOperation(value = "用户签到")
@PostMapping("/checkAbleToOpenShop")
public Result checkAbleToOpenShop(@RequestBody UserSigninRequestDto dto) {
public Result checkAbleToOpenShop(@RequestBody UserSignInRequestDto dto) {
logger.info("【请求开始】用户签到,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("userId", "用户id").must().number()
......@@ -41,7 +41,7 @@ public class UserSigninController {
@ApiOperation(value = "领取奖励")
@PostMapping("/getReward")
public Result getReward(@RequestBody UserSigninRequestDto dto) {
public Result getReward(@RequestBody UserSignInRequestDto dto) {
logger.info("【请求开始】领取奖励,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("userId", "用户id").must().number()
......@@ -57,7 +57,7 @@ public class UserSigninController {
@ApiOperation(value = "查询签到记录")
@PostMapping("/findList")
public Result findList(@RequestBody UserSigninRequestDto dto) {
public Result findList(@RequestBody UserSignInRequestDto dto) {
logger.info("【请求开始】查询签到记录,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("userId", "用户id").must().number()
......
......@@ -89,12 +89,12 @@ public class WxPayServiceTest {
@Test
public void refund() {
List<String> list = Arrays.asList("DA2411061130292824378", "DA2411050940309904308", "DA2411040955234251934");
List<String> list = Arrays.asList("DA2411192041343155076");
list.forEach(orderId ->{
DistributionOrderRequestDto dto = new DistributionOrderRequestDto();
dto.setDistributionOrderId(orderId);
dto.setAmount("1");
dto.setRefundPrice("1");
dto.setAmount("24.9");
dto.setRefundPrice("24.9");
Result result = wxPayServiceApi.refund(dto);
logger.info("申请微信支付退款:{}", result);
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment