钉钉考勤
This commit is contained in:
@@ -14,6 +14,7 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 考勤打卡数据
|
* 考勤打卡数据
|
||||||
@@ -32,8 +33,12 @@ public class AttendanceController {
|
|||||||
* @return 配置信息
|
* @return 配置信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/config")
|
@GetMapping("/config")
|
||||||
public CzgResult<ShopConfig> getConfig() {
|
public CzgResult<Map<String, String>> getConfig() {
|
||||||
return CzgResult.success(shopConfigService.getById(StpKit.USER.getShopId()));
|
ShopConfig config = shopConfigService.getById(StpKit.USER.getShopId());
|
||||||
|
return CzgResult.success(Map.of(
|
||||||
|
"dingAppKey", config.getDingAppKey(),
|
||||||
|
"dingAppSecret", config.getDingAppSecret()
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,16 +54,14 @@ public class AttendanceController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
* @param page 开始页码
|
|
||||||
* @param size 数量
|
|
||||||
* @param name 姓名
|
* @param name 姓名
|
||||||
* @param startTime 开始时间
|
* @param startTime 开始时间
|
||||||
* @param endTime 结束时间
|
* @param endTime 结束时间
|
||||||
*/
|
*/
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public CzgResult<ArrayList<DingAttendanceStatsVO>> getList(@RequestParam Integer page, @RequestParam Integer size,
|
public CzgResult<ArrayList<DingAttendanceStatsVO>> getList(
|
||||||
@RequestParam(required = false) String name, @RequestParam(required = false) String startTime,
|
@RequestParam(required = false) String name, @RequestParam(required = false) String startTime,
|
||||||
@RequestParam(required = false) String endTime) {
|
@RequestParam(required = false) String endTime) {
|
||||||
return CzgResult.success(attendanceService.list(StpKit.USER.getShopId(), page, size, name, startTime, endTime));
|
return CzgResult.success(attendanceService.list(StpKit.USER.getShopId(), name, startTime, endTime));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ import com.czg.market.vo.DingAttendanceStatsVO;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public interface AttendanceService {
|
public interface AttendanceService {
|
||||||
ArrayList<DingAttendanceStatsVO> list(Long shopId, Integer page, Integer size, String name, String startTime, String endTime);
|
ArrayList<DingAttendanceStatsVO> list(Long shopId, String name, String startTime, String endTime);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class AttendanceServiceImpl implements AttendanceService {
|
|||||||
private ShopConfigService shopConfigService;
|
private ShopConfigService shopConfigService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<DingAttendanceStatsVO> list(Long shopId, Integer page, Integer size, String name, String startTime, String endTime) {
|
public ArrayList<DingAttendanceStatsVO> list(Long shopId, String name, String startTime, String endTime) {
|
||||||
DateTime start;
|
DateTime start;
|
||||||
DateTime end;
|
DateTime end;
|
||||||
if (StrUtil.isBlank(startTime)) {
|
if (StrUtil.isBlank(startTime)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user