添加查询打卡情况接口
This commit is contained in:
parent
7053e69a33
commit
b7483086a2
@ -125,4 +125,10 @@ public class SysWxUserLogController extends BaseController {
|
|||||||
sysWxUserLog.setLogTime(DateTimeUtil.getCurrentTimeDate());
|
sysWxUserLog.setLogTime(DateTimeUtil.getCurrentTimeDate());
|
||||||
return add(sysWxUserLog);
|
return add(sysWxUserLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/wx/logs/check/{openid}")
|
||||||
|
public AjaxResult checkLog(@PathVariable String openid) {
|
||||||
|
int count = sysWxUserLogService.checkWxLogInfoCount(openid);
|
||||||
|
return AjaxResult.success(count);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,6 +1,8 @@
|
|||||||
package com.stdiet.custom.mapper;
|
package com.stdiet.custom.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.stdiet.custom.domain.SysWxUserInfo;
|
||||||
import com.stdiet.custom.domain.SysWxUserLog;
|
import com.stdiet.custom.domain.SysWxUserLog;
|
||||||
import com.stdiet.custom.page.WxLogInfo;
|
import com.stdiet.custom.page.WxLogInfo;
|
||||||
|
|
||||||
@ -61,4 +63,7 @@ public interface SysWxUserLogMapper
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSysWxUserLogByIds(String[] openids);
|
public int deleteSysWxUserLogByIds(String[] openids);
|
||||||
|
|
||||||
|
public int checkWxLogInfoCount(String openid);
|
||||||
|
|
||||||
}
|
}
|
@ -1,9 +0,0 @@
|
|||||||
package com.stdiet.custom.page;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
public class WxCurUserLogInfo implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,6 +1,8 @@
|
|||||||
package com.stdiet.custom.service;
|
package com.stdiet.custom.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.stdiet.custom.domain.SysWxUserInfo;
|
||||||
import com.stdiet.custom.domain.SysWxUserLog;
|
import com.stdiet.custom.domain.SysWxUserLog;
|
||||||
import com.stdiet.custom.page.WxLogInfo;
|
import com.stdiet.custom.page.WxLogInfo;
|
||||||
|
|
||||||
@ -61,4 +63,6 @@ public interface ISysWxUserLogService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSysWxUserLogById(String openid);
|
public int deleteSysWxUserLogById(String openid);
|
||||||
|
|
||||||
|
public int checkWxLogInfoCount(String openid);
|
||||||
}
|
}
|
@ -3,6 +3,7 @@ package com.stdiet.custom.service.impl;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.stdiet.common.utils.DateUtils;
|
import com.stdiet.common.utils.DateUtils;
|
||||||
|
import com.stdiet.custom.domain.SysWxUserInfo;
|
||||||
import com.stdiet.custom.page.WxLogInfo;
|
import com.stdiet.custom.page.WxLogInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -93,4 +94,11 @@ public class SysWxUserLogServiceImpl implements ISysWxUserLogService {
|
|||||||
public int deleteSysWxUserLogById(String openid) {
|
public int deleteSysWxUserLogById(String openid) {
|
||||||
return sysWxUserLogMapper.deleteSysWxUserLogById(openid);
|
return sysWxUserLogMapper.deleteSysWxUserLogById(openid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int checkWxLogInfoCount(String openid) {
|
||||||
|
return sysWxUserLogMapper.checkWxLogInfoCount(openid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -42,6 +42,10 @@
|
|||||||
select openid, weight, appid, phone, log_time, sleep_time, wakeup_time, sport, avatar_url, diet, insomnia, defecation, water, create_by, create_time, update_by, update_time, remark from sys_wx_user_log
|
select openid, weight, appid, phone, log_time, sleep_time, wakeup_time, sport, avatar_url, diet, insomnia, defecation, water, create_by, create_time, update_by, update_time, remark from sys_wx_user_log
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
<select id="checkWxLogInfoCount" parameterType="String" resultType="Integer" >
|
||||||
|
select count(*) from sys_wx_user_log where to_days(log_time) = to_days(now()) and openid = #{openid}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectSysWxUserLogList" parameterType="SysWxUserLog" resultMap="SysWxUserLogResult">
|
<select id="selectSysWxUserLogList" parameterType="SysWxUserLog" resultMap="SysWxUserLogResult">
|
||||||
<include refid="selectSysWxUserLogVo"/>
|
<include refid="selectSysWxUserLogVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user