doc/20260511_create_table_production_team.sql
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,28 @@ #ç产çç»è¡¨ drop table if exists production_team; create table production_team ( id bigint auto_increment primary key, team_name varchar(100) not null comment 'çç»åç§°', remark text null comment '夿³¨', tenant_id bigint not null comment 'ç§æ·id', create_time datetime null comment 'å建æ¶é´', update_time datetime null comment 'æ´æ°æ¶é´', index idx_team_name (team_name), ); #çç»å°è´¦ä¸ç¨æ·å ³è表 drop table if exists production_team_user_rel; create table production_team_user_rel ( id bigint auto_increment primary key, production_team_id bigint not null comment 'ç产çç»id', sys_user_id bigint not null comment 'ç³»ç»ç¨æ·id', is_leader tinyint not null default 0 comment 'æ¯å¦ä¸ºçç»é¿ 0å¦ 1æ¯', tenant_id bigint not null comment 'ç§æ·id', create_time datetime null comment 'å建æ¶é´', update_time datetime null comment 'æ´æ°æ¶é´', index idx_production_team_id (production_team_id), index idx_sys_user_id (sys_user_id), unique idx_production_team_user (production_team_id, sys_user_id) ); src/main/java/com/ruoyi/production/bean/dto/ProductionTeamDto.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,26 @@ package com.ruoyi.production.bean.dto; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.util.List; @Data @Schema(name = "ProductionTeamDto", description = "ç产çç»è¯·æ±åæ°") public class ProductionTeamDto { @Schema(description = "çç»ID") private Long id; @Schema(description = "çç»åç§°") private String teamName; @Schema(description = "çç»é¿ID") private Long leaderId; @Schema(description = "çç»æåIDå表") private List<Long> memberIds; @Schema(description = "夿³¨") private String remark; } src/main/java/com/ruoyi/production/bean/vo/ProductionTeamVo.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,50 @@ package com.ruoyi.production.bean.vo; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; import java.util.List; @Data @Schema(name = "ProductionTeamVo", description = "ç产çç»ååºæ°æ®") public class ProductionTeamVo { @Schema(description = "çç»ID") private Long id; @Schema(description = "çç»åç§°") private String teamName; @Schema(description = "çç»é¿ID") private Long leaderId; @Schema(description = "çç»é¿å§å") private String leaderName; @Schema(description = "çç»æåå表") private List<MemberVo> members; @Schema(description = "åå»ºæ¥æ") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createTime; @Schema(description = "夿³¨") private String remark; @Data @Schema(name = "MemberVo", description = "çç»æåä¿¡æ¯") public static class MemberVo { @Schema(description = "ç¨æ·ID") private Long userId; @Schema(description = "ç¨æ·æµç§°") private String nickName; @Schema(description = "æ¯å¦ä¸ºçç»é¿") private Boolean isLeader; } } src/main/java/com/ruoyi/production/controller/ProductionTeamController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,91 @@ package com.ruoyi.production.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.framework.web.domain.R; import com.ruoyi.production.bean.dto.ProductionTeamDto; import com.ruoyi.production.bean.vo.ProductionTeamVo; import com.ruoyi.production.service.ProductionTeamService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; /** * ç产çç»æ§å¶å¨ */ @RestController @RequestMapping("/production_team") @Tag(name = "ç产çç»ç®¡ç", description = "ç产çç»å¢å æ¹æ¥æ¥å£") public class ProductionTeamController { private final ProductionTeamService productionTeamService; public ProductionTeamController(ProductionTeamService productionTeamService) { this.productionTeamService = productionTeamService; } /** * å建çç» */ @PostMapping @Operation(summary = "å建çç»", description = "å建ç产çç»ï¼å å«çç»é¿åæå") public R createTeam(@Validated @RequestBody ProductionTeamDto dto) { boolean success = productionTeamService.createTeam(dto); return success ? R.ok("å建æå") : R.fail("å建失败"); } /** * æ´æ°çç» */ @PutMapping @Operation(summary = "æ´æ°çç»", description = "æ´æ°ç产çç»ä¿¡æ¯") public R updateTeam(@Validated @RequestBody ProductionTeamDto dto) { if (dto.getId() == null) { return R.fail("çç»IDä¸è½ä¸ºç©º"); } boolean success = productionTeamService.updateTeam(dto); return success ? R.ok("æ´æ°æå") : R.fail("æ´æ°å¤±è´¥"); } /** * å é¤çç» */ @DeleteMapping("/{id}") @Operation(summary = "å é¤çç»", description = "å é¤ç产çç»") public R deleteTeam(@PathVariable Long id) { boolean success = productionTeamService.deleteTeam(id); return success ? R.ok("å 餿å") : R.fail("å é¤å¤±è´¥"); } /** * æ¥è¯¢çç»è¯¦æ */ @GetMapping("/{id}") @Operation(summary = "æ¥è¯¢çç»è¯¦æ ", description = "æ ¹æ®IDæ¥è¯¢çç»è¯¦ç»ä¿¡æ¯ï¼å 嫿åå表") public R<ProductionTeamVo> getTeamDetail(@PathVariable Long id) { ProductionTeamVo vo = productionTeamService.getTeamDetail(id); return vo != null ? R.ok(vo) : R.fail("çç»ä¸åå¨"); } /** * æ¥è¯¢çç»å表 */ @GetMapping("/list") @Operation(summary = "æ¥è¯¢çç»å表", description = "æ¥è¯¢ç产çç»åè¡¨ï¼æ¯ææçç»åç§°æç´¢") public R<List<ProductionTeamVo>> getTeamList(ProductionTeamDto dto) { List<ProductionTeamVo> list = productionTeamService.getTeamList(dto); return R.ok(list); } /** * å页æ¥è¯¢çç»å表 */ @GetMapping("/listPage") @Operation(summary = "å页æ¥è¯¢çç»å表", description = "å页æ¥è¯¢ç产çç»åè¡¨ï¼æ¯ææçç»åç§°æç´¢") public R<IPage<ProductionTeamVo>> listPage(Page<ProductionTeamDto> page, ProductionTeamDto dto) { return R.ok(productionTeamService.listPage(page, dto)); } } src/main/java/com/ruoyi/production/controller/ProductionTeamUserRelController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,18 @@ package com.ruoyi.production.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * <p> * å端æ§å¶å¨ * </p> * * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå ¬å¸ * @since 2026-05-11 11:15:05 */ @RestController @RequestMapping("/productionTeamUserRel") public class ProductionTeamUserRelController { } src/main/java/com/ruoyi/production/mapper/ProductionTeamMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,36 @@ package com.ruoyi.production.mapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.production.bean.dto.ProductionTeamDto; import com.ruoyi.production.bean.vo.ProductionTeamVo; import com.ruoyi.production.pojo.ProductionTeam; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; @Mapper public interface ProductionTeamMapper extends BaseMapper<ProductionTeam> { /** * æ¥è¯¢çç»è¯¦æ ï¼å 嫿åä¿¡æ¯ï¼ */ ProductionTeamVo selectTeamDetail(@Param("id") Long id); /** * æ¥è¯¢çç»å表ï¼å 嫿åä¿¡æ¯ï¼ */ List<ProductionTeamVo> selectTeamList(@Param("dto") ProductionTeamDto dto); /** * å页æ¥è¯¢çç»å表 */ IPage<ProductionTeamVo> selectTeamPage(Page<ProductionTeamDto> page, @Param("dto") ProductionTeamDto dto); /** * æ¥è¯¢çç»æåå表 */ List<ProductionTeamVo.MemberVo> selectTeamMembers(@Param("teamId") Long teamId); } src/main/java/com/ruoyi/production/mapper/ProductionTeamUserRelMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,18 @@ package com.ruoyi.production.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.production.pojo.ProductionTeamUserRel; import org.apache.ibatis.annotations.Mapper; /** * <p> * Mapper æ¥å£ * </p> * * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå ¬å¸ * @since 2026-05-11 11:15:05 */ @Mapper public interface ProductionTeamUserRelMapper extends BaseMapper<ProductionTeamUserRel> { } src/main/java/com/ruoyi/production/pojo/ProductionTeam.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,70 @@ package com.ruoyi.production.pojo; import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; import lombok.ToString; import java.io.Serializable; import java.time.LocalDateTime; /** * <p> * * </p> * * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå ¬å¸ * @since 2026-05-11 11:15:05 */ @Getter @Setter @ToString @TableName("production_team") @ApiModel(value = "ProductionTeam对象", description = "") public class ProductionTeam implements Serializable { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Long id; /** * çç»åç§° */ @ApiModelProperty("çç»åç§°") private String teamName; /** * 夿³¨ */ @ApiModelProperty("夿³¨") private String remark; /** * ç§æ·id */ @ApiModelProperty("ç§æ·id") @TableField(fill = FieldFill.INSERT) private Long tenantId; /** * å建æ¶é´ */ @ApiModelProperty("å建æ¶é´") @TableField(fill = FieldFill.INSERT) private LocalDateTime createTime; /** * æ´æ°æ¶é´ */ @ApiModelProperty("æ´æ°æ¶é´") @TableField(fill = FieldFill.INSERT_UPDATE) private LocalDateTime updateTime; } src/main/java/com/ruoyi/production/pojo/ProductionTeamUserRel.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,75 @@ package com.ruoyi.production.pojo; import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Getter; import lombok.Setter; import lombok.ToString; import java.io.Serializable; import java.time.LocalDateTime; /** * <p> * * </p> * * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå ¬å¸ * @since 2026-05-11 11:15:05 */ @Getter @Setter @ToString @TableName("production_team_user_rel") @ApiModel(value = "ProductionTeamUserRel对象", description = "") public class ProductionTeamUserRel implements Serializable { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Long id; /** * ç产çç»id */ @ApiModelProperty("ç产çç»id") private Long productionTeamId; /** * ç³»ç»ç¨æ·id */ @ApiModelProperty("ç³»ç»ç¨æ·id") private Long sysUserId; /** * æ¯å¦ä¸ºçç»é¿ 0å¦ 1æ¯ */ @ApiModelProperty("æ¯å¦ä¸ºçç»é¿ 0å¦ 1æ¯") private Byte isLeader; /** * ç§æ·id */ @ApiModelProperty("ç§æ·id") @TableField(fill = FieldFill.INSERT) private Long tenantId; /** * å建æ¶é´ */ @ApiModelProperty("å建æ¶é´") @TableField(fill = FieldFill.INSERT) private LocalDateTime createTime; /** * æ´æ°æ¶é´ */ @ApiModelProperty("æ´æ°æ¶é´") @TableField(fill = FieldFill.INSERT_UPDATE) private LocalDateTime updateTime; } src/main/java/com/ruoyi/production/service/ProductionTeamService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,43 @@ package com.ruoyi.production.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.production.bean.dto.ProductionTeamDto; import com.ruoyi.production.bean.vo.ProductionTeamVo; import com.ruoyi.production.pojo.ProductionTeam; import com.baomidou.mybatisplus.extension.service.IService; import java.util.List; public interface ProductionTeamService extends IService<ProductionTeam> { /** * å建çç»ï¼å 嫿åå ³ç³»ï¼ */ boolean createTeam(ProductionTeamDto dto); /** * æ´æ°çç»ï¼å 嫿åå ³ç³»ï¼ */ boolean updateTeam(ProductionTeamDto dto); /** * å é¤çç»ï¼çº§èå 餿åå ³ç³»ï¼ */ boolean deleteTeam(Long id); /** * æ¥è¯¢çç»è¯¦æ */ ProductionTeamVo getTeamDetail(Long id); /** * æ¥è¯¢çç»å表 */ List<ProductionTeamVo> getTeamList(ProductionTeamDto dto); /** * å页æ¥è¯¢çç»å表 */ IPage<ProductionTeamVo> listPage(Page<ProductionTeamDto> page, ProductionTeamDto dto); } src/main/java/com/ruoyi/production/service/ProductionTeamUserRelService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ package com.ruoyi.production.service; import com.ruoyi.production.pojo.ProductionTeamUserRel; import com.baomidou.mybatisplus.extension.service.IService; /** * <p> * æå¡ç±» * </p> * * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå ¬å¸ * @since 2026-05-11 11:15:05 */ public interface ProductionTeamUserRelService extends IService<ProductionTeamUserRel> { } src/main/java/com/ruoyi/production/service/impl/ProductionTeamServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,137 @@ package com.ruoyi.production.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.production.bean.dto.ProductionTeamDto; import com.ruoyi.production.bean.vo.ProductionTeamVo; import com.ruoyi.production.mapper.ProductionTeamMapper; import com.ruoyi.production.pojo.ProductionTeam; import com.ruoyi.production.pojo.ProductionTeamUserRel; import com.ruoyi.production.service.ProductionTeamService; import com.ruoyi.production.service.ProductionTeamUserRelService; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.List; @Service @RequiredArgsConstructor public class ProductionTeamServiceImpl extends ServiceImpl<ProductionTeamMapper, ProductionTeam> implements ProductionTeamService { private final ProductionTeamUserRelService teamUserRelService; @Override @Transactional(rollbackFor = Exception.class) public boolean createTeam(ProductionTeamDto dto) { // å建çç» ProductionTeam team = new ProductionTeam(); team.setTeamName(dto.getTeamName()); team.setRemark(dto.getRemark()); this.save(team); // ä¿åæåå ³ç³» saveTeamUserRel(team.getId(), dto.getLeaderId(), dto.getMemberIds()); return true; } @Override @Transactional(rollbackFor = Exception.class) public boolean updateTeam(ProductionTeamDto dto) { // æ´æ°çç» ProductionTeam team = new ProductionTeam(); team.setId(dto.getId()); team.setTeamName(dto.getTeamName()); team.setRemark(dto.getRemark()); this.updateById(team); // å é¤åææåå ³ç³» QueryWrapper<ProductionTeamUserRel> wrapper = new QueryWrapper<>(); wrapper.eq("production_team_id", dto.getId()); teamUserRelService.remove(wrapper); // ä¿åæ°çæåå ³ç³» saveTeamUserRel(dto.getId(), dto.getLeaderId(), dto.getMemberIds()); return true; } @Override @Transactional(rollbackFor = Exception.class) public boolean deleteTeam(Long id) { // å 餿åå ³ç³» QueryWrapper<ProductionTeamUserRel> wrapper = new QueryWrapper<>(); wrapper.eq("production_team_id", id); teamUserRelService.remove(wrapper); // å é¤çç» return this.removeById(id); } @Override public ProductionTeamVo getTeamDetail(Long id) { ProductionTeamVo teamVo = getBaseMapper().selectTeamDetail(id); if (teamVo != null) { // å è½½æåå表 List<ProductionTeamVo.MemberVo> members = getBaseMapper().selectTeamMembers(id); teamVo.setMembers(members); } return teamVo; } @Override public List<ProductionTeamVo> getTeamList(ProductionTeamDto dto) { List<ProductionTeamVo> teamList = getBaseMapper().selectTeamList(dto); // 为æ¯ä¸ªçç»å è½½æåå表 for (ProductionTeamVo teamVo : teamList) { List<ProductionTeamVo.MemberVo> members = getBaseMapper().selectTeamMembers(teamVo.getId()); teamVo.setMembers(members); } return teamList; } @Override public IPage<ProductionTeamVo> listPage(Page<ProductionTeamDto> page, ProductionTeamDto dto) { IPage<ProductionTeamVo> resultPage = getBaseMapper().selectTeamPage(page, dto); // 为æ¯ä¸ªçç»å è½½æåå表 for (ProductionTeamVo teamVo : resultPage.getRecords()) { List<ProductionTeamVo.MemberVo> members = getBaseMapper().selectTeamMembers(teamVo.getId()); teamVo.setMembers(members); } return resultPage; } /** * ä¿åçç»ç¨æ·å ³ç³» */ private void saveTeamUserRel(Long teamId, Long leaderId, List<Long> memberIds) { // ä¿åçç»é¿ if (leaderId != null) { ProductionTeamUserRel leaderRel = new ProductionTeamUserRel(); leaderRel.setProductionTeamId(teamId); leaderRel.setSysUserId(leaderId); leaderRel.setIsLeader((byte) 1); teamUserRelService.save(leaderRel); } // ä¿åæå if (!CollectionUtils.isEmpty(memberIds)) { for (Long memberId : memberIds) { // è·³è¿çç»é¿ï¼å·²ä¿åï¼ if (leaderId != null && leaderId.equals(memberId)) { continue; } ProductionTeamUserRel memberRel = new ProductionTeamUserRel(); memberRel.setProductionTeamId(teamId); memberRel.setSysUserId(memberId); memberRel.setIsLeader((byte) 0); teamUserRelService.save(memberRel); } } } } src/main/java/com/ruoyi/production/service/impl/ProductionTeamUserRelServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,22 @@ package com.ruoyi.production.service.impl; import com.ruoyi.production.pojo.ProductionTeamUserRel; import com.ruoyi.production.mapper.ProductionTeamUserRelMapper; import com.ruoyi.production.service.ProductionTeamUserRelService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; /** * <p> * æå¡å®ç°ç±» * </p> * * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå ¬å¸ * @since 2026-05-11 11:15:05 */ @Service @RequiredArgsConstructor public class ProductionTeamUserRelServiceImpl extends ServiceImpl<ProductionTeamUserRelMapper, ProductionTeamUserRel> implements ProductionTeamUserRelService { } src/main/resources/application-qllx.yml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,266 @@ # 项ç®ç¸å ³é ç½® ruoyi: # åç§° name: RuoYi # çæ¬ version: 3.8.9 # çæå¹´ä»½ copyrightYear: 2025 # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé ç½®D:/ruoyi/uploadPathï¼Linuxé ç½® /home/ruoyi/uploadPathï¼ profile: D:/ruoyi/uploadPath # è·åipå°åå¼å ³ addressEnabled: false # éªè¯ç ç±»å math æ°åè®¡ç® char å符éªè¯ captchaType: math # åå审æ¹ç¼å·åç¼(é ç½®æä»¶åç¼å½å) approvalNumberPrefix: DEV # ä¸ªæ¨ Unipush é ç½® getui: appId: PfjyAAE0FK64FaO1w2CMb1 appKey: zTMb831OEL6J4GK1uE3Ob4 masterSecret: K1GFtsv42v61tXGnF7SGE5 domain: https://restapi.getui.cn/v2/ # 离线æ¨é使ç¨çå å/ç»ä»¶å intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry # å¼åç¯å¢é ç½® server: # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 port: 7003 servlet: # åºç¨ç访é®è·¯å¾ context-path: / tomcat: # tomcatçURIç¼ç uri-encoding: UTF-8 # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 accept-count: 1000 max-swallow-size: -1 # -1 表示ä¸éå¶ max-http-form-post-size: -1 # POST 请æ±ä½ä¸éå¶ connection-timeout: 60000 # è¿æ¥è¶ æ¶æ¶é´(毫ç§) threads: # tomcatæå¤§çº¿ç¨æ°ï¼é»è®¤ä¸º200 max: 800 # Tomcatå¯å¨åå§åççº¿ç¨æ°ï¼é»è®¤å¼10 min-spare: 100 # æ¥å¿é ç½® logging: level: org.quartz: DEBUG com.ruoyi: warn org.springframework: warn # ç¨æ·é ç½® user: password: # å¯ç æå¤§éè¯¯æ¬¡æ° maxRetryCount: 5 # å¯ç é宿¶é´ï¼é»è®¤10åéï¼ lockTime: 10 # Springé ç½® spring: main: allow-circular-references: true # å 许循ç¯ä¾èµ datasource: type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver druid: # ä¸»åºæ°æ®æº master: url: jdbc:mysql://localhost:3306/product-inventory-management-qllx?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: 123456 # ä»åºæ°æ®æº slave: # 仿°æ®æºå¼å ³/é»è®¤å ³é enabled: false url: username: password: # åå§è¿æ¥æ° initialSize: 5 # æå°è¿æ¥æ± æ°é minIdle: 10 # æå¤§è¿æ¥æ± æ°é maxActive: 20 # é ç½®è·åè¿æ¥çå¾ è¶ æ¶çæ¶é´ maxWait: 60000 # é ç½®è¿æ¥è¶ æ¶æ¶é´ connectTimeout: 30000 # é ç½®ç½ç»è¶ æ¶æ¶é´ socketTimeout: 60000 # é ç½®é´éå¤ä¹ æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å ³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ timeBetweenEvictionRunsMillis: 60000 # é ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ minEvictableIdleTimeMillis: 300000 # é ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ maxEvictableIdleTimeMillis: 900000 # é ç½®æ£æµè¿æ¥æ¯å¦ææ validationQuery: SELECT 1 FROM DUAL testWhileIdle: true testOnBorrow: false testOnReturn: false webStatFilter: enabled: true statViewServlet: enabled: true # 设置ç½ååï¼ä¸å¡«åå 许ææè®¿é® allow: url-pattern: /druid/* # æ§å¶å°ç®¡çç¨æ·ååå¯ç login-username: ruoyi login-password: 123456 filter: stat: enabled: true # æ ¢SQLè®°å½ log-slow-sql: true slow-sql-millis: 1000 merge-sql: true wall: config: multi-statement-allow: true # èµæºä¿¡æ¯ messages: # å½é åèµæºæä»¶è·¯å¾ basename: i18n/messages # æä»¶ä¸ä¼ servlet: multipart: # å个æä»¶å¤§å° max-file-size: 1GB # 设置æ»ä¸ä¼ çæä»¶å¤§å° max-request-size: 2GB # æå¡æ¨¡å devtools: restart: # çé¨ç½²å¼å ³ enabled: false # redis é ç½® data: mongodb: uri: mongodb://114.132.189.42:9028/chat_memory_db # redis é ç½® redis: # å°å host: 127.0.0.1 # host: 172.17.0.1 # 端å£ï¼é»è®¤ä¸º6379 port: 6379 # æ°æ®åºç´¢å¼ database: 0 # å¯ç # password: root2022! password: # è¿æ¥è¶ æ¶æ¶é´ timeout: 10s lettuce: pool: # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ min-idle: 0 # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ max-idle: 8 # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° max-active: 8 # #è¿æ¥æ± æå¤§é»å¡çå¾ æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ max-wait: -1ms # Quartz宿¶ä»»å¡é ç½®ï¼æ°å¢é¨åï¼ quartz: job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ jdbc: initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ properties: org: quartz: scheduler: instanceName: RuoYiScheduler instanceId: AUTO jobStore: class: org.quartz.impl.jdbcjobstore.JobStoreTX driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ clusterCheckinInterval: 10000 txIsolationLevelSerializable: true threadPool: class: org.quartz.simpl.SimpleThreadPool threadCount: 10 # çº¿ç¨æ± å¤§å° threadPriority: 5 makeThreadsDaemons: true updateCheck: false # å ³éçæ¬æ£æ¥ # tokené ç½® token: # 令çèªå®ä¹æ è¯ header: Authorization # 令çå¯é¥ æ°çjwtå¯é¥é¿åº¦å¿ é¡»64ä½ä»¥ä¸ secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ # ä»¤çæææï¼é»è®¤30åéï¼ expireTime: 450 # MyBatis Plusé ç½® mybatis-plus: # æç´¢æå®å å«å æ ¹æ®èªå·±çé¡¹ç®æ¥ typeAliasesPackage: com.ruoyi.**.pojo # é ç½®mapperçæ«æï¼æ¾å°ææçmapper.xmlæ å°æä»¶ mapperLocations: classpath*:mapper/**/*Mapper.xml # å è½½å ¨å±çé ç½®æä»¶ configLocation: classpath:mybatis/mybatis-config.xml global-config: enable-sql-runner: true db-config: id-type: auto # PageHelperå页æä»¶ pagehelper: helperDialect: mysql supportMethodsArguments: true params: count=countSql # Swaggeré ç½® swagger: # æ¯å¦å¼å¯swagger enabled: true # 请æ±åç¼ pathMapping: /dev-api # 鲿¢XSSæ»å» xss: # è¿æ»¤å¼å ³ enabled: true # æé¤é¾æ¥ï¼å¤ä¸ªç¨éå·åéï¼ excludes: /system/notice # å¹é 龿¥ urlPatterns: /system/*,/monitor/*,/tool/* # 代ç çæ gen: # ä½è author: ruoyi # é»è®¤çæå è·¯å¾ system éæ¹æèªå·±ç模ååç§° å¦ system monitor tool packageName: com.ruoyi.project.system # èªå¨å»é¤è¡¨åç¼ï¼é»è®¤æ¯true autoRemovePre: false # 表åç¼ï¼çæç±»åä¸ä¼å å«è¡¨åç¼ï¼å¤ä¸ªç¨éå·åéï¼ tablePrefix: sys_ # æ¯å¦å è®¸çææä»¶è¦çå°æ¬å°ï¼èªå®ä¹è·¯å¾ï¼ï¼é»è®¤ä¸å 许 allowOverwrite: false # æä»¶ä¸ä¼ é ç½® file: temp-dir: D:/ruoyi/temp/uploads # 临æ¶ç®å½ åæå é¤ upload-dir: D:/ruoyi/prod/uploads # æ£å¼ç®å½ åæå é¤ path: C:/Users/12631/Desktop/download/uploads # ä¸ä¼ ç®å½ urlPrefix: /common # 龿¥åç¼ domain: http://127.0.0.1:7003 # åååç¼ expired: 120 # è¿ææ¶é´(åä½:åé) useLimit: 10 # ä½¿ç¨æ¬¡æ° compress: true # æ¯å¦å缩 needCompressSize: 10MB # å缩éå¼ compressQuality: 0.5 # å缩质é(0.0-1.0) src/main/resources/mapper/production/ProductionTeamMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,76 @@ <?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.ruoyi.production.mapper.ProductionTeamMapper"> <resultMap id="TeamDetailMap" type="com.ruoyi.production.bean.vo.ProductionTeamVo"> <id property="id" column="id"/> <result property="teamName" column="team_name"/> <result property="leaderId" column="leader_id"/> <result property="leaderName" column="leader_name"/> <result property="remark" column="remark"/> <result property="createTime" column="create_time"/> </resultMap> <select id="selectTeamDetail" resultMap="TeamDetailMap"> SELECT t.id, t.team_name, leader.sys_user_id as leader_id, u.nick_name as leader_name, t.remark, t.create_time FROM production_team t LEFT JOIN production_team_user_rel leader ON t.id = leader.production_team_id AND leader.is_leader = 1 LEFT JOIN sys_user u ON leader.sys_user_id = u.user_id WHERE t.id = #{id} </select> <select id="selectTeamMembers" resultType="com.ruoyi.production.bean.vo.ProductionTeamVo$MemberVo"> SELECT rel.sys_user_id as userId, u.nick_name as nickName, rel.is_leader as isLeader FROM production_team_user_rel rel LEFT JOIN sys_user u ON rel.sys_user_id = u.user_id WHERE rel.production_team_id = #{teamId} ORDER BY rel.is_leader DESC </select> <select id="selectTeamList" resultMap="TeamDetailMap"> SELECT t.id, t.team_name, leader.sys_user_id as leader_id, u.nick_name as leader_name, t.remark, t.create_time FROM production_team t LEFT JOIN production_team_user_rel leader ON t.id = leader.production_team_id AND leader.is_leader = 1 LEFT JOIN sys_user u ON leader.sys_user_id = u.user_id <where> <if test="dto.teamName != null and dto.teamName != ''"> AND t.team_name LIKE CONCAT('%', #{dto.teamName}, '%') </if> </where> ORDER BY t.create_time DESC </select> <select id="selectTeamPage" resultMap="TeamDetailMap"> SELECT t.id, t.team_name, leader.sys_user_id as leader_id, u.nick_name as leader_name, t.remark, t.create_time FROM production_team t LEFT JOIN production_team_user_rel leader ON t.id = leader.production_team_id AND leader.is_leader = 1 LEFT JOIN sys_user u ON leader.sys_user_id = u.user_id <where> <if test="dto.teamName != null and dto.teamName != ''"> AND t.team_name LIKE CONCAT('%', #{dto.teamName}, '%') </if> </where> ORDER BY t.create_time DESC </select> </mapper> src/main/resources/mapper/production/ProductionTeamUserRelMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ <?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.ruoyi.production.mapper.ProductionTeamUserRelMapper"> <!-- éç¨æ¥è¯¢æ å°ç»æ --> <resultMap id="BaseResultMap" type="com.ruoyi.production.pojo.ProductionTeamUserRel"> <id column="id" property="id" /> <result column="production_team_id" property="productionTeamId" /> <result column="sys_user_id" property="sysUserId" /> <result column="is_leader" property="isLeader" /> <result column="tenant_id" property="tenantId" /> <result column="create_time" property="createTime" /> <result column="update_time" property="updateTime" /> </resultMap> </mapper>