Merge branch 'master' of http://gitea.zianxin.com/zianxin-tec/biz-api-cloud
This commit is contained in:
commit
f405da26b4
32 files changed
+509
-12
No files matched your search
+3
@@ -201,4 +201,7 @@ public class CanteenSpuEntity extends Model<CanteenSpuEntity> {
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description="是否显示")
|
||||
private String isShow;
|
||||
}
|
||||
+5
@@ -40,4 +40,9 @@ public class DailyMenuAppVO {
|
||||
private Integer hourType;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 是否显示
|
||||
*/
|
||||
private String isShow;
|
||||
}
|
||||
+19
-4
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.canteen.dto.DailyMenuAll;
|
||||
import com.bsd.pjcloud.canteen.dto.app.DailyMenuDTO;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenSpuEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.CanteenSpuMapper;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenSpuService;
|
||||
import com.bsd.pjcloud.canteen.vo.ADCanteenDailyMenuListVO;
|
||||
import com.bsd.pjcloud.canteen.vo.DailyMenuVO;
|
||||
@@ -48,6 +49,8 @@ public class CanteenDailyMenuServiceImpl extends ServiceImpl<CanteenDailyMenuMap
|
||||
private final RemoteMqttEventService remoteMqttEventService;
|
||||
private final RemoteMchService remoteMchService;
|
||||
|
||||
private final CanteenSpuMapper canteenSpuMapper;
|
||||
|
||||
@Override
|
||||
public List<DailyMenuAll> selectTimeFood(String time, Long merchantId, Long categoryId) {
|
||||
List<DailyMenuAll> dailyMenuAllES = new ArrayList<>();
|
||||
@@ -145,16 +148,27 @@ public class CanteenDailyMenuServiceImpl extends ServiceImpl<CanteenDailyMenuMap
|
||||
canteenDailyMenuEntityLambdaQueryWrapper.eq(CanteenDailyMenuEntity::getStartTime, dailyMenuDTO.getStartTime());
|
||||
canteenDailyMenuEntityLambdaQueryWrapper.eq(dailyMenuDTO.getHourType() != null,
|
||||
CanteenDailyMenuEntity::getHourType, dailyMenuDTO.getHourType());
|
||||
|
||||
//查询
|
||||
LambdaQueryWrapper<CanteenSpuEntity> onlineFoodSpuDOLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
onlineFoodSpuDOLambdaQueryWrapper.eq(null != dailyMenuDTO.getCategoryId(), CanteenSpuEntity::getCategoryId, dailyMenuDTO.getCategoryId());
|
||||
onlineFoodSpuDOLambdaQueryWrapper.eq(CanteenSpuEntity::getIsShow, "1");
|
||||
List<CanteenSpuEntity> spuEntities = canteenSpuService.list(onlineFoodSpuDOLambdaQueryWrapper);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(spuEntities)){
|
||||
List<Long> spuIds = spuEntities.stream().map(CanteenSpuEntity::getId).collect(Collectors.toList());
|
||||
canteenDailyMenuEntityLambdaQueryWrapper.notIn(CanteenDailyMenuEntity::getSpuId, spuIds);
|
||||
}
|
||||
|
||||
Page pageData = baseMapper.selectPage(page, canteenDailyMenuEntityLambdaQueryWrapper);
|
||||
List<CanteenDailyMenuEntity> canteenDailyMenuEntities = pageData.getRecords();
|
||||
if (CollectionUtils.isNotEmpty(canteenDailyMenuEntities)) {
|
||||
List<Long> spuIds = canteenDailyMenuEntities.stream().map(CanteenDailyMenuEntity::getSpuId).distinct().collect(Collectors.toList());
|
||||
LambdaQueryWrapper<CanteenSpuEntity> onlineFoodSpuDOLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
onlineFoodSpuDOLambdaQueryWrapper.eq(null != dailyMenuDTO.getCategoryId(), CanteenSpuEntity::getCategoryId, dailyMenuDTO.getCategoryId());
|
||||
LambdaQueryWrapper<CanteenSpuEntity> spuDOLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
onlineFoodSpuDOLambdaQueryWrapper.in(CanteenSpuEntity::getId, spuIds);
|
||||
List<CanteenSpuEntity> canteenSpuEntities = canteenSpuService.list(onlineFoodSpuDOLambdaQueryWrapper);
|
||||
List<CanteenSpuEntity> list = canteenSpuService.list(spuDOLambdaQueryWrapper);
|
||||
// 按 id 分组成 Map
|
||||
Map<Long, CanteenSpuEntity> spuEntityMap = canteenSpuEntities.stream()
|
||||
Map<Long, CanteenSpuEntity> spuEntityMap = list.stream()
|
||||
.collect(Collectors.toMap(CanteenSpuEntity::getId, spu -> spu));
|
||||
// 构造新的 VO 列表
|
||||
List<DailyMenuAppVO> dailyMenuVOList = canteenDailyMenuEntities.stream()
|
||||
@@ -169,6 +183,7 @@ public class CanteenDailyMenuServiceImpl extends ServiceImpl<CanteenDailyMenuMap
|
||||
vo.setPicUrl(spuEntity.getPicUrl());
|
||||
vo.setName(spuEntity.getName());
|
||||
vo.setSort(spuEntity.getSort());
|
||||
vo.setIsShow(spuEntity.getIsShow());
|
||||
// 其他需要的字段
|
||||
}
|
||||
return vo;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="isShow" column="is_show"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
+8
@@ -1,5 +1,7 @@
|
||||
package com.bsd.pjcloud.flow.task.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -94,4 +96,10 @@ public class TaskDto {
|
||||
*/
|
||||
private String processName;
|
||||
|
||||
|
||||
/**
|
||||
* 表单详情路由
|
||||
*/
|
||||
private String formDetail;
|
||||
|
||||
}
|
||||
+3
-3
@@ -142,7 +142,7 @@ public class Process {
|
||||
private String businessKey;
|
||||
|
||||
|
||||
// @Schema(description = "表单详情路由")
|
||||
// @TableField("form_detail")
|
||||
// private String formDetail;
|
||||
@Schema(description = "表单详情路由")
|
||||
@TableField("form_detail")
|
||||
private String formDetail;
|
||||
}
|
||||
+1
@@ -35,6 +35,7 @@ public class ProcessGroup {
|
||||
@TableField("sort")
|
||||
private Integer sort;
|
||||
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
|
||||
+5
@@ -2,6 +2,7 @@ package com.bsd.pjcloud.flow.task.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -72,6 +73,10 @@ public class ProcessInstanceRecord {
|
||||
@TableField("group_name")
|
||||
private String groupName;
|
||||
|
||||
|
||||
@TableField("form_detail")
|
||||
private String formDetail;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class ProcessInstanceController {
|
||||
|
||||
/**
|
||||
* 查询当前登录用户的待办任务
|
||||
* @param pageDto
|
||||
* @param queryParamDto
|
||||
* @return
|
||||
*/
|
||||
@SneakyThrows
|
||||
|
||||
+1
@@ -132,6 +132,7 @@ public class ProcessInstanceServiceImpl implements IProcessInstanceService {
|
||||
|
||||
record.setRootUserId(processInstanceRecord.getUserId());
|
||||
record.setGroupName(processInstanceRecord.getGroupName());
|
||||
record.setFormDetail(processInstanceRecord.getFormDetail());
|
||||
record.setRootUserName(startUser.getUsername());
|
||||
record.setRootUserAvatarUrl(startUser.getAvatar());
|
||||
record.setStartTime(processInstanceRecord.getCreateTime());
|
||||
|
||||
+1
-1
@@ -199,7 +199,7 @@ public class RemoteServiceImpl implements IRemoteService {
|
||||
entity.setGroupId(oaFormGroups.getId());
|
||||
entity.setGroupName(oaFormGroups.getGroupName());
|
||||
entity.setStatus(NodeStatusEnum.JXZ.getCode());
|
||||
|
||||
entity.setFormDetail(oaForms.getFormDetail());
|
||||
processInstanceRecordService.save(entity);
|
||||
|
||||
return R.ok();
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.bsd.pjcloud.integrated.vo.common;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "下拉返回")
|
||||
public class SelectSimpleVo {
|
||||
|
||||
@Schema(description = "id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
}
|
||||
@@ -61,7 +61,7 @@
|
||||
<!--必备: 依赖api模块-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-supermarket-erp-api</artifactId>
|
||||
<artifactId>pjcloud-integrated-api</artifactId>
|
||||
<version>5.7.0</version>
|
||||
</dependency>
|
||||
<!--必备: log 依赖-->
|
||||
|
||||
+11
@@ -6,11 +6,13 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.common.security.util.SecurityUtils;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingEquipmentEntity;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingEquipmentService;
|
||||
import com.bsd.pjcloud.integrated.vo.common.SelectSimpleVo;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
@@ -124,4 +126,13 @@ public class MeetingEquipmentController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "设备下拉数量" , description = "设备下拉数量,可根据参数设备名称模糊查询" )
|
||||
@GetMapping("/simpleAll" )
|
||||
public R getSimpleAll(@RequestParam(required = false,value = "name")String name) {
|
||||
List<MeetingEquipmentEntity> list=meetingEquipmentService.listScope(name);
|
||||
List<SelectSimpleVo> bean = BeanUtils.toBean(list, SelectSimpleVo.class);
|
||||
return R.ok(bean);
|
||||
}
|
||||
}
|
||||
+14
-1
@@ -9,6 +9,8 @@ import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.common.security.util.SecurityUtils;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingRoomEntity;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingRoomEquipmentEntity;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingRoomEquipmentService;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingRoomService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
@@ -18,6 +20,7 @@ import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
@@ -38,6 +41,8 @@ public class MeetingRoomController {
|
||||
|
||||
private final MeetingRoomService meetingRoomService;
|
||||
|
||||
private final MeetingRoomEquipmentService meetingRoomEquipmentService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
@@ -49,7 +54,7 @@ public class MeetingRoomController {
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoom_view')" )
|
||||
public R getMeetingRoomPage(@ParameterObject Page page, @ParameterObject MeetingRoomEntity meetingRoom) {
|
||||
LambdaQueryWrapper<MeetingRoomEntity> wrapper = Wrappers.lambdaQuery();
|
||||
return R.ok(meetingRoomService.page(page, wrapper));
|
||||
return R.ok(meetingRoomService.pageScope(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
@@ -74,8 +79,16 @@ public class MeetingRoomController {
|
||||
@SysLog("新增会议室信息表" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingRoom_add')" )
|
||||
@Transactional
|
||||
public R save(@RequestBody MeetingRoomEntity meetingRoom) {
|
||||
meetingRoom.setDeptId(SecurityUtils.getUser().getDeptId());
|
||||
List<MeetingRoomEquipmentEntity> meetingRoomEquipmentEntityList = meetingRoom.getMeetingRoomEquipmentEntityList();
|
||||
if (CollUtil.isNotEmpty(meetingRoomEquipmentEntityList)) {
|
||||
meetingRoomEquipmentEntityList.forEach(meetingRoomEquipmentEntity -> {
|
||||
meetingRoomEquipmentEntity.setRoomId(meetingRoom.getId());
|
||||
});
|
||||
meetingRoomEquipmentService.saveBatch(meetingRoomEquipmentEntityList);
|
||||
}
|
||||
return R.ok(meetingRoomService.save(meetingRoom));
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -7,6 +7,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会议室信息表
|
||||
@@ -130,4 +131,9 @@ public class MeetingRoomEntity extends Model<MeetingRoomEntity> {
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description="设备会议室关联")
|
||||
private List<MeetingRoomEquipmentEntity> meetingRoomEquipmentEntityList;
|
||||
}
|
||||
+10
@@ -1,8 +1,18 @@
|
||||
package com.bsd.pjcloud.integrated.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.integrated.entity.FeedbackEntity;
|
||||
|
||||
public interface FeedbackService extends IService<FeedbackEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page
|
||||
* @param wrapper
|
||||
* @return
|
||||
*/
|
||||
Object pageScope(Page page, LambdaQueryWrapper<FeedbackEntity> wrapper);
|
||||
}
|
||||
+9
@@ -3,6 +3,15 @@ package com.bsd.pjcloud.integrated.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingEquipmentEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MeetingEquipmentService extends IService<MeetingEquipmentEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 数据查询所有list
|
||||
* @param name 设备名称
|
||||
* @return
|
||||
*/
|
||||
List<MeetingEquipmentEntity> listScope(String name);
|
||||
}
|
||||
+10
@@ -1,8 +1,18 @@
|
||||
package com.bsd.pjcloud.integrated.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingRoomEntity;
|
||||
|
||||
public interface MeetingRoomService extends IService<MeetingRoomEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 数据权限分页
|
||||
* @param page
|
||||
* @param wrapper
|
||||
* @return
|
||||
*/
|
||||
Object pageScope(Page page, LambdaQueryWrapper<MeetingRoomEntity> wrapper);
|
||||
}
|
||||
+7
@@ -1,6 +1,9 @@
|
||||
package com.bsd.pjcloud.integrated.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.integrated.entity.FeedbackEntity;
|
||||
import com.bsd.pjcloud.integrated.mapper.FeedbackMapper;
|
||||
import com.bsd.pjcloud.integrated.service.FeedbackService;
|
||||
@@ -13,4 +16,8 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
public class FeedbackServiceImpl extends ServiceImpl<FeedbackMapper, FeedbackEntity> implements FeedbackService {
|
||||
@Override
|
||||
public Object pageScope(Page page, LambdaQueryWrapper<FeedbackEntity> wrapper) {
|
||||
return baseMapper.selectPageByScope(page, wrapper, DataScope.of());
|
||||
}
|
||||
}
|
||||
+13
@@ -1,10 +1,16 @@
|
||||
package com.bsd.pjcloud.integrated.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingEquipmentEntity;
|
||||
import com.bsd.pjcloud.integrated.mapper.MeetingEquipmentMapper;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingEquipmentService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备表
|
||||
*
|
||||
@@ -13,4 +19,11 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
public class MeetingEquipmentServiceImpl extends ServiceImpl<MeetingEquipmentMapper, MeetingEquipmentEntity> implements MeetingEquipmentService {
|
||||
@Override
|
||||
public List<MeetingEquipmentEntity> listScope(String name) {
|
||||
LambdaQueryWrapper<MeetingEquipmentEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotBlank(name),MeetingEquipmentEntity::getName, name);
|
||||
List<MeetingEquipmentEntity> list = baseMapper.selectListByScope(wrapper, DataScope.of());
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+7
@@ -1,6 +1,9 @@
|
||||
package com.bsd.pjcloud.integrated.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingRoomEntity;
|
||||
import com.bsd.pjcloud.integrated.mapper.MeetingRoomMapper;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingRoomService;
|
||||
@@ -13,4 +16,8 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
public class MeetingRoomServiceImpl extends ServiceImpl<MeetingRoomMapper, MeetingRoomEntity> implements MeetingRoomService {
|
||||
@Override
|
||||
public Object pageScope(Page page, LambdaQueryWrapper<MeetingRoomEntity> wrapper) {
|
||||
return baseMapper.selectPageByScope(page, wrapper, DataScope.of());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
# 开发组IDE 编辑器标准 V2.1.0
|
||||
root = true
|
||||
|
||||
[*.{adoc, bat, groovy, html, java, js, jsp, kt, kts, md, properties, py, rb, sh, sql, svg, txt, xml, xsd}]
|
||||
charset = utf-8
|
||||
|
||||
[*.{groovy, java, kt, kts, xml, xsd}]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
continuation_indent_size = 8
|
||||
end_of_line = lf
|
||||
|
||||
[*.{js, html}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
智慧通行模块
|
||||
|
||||
|
||||
|
||||
|
||||
| 姓名 | 角色 | 时间 |
|
||||
| ---- | ---- |---------|
|
||||
| xxx | 开发 | 2023-01 |
|
||||
| | | |
|
||||
| | | |
|
||||
|
||||
|
||||
|
||||
|
||||
```
|
||||
项目根目录
|
||||
├── xxx-api -- 业务接口(实体,DTO,utils,feign接口)
|
||||
├── xxx-biz -- 业务实现[默认服务端口 : 6066]
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-pass</artifactId>
|
||||
<version>5.7.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>pjcloud-pass-api</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<!-- 连表查询注解 -->
|
||||
<dependency>
|
||||
<groupId>com.github.yulichang</groupId>
|
||||
<artifactId>mybatis-plus-join-annotation</artifactId>
|
||||
</dependency>
|
||||
<!--core 工具类-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-common-core</artifactId>
|
||||
</dependency>
|
||||
<!--mybatis plus extension,包含了mybatis plus core-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-extension</artifactId>
|
||||
</dependency>
|
||||
<!--feign 工具类-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-common-feign</artifactId>
|
||||
</dependency>
|
||||
<!-- excel 导入导出 -->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-common-excel</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,134 @@
|
||||
<?xml version="1.0"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-pass</artifactId>
|
||||
<version>5.7.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>pjcloud-pass-biz</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<!--必备: undertow容器-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||
</dependency>
|
||||
<!--必备: spring boot web-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<!--必备: 注册中心客户端-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!--必备: 配置中心客户端-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!--必备: 操作数据源相关-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-common-data</artifactId>
|
||||
</dependency>
|
||||
<!--必备:pigx安全模块-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-common-security</artifactId>
|
||||
</dependency>
|
||||
<!--必备:xss 过滤模块-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-common-xss</artifactId>
|
||||
</dependency>
|
||||
<!--必备: sentinel 依赖-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-common-sentinel</artifactId>
|
||||
</dependency>
|
||||
<!--必备: feign 依赖-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-common-feign</artifactId>
|
||||
</dependency>
|
||||
<!--必备: 依赖api模块-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-pass-api</artifactId>
|
||||
<version>5.7.0</version>
|
||||
</dependency>
|
||||
<!--必备: log 依赖-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-common-log</artifactId>
|
||||
</dependency>
|
||||
<!--选配: mybatis 依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||
</dependency>
|
||||
<!--选配: druid 连接池 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-3-starter</artifactId>
|
||||
</dependency>
|
||||
<!--选配: mysql 数据库驱动 -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
<!--选配: swagger文档-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<!--测试: spring boot test-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>cloud</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<loaderImplementation>CLASSIC</loaderImplementation>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>false</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>boot</id>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.bsd.pjcloud.pass;
|
||||
|
||||
import com.bsd.pjcloud.common.feign.annotation.EnablePjcloudFeignClients;
|
||||
import com.bsd.pjcloud.common.security.annotation.EnablePjcloudResourceServer;
|
||||
import com.bsd.pjcloud.common.swagger.annotation.EnableOpenApi;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
/**
|
||||
* @author archetype auto
|
||||
* <p>
|
||||
* 项目启动类
|
||||
*/
|
||||
@EnableOpenApi("pjcloud-pass")
|
||||
@EnablePjcloudFeignClients
|
||||
@EnableDiscoveryClient
|
||||
@EnablePjcloudResourceServer
|
||||
@SpringBootApplication
|
||||
public class PassApp {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(PassApp.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
server:
|
||||
port: 6066
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
username: @nacos.username@
|
||||
password: @nacos.password@
|
||||
discovery:
|
||||
server-addr: pjcloud-register:8848
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:application-@profiles.active@.yml
|
||||
- optional:nacos:${spring.application.name}-@profiles.active@.yml
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://pjcloud-mysql:2881/pjcloud_pass?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
小技巧: 在根pom里面设置统一存放路径,统一管理方便维护
|
||||
<properties>
|
||||
<log-path>/Users/lengleng</log-path>
|
||||
</properties>
|
||||
1. 其他模块加日志输出,直接copy本文件放在resources 目录即可
|
||||
2. 注意修改 <property name="${log-path}/log.path" value=""/> 的value模块
|
||||
-->
|
||||
<configuration debug="false" scan="false">
|
||||
<property name="log.path" value="logs/${project.artifactId}"/>
|
||||
<!-- 彩色日志格式 -->
|
||||
<property name="CONSOLE_LOG_PATTERN"
|
||||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
||||
<!-- 彩色日志依赖的渲染类 -->
|
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
|
||||
<conversionRule conversionWord="wex"
|
||||
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
|
||||
<conversionRule conversionWord="wEx"
|
||||
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
|
||||
<!-- Console log output -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- Log file debug output -->
|
||||
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/debug.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- Log file error output -->
|
||||
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<logger name="org.activiti.engine.impl.db" level="DEBUG">
|
||||
<appender-ref ref="debug"/>
|
||||
</logger>
|
||||
|
||||
<!--nacos 心跳 INFO 屏蔽-->
|
||||
<logger name="com.alibaba.nacos" level="OFF">
|
||||
<appender-ref ref="error"/>
|
||||
</logger>
|
||||
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="console"/>
|
||||
<appender-ref ref="debug"/>
|
||||
</root>
|
||||
</configuration>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud</artifactId>
|
||||
<version>5.7.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>pjcloud-pass</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<!--项目子模块-->
|
||||
<modules>
|
||||
<module>pjcloud-pass-api</module>
|
||||
<module>pjcloud-pass-biz</module>
|
||||
</modules>
|
||||
</project>
|
||||
+1
-1
@@ -399,7 +399,7 @@ public class ThirdPartyOAuth2Service {
|
||||
url, HttpMethod.GET, requestEntity, responseType
|
||||
);
|
||||
if (response.getBody().getCode().equals("-1")){
|
||||
log.error("获取浙政钉用户信息失败");
|
||||
log.error("获取浙政钉/诗画用户信息失败");
|
||||
log.error("token",zzdToken);
|
||||
log.error("response",response.getBody().getDescription());
|
||||
log.error("response",response.getBody());
|
||||
|
||||
Reference in new issue
Block a user