diff --git a/pom.xml b/pom.xml index 20a488232..5060140ef 100644 --- a/pom.xml +++ b/pom.xml @@ -175,7 +175,26 @@ jjwt ${jjwt.version} - + + com.auth0 + java-jwt + 3.4.0 + + + cn.hutool + hutool-all + 5.7.12 + + + + com.alibaba + easyexcel + 3.2.1 + com.alibaba diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserService.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserService.java index e7fe34c5d..2f945a5d8 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserService.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserService.java @@ -1,5 +1,6 @@ package com.ruoyi.system.api; +import com.ruoyi.system.api.model.WxLoginUser; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -31,6 +32,9 @@ public interface RemoteUserService @GetMapping("/user/info/{username}") public R getUserInfo(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); + @PostMapping("/wxLogin/getWxUserInfo") + public R getWxUserInfo(@RequestBody LoginUser wxLoginBody, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); + /** * 注册用户信息 * diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java index 8fd6c6775..714aa2972 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java @@ -31,6 +31,11 @@ public class RemoteUserFallbackFactory implements FallbackFactory getWxUserInfo(LoginUser wxLoginBody,String source) { + return R.fail("获取用户失败:" + throwable.getMessage()); + } + @Override public R registerUserInfo(SysUser sysUser, String source) { diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/model/WxLoginUser.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/model/WxLoginUser.java new file mode 100644 index 000000000..813671dba --- /dev/null +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/model/WxLoginUser.java @@ -0,0 +1,148 @@ +package com.ruoyi.system.api.model; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author 吴一博 + * @date 2023年07月07日 17:53 + * @Description + */ +public class WxLoginUser { + /** + * 用户ID + */ + private Long userId; + /** + * 微信多平台用户唯一ID + */ + private String unionid; + + /** + * 微信用户唯一OPEN_ID + */ + private String openId; + + /** + * 用户名称 + */ + private String userName; + /** + * 用户真实姓名 + */ + private String realName; + /** + * 登录账号 + */ + private String loginName; + + /** + * 角色ID列表 + */ + private List roleCodes; + /** + * token + */ + + @ApiModelProperty(value = "token") + private String accessToken; + /** + *刷新token + */ + + @ApiModelProperty(value = "刷新token") + private String refreshToken; + /** + *用户所拥有的菜单权限(给前端控制菜单和按钮的显示和隐藏) + */ + /*@Setter + @Getter + @ApiModelProperty(value = "用户所拥有的菜单权限(给前端控制菜单和按钮的显示和隐藏)") + private List list;*/ + + /** + * wx 登录 后返回的 session_key + */ + private String sessionKey; + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getUnionid() { + return unionid; + } + + public void setUnionid(String unionid) { + this.unionid = unionid; + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getRealName() { + return realName; + } + + public void setRealName(String realName) { + this.realName = realName; + } + + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public List getRoleCodes() { + return roleCodes; + } + + public void setRoleCodes(List roleCodes) { + this.roleCodes = roleCodes; + } + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public String getRefreshToken() { + return refreshToken; + } + + public void setRefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + } + + public String getSessionKey() { + return sessionKey; + } + + public void setSessionKey(String sessionKey) { + this.sessionKey = sessionKey; + } +} diff --git a/ruoyi-auth/src/main/java/com/ruoyi/auth/controller/WxLoginController.java b/ruoyi-auth/src/main/java/com/ruoyi/auth/controller/WxLoginController.java new file mode 100644 index 000000000..9756ba528 --- /dev/null +++ b/ruoyi-auth/src/main/java/com/ruoyi/auth/controller/WxLoginController.java @@ -0,0 +1,75 @@ +package com.ruoyi.auth.controller; + +/** + * @author 吴一博 + * @date 2023年07月07日 17:47 + * @Description + */ + +import com.ruoyi.auth.form.WxLoginBody; +import com.ruoyi.auth.service.SysLoginService; +import com.ruoyi.auth.service.WxLoginService; +import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.web.page.TableDataInfo; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.common.security.service.TokenService; +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.api.model.WxLoginUser; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.security.InvalidParameterException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 微信小程序登录Controller + * + * @author wyb + * @date 2023-07-06 + */ +@RestController +@RequestMapping(value="/wxLogin") +@Api(description = "微信小程序-登录接口") +public class WxLoginController { + + @Resource + private WxLoginService wxLoginService; + @Autowired + private TokenService tokenService; + @ApiOperation("wx用户登录") + @PostMapping("/loginInFromWx") + @ResponseBody + public R loginInFromWx(@RequestBody LoginUser entity) { + LoginUser loginUser = wxLoginService.loginInFromWx(entity); + return R.ok(tokenService.createToken(loginUser)); + } + + + @PostMapping("/user/register") + @ApiOperation(value = "wx用户注册接口") + public AjaxResult register(@RequestBody WxLoginBody entity) { + //loginFeign.register(entity); + return AjaxResult.success("注册成功"); + } + + @ApiOperation("用户登出") + @GetMapping("/loginOut") + @ResponseBody + public AjaxResult loginOut(@PathVariable("id") Long id) throws Exception { + return AjaxResult.success("登出成功"); + } +} diff --git a/ruoyi-auth/src/main/java/com/ruoyi/auth/form/WxLoginBody.java b/ruoyi-auth/src/main/java/com/ruoyi/auth/form/WxLoginBody.java new file mode 100644 index 000000000..ed65dafea --- /dev/null +++ b/ruoyi-auth/src/main/java/com/ruoyi/auth/form/WxLoginBody.java @@ -0,0 +1,114 @@ +package com.ruoyi.auth.form; + +import io.swagger.annotations.ApiModelProperty; +import jdk.nashorn.internal.objects.annotations.Getter; +import jdk.nashorn.internal.objects.annotations.Setter; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +/** + * @author 吴一博 + * @date 2023年07月07日 17:49 + * @Description + */ +public class WxLoginBody { + private static final long serialVersionUID = 1L; + + /** + * 账号(手机号/微信code) + */ + + @ApiModelProperty(value="账号(手机号/微信code)",required=false) + @NotBlank(message = "登录账号不能为空") + private String loginName; + /** + * 登录密码 + */ + + @ApiModelProperty(value = "用户密码") + private String password; + /** + * 用户手机号(微信登录需要传) + */ + + @ApiModelProperty(value = "用户手机号") + private String telephone; + /** + *头像(微信登录需要传) + */ + private String avatar; + /** + *性别(微信登录需要传) + */ + + private Integer gender; + /** + *昵称(微信登录需要传) + */ + + private String nickname; + /** + * 登录类型(1:pc;2:wx) + */ + + @ApiModelProperty(value = "登录类型(1:pc;2:wx)") + @NotBlank(message = "登录类型不能为空") + private String type; + + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getTelephone() { + return telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + public Integer getGender() { + return gender; + } + + public void setGender(Integer gender) { + this.gender = gender; + } + + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } +} diff --git a/ruoyi-auth/src/main/java/com/ruoyi/auth/service/WxLoginService.java b/ruoyi-auth/src/main/java/com/ruoyi/auth/service/WxLoginService.java new file mode 100644 index 000000000..ae78ef44c --- /dev/null +++ b/ruoyi-auth/src/main/java/com/ruoyi/auth/service/WxLoginService.java @@ -0,0 +1,26 @@ +package com.ruoyi.auth.service; + +import com.ruoyi.auth.form.WxLoginBody; +import com.ruoyi.common.core.constant.SecurityConstants; +import com.ruoyi.common.core.domain.R; +import com.ruoyi.system.api.RemoteUserService; +import com.ruoyi.system.api.model.LoginUser; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @author 吴一博 + * @date 2023年07月07日 17:52 + * @Description + */ +@Component +public class WxLoginService { + @Autowired + private RemoteUserService remoteUserService; + public LoginUser loginInFromWx(LoginUser entity) { + // 查询用户信息 + R userResult = remoteUserService.getWxUserInfo(entity,SecurityConstants.INNER); + LoginUser userInfo = userResult.getData(); + return userInfo; + } +} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java index c7e1f34ed..d1f1c1e86 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java @@ -121,10 +121,133 @@ public class Constants * 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加) */ public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" }; - /** * 定时任务违规的字符 */ public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", "org.springframework", "org.apache", "com.ruoyi.common.core.utils.file" }; + + + /** + * 用户ID key + */ + public static final String JWT_USER_ID="user_id"; + /** + * 用户ID key + */ + public static final String JWT_USER_NAME="user_name"; + /** + * 用户ID key + */ + public static final String JWT_LOGIN_NAME="login_name"; + + /** + * 真实姓名 + */ + public static final String JWT_REAL_NAME="real_name"; + + /** + * 微信多平台唯一ID key + */ + public static final String JWT_UNIONID="unionid"; + /** + * 登录微信后的session_key + */ + public static final String JWT_SESSION_KEY = "session_key"; + + /** + * 登录微信后的open_id + */ + public static final String JWT_OPEN_ID = "open_id"; + /** + * 小程序ACCESS_TOKEN缓存key + */ + public static final String WX_APPLETS_REDIS_ACCESS_TOKEN_KEY="wx.applets.access.token.key"; + /** + * 微信小程序--服务器验证专用token + */ + public static final String WX_APPLETS_TOKEN="oHDqn56DWSxUHyiOnqLAyawfUj0k"; + /** + * 微信小程序--开发者账号的appid + */ + public static final String WX_APPLETS_APP_ID="wxd4300820f84a6d6b"; + /** + * 微信小程序--开发者账号的AppSecret + */ + public static final String WX_APPLETS_APP_SERCERT="16daf686025b3d9755976d79615b254f"; + + /** + * 公众号ACCESS_TOKEN缓存key + */ + public static final String WX_OFFICIAL_ACCOUNT_REDIS_ACCESS_TOKEN_KEY="wx.officialAccount.access.token.key"; + /** + * 微信公众号--服务器验证专用token + */ + public static final String WX_OFFICIAL_ACCOUNT_TOKEN="oHDqn56DWSxUHyiOnqLAyawfUj0k"; + /** + * 微信公众号--开发者账号的appid + */ + public static final String WX_OFFICIAL_ACCOUNT_APPID ="wx42f8776ad330e623"; + /** + * 微信公众号--开发者账号的AppSecret + */ + public static final String WX_OFFICIAL_ACCOUNT_APPSECRET="6dd7ea55e17ec30df20164f1de1e9e5f"; + + /** + * 赛会: 赛会创建-防重提交缓存key + */ + public static final String COMPETITION_CREATE_KEY = "competition:create:code:"; + /** + * 赛会: 赛会创建时保存的短信验证码缓存key + */ + public static final String ESTABLISH_COMPETITION_SMS_CAPTCHA = "competition:verifyCode:"; + + /** + * 赛会: 球队申请加入赛会-短信验证码缓存key + */ + public static final String COMPETITION_TEAM_CAPTCHA = "competition:team:verifyCode:"; + /** + * 赛会:球队-球员申请加入球队-短信验证码缓存key + */ + public static final String COMPETITION_TEAM_MEMBER_CAPTCHA = "competition:team:member:verifyCode:"; + /** + * 球队加入验证码过期时间-有效期 (秒) + */ + public static final Long COMPETITION_TEAM_MEMBER_CAPTCHA_EXPIRES = 300L; + /** + * 泡泡短信平台-url前缀 + */ + public static final String SMS_PAOPAO_URL = "http://47.94.229.220:7862/sms"; + /** + * 泡泡短信平台-account + */ + public static final String SMS_PAOPAO_ACCOUNT = "911136"; + /** + * 泡泡短信平台-密码 password + */ + public static final String SMS_PAOPAO_PASSWORD = "MMfZ3p"; + /** + * 泡泡短信平台-接入号 extno + */ + public static final String SMS_PAOPAO_EXTNO = "106901911136"; + /** + * 泡泡短信平台-有效期 (秒) + */ + public static final Long SMS_PAOPAO_EXPIRES = 900L; + /** + * 短信签名 + */ + public static final String SMS_PAOPAO_SIGN="【篮球Zone】"; + /** + * 存放赛程循环赛的锁的key + */ + public static final String ARRANGE_TEAM_GROUP_SCHEDULE="arrange:team:group:schedule:"; + /** + * Redis 存放乐橙云 管理员token + */ + public static final String LECHANGE_ACCESSTOKEN = "lechange:accesstoken"; + /** + * Redis 存放乐橙云 轻应用播放token + */ + public static final String LECHANGE_LIVE_KITTOKEN = "lechange:live:kittoken"; } diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/aspect/InnerAuthAspect.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/aspect/InnerAuthAspect.java index 780f65e93..dee842d2d 100644 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/aspect/InnerAuthAspect.java +++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/aspect/InnerAuthAspect.java @@ -11,6 +11,8 @@ import com.ruoyi.common.core.utils.ServletUtils; import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.security.annotation.InnerAuth; +import static com.ruoyi.common.core.constant.SecurityConstants.FROM_SOURCE; + /** * 内部服务调用验证处理 * @@ -23,7 +25,7 @@ public class InnerAuthAspect implements Ordered @Around("@annotation(innerAuth)") public Object innerAround(ProceedingJoinPoint point, InnerAuth innerAuth) throws Throwable { - String source = ServletUtils.getRequest().getHeader(SecurityConstants.FROM_SOURCE); + String source = ServletUtils.getRequest().getHeader(FROM_SOURCE); // 内部请求验证 if (!StringUtils.equals(SecurityConstants.INNER, source)) { diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/service/TokenService.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/service/TokenService.java index b3093c9cd..544028268 100644 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/service/TokenService.java +++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/service/TokenService.java @@ -4,6 +4,8 @@ import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; import javax.servlet.http.HttpServletRequest; + +import com.ruoyi.system.api.model.WxLoginUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.ruoyi.common.core.constant.CacheConstants; @@ -44,8 +46,8 @@ public class TokenService public Map createToken(LoginUser loginUser) { String token = IdUtils.fastUUID(); - Long userId = loginUser.getSysUser().getUserId(); - String userName = loginUser.getSysUser().getUserName(); + Long userId = loginUser.getUserid(); + String userName = loginUser.getUsername(); loginUser.setToken(token); loginUser.setUserid(userId); loginUser.setUsername(userName); @@ -62,9 +64,9 @@ public class TokenService Map rspMap = new HashMap(); rspMap.put("access_token", JwtUtils.createToken(claimsMap)); rspMap.put("expires_in", expireTime); + rspMap.put("user",loginUser); return rspMap; } - /** * 获取用户身份信息 * diff --git a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/apiConstants/ApiTerminal.java b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/apiConstants/ApiTerminal.java new file mode 100644 index 000000000..1ccf7fedc --- /dev/null +++ b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/apiConstants/ApiTerminal.java @@ -0,0 +1,10 @@ +package com.ruoyi.common.swagger.apiConstants; +/** + * @description API 接口使用终端 + * @author 吴一博 + * @date 2023/7/4 10:18 + */ +public class ApiTerminal { + public static final String wxMiniProgram="微信小程序-"; + public static final String pc="PC端-"; +} diff --git a/ruoyi-modules/ruoyi-system/pom.xml b/ruoyi-modules/ruoyi-system/pom.xml index b29962c70..377683b97 100644 --- a/ruoyi-modules/ruoyi-system/pom.xml +++ b/ruoyi-modules/ruoyi-system/pom.xml @@ -71,7 +71,18 @@ com.ruoyi ruoyi-common-log - + + com.auth0 + java-jwt + + + cn.hutool + hutool-all + + + com.alibaba + easyexcel + com.ruoyi diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/BuildingInfoDetailController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/BuildingInfoDetailController.java new file mode 100644 index 000000000..02e1e340e --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/BuildingInfoDetailController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.BuildingInfoDetail; +import com.ruoyi.system.service.IBuildingInfoDetailService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-06 + */ +@RestController +@RequestMapping("/buildingInfoDetail") +public class BuildingInfoDetailController extends BaseController +{ + @Autowired + private IBuildingInfoDetailService buildingInfoDetailService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:detail:list") + @GetMapping("/list") + public TableDataInfo list(BuildingInfoDetail buildingInfoDetail) + { + startPage(); + List list = buildingInfoDetailService.selectBuildingInfoDetailList(buildingInfoDetail); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:detail:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BuildingInfoDetail buildingInfoDetail) + { + List list = buildingInfoDetailService.selectBuildingInfoDetailList(buildingInfoDetail); + ExcelUtil util = new ExcelUtil(BuildingInfoDetail.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:detail:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(buildingInfoDetailService.selectBuildingInfoDetailById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:detail:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BuildingInfoDetail buildingInfoDetail) + { + return toAjax(buildingInfoDetailService.insertBuildingInfoDetail(buildingInfoDetail)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:detail:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BuildingInfoDetail buildingInfoDetail) + { + return toAjax(buildingInfoDetailService.updateBuildingInfoDetail(buildingInfoDetail)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:detail:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(buildingInfoDetailService.deleteBuildingInfoDetailByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/BuildingLabelController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/BuildingLabelController.java new file mode 100644 index 000000000..8e3eaef1c --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/BuildingLabelController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.BuildingLabel; +import com.ruoyi.system.service.IBuildingLabelService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/label") +public class BuildingLabelController extends BaseController +{ + @Autowired + private IBuildingLabelService buildingLabelService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:label:list") + @GetMapping("/list") + public TableDataInfo list(BuildingLabel buildingLabel) + { + startPage(); + List list = buildingLabelService.selectBuildingLabelList(buildingLabel); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:label:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BuildingLabel buildingLabel) + { + List list = buildingLabelService.selectBuildingLabelList(buildingLabel); + ExcelUtil util = new ExcelUtil(BuildingLabel.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:label:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(buildingLabelService.selectBuildingLabelById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:label:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BuildingLabel buildingLabel) + { + return toAjax(buildingLabelService.insertBuildingLabel(buildingLabel)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:label:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BuildingLabel buildingLabel) + { + return toAjax(buildingLabelService.updateBuildingLabel(buildingLabel)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:label:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(buildingLabelService.deleteBuildingLabelByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/BuildingTeamRelController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/BuildingTeamRelController.java new file mode 100644 index 000000000..56e4d9159 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/BuildingTeamRelController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.BuildingTeamRel; +import com.ruoyi.system.service.IBuildingTeamRelService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/buildingTeamRel") +public class BuildingTeamRelController extends BaseController +{ + @Autowired + private IBuildingTeamRelService buildingTeamRelService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:rel:list") + @GetMapping("/list") + public TableDataInfo list(BuildingTeamRel buildingTeamRel) + { + startPage(); + List list = buildingTeamRelService.selectBuildingTeamRelList(buildingTeamRel); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:rel:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BuildingTeamRel buildingTeamRel) + { + List list = buildingTeamRelService.selectBuildingTeamRelList(buildingTeamRel); + ExcelUtil util = new ExcelUtil(BuildingTeamRel.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:rel:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(buildingTeamRelService.selectBuildingTeamRelById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:rel:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BuildingTeamRel buildingTeamRel) + { + return toAjax(buildingTeamRelService.insertBuildingTeamRel(buildingTeamRel)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:rel:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BuildingTeamRel buildingTeamRel) + { + return toAjax(buildingTeamRelService.updateBuildingTeamRel(buildingTeamRel)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:rel:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(buildingTeamRelService.deleteBuildingTeamRelByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CameraInfoController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CameraInfoController.java new file mode 100644 index 000000000..f593cb9ec --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CameraInfoController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.CameraInfo; +import com.ruoyi.system.service.ICameraInfoService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/cameraInfo") +public class CameraInfoController extends BaseController +{ + @Autowired + private ICameraInfoService cameraInfoService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:info:list") + @GetMapping("/list") + public TableDataInfo list(CameraInfo cameraInfo) + { + startPage(); + List list = cameraInfoService.selectCameraInfoList(cameraInfo); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:info:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CameraInfo cameraInfo) + { + List list = cameraInfoService.selectCameraInfoList(cameraInfo); + ExcelUtil util = new ExcelUtil(CameraInfo.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:info:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(cameraInfoService.selectCameraInfoById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:info:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody CameraInfo cameraInfo) + { + return toAjax(cameraInfoService.insertCameraInfo(cameraInfo)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:info:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody CameraInfo cameraInfo) + { + return toAjax(cameraInfoService.updateCameraInfo(cameraInfo)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:info:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(cameraInfoService.deleteCameraInfoByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionController.java index b5fa43730..77949d011 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionController.java @@ -1,28 +1,58 @@ package com.ruoyi.system.controller; -import java.util.List; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.InputStream; +import java.math.BigDecimal; +import java.security.InvalidParameterException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.*; import java.io.IOException; +import java.util.concurrent.TimeUnit; import javax.servlet.http.HttpServletResponse; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.io.FileUtil; +import cn.hutool.system.UserInfo; +import com.alibaba.csp.sentinel.util.IdUtil; +import com.alibaba.fastjson.JSON; +import com.ruoyi.common.core.constant.Constants; +import com.ruoyi.common.core.exception.CheckedException; +import com.ruoyi.common.core.exception.ServiceException; +import com.ruoyi.common.core.utils.uuid.IdUtils; +import com.ruoyi.common.redis.service.RedisService; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; import com.ruoyi.system.api.domain.vo.WxAppletsCodeVo; +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.api.model.WxLoginUser; +import com.ruoyi.system.domain.*; +import com.ruoyi.system.domain.vo.*; +import com.ruoyi.system.service.*; +import com.ruoyi.system.utils.LoginUserUtil; +import com.ruoyi.system.utils.UtilTool; +import io.seata.core.model.Result; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.RandomStringUtils; +import org.apache.poi.hssf.usermodel.*; +import org.apache.poi.ooxml.POIXMLDocumentPart; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.xssf.usermodel.*; +import org.aspectj.weaver.loadtime.Aj; +import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; -import com.ruoyi.system.domain.Competition; -import com.ruoyi.system.service.ICompetitionService; import com.ruoyi.common.core.web.controller.BaseController; import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.utils.poi.ExcelUtil; import com.ruoyi.common.core.web.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; /** * 比赛信息Controller @@ -36,6 +66,24 @@ public class CompetitionController extends BaseController { @Autowired private ICompetitionService competitionService; + @Autowired + private ICompetitionOfTeamService competitionOfTeamService; + @Autowired + private ICompetitionMembersService competitionMembersService; + @Autowired + private IWxUserService wxUserService; + + @Autowired + private RedisService redisService; + @Autowired + private SmsService smsService; + + @Value("${image.location.linux}") + private String linuxLocation; + @Value("${image.location.windows}") + private String winLocation; + @Value("${image.domainName}") + private String domainName; /** * 查询比赛信息列表 @@ -66,19 +114,50 @@ public class CompetitionController extends BaseController * 获取比赛信息详细信息 */ @RequiresPermissions("system:competition:query") - @GetMapping(value = "/{id}") + @GetMapping(value = "/getInfo/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return AjaxResult.success(competitionService.selectCompetitionById(id)); } - + @ApiOperation(ApiTerminal.wxMiniProgram+"根据ID查询比赛详情") + @GetMapping("/detail/{id}") + @ResponseBody + public AjaxResult detail(@PathVariable("id") Long id){ + CompetitionResponse competition = competitionService.getCompetitionById(id); + return AjaxResult.success(competition); + } + @PostMapping("/getMyJoinCompetition") + @ResponseBody + @ApiOperation(value = ApiTerminal.wxMiniProgram+"分页获取我参与过的比赛列表") + public TableDataInfo getMyJoinCompetition(@RequestBody CompetitionVo entity) { + startPage(); + //关键字word包含:球队名称、地点名称、球馆名称,支持模糊搜索; + entity.setIsDeleted(0); + List list = competitionService.getMyJoinCompetition(entity); + return getDataTable(list); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"创建约战") + @PostMapping("/add") + @ResponseBody + public AjaxResult add(@RequestBody Competition entity) { + return AjaxResult.success(competitionService.add(entity)); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"获取自动生成的赛会唯一编码") + @GetMapping("/genCompetitionCode") + @ResponseBody + public AjaxResult genCompetitionCode() { + DateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + System.out.println(sdf.format(new Date()) + RandomStringUtils.randomNumeric(6)); + String code = "B" + sdf.format(new Date()) + RandomStringUtils.randomNumeric(6); + return AjaxResult.success(code); + } /** * 新增比赛信息 */ @RequiresPermissions("system:competition:add") @Log(title = "比赛信息", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody Competition competition) + public AjaxResult addCompetition(@RequestBody Competition competition) { return toAjax(competitionService.insertCompetition(competition)); } @@ -97,7 +176,7 @@ public class CompetitionController extends BaseController @RequiresPermissions("system:competition:edit") @Log(title = "比赛信息", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody Competition competition) + public AjaxResult editCompetition(@RequestBody Competition competition) { return toAjax(competitionService.updateCompetition(competition)); } @@ -112,4 +191,453 @@ public class CompetitionController extends BaseController { return toAjax(competitionService.deleteCompetitionByIds(ids)); } + + @ApiOperation(ApiTerminal.wxMiniProgram+"应战确认") + @PostMapping("/challengeConfirm") + @ResponseBody + public AjaxResult challengeConfirm(@RequestBody Competition entity) throws Exception { + if (UtilTool.isNull(entity)) { + throw new InvalidParameterException("参数异常,非法操作!"); + } else if (entity.getId() == null) { + throw new InvalidParameterException("约战id不能为空"); + } else if (entity.getGuestTeamId() == null) { + throw new InvalidParameterException("应战teamId不能为空"); + } + return AjaxResult.success(competitionService.challengeConfirm(entity)); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"创建赛会") + @PostMapping("/establishCompetition") + @ResponseBody + public AjaxResult establishCompetition(@RequestBody CompetitionVo entity){ + //校验数据字段 + if (StringUtils.isEmpty(entity)) { + throw new InvalidParameterException("参数异常,非法操作!"); + } + if (StringUtils.isEmpty(entity.getCompetitionName())) { + throw new InvalidParameterException("赛会名称【competitionName】不能为空!"); + } else if (StringUtils.isEmpty(entity.getCityCode())) { + throw new InvalidParameterException("举办城市【cityCode】不能为空!"); + } else if (StringUtils.isEmpty(entity.getCompetitionType())) { + throw new InvalidParameterException("赛制【competitionType】不能为空!"); + } else if (StringUtils.isEmpty(entity.getEnrollBeginTime())) { + throw new InvalidParameterException("报名开始时间【EnrollBeginTime】不能为空!"); + } else if (StringUtils.isEmpty(entity.getEnrollEndTime())) { + throw new InvalidParameterException("报名结束时间【EnrollEndTime】不能为空!"); + } else if (StringUtils.isEmpty(entity.getCompetitionBeginTime())) { + throw new InvalidParameterException("比赛开始时间【CompetitionBeginTime】不能为空!"); + } else if (StringUtils.isEmpty(entity.getCompetitionEndTime())) { + throw new InvalidParameterException("比赛结束时间【CompetitionEndTime】不能为空!"); + } else if (StringUtils.isEmpty(entity.getContacts())) { + throw new InvalidParameterException("赛会联系人【Contacts】不能为空!"); + } else if (StringUtils.isEmpty(entity.getContactsAreaCode())) { + throw new InvalidParameterException("赛会联系人电话区号【ContactsAreaCode】不能为空!"); + } else if (StringUtils.isEmpty(entity.getContactsTel())) { + throw new InvalidParameterException("赛会联系人电话【ContactsTel】不能为空!"); + } else if (StringUtils.isEmpty(entity.getCaptcha())) { + throw new InvalidParameterException("短信验证码【Captcha】不能为空!"); + } + //获取短信验证码校验短信验证码是否有效 + Object captcha = redisService.getCacheObject(Constants.ESTABLISH_COMPETITION_SMS_CAPTCHA + entity.getContactsTel()); + if (!entity.getCaptcha().equals(String.valueOf(captcha))) { + throw new ServiceException("短信验证码【"+entity.getCaptcha()+"】已过期或有误!请重新获取!"); + } + return AjaxResult.success(competitionService.establishCompetition(entity)); + } + + @PostMapping("/getCompetitionByCondition") + @ApiOperation(ApiTerminal.wxMiniProgram+"获取赛会数据") + @ResponseBody + public TableDataInfo getCompetitionByCondition(@RequestBody CompetitionVo competition){ + startPage(); + competition.setIsDeleted(0); + List list = competitionService.getCompetitionByCondition(competition); + return getDataTable(list); + } + @PostMapping("/getAllCompetition") + @ResponseBody + @ApiOperation(value = ApiTerminal.wxMiniProgram+"分页获取所有比赛列表") + public TableDataInfo getAllCompetition(@RequestBody CompetitionVo entity) { + entity.setIsDeleted(0); + List list = competitionService.getCompetitionByCondition(entity); + return getDataTable(list); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"编辑") + @PostMapping("/edit") + @ResponseBody + public AjaxResult edit(@RequestBody Competition entity) throws Exception { + if (StringUtils.isEmpty(entity)) { + throw new ServiceException("参数异常,非法操作!"); + } + if (StringUtils.isEmpty(entity.getId())) { + throw new ServiceException("id为空!"); + } + competitionService.edit(entity); + return AjaxResult.success(); + } + + @PostMapping("/sendSms") + @ApiOperation(ApiTerminal.wxMiniProgram+"创建赛会-发送手机验证码") + @ResponseBody + public AjaxResult sendSms(@RequestBody Sms sms) throws Exception { + if (StringUtils.isEmpty(sms)) { + throw new InvalidParameterException("sms is empty!"); + } else if (StringUtils.isEmpty(sms.getMb())) { + throw new InvalidParameterException("手机号码不能为空!"); + } + //生成6位随机数 + int randomNums = (int) ((Math.random() * 9 + 1) * 100000); + if (StringUtils.isEmpty(sms.getMs())) { + StringBuffer msg = new StringBuffer(Constants.SMS_PAOPAO_SIGN); + msg.append("你的验证码为"); + msg.append(randomNums); + msg.append(",有效时间"); + msg.append(Constants.SMS_PAOPAO_EXPIRES / 60); + msg.append("分钟,请勿泄露给他人"); + sms.setMs(msg.toString()); + } else { + sms.setMs(sms.getMs().replace("{}", String.valueOf(randomNums))); + } + SmsResponse smsResponse = smsService.sendSms(sms); + if (smsResponse.getStatus() == 0) { + //保存到缓存 + redisService.setCacheObject(Constants.ESTABLISH_COMPETITION_SMS_CAPTCHA + sms.getMb(), randomNums, Constants.SMS_PAOPAO_EXPIRES, TimeUnit.SECONDS); + } + return AjaxResult.success(smsResponse); + } + + @PostMapping("/teamEnrollExcleImport") + @ResponseBody + @ApiOperation(value = ApiTerminal.wxMiniProgram+"导入球队报名excel(包含图片)") + public AjaxResult teamEnrollExcleImport( + @RequestParam(value = "competitionId", required = true) Long competitionId, + @RequestParam("file") MultipartFile file) throws Exception { + CompetitionExcleVo excleVo = new CompetitionExcleVo(); + String fileName = file.getOriginalFilename(); + + String time = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); + //System.out.println("获取到精确到日的时间格式为"+time); + String[] str = time.split("-");//根据‘-’进行拆分字符串 拆分出来的日期有,年,日,月,根据年日月创建文件夹 + String datePath = "/" + str[0] + "/" + str[1] + "/" + str[2] + "/"; + // 上传文件为空 + if (StringUtils.isEmpty(fileName)) { + throw new CheckedException("没有导入文件"); + } + // 上传文件名格式不正确 + if (fileName.lastIndexOf(".") != -1 && !".xlsx".equals(fileName.substring(fileName.lastIndexOf(".")))) { + throw new CheckedException("文件名格式不正确, 请使用后缀名为.xlsx的文件"); + } + String filePath = getFilePath(file); + Sheet sheet = null; + Workbook wb = null; + //读图片--开始 + Map maplist = null; + BufferedInputStream inputStream = new BufferedInputStream(file.getInputStream()); + // 判断用07还是03的方法获取图片 + if (filePath.endsWith("xls")) { + wb = new HSSFWorkbook(inputStream); + sheet = wb.getSheetAt(0); + maplist = getPictures03((HSSFSheet) sheet); + } else if (filePath.endsWith("xlsx")) { + wb = new XSSFWorkbook(inputStream); + sheet = wb.getSheetAt(0); + maplist = getPictures07((XSSFSheet) sheet); + } else { + throw new CheckedException("Excel文件格式不支持"); + } + //读图片--结束 + // printImg(maplist); + //获得数据的总行数 + int totalRowNum = sheet.getLastRowNum(); + //todo 获取赛事编码 + Row row1 = sheet.getRow(1); + Cell cell1 = row1.getCell(5); + if (cell1 == null) { + throw new CheckedException("赛事编码不能为空"); + } + cell1.setCellType(CellType.STRING); + String competitionCode = cell1.getStringCellValue().toString(); + if (StringUtils.isEmpty(competitionCode)) { + throw new CheckedException("赛事编码不能为空"); + } + System.out.println("赛事编码" + competitionCode); + Row row5 = sheet.getRow(5); + Cell cell5_1 = row5.getCell(0); + if (cell5_1 == null) { + throw new CheckedException("球队logo不能为空"); + } + cell5_1.setCellType(CellType.STRING); + //todo 获取赛事信息 + Competition competition = competitionService.selectCompetitionById(competitionId); + //校验比赛编码是否是本 + BeanUtil.copyProperties(competition, excleVo); + if (UtilTool.isNull(competition)) { + throw new CheckedException("赛会信息不存在;"); + } + if (!competition.getCompetitionCode().equals(competitionCode)) { + throw new CheckedException("导入的文件中的赛事编码错误"); + } + Cell cell5_2 = row5.getCell(1); + if (cell5_2 == null) { + throw new CheckedException("球队名称不能为空"); + } + cell5_2.setCellType(CellType.STRING); + String teamName = cell5_2.getStringCellValue().trim(); + if (StringUtils.isEmpty(teamName)) { + throw new CheckedException("球队名称不能为空"); + } + //球队队长 + Cell cell5_2_1 = row5.getCell(4); + String captain = ""; + if (cell5_2_1 != null) { + captain = cell5_2_1.getStringCellValue(); + } + Cell cell5_3 = row5.getCell(5); + if (cell5_3 == null) { + throw new CheckedException("球队领队不能为空"); + } + cell5_3.setCellType(CellType.STRING); + String teamLeader = cell5_3.getStringCellValue(); + if (StringUtils.isEmpty(teamLeader)) { + throw new CheckedException("球队领队不能为空"); + } + Cell cell5_4 = row5.getCell(6); + if (cell5_4 == null) { + throw new CheckedException("球队领队手机号码不能为空"); + } + cell5_4.setCellType(CellType.STRING); + String teamLeaderTel = cell5_4.getStringCellValue().toString(); + if (StringUtils.isEmpty(teamLeaderTel)) { + throw new CheckedException("球队队长手机号码不能为空"); + } + Cell cell5_5 = row5.getCell(7); + if (cell5_5 == null) { + throw new CheckedException("球队人数不能为空"); + } + cell5_5.setCellType(CellType.STRING); + String teamUserNum = cell5_5.getStringCellValue(); + if (StringUtils.isEmpty(teamUserNum)) { + throw new CheckedException("球队人数不能为空"); + } + //todo 获取到数据后,开始保存数据 + LoginUser user = SecurityUtils.getLoginUser(); + CompetitionOfTeamVo team = new CompetitionOfTeamVo(); + team.setTeamName(teamName); + team.setRemark("导入方式报名"); + team.setContactsTel(teamLeaderTel); + team.setContacts(teamLeader); + team.setCaptain(captain); + team.setCreatedTime(new Date()); + team.setCreatedBy(String.valueOf(user.getUserid())); + team.setCreatedTime(new Date()); + team.setSerialNumber(Integer.parseInt(teamUserNum)); + team.setCompetitionId(competition.getId()); + //保存图片 + PictureData pictureData = maplist.get("5_0"); + if (pictureData == null) { + throw new CheckedException("球队logo不能为空"); + } + byte[] data = pictureData.getData(); + //得到保存的file + String osPath = linuxLocation; + String os = System.getProperty("os.name"); + if (os.toLowerCase().startsWith("win")) { + osPath = winLocation; + } + String newFileName = UUID.randomUUID() + "_5.jpg"; + String uploadpath = UtilTool.getFileUploadPath(osPath); + File file2 = UtilTool.bytesToFile(data, uploadpath, newFileName); + team.setTeamLogo(domainName + datePath + newFileName); + team.setStatus(0); + System.out.println(JSON.toJSONString(team)); + //todo 保存球队数据; + CompetitionOfTeam competitionOfTeam = competitionOfTeamService.selectOneByTeamName(teamName); + if (UtilTool.isNotNull(competitionOfTeam)) { + team.setId(competitionOfTeam.getId()); + competitionOfTeamService.updateCompetitionOfTeam(team); + }else { + competitionOfTeamService.insertCompetitionOfTeam(team); + } + excleVo.setOfTeam(team); + //todo 清空球员数据 + competitionMembersService.deleteByMembers(competition.getId(), team.getId()); + //要获得属性 + List membersVos = new ArrayList<>(); + for (int i = 8; i < totalRowNum; i++) { + CompetitionMembers membersVo = new CompetitionMembers(); + membersVo.setCompetitionId(competition.getId()); + //membersVo.setCompetitionTeamId(team.getId()); + membersVo.setCompetitionOfTeamId(team.getId()); + membersVo.setCompetitionNature(1); + membersVo.setCreatedBy(String.valueOf(user.getUserid())); + membersVo.setCreatedTime(new Date()); + //获得第i行对象 + Row row = sheet.getRow(i); + //真实姓名 + Cell cell = row.getCell(1); + if (cell != null) { + cell.setCellType(CellType.STRING); + } + membersVo.setRealName(cell.getStringCellValue()); + if (StringUtils.isEmpty(membersVo.getRealName())) { + break; + } + //球衣号码 + cell = row.getCell(2); + if (cell != null) { + cell.setCellType(CellType.STRING); + membersVo.setJerseyNumber(cell.getStringCellValue()); + } + //位置 + cell = row.getCell(3); + if (cell != null) { + cell.setCellType(CellType.STRING); + membersVo.setTeamPosition(cell.getStringCellValue()); + } + //身高 + cell = row.getCell(4); + if (cell != null) { + cell.setCellType(CellType.STRING); + membersVo.setHeight(new BigDecimal(cell.getStringCellValue())); + } + //体重 + cell = row.getCell(5); + if (cell != null) { + cell.setCellType(CellType.STRING); + membersVo.setWeight(new BigDecimal(cell.getStringCellValue())); + } + //证件号码 + cell = row.getCell(6); + if (cell != null) { + membersVo.setIdType("身份证"); + membersVo.setIdCardNo(cell.getStringCellValue()); + } + //电话 + cell = row.getCell(7); + if (cell != null) { + membersVo.setContactsAreaCode("86"); + membersVo.setContactsTel(String.valueOf(((XSSFCell) cell).getRawValue())); + } + //电话 + cell = row.getCell(8); + if (cell != null) { + membersVo.setIdCardNo(String.valueOf(((XSSFCell) cell).getRawValue())); + } + //membersVo.setAvatar(domainName+datePath+newFileName); + //保存图片 + PictureData pictureData2 = maplist.get(i + "_0"); + if (pictureData2 == null) { + + } + byte[] data2 = pictureData2.getData(); + String newFileName2 = UUID.randomUUID() + "_0.jpg"; + String uploadpath2 = UtilTool.getFileUploadPath(osPath); + File file3 = UtilTool.bytesToFile(data2, uploadpath2, newFileName2); + membersVo.setPersonalPhoto(domainName + datePath + newFileName2); + membersVo.setCreatedTime(new Date()); + //默认球员是已确认状态 + membersVo.setStatus(1); + System.out.println(JSON.toJSONString((membersVo))); + membersVo.setCreatedBy(String.valueOf(user.getUserid())); + membersVos.add(membersVo); + competitionMembersService.insertCompetitionMembers(membersVo); + } + + excleVo.setTeamMemberList(membersVos); + //todo 发个短信通知管理员 + Sms sms = new Sms(); + StringBuffer msg = new StringBuffer(Constants.SMS_PAOPAO_SIGN); + msg.append("赛会["); + msg.append(competition.getCompetitionName()); + msg.append("]"); + msg.append("已有球队["); + msg.append(teamName); + msg.append("]申请出战,请尽快审批处理!"); + sms.setMs(msg.toString()); + WxUser userInfo = wxUserService.selectWxUserById(12L); + sms.setMobile(userInfo.getTelephone()); + sms.setMb(userInfo.getTelephone()); + /* SmsResponse smsResponse = smsFeign.sendSms(sms); + if (smsResponse.getStatus() == 0) { + //保存到缓存 + // redisUtil.set(Constant.ESTABLISH_COMPETITION_SMS_CAPTCHA+sms.getMb(), randomNums,Constant.SMS_PAOPAO_EXPIRES); + }*/ + //使用完成关闭 + wb.close(); + if (inputStream != null) { + inputStream.close(); + } + return AjaxResult.success(excleVo); + } + + /** + * 获取03图片和位置 (xls) clerk + * + * @param sheet + * @return + * @throws IOException + */ + public static Map getPictures03(HSSFSheet sheet) throws IOException { + Map map = new HashMap(); + List list = sheet.getDrawingPatriarch().getChildren(); + + for (HSSFShape shape : list) { + if (shape instanceof HSSFPicture) { + HSSFPicture picture = (HSSFPicture) shape; + HSSFClientAnchor cAnchor = (HSSFClientAnchor) picture.getAnchor(); + HSSFPictureData pdata = picture.getPictureData(); + String key = cAnchor.getRow1() + "_" + cAnchor.getCol1(); // 行号-列号 + map.put(key, pdata); + } + } + return map; + } + + /** + * 获取Excel2007图片 + * + * @param sheet 当前sheet对象 + * @return Map key:图片单元格索引(0_1)String,value:图片流PictureData + */ + public static Map getPictures07(XSSFSheet sheet) { + int sheetNum = 0; + Map sheetIndexPicMap = new HashMap(); + for (POIXMLDocumentPart dr : sheet.getRelations()) { + if (dr instanceof XSSFDrawing) { + XSSFDrawing drawing = (XSSFDrawing) dr; + List shapes = drawing.getShapes(); + + for (XSSFShape shape : shapes) { + XSSFPicture pic = (XSSFPicture) shape; + XSSFClientAnchor anchor = pic.getPreferredSize(); + CTMarker ctMarker = anchor.getFrom(); + + String picIndex = ctMarker.getRow() + "_" + ctMarker.getCol(); + if (sheetNum == ctMarker.getCol()) { + sheetIndexPicMap.put(picIndex, pic.getPictureData()); + + } + + } + } + } + return sheetIndexPicMap; + } + + private String getFilePath(MultipartFile file) { + String dirPath = FileUtil.getTmpDirPath(); + try { + InputStream inputStream = file.getInputStream(); + File fromStream = FileUtil.writeFromStream(inputStream, dirPath + "/" + IdUtils.simpleUUID() + file.getOriginalFilename()); + return fromStream.getAbsolutePath(); + } catch (IOException e) { + throw new CheckedException("导入文件异常"); + } + } + @GetMapping("/getTeamEnrollExcleImpData") + @ApiOperation(value = ApiTerminal.wxMiniProgram+"获取通过excle导入的报名球队以及队员数据") + public AjaxResult getTeamEnrollExcleImpData(@RequestParam("competitionId") Long competitionId, @RequestParam("userId") Long userId) { + CompetitionExcleVo excleVo = competitionService.getTeamEnrollExcleImpData(competitionId, userId); + return AjaxResult.success(excleVo); + } + } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionMembersController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionMembersController.java index 860303818..aab172227 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionMembersController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionMembersController.java @@ -3,15 +3,13 @@ package com.ruoyi.system.controller; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import com.ruoyi.system.domain.vo.CompetitionMembersVo; +import io.seata.core.model.Result; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; @@ -102,4 +100,12 @@ public class CompetitionMembersController extends BaseController { return toAjax(competitionMembersService.deleteCompetitionMembersByIds(ids)); } + @PostMapping("/getJoinCompetitionMembersPage") + @ResponseBody + @ApiOperation(value = ApiTerminal.wxMiniProgram+"分页获取参与比赛的人员列表") + public TableDataInfo getJoinCompetitionMembersPage(@RequestBody CompetitionMembersVo entity){ + startPage(); + List list = competitionMembersService.getJoinCompetitionMembersPage(entity); + return getDataTable(list); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionOfTeamController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionOfTeamController.java index 7188d7594..8ec9a3b41 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionOfTeamController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionOfTeamController.java @@ -1,20 +1,37 @@ package com.ruoyi.system.controller; -import java.util.List; +import java.net.URLEncoder; +import java.security.InvalidParameterException; +import java.util.*; import java.io.IOException; +import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.util.MapUtils; +import com.alibaba.fastjson.JSON; +import com.ruoyi.common.core.constant.Constants; +import com.ruoyi.common.core.exception.ServiceException; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import com.ruoyi.system.domain.Competition; +import com.ruoyi.system.domain.CompetitionTeamGroup; +import com.ruoyi.system.domain.Sms; +import com.ruoyi.system.domain.vo.CompetitionOfTeamGroupVo; import com.ruoyi.system.domain.vo.CompetitionOfTeamVo; +import com.ruoyi.system.domain.vo.SmsResponse; +import com.ruoyi.system.service.ICompetitionService; +import com.ruoyi.system.service.ICompetitionTeamGroupService; +import com.ruoyi.system.service.SmsService; +import com.ruoyi.system.utils.LoginUserUtil; +import com.ruoyi.system.utils.UtilTool; +import io.seata.core.model.Result; +import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Parameters; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; @@ -37,7 +54,18 @@ public class CompetitionOfTeamController extends BaseController { @Autowired private ICompetitionOfTeamService competitionOfTeamService; - + @Autowired + private ICompetitionService competitionService; + @Autowired + private ICompetitionTeamGroupService competitionTeamGroupService; + @Autowired + private SmsService smsService; + @Value("${image.location.linux}") + private String linuxLocation; + @Value("${image.location.windows}") + private String winLocation; + @Value("${image.domainName}") + private String domainName; /** * 查询赛会中-参赛队伍列表 */ @@ -127,4 +155,167 @@ public class CompetitionOfTeamController extends BaseController { return toAjax(competitionOfTeamService.deleteCompetitionOfTeamByIds(ids)); } + + @ApiOperation(ApiTerminal.wxMiniProgram+"新增") + @PostMapping("/add") + @ResponseBody + public AjaxResult add(@RequestBody CompetitionTeamGroup entity) throws Exception { + entity.setCreatedTime(new Date()); + entity.setCreatedBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); + return AjaxResult.success(competitionTeamGroupService.add(entity)); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"编辑") + @PostMapping("/edit") + @ResponseBody + public AjaxResult editCompetitionOfTeam(@RequestBody CompetitionOfTeam entity) throws Exception { + if(StringUtils.isEmpty(entity)){ + throw new ServiceException("参数异常,非法操作!"); + } + if(StringUtils.isEmpty(entity.getId())){ + throw new ServiceException("id为空!"); + } + return AjaxResult.success(competitionOfTeamService.edit(entity)); + } + @PostMapping("/getJoinCompetitionTeam") + @ResponseBody + @ApiOperation(value = ApiTerminal.wxMiniProgram+"分页获取参与比赛的球队列表") + public TableDataInfo getJoinCompetitionTeam(@RequestBody CompetitionOfTeam entity){ + startPage(); + //关键字word包含:球队名称、地点名称、球馆名称,支持模糊搜索; + List list = competitionOfTeamService.getJoinCompetitionTeam(entity); + return getDataTable(list); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"参赛球队审批") + @PostMapping("/teamApprove") + @ResponseBody + public AjaxResult approve(@RequestBody CompetitionOfTeam entity) throws Exception { + if(StringUtils.isEmpty(entity)){ + throw new ServiceException("参数异常,非法操作!"); + } + if(StringUtils.isEmpty(entity.getId())){ + throw new InvalidParameterException("id为空!"); + }if(StringUtils.isEmpty(entity.getStatus())){ + throw new InvalidParameterException("status为空!"); + } + CompetitionOfTeam old = competitionOfTeamService.selectCompetitionOfTeamById(entity.getId()); + Competition competition = competitionService.selectCompetitionById(old.getCompetitionId()); + StringBuffer msg = new StringBuffer(Constants.SMS_PAOPAO_SIGN); + if(old.getStatus().intValue()!=entity.getStatus()){ + String passMsg = "已通过,让我们携手共创新的荣耀"; + if(entity.getStatus()==-1){ + passMsg = "已被驳回,原因是:"+entity.getRemark(); + } + competitionOfTeamService.edit(entity); + //todo 发个短信通知管理员 + Sms sms = new Sms(); + msg.append("你的球队["); + msg.append(old.getTeamName()); + msg.append("]加入赛会["); + msg.append(competition.getCompetitionName()); + msg.append("]的申请"); + msg.append(passMsg); + sms.setMs(msg.toString()); + sms.setMb(old.getContactsTel()); + SmsResponse smsResponse = smsService.sendSms(sms); + } + return AjaxResult.success(Boolean.TRUE); + } + @PostMapping("/getJoinCompetitionGroupTeam") + @ResponseBody + @ApiOperation(value = ApiTerminal.wxMiniProgram+"获取赛事中参与的球队的分组数据") + public AjaxResult getJoinCompetitionGroupTeam(@RequestBody CompetitionOfTeamVo entity){ + //关键字word包含:球队名称、地点名称、球馆名称,支持模糊搜索; +// List competitionOfTeamVos = competitionOfTeamFeign.getJoinCompetitionGroupTeam(entity); +// List isNotGroupList = list.stream().filter(a -> StringUtils.isEmpty(a.getCompetitionGroup())).collect(Collectors.toList()); +// List list1 = list.stream().filter(a -> !StringUtils.isEmpty(a.getCompetitionGroup())).collect(Collectors.toList()); +// //1.根据字符串类型日期分组,并按照日期升序排序,返回TreeMap,map的key为字符串日期,value为list +// TreeMap> dataGroupMap = list1.stream().collect(Collectors.groupingBy(a->a.getCompetitionGroup(), TreeMap::new,Collectors.toList())); +// List listMap = new ArrayList<>(); +// for(Map.Entry> entry:dataGroupMap.entrySet()){ +// Map resMap =new HashMap(); +// resMap.put("competitionGroup",entry.getKey()); +// resMap.put("competitionOfTeamList",entry.getValue()); +// listMap.add(resMap); +// } +// maps.put("isGroup",listMap); +// maps.put("isNotGroup",isNotGroupList); + Map hashMap = new HashMap(); + List competitionOfTeamGroupVoList = null; + List competitionOfTeamVos = competitionOfTeamService.findCompetitionTeamGroupList(entity); + if(UtilTool.isNotNull(competitionOfTeamVos)){ + competitionOfTeamGroupVoList = new ArrayList<>(); + //获取没有分组的球队 + List groupNull = competitionOfTeamVos.stream().filter(a -> UtilTool.isNull(a.getCompetitionGroup())).collect(Collectors.toList()); + + //过滤分组为空的球队 + competitionOfTeamVos = competitionOfTeamVos.stream().filter(a -> UtilTool.isNotNull(a.getCompetitionGroup())).collect(Collectors.toList()); + + //分组去重并返回SET + List setList = competitionOfTeamVos.stream() + .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> + new TreeSet<>(Comparator.comparing(CompetitionOfTeamVo::getCompetitionGroup))), ArrayList::new)); + //排序 + setList.sort((o1, o2) -> o1.getCompetitionGroup().compareTo(o2.getCompetitionGroup())); //正序 + CompetitionOfTeamGroupVo competitionOfTeamGroupVo = null; + for(CompetitionOfTeamVo competitionOfTeamVo : setList){ + competitionOfTeamGroupVo = new CompetitionOfTeamGroupVo(); + List groupList = competitionOfTeamVos.stream().filter(s -> s.getCompetitionGroup().equals(competitionOfTeamVo.getCompetitionGroup())).collect(Collectors.toList()); + groupList.sort((o1, o2) -> o2.getIntegral().compareTo(o1.getIntegral())); //正序 + competitionOfTeamGroupVo.setGroupName(competitionOfTeamVo.getCompetitionGroup()); + competitionOfTeamGroupVo.setTeamList(groupList); + competitionOfTeamGroupVoList.add(competitionOfTeamGroupVo); + } + + //添加未分组球队 + if(UtilTool.isNotNull(groupNull)){ + competitionOfTeamGroupVo = new CompetitionOfTeamGroupVo(); + competitionOfTeamGroupVo.setGroupName("未分"); + competitionOfTeamGroupVo.setTeamList(groupNull); + competitionOfTeamGroupVoList.add(competitionOfTeamGroupVo); + } + + hashMap.put("competitionOfTeamGroupVo",competitionOfTeamGroupVoList); + } + + return AjaxResult.success(hashMap); + } + @GetMapping("/teamEnrollExcleExport") + @ApiOperation(value = ApiTerminal.wxMiniProgram+"球队报名excel模板文件导出(get)") + public void teamEnrollExcleExport(@RequestParam(value = "competitionId", required = true) Long competitionId, HttpServletResponse response) throws IOException { + // 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman + Competition competition = competitionService.selectCompetitionById(competitionId); + // 模板注意 用{} 来表示你要用的变量 如果本来就有"{","}" 特殊字符 用"\{","\}"代替 + // {} 代表普通变量 {.} 代表是list的变量 {前缀.} 前缀可以区分不同的list + String osPath = linuxLocation; + String os = System.getProperty("os.name"); + if (os.toLowerCase().startsWith("win")) { + osPath = winLocation; + } + Long times = System.currentTimeMillis(); + String templateFileName = osPath + "apply.xlsx"; + String fileName = osPath+ "compositeFill" + times + ".xlsx"; + try { + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setCharacterEncoding("utf-8"); + // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 + String fileName1 = URLEncoder.encode(competition.getCompetitionName()+"球队报名登记表", "UTF-8").replaceAll("\\+", "%20"); + response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName1 + ".xlsx"); + // EasyExcel.write(response.getOutputStream(), DownloadData.class).sheet("模板").doWrite(data()); + // 这里需要设置不关闭流 + // 方案1 + //EasyExcel.write(response.getOutputStream()).withTemplate(templateFileName).sheet().doFill(competition); + System.out.println(templateFileName); + //todo 先把文件输出到服务器, + EasyExcel.write(response.getOutputStream()).withTemplate(templateFileName).sheet().doFill(competition); + } catch (Exception e) { + // 重置response + response.reset(); + response.setContentType("application/json"); + response.setCharacterEncoding("utf-8"); + Map map = MapUtils.newHashMap(); + map.put("status", "failure"); + map.put("message", "下载文件失败" + e.getMessage()); + response.getWriter().println(JSON.toJSONString(map)); + } + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionResultController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionResultController.java index ba685ec2a..cdc8dc4a5 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionResultController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionResultController.java @@ -1,19 +1,26 @@ package com.ruoyi.system.controller; +import java.security.InvalidParameterException; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.Date; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; +import com.ruoyi.common.core.exception.ServiceException; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import com.ruoyi.system.domain.CompetitionMembersScore; import com.ruoyi.system.domain.vo.CompetitionVsRecordVo; +import com.ruoyi.system.domain.vo.PersonalHonorResponse; +import com.ruoyi.system.service.ICompetitionMembersScoreService; +import com.ruoyi.system.utils.UtilTool; +import io.seata.core.model.Result; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; @@ -36,6 +43,8 @@ public class CompetitionResultController extends BaseController { @Autowired private ICompetitionResultService competitionResultService; + @Autowired + private ICompetitionMembersScoreService competitionMembersScoreService; /** * 查询赛会中-赛程结果记录列表 @@ -118,4 +127,77 @@ public class CompetitionResultController extends BaseController { return toAjax(competitionResultService.deleteCompetitionResultByIds(ids)); } + @ApiOperation(ApiTerminal.wxMiniProgram+"球员数据-新增、编辑") + @PostMapping("/insertOrUpdateMemberScore") + @ResponseBody + public AjaxResult insertOrUpdateMemberScore(@RequestBody CompetitionMembersScore request) throws Exception { + if(UtilTool.isNull(request)){ + throw new ServiceException("参数不能为空1"); + } + + //新增 + if(request.getId()==null){ + request.setCreatedBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); + request.setCreatedTime(new Date()); + competitionMembersScoreService.insertCompetitionMembersScore(request); + } else {//编辑、 + if(StringUtils.isEmpty(request.getId())){ + throw new ServiceException("id为空"); + } + request.setLastUpdatedTime(new Date()); + request.setModifiedBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); + competitionMembersScoreService.updateCompetitionMembersScore(request); + } + return AjaxResult.success(); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"赛会个人荣誉榜") + @GetMapping("/getHonorList/{competitionId}") + @ResponseBody + public TableDataInfo getHonorList(@PathVariable("competitionId") Long competitionId) throws Exception { + if(UtilTool.isNull(competitionId)){ + throw new InvalidParameterException("赛会id不能为"); + } + List honorResponseList = null; + + //查询赛会得分数据 + List membersScoreList = competitionMembersScoreService.getHonorList(competitionId,null); + if(UtilTool.isNotNull(membersScoreList)){ + honorResponseList = new ArrayList<>(); + + CompetitionMembersScore membersScore = null; + //3分王 + membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getThreePoints)).get(); + setHonorData(honorResponseList,membersScore,"3分王"); + //篮板王 + membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getBackboard)).get(); + setHonorData(honorResponseList,membersScore,"篮板王"); + //效率王 +// membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getThreePoints)).get(); +// setHonorData(membersScore,"效率王"); + //助攻王 + membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getAssists)).get(); + setHonorData(honorResponseList,membersScore,"助攻王"); + //得分王 + membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getTotalScore)).get(); + setHonorData(honorResponseList,membersScore,"得分王"); + //盖帽王 + membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getBlock)).get(); + setHonorData(honorResponseList,membersScore,"盖帽王"); + //抢断王 + membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getSnatch)).get(); + setHonorData(honorResponseList,membersScore,"抢断王"); + + } + return getDataTable(honorResponseList); + } + + private void setHonorData(List honorResponseList,CompetitionMembersScore membersScore,String honorName) { + if(UtilTool.isNotNull(membersScore)){ + PersonalHonorResponse honorResponse = new PersonalHonorResponse(); + honorResponse.setHonorName(honorName); + honorResponse.setHonoraryPersonnel(membersScore.getRealName()); + honorResponse.setTeamName(membersScore.getTeamName()); + honorResponseList.add(honorResponse); + } + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionTeamGroupController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionTeamGroupController.java index ad6b84ad3..0464afb53 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionTeamGroupController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionTeamGroupController.java @@ -1,17 +1,27 @@ package com.ruoyi.system.controller; +import java.util.ArrayList; +import java.util.Date; import java.util.List; +import java.util.TreeMap; +import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; +import com.ruoyi.common.core.exception.ServiceException; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import com.ruoyi.system.domain.CompetitionOfTeam; +import com.ruoyi.system.domain.vo.CompetitionOfTeamVo; +import com.ruoyi.system.domain.vo.CompetitionTeamGroupVo; +import com.ruoyi.system.domain.vo.TeamGroupRequest; +import com.ruoyi.system.service.ICompetitionOfTeamService; +import com.ruoyi.system.utils.LoginUserUtil; +import io.seata.core.model.Result; +import io.swagger.annotations.ApiOperation; +import org.aspectj.weaver.loadtime.Aj; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; @@ -34,6 +44,8 @@ public class CompetitionTeamGroupController extends BaseController { @Autowired private ICompetitionTeamGroupService competitionTeamGroupService; + @Autowired + private ICompetitionOfTeamService competitionOfTeamService; /** * 查询赛会中-分组列表 @@ -91,7 +103,7 @@ public class CompetitionTeamGroupController extends BaseController { return toAjax(competitionTeamGroupService.updateCompetitionTeamGroup(competitionTeamGroup)); } - @RequiresPermissions("system:competitionTeamGroup:arrangeTeamGroupSchedule") + //@RequiresPermissions("system:competitionTeamGroup:arrangeTeamGroupSchedule") @Log(title = "赛会中-一键编排分组内的球队的单组循环赛赛程", businessType = BusinessType.OTHER) @PostMapping("/arrangeTeamGroupSchedule") public AjaxResult arrangeTeamGroupSchedule(@RequestBody CompetitionTeamGroup competitionTeamGroup) @@ -108,4 +120,102 @@ public class CompetitionTeamGroupController extends BaseController { return toAjax(competitionTeamGroupService.deleteCompetitionTeamGroupByIds(ids)); } + + + + @PostMapping("/getTeamGroupByCondition") + @ResponseBody + @ApiOperation(value = ApiTerminal.wxMiniProgram+"分页获取比赛分组列表") + public TableDataInfo getTeamGroupByCondition(@RequestBody CompetitionTeamGroup entity){ + startPage(); + entity.setIsDeleted(0); + List list =competitionTeamGroupService.getTeamGroupByCondition(entity); + return getDataTable(list); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"新增") + @PostMapping("/add") + @ResponseBody + public AjaxResult addCompetitionTeamGroup(@RequestBody CompetitionTeamGroup entity) { + return AjaxResult.success(competitionTeamGroupService.add(entity)); + } + @PostMapping("/getJoinCompetitionGroupTeam") + @ResponseBody + @ApiOperation(value = ApiTerminal.wxMiniProgram+"获取赛事中参与的球队的分组数据") + public AjaxResult getJoinCompetitionGroupTeam(@RequestBody CompetitionTeamGroup entity){ + if(StringUtils.isEmpty(entity)){ + throw new ServiceException("参数异常,非法操作!"); + } + if(StringUtils.isEmpty(entity.getCompetitionId())){ + throw new ServiceException("CompetitionId为空!"); + } + + entity.setIsDeleted(0); + List groupList =competitionTeamGroupService.getTeamGroupByCondition(entity); + CompetitionTeamGroupVo competitionTeamGroupVo = new CompetitionTeamGroupVo(); + CompetitionOfTeam ofTeam =new CompetitionOfTeam(); + ofTeam.setCompetitionId(entity.getCompetitionId()); + ofTeam.setStatus(1); + List list = competitionOfTeamService.getJoinCompetitionGroupTeam(ofTeam); + List isNotGroupList = list.stream().filter(a -> StringUtils.isEmpty(a.getCompetitionGroup())).collect(Collectors.toList()); + List list1 = list.stream().filter(a -> !StringUtils.isEmpty(a.getCompetitionGroup())).collect(Collectors.toList()); + //1.根据字符串类型日期分组,并按照日期升序排序,返回TreeMap,map的key为字符串日期,value为list + TreeMap> dataGroupMap = list1.stream().collect(Collectors.groupingBy(a->a.getCompetitionGroup(), TreeMap::new,Collectors.toList())); + List listMap = new ArrayList<>(); + +// for(Map.Entry> entry:dataGroupMap.entrySet()){ +// CompetitionTeamGroupVo.IsGroupBean resMap =new CompetitionTeamGroupVo.IsGroupBean(); +// +// +// resMap.setCompetitionGroup(entry.getKey()); +// resMap.setCompetitionOfTeamList(entry.getValue()); +// listMap.add(resMap); +// } + + if(groupList.size()>0){ + for (CompetitionTeamGroup teamGroup:groupList) { + CompetitionTeamGroupVo.IsGroupBean resMap =new CompetitionTeamGroupVo.IsGroupBean(); + resMap.setCompetitionGroup(teamGroup.getCompetitionGroup()); + resMap.setCompetitionOfTeamList(dataGroupMap.get(teamGroup.getCompetitionGroup())); + listMap.add(resMap); + } + } + + competitionTeamGroupVo.setIsGroup(listMap); + competitionTeamGroupVo.setIsNotGroup(isNotGroupList); + return AjaxResult.success(competitionTeamGroupVo); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"批量设置球队分组数据") + @PostMapping("/batchEditTeamGroup") + @ResponseBody + public AjaxResult batchEditTeamGroup(@RequestBody TeamGroupRequest entity) throws Exception { + if(StringUtils.isEmpty(entity)){ + throw new ServiceException("参数异常,非法操作!"); + } + if(StringUtils.isEmpty(entity.getGroup())){ + throw new ServiceException("Group为空!"); + }if(StringUtils.isEmpty(entity.getOfTeamIds())||entity.getOfTeamIds().size()==0){ + throw new ServiceException("ids为空!"); + } + return AjaxResult.success(competitionTeamGroupService.batchEditTeamGroup(entity)); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"随机设置球队分组数据") + @PostMapping("/randomTeamGroup") + @ResponseBody + public AjaxResult randomTeamGroup(@RequestBody List list, @RequestParam("competitionId") Long competitionId) throws Exception { + if(StringUtils.isEmpty(list)||list.size()==0){ + throw new ServiceException("参数异常,非法操作!"); + } + if(StringUtils.isEmpty(competitionId)){ + throw new ServiceException("competitionId为空,非法操作!"); + } + for (TeamGroupRequest teamGroupRequest: list) { + if(StringUtils.isEmpty(teamGroupRequest.getGroup())){ + throw new ServiceException("group为空!"); + }if(StringUtils.isEmpty(teamGroupRequest.getOfTeamIds())||teamGroupRequest.getOfTeamIds().size()==0){ + throw new ServiceException("ofTeamIds为空!"); + } + } + + return AjaxResult.success(competitionTeamGroupService.randomTeamGroup(list,competitionId)); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionTeamVsTeamController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionTeamVsTeamController.java index ab969b04c..c39b8c76d 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionTeamVsTeamController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionTeamVsTeamController.java @@ -1,11 +1,22 @@ package com.ruoyi.system.controller; +import java.security.InvalidParameterException; +import java.text.ParseException; +import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.io.IOException; +import java.util.Map; import javax.servlet.http.HttpServletResponse; +import com.ruoyi.common.core.exception.CheckedException; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import com.ruoyi.system.domain.CompetitionResult; +import com.ruoyi.system.domain.vo.CompetitionTeamIntegralVo; +import com.ruoyi.system.domain.vo.CompetitionTeamVsTeamRequest; import com.ruoyi.system.domain.vo.CompetitionTeamVsTeamVo; import com.ruoyi.system.domain.vo.CompetitionUnifiedRecordVo; +import com.ruoyi.system.utils.UtilTool; import io.seata.core.model.Result; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -113,4 +124,54 @@ public class CompetitionTeamVsTeamController extends BaseController public AjaxResult getCompetitionVsRecordById(@PathVariable("id") Long id) { return AjaxResult.success(competitionTeamVsTeamService.getCompetitionVsRecordById(id)); } + + @PostMapping("/getCompetitionSchedule") + @ResponseBody + @ApiOperation(ApiTerminal.wxMiniProgram+"分页获取赛事-赛程列表") + public TableDataInfo getCompetitionSchedule(@RequestBody CompetitionTeamVsTeam entity) throws ParseException { + startPage(); + //关键字word包含:球队名称、地点名称、球馆名称,支持模糊搜索; + List listMap = new ArrayList<>(); + entity.setIsDeleted(0); + Map> map = competitionTeamVsTeamService.getCompetitionSchedule(entity); + for(Map.Entry> entry:map.entrySet()){ + CompetitionTeamVsTeamRequest request =new CompetitionTeamVsTeamRequest(); + request.setCompetitionDate(entry.getKey()); + request.setWeekDay(UtilTool.dateToWeek(entry.getKey())); + request.setTeamVsTeamList(entry.getValue()); + request.setCompetitionId(entity.getCompetitionId()); + request.setIsDisabled(UtilTool.compareToDate(entry.getKey(),new Date())); + listMap.add(request); + } + return getDataTable(listMap); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"根据赛会ID获取所有球队的积分列表") + @GetMapping("/competitionTeamIntegralList/{id}") + @ResponseBody + public TableDataInfo competitionTeamIntegralList(@PathVariable("id") Long id) throws Exception { + List list = competitionTeamVsTeamService.getCompetitionTeamIntegralListById(id); + return getDataTable(list); + } + + + @PostMapping("/competitionScheduleSubmit") + @ResponseBody + @ApiOperation(value = "赛事-比赛赛程提交") + public AjaxResult competitionScheduleSubmit(@RequestBody List vsTeamRequestList){ + return AjaxResult.success(competitionTeamVsTeamService.competitionScheduleSubmit(vsTeamRequestList)); + } + /** + * 赛事队伍积分提交 + * @param request + * @return + */ + @PostMapping("/competitionScoreSubmit") + @ResponseBody + @ApiOperation(value = "赛事队伍积分提交") + public AjaxResult competitionScoreSubmit(@RequestBody List request){ + if(UtilTool.isNull(request)){ + throw new CheckedException("参数不能为空"); + } + return AjaxResult.success(competitionTeamVsTeamService.competitionScoreSubmit(request)); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/DataDictionaryController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/DataDictionaryController.java new file mode 100644 index 000000000..0bf597482 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/DataDictionaryController.java @@ -0,0 +1,119 @@ +package com.ruoyi.system.controller; + +import java.util.HashMap; +import java.util.List; +import java.io.IOException; +import java.util.Map; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.DataDictionary; +import com.ruoyi.system.service.IDataDictionaryService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/dictionary") +public class DataDictionaryController extends BaseController +{ + @Autowired + private IDataDictionaryService dataDictionaryService; + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:dictionary:list") + @GetMapping("/list") + public TableDataInfo list(DataDictionary dataDictionary) + { + startPage(); + List list = dataDictionaryService.selectDataDictionaryList(dataDictionary); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:dictionary:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DataDictionary dataDictionary) + { + List list = dataDictionaryService.selectDataDictionaryList(dataDictionary); + ExcelUtil util = new ExcelUtil(DataDictionary.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:dictionary:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(dataDictionaryService.selectDataDictionaryById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:dictionary:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DataDictionary dataDictionary) + { + return toAjax(dataDictionaryService.insertDataDictionary(dataDictionary)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:dictionary:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DataDictionary dataDictionary) + { + return toAjax(dataDictionaryService.updateDataDictionary(dataDictionary)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:dictionary:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(dataDictionaryService.deleteDataDictionaryByIds(ids)); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"通过parentKey获取数据字典") + @GetMapping(value = "/getChildByParentKey/{parentKey}") + AjaxResult getChildByParentKey(@PathVariable("parentKey") String parentKey){ + if(StringUtils.isBlank(parentKey)){ + throw new IllegalArgumentException("参数["+parentKey+"]不能为空"); + } + return AjaxResult.success(dataDictionaryService.getChildByParentKey(parentKey)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/FeatureLabelController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/FeatureLabelController.java new file mode 100644 index 000000000..4b468672d --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/FeatureLabelController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.FeatureLabel; +import com.ruoyi.system.service.IFeatureLabelService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 球馆特征Controller + * + * @author ruoyi + * @date 2023-07-06 + */ +@RestController +@RequestMapping("/featureLabel") +public class FeatureLabelController extends BaseController +{ + @Autowired + private IFeatureLabelService featureLabelService; + + /** + * 查询球馆特征列表 + */ + @RequiresPermissions("system:featureLabel:list") + @GetMapping("/list") + public TableDataInfo list(FeatureLabel featureLabel) + { + startPage(); + List list = featureLabelService.selectFeatureLabelList(featureLabel); + return getDataTable(list); + } + + /** + * 导出球馆特征列表 + */ + @RequiresPermissions("system:featureLabel:export") + @Log(title = "球馆特征", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, FeatureLabel featureLabel) + { + List list = featureLabelService.selectFeatureLabelList(featureLabel); + ExcelUtil util = new ExcelUtil(FeatureLabel.class); + util.exportExcel(response, list, "球馆特征数据"); + } + + /** + * 获取球馆特征详细信息 + */ + @RequiresPermissions("system:featureLabel:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(featureLabelService.selectFeatureLabelById(id)); + } + + /** + * 新增球馆特征 + */ + @RequiresPermissions("system:featureLabel:add") + @Log(title = "球馆特征", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody FeatureLabel featureLabel) + { + return toAjax(featureLabelService.insertFeatureLabel(featureLabel)); + } + + /** + * 修改球馆特征 + */ + @RequiresPermissions("system:featureLabel:edit") + @Log(title = "球馆特征", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody FeatureLabel featureLabel) + { + return toAjax(featureLabelService.updateFeatureLabel(featureLabel)); + } + + /** + * 删除球馆特征 + */ + @RequiresPermissions("system:featureLabel:remove") + @Log(title = "球馆特征", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(featureLabelService.deleteFeatureLabelByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/GlobalAttachmentController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/GlobalAttachmentController.java new file mode 100644 index 000000000..6635d411c --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/GlobalAttachmentController.java @@ -0,0 +1,110 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import io.seata.core.model.Result; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.GlobalAttachment; +import com.ruoyi.system.service.IGlobalAttachmentService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/globalAttachment") +public class GlobalAttachmentController extends BaseController +{ + @Autowired + private IGlobalAttachmentService globalAttachmentService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:attachment:list") + @GetMapping("/list") + public TableDataInfo list(GlobalAttachment globalAttachment) + { + startPage(); + List list = globalAttachmentService.selectGlobalAttachmentList(globalAttachment); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:attachment:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, GlobalAttachment globalAttachment) + { + List list = globalAttachmentService.selectGlobalAttachmentList(globalAttachment); + ExcelUtil util = new ExcelUtil(GlobalAttachment.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:attachment:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(globalAttachmentService.selectGlobalAttachmentById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:attachment:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody GlobalAttachment globalAttachment) + { + return toAjax(globalAttachmentService.insertGlobalAttachment(globalAttachment)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:attachment:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody GlobalAttachment globalAttachment) + { + return toAjax(globalAttachmentService.updateGlobalAttachment(globalAttachment)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:attachment:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(globalAttachmentService.deleteGlobalAttachmentByIds(ids)); + } + + @ApiOperation(ApiTerminal.wxMiniProgram+"查询首页图片") + @PostMapping("/getBanner") + @ResponseBody + public TableDataInfo getBanner(@RequestBody GlobalAttachment entity) throws Exception { + List list = globalAttachmentService.selectGlobalAttachmentList(entity); + return getDataTable(list); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/GroupWechatController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/GroupWechatController.java new file mode 100644 index 000000000..a12672ed7 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/GroupWechatController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.GroupWechat; +import com.ruoyi.system.service.IGroupWechatService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/weChat") +public class GroupWechatController extends BaseController +{ + @Autowired + private IGroupWechatService groupWechatService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:wechat:list") + @GetMapping("/list") + public TableDataInfo list(GroupWechat groupWechat) + { + startPage(); + List list = groupWechatService.selectGroupWechatList(groupWechat); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:wechat:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, GroupWechat groupWechat) + { + List list = groupWechatService.selectGroupWechatList(groupWechat); + ExcelUtil util = new ExcelUtil(GroupWechat.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:wechat:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(groupWechatService.selectGroupWechatById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:wechat:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody GroupWechat groupWechat) + { + return toAjax(groupWechatService.insertGroupWechat(groupWechat)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:wechat:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody GroupWechat groupWechat) + { + return toAjax(groupWechatService.updateGroupWechat(groupWechat)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:wechat:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(groupWechatService.deleteGroupWechatByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MessageController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MessageController.java new file mode 100644 index 000000000..a1752f3f2 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MessageController.java @@ -0,0 +1,111 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import io.seata.core.model.Result; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.Message; +import com.ruoyi.system.service.IMessageService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/message") +public class MessageController extends BaseController +{ + @Autowired + private IMessageService messageService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:message:list") + @GetMapping("/list") + public TableDataInfo list(Message message) + { + startPage(); + List list = messageService.selectMessageList(message); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:message:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Message message) + { + List list = messageService.selectMessageList(message); + ExcelUtil util = new ExcelUtil(Message.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:message:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(messageService.selectMessageById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:message:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Message message) + { + return toAjax(messageService.insertMessage(message)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:message:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Message message) + { + return toAjax(messageService.updateMessage(message)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:message:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(messageService.deleteMessageByIds(ids)); + } + + @ApiOperation(ApiTerminal.wxMiniProgram+"我的消息列表") + @PostMapping("/getMessagePage") + @ResponseBody + public TableDataInfo getMessageList(@RequestBody Message message) throws Exception { + startPage(); + List list = messageService.selectMessageList(message); + return getDataTable(list); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ShAreaController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ShAreaController.java new file mode 100644 index 000000000..a69222f01 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ShAreaController.java @@ -0,0 +1,119 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import io.seata.core.model.Result; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.ShArea; +import com.ruoyi.system.service.IShAreaService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/shArea") +public class ShAreaController extends BaseController +{ + @Autowired + private IShAreaService shAreaService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:area:list") + @GetMapping("/list") + public TableDataInfo list(ShArea shArea) + { + startPage(); + List list = shAreaService.selectShAreaList(shArea); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:area:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ShArea shArea) + { + List list = shAreaService.selectShAreaList(shArea); + ExcelUtil util = new ExcelUtil(ShArea.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:area:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(shAreaService.selectShAreaById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:area:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ShArea shArea) + { + return toAjax(shAreaService.insertShArea(shArea)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:area:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ShArea shArea) + { + return toAjax(shAreaService.updateShArea(shArea)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:area:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(shAreaService.deleteShAreaByIds(ids)); + } + + @ApiOperation(ApiTerminal.wxMiniProgram+"查询离得最近的城市") + @PostMapping("/findMyCity") + @ResponseBody + public TableDataInfo findMyCity(@RequestBody ShArea entity) throws Exception { + List list = shAreaService.findMyCity(entity); + return getDataTable(list); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"获取所有城市接口") + @PostMapping("/findAllCity") + @ResponseBody + public TableDataInfo findAllCity() throws Exception { + ShArea entity=new ShArea(); + entity.setLevel(2); + List list = shAreaService.selectShAreaList(entity); + return getDataTable(list); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/TeamMembersController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/TeamMembersController.java index c98c50f47..d9e92bb63 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/TeamMembersController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/TeamMembersController.java @@ -4,16 +4,13 @@ import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import com.ruoyi.system.domain.vo.TeamMembersResponse; import com.ruoyi.system.domain.vo.TeamMembersVo; +import io.seata.core.model.Result; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; @@ -104,4 +101,11 @@ public class TeamMembersController extends BaseController { return toAjax(teamMembersService.deleteTeamMembersByIds(ids)); } + @ApiOperation(ApiTerminal.wxMiniProgram+"根据球队ID查询加入球队的队员列表") + @PostMapping("/getTeamMembersByTeamId") + @ResponseBody + public TableDataInfo getTeamMembersByTeamId(@RequestParam("teamId") Long teamId) throws Exception { + List list = teamMembersService.getTeamMembersByTeamId(teamId); + return getDataTable(list); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/TokenInfoController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/TokenInfoController.java new file mode 100644 index 000000000..0ab5c4b3e --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/TokenInfoController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.TokenInfo; +import com.ruoyi.system.service.ITokenInfoService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/tokenInfo") +public class TokenInfoController extends BaseController +{ + @Autowired + private ITokenInfoService tokenInfoService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:info:list") + @GetMapping("/list") + public TableDataInfo list(TokenInfo tokenInfo) + { + startPage(); + List list = tokenInfoService.selectTokenInfoList(tokenInfo); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:info:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TokenInfo tokenInfo) + { + List list = tokenInfoService.selectTokenInfoList(tokenInfo); + ExcelUtil util = new ExcelUtil(TokenInfo.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:info:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(tokenInfoService.selectTokenInfoById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:info:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody TokenInfo tokenInfo) + { + return toAjax(tokenInfoService.insertTokenInfo(tokenInfo)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:info:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody TokenInfo tokenInfo) + { + return toAjax(tokenInfoService.updateTokenInfo(tokenInfo)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:info:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(tokenInfoService.deleteTokenInfoByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/TrainingInfoController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/TrainingInfoController.java new file mode 100644 index 000000000..5962d0196 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/TrainingInfoController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.TrainingInfo; +import com.ruoyi.system.service.ITrainingInfoService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/trainingInfo") +public class TrainingInfoController extends BaseController +{ + @Autowired + private ITrainingInfoService trainingInfoService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:info:list") + @GetMapping("/list") + public TableDataInfo list(TrainingInfo trainingInfo) + { + startPage(); + List list = trainingInfoService.selectTrainingInfoList(trainingInfo); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:info:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TrainingInfo trainingInfo) + { + List list = trainingInfoService.selectTrainingInfoList(trainingInfo); + ExcelUtil util = new ExcelUtil(TrainingInfo.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:info:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(trainingInfoService.selectTrainingInfoById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:info:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody TrainingInfo trainingInfo) + { + return toAjax(trainingInfoService.insertTrainingInfo(trainingInfo)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:info:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody TrainingInfo trainingInfo) + { + return toAjax(trainingInfoService.updateTrainingInfo(trainingInfo)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:info:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(trainingInfoService.deleteTrainingInfoByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserBuildingRelController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserBuildingRelController.java new file mode 100644 index 000000000..da8cef311 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserBuildingRelController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.UserBuildingRel; +import com.ruoyi.system.service.IUserBuildingRelService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/rel") +public class UserBuildingRelController extends BaseController +{ + @Autowired + private IUserBuildingRelService userBuildingRelService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:rel:list") + @GetMapping("/list") + public TableDataInfo list(UserBuildingRel userBuildingRel) + { + startPage(); + List list = userBuildingRelService.selectUserBuildingRelList(userBuildingRel); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:rel:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, UserBuildingRel userBuildingRel) + { + List list = userBuildingRelService.selectUserBuildingRelList(userBuildingRel); + ExcelUtil util = new ExcelUtil(UserBuildingRel.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:rel:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(userBuildingRelService.selectUserBuildingRelById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:rel:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody UserBuildingRel userBuildingRel) + { + return toAjax(userBuildingRelService.insertUserBuildingRel(userBuildingRel)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:rel:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody UserBuildingRel userBuildingRel) + { + return toAjax(userBuildingRelService.updateUserBuildingRel(userBuildingRel)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:rel:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(userBuildingRelService.deleteUserBuildingRelByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserRoleController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserRoleController.java new file mode 100644 index 000000000..0730c3386 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserRoleController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.UserRole; +import com.ruoyi.system.service.IUserRoleService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-07-04 + */ +@RestController +@RequestMapping("/wxUserRole") +public class UserRoleController extends BaseController +{ + @Autowired + private IUserRoleService userRoleService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:role:list") + @GetMapping("/list") + public TableDataInfo list(UserRole userRole) + { + startPage(); + List list = userRoleService.selectUserRoleList(userRole); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:role:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, UserRole userRole) + { + List list = userRoleService.selectUserRoleList(userRole); + ExcelUtil util = new ExcelUtil(UserRole.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:role:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(userRoleService.selectUserRoleById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:role:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody UserRole userRole) + { + return toAjax(userRoleService.insertUserRole(userRole)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:role:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody UserRole userRole) + { + return toAjax(userRoleService.updateUserRole(userRole)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:role:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(userRoleService.deleteUserRoleByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserWxAqrCodeController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserWxAqrCodeController.java index 34a855459..c1e90539f 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserWxAqrCodeController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserWxAqrCodeController.java @@ -9,6 +9,7 @@ import com.ruoyi.system.domain.WxUser; import com.ruoyi.system.domain.vo.UserWxAqrCodeVo; import com.ruoyi.system.service.IWxBasketballTeamService; import com.ruoyi.system.service.IWxUserService; +import io.swagger.annotations.ApiOperation; import org.apache.commons.lang.ObjectUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxApplesCodeController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxApplesCodeController.java index f252b78c5..6be0b78ec 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxApplesCodeController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxApplesCodeController.java @@ -6,16 +6,30 @@ import com.ruoyi.common.core.web.page.TableDataInfo; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; import com.ruoyi.system.api.domain.vo.WxAppletsCodeVo; import com.ruoyi.system.domain.UserWxAqrCode; import com.ruoyi.system.domain.vo.UserWxAqrCodeVo; import com.ruoyi.system.service.IWxUserService; import com.ruoyi.system.service.WxApplesCodeService; +import io.seata.core.model.Result; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.*; +import org.springframework.web.client.RestTemplate; +import sun.misc.BASE64Encoder; import javax.annotation.Resource; -import java.util.List; +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.*; /** * @author 吴一博 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxAppletsController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxAppletsController.java new file mode 100644 index 000000000..e0fdb7f2b --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxAppletsController.java @@ -0,0 +1,153 @@ +package com.ruoyi.system.controller; + +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import com.ruoyi.system.api.domain.vo.WxAppletsCodeVo; +import com.ruoyi.system.service.WxAppletsService; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.client.RestTemplate; +import sun.misc.BASE64Encoder; + +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +/** + * @author 吴一博 + * @date 2023年07月08日 18:11 + * @Description + */ +@RestController +@RequestMapping("/wxApplets") +public class WxAppletsController { + @Autowired + private WxAppletsService wxAppletsService; + @Autowired + private RestTemplate restTemplate; + @Value("${image.location.linux}") + private String linuxLocation; + @Value("${image.location.windows}") + private String winLocation; + @Value("${image.domainName}") + private String domainName; + + @PostMapping("/getWxacodeunlimit") + @ApiOperation(ApiTerminal.wxMiniProgram +"微信小程序-获取小程序码") + @ResponseBody + public AjaxResult getWxacodeunlimit(@RequestBody WxAppletsCodeVo wxAppletsCodeVo) throws Exception { + if(restTemplate==null){ + restTemplate = new RestTemplate(); + } + InputStream inputStream = null; + OutputStream outputStream = null; + //根据APPid和密钥获取存取令牌 + try { + String url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + wxAppletsService.getAccessToken(); + //定义生产二维码所需的参数、样式 + Map param = new HashMap<>(); + param.put("scene", wxAppletsCodeVo.getScene()); + param.put("page", wxAppletsCodeVo.getPage()); + param.put("width", StringUtils.isEmpty(wxAppletsCodeVo.getPage())?10:wxAppletsCodeVo.getPage()); + param.put("auto_color", wxAppletsCodeVo.getAutoColor()==null?false:wxAppletsCodeVo.getAutoColor()); + param.put("is_hyaline",wxAppletsCodeVo.getIsHyaline()==null?false:wxAppletsCodeVo.getIsHyaline()); + Map line_color = new HashMap<>(); + line_color.put("r", 0); + line_color.put("g", 0); + line_color.put("b", 0); + param.put("line_color", line_color); + System.out.println(param+"调用微信URL传参"); + MultiValueMap headers = new LinkedMultiValueMap<>(); + HttpEntity requestEntity = new HttpEntity(param, headers); + //System.out.println("协议请求头"+headers+""+requestEntity); + ResponseEntity entity = restTemplate.exchange(url, HttpMethod.POST, requestEntity, byte[].class, new Object[0]); + // LOG.info("调用小程序生成微信永久小程序码URL接口返回结果:" + entity.getBody()); + // System.out.println("返回结果"+entity.getBody()+".."+entity); + byte[] result = entity.getBody(); +// LOG.info(Base64.encodeBase64String(result)); + // System.out.println("不知道是什么:"+Base64.encodeBase64String(result)); + inputStream = new ByteArrayInputStream(result); +// 生成随机数命名图片 + String filename = UUID.randomUUID().toString(); + // System.out.println(filename); + Date date = new Date(); + String time = new SimpleDateFormat("yyyy-MM-dd").format(date); + String[] str = time.split("-");//根据‘-’进行拆分字符串 拆分出来的日期有,年,日,月,根据年日月创建文件夹 + String datePath="/"+str[0]+"/"+str[1]+"/"+str[2]+"/"; + //创建文件夹 + String xdpath = datePath+filename+".png"; + String filePath = linuxLocation+datePath+filename+".png"; +// 服务器存放位置 + File file = new File(filePath); + //文件目录不存在需要先创建 + if(!file.getParentFile().exists()){ + file.getParentFile().mkdirs(); + } + outputStream = new FileOutputStream(file); + int len = 0; + byte[] buf = new byte[1024]; + while ((len = inputStream.read(buf, 0, 1024)) != -1) { + outputStream.write(buf, 0, len); + } + outputStream.flush(); + wxAppletsCodeVo.setBase64(getBase64(file)); + wxAppletsCodeVo.setCodeImgUrl(domainName+xdpath); + return AjaxResult.success(wxAppletsCodeVo); + + } catch (Exception e) { +// LOG.error("调用小程序生成微信永久小程序码URL接口异常", e); + } finally { + if (inputStream != null) { + try { + inputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (outputStream != null) { + try { + outputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + System.out.println("获取二维码"); + return AjaxResult.success(wxAppletsCodeVo); + } + + public String getBase64(File file){ + String imgStr = ""; + try { + FileInputStream fis = new FileInputStream(file); + byte[] buffer = new byte[(int) file.length()]; + int offset = 0; + int numRead = 0; + while (offset < buffer.length && (numRead = fis.read(buffer, offset, buffer.length - offset)) >= 0) { + offset += numRead; + } + + if (offset != buffer.length) { + throw new IOException("Could not completely read file " + + file.getName()); + } + fis.close(); + BASE64Encoder encoder = new BASE64Encoder(); + imgStr = encoder.encode(buffer); + } catch (Exception e) { + e.printStackTrace(); + } + return imgStr; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxBasketballTeamController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxBasketballTeamController.java index 95792e639..212903d84 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxBasketballTeamController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxBasketballTeamController.java @@ -1,17 +1,16 @@ package com.ruoyi.system.controller; import java.util.List; -import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.api.model.WxLoginUser; +import com.ruoyi.system.utils.LoginUserUtil; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; @@ -102,4 +101,13 @@ public class WxBasketballTeamController extends BaseController { return toAjax(wxBasketballTeamService.deleteWxBasketballTeamByIds(ids)); } + @PostMapping("/getMyBasketBallTeam") + @ResponseBody + @ApiOperation(value = ApiTerminal.wxMiniProgram+"分页获取我的球队列表") + public TableDataInfo getMyBasketBallTeam(@RequestBody WxBasketballTeam entity){ + LoginUser user = SecurityUtils.getLoginUser(); + entity.setCreatedId(user.getUserid()); + List list =wxBasketballTeamService.getMyBasketBallTeam(entity); + return getDataTable(list); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxBuildingInfoController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxBuildingInfoController.java index 9e90fafdf..a2681efa4 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxBuildingInfoController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxBuildingInfoController.java @@ -1,17 +1,25 @@ package com.ruoyi.system.controller; +import java.util.Date; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.api.model.WxLoginUser; +import com.ruoyi.system.domain.BuildingInfoDetail; +import com.ruoyi.system.domain.vo.BuildingInfoRequest; +import com.ruoyi.system.domain.vo.BuildingInfoResponse; +import com.ruoyi.system.service.IBuildingInfoDetailService; +import com.ruoyi.system.utils.LoginUserUtil; +import io.seata.core.model.Result; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; @@ -29,11 +37,13 @@ import com.ruoyi.common.core.web.page.TableDataInfo; * @date 2022-08-30 */ @RestController -@RequestMapping("/WxBuilding") +@RequestMapping("/wxBuildingInfo") public class WxBuildingInfoController extends BaseController { @Autowired private IWxBuildingInfoService wxBuildingInfoService; + @Autowired + private IBuildingInfoDetailService buildingInfoDetailService; /** * 查询球场管理列表 @@ -102,4 +112,95 @@ public class WxBuildingInfoController extends BaseController { return toAjax(wxBuildingInfoService.deleteWxBuildingInfoByIds(ids)); } + + @ApiOperation(ApiTerminal.wxMiniProgram+"保存") + @PostMapping("/save") + @ResponseBody + public AjaxResult save(@RequestBody BuildingInfoRequest entity) throws Exception { + LoginUser user = SecurityUtils.getLoginUser(); + WxBuildingInfo buildingInfo=new WxBuildingInfo(); + BeanUtils.copyProperties(entity,buildingInfo); + buildingInfo.setCreatedTime(new Date()); + buildingInfo.setCreatedBy(String.valueOf(user.getUserid())); + if(!ObjectUtils.isEmpty(buildingInfo.getId())){ + wxBuildingInfoService.updateWxBuildingInfo(buildingInfo); + }else{ + //设置球场创建人 + buildingInfo.setCreatedId(user.getUserid()); + wxBuildingInfoService.insertWxBuildingInfo(buildingInfo); + } + BuildingInfoDetail detail=new BuildingInfoDetail(); + BuildingInfoDetail details=new BuildingInfoDetail(); + details.setBuildingId(buildingInfo.getId()); + List detailList=buildingInfoDetailService.selectBuildingInfoDetailList(details); + BeanUtils.copyProperties(entity,detail); + if(detailList.size()>0){ + detail.setId(detailList.get(0).getId()); + detail.setBuildingId(buildingInfo.getId()); + buildingInfoDetailService.updateBuildingInfoDetail(detail); + }else{ + detail.setId(null); + if(ObjectUtils.isEmpty(entity.getOpenId())){ + detail.setCreatedBy("admin"); + detail.setCreatedTime(new Date()); + } + detail.setBuildingId(buildingInfo.getId()); + buildingInfoDetailService.insertBuildingInfoDetail(detail); + } + return AjaxResult.success(Boolean.TRUE); + } + + @ApiOperation(ApiTerminal.wxMiniProgram+"获取附近球场列表") + @PostMapping("/findNearbyBuilding") + @ResponseBody + public TableDataInfo findNearbyBuilding(@RequestBody WxBuildingInfo entity) throws Exception { + List list = wxBuildingInfoService.findNearbyBuilding(entity); + return getDataTable(list); + } + + @PostMapping("/getBuildingByCity") + @ApiOperation(ApiTerminal.wxMiniProgram+"获取球场列表") + @ResponseBody + public TableDataInfo getBuildingByCity(@RequestBody WxBuildingInfo entity){ + List list = wxBuildingInfoService.getBuildingByCity(entity); + return getDataTable(list); + + } + + @PostMapping("/getAuditList") + @ResponseBody + @ApiOperation(value = ApiTerminal.wxMiniProgram+"获取审核球场列表") + public TableDataInfo getAuditPage(@RequestBody BuildingInfoRequest entity){ + startPage(); + WxBuildingInfo buildingInfo=new WxBuildingInfo(); + BeanUtils.copyProperties(entity,buildingInfo); + if(!ObjectUtils.isEmpty(entity.getOpenId())){ + buildingInfo.setCreatedBy(entity.getOpenId()); + } + List list =wxBuildingInfoService.getAuditPage(buildingInfo); + return getDataTable(list); + } + @ApiOperation(ApiTerminal.wxMiniProgram+"根据ID查询场地明细信息") + @GetMapping("/findAllInfoById/{id}") + @ResponseBody + public AjaxResult findAllInfoById(@PathVariable("id") Long id) throws Exception { + BuildingInfoResponse entity = wxBuildingInfoService.findAllInfoById(id); + return AjaxResult.success(entity); + } + @PostMapping("/getAllBuildingByCondition") + @ResponseBody + @ApiOperation(value = ApiTerminal.wxMiniProgram+"分页获取球场列表") + public TableDataInfo getAllBuildingByCondition(@RequestBody BuildingInfoRequest entity){ + List list =wxBuildingInfoService.getAllBuildingByCondition(entity); + for(BuildingInfoResponse response:list){ + if(1==response.getStatus()){ + response.setStatusName("待审核"); + }else if(2==response.getStatus()){ + response.setStatusName("已审核"); + }else if(3==response.getStatus()){ + response.setStatusName("已拒绝"); + } + } + return getDataTable(list); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxLoginController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxLoginController.java new file mode 100644 index 000000000..b32e88f66 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxLoginController.java @@ -0,0 +1,68 @@ +package com.ruoyi.system.controller; + +import com.alibaba.fastjson.JSON; +import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.security.annotation.InnerAuth; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.api.model.WxLoginUser; +import com.ruoyi.system.domain.vo.WxLoginRequest; +import com.ruoyi.system.domain.vo.WxRegisterRequest; +import com.ruoyi.system.service.WxLoginService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * 微信小程序登录Controller + * + * @author wyb + * @date 2023-07-06 + */ +@RestController +@RequestMapping(value="/wxLogin") +@Api(description = ApiTerminal.wxMiniProgram+"登录接口") +public class WxLoginController { + + @Resource + private WxLoginService wxLoginService; + + @ApiOperation(ApiTerminal.wxMiniProgram+"wx用户登录") + @PostMapping("/loginInFromWx") + @ResponseBody + public AjaxResult loginInFromWx(@RequestBody WxLoginRequest entity) throws Exception { + WxLoginUser loginUser=wxLoginService.loginInFromWx(entity); + return AjaxResult.success(loginUser); + } + + + @PostMapping("/user/register") + @ApiOperation(value = ApiTerminal.wxMiniProgram+"用户注册接口") + public AjaxResult register(@RequestBody WxRegisterRequest entity){ + //loginFeign.register(entity); + return AjaxResult.success("注册成功"); + } + + @ApiOperation("用户登出") + @GetMapping("/loginOut") + @ResponseBody + public AjaxResult loginOut(@PathVariable("id") Long id) throws Exception { + return AjaxResult.success("登出成功"); + } + + /** + * 获取当前用户信息 + */ + @InnerAuth + @PostMapping("/getWxUserInfo") + public R getWxUserInfo(@RequestBody LoginUser loginUser) + { + LoginUser loginUser1=wxLoginService.loginFromWx(loginUser); + System.out.println(JSON.toJSONString(loginUser1)); + return R.ok(loginUser1); + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxUserController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxUserController.java index 5f9e13ab0..ecaeafc26 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxUserController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/WxUserController.java @@ -1,17 +1,29 @@ package com.ruoyi.system.controller; +import java.security.InvalidParameterException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.List; import java.io.IOException; +import java.util.Map; +import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; + +import com.github.pagehelper.util.StringUtil; +import com.ruoyi.common.swagger.apiConstants.ApiTerminal; +import com.ruoyi.system.domain.UserRole; +import com.ruoyi.system.domain.vo.PersonalCareerVo; +import com.ruoyi.system.domain.vo.UserInfoResponse; +import com.ruoyi.system.service.ICompetitionMembersScoreService; +import com.ruoyi.system.service.IDataDictionaryService; +import com.ruoyi.system.service.IUserRoleService; +import com.ruoyi.system.utils.AgeUtils; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; @@ -34,7 +46,12 @@ public class WxUserController extends BaseController { @Autowired private IWxUserService wxUserService; - + @Autowired + private IDataDictionaryService dataDictionaryService; + @Autowired + private IUserRoleService userRoleService; + @Autowired + private ICompetitionMembersScoreService competitionMembersScoreService; /** * 查询微信用户列表 */ @@ -102,4 +119,67 @@ public class WxUserController extends BaseController { return toAjax(wxUserService.deleteWxUserByIds(ids)); } + + @ApiOperation(ApiTerminal.wxMiniProgram+"根据用户id查询个人中心详情") + @PostMapping("/detail/{userId}") + @ResponseBody + public AjaxResult detail(@PathVariable("userId") Long userId){ + UserInfoResponse userInfoResponse = new UserInfoResponse(); + //查询用户基本信息 + WxUser userInfo = wxUserService.selectWxUserById(userId); + if(userInfo==null){ + throw new InvalidParameterException("根据传入的userId【"+userId+"】未查询到用户信息"); + } + //赋值 + BeanUtils.copyProperties(userInfo,userInfoResponse); + + if(ObjectUtils.isNotEmpty(userInfo.getBirthday())){ + //根据日期计算年龄 + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + String birthTimeString = format.format(userInfo.getBirthday()); + userInfoResponse.setAge(AgeUtils.getAgeFromBirthTime(birthTimeString)); + } + + //球队位置组装 + if(userInfo.getTeamPosition()!=null){ + Map teamPositionMap = dataDictionaryService.getChildByParentKey("teamPosition"); + String[] teamPositionArgs = userInfo.getTeamPosition().split(","); + if(teamPositionArgs!=null&&teamPositionArgs.length>0){ + List teamPositionName = new ArrayList<>(); + for(String teamPosition : teamPositionArgs){ + teamPositionName.add(teamPositionMap.get(teamPosition)); + } + userInfoResponse.setTeamPositionName(teamPositionName); + } + } + + //标签数据组装 + if(userInfo.getTag()!=null){ + Map tagMap = dataDictionaryService.getChildByParentKey("tag"); + String[] tagArgs = userInfo.getTag().split(","); + if(tagArgs!=null&&tagArgs.length>0){ + List tagName = new ArrayList<>(); + for(String tag : tagArgs){ + tagName.add(tagMap.get(tag)); + } + userInfoResponse.setTagName(tagName); + } + } + + //查询此用户的角色有哪些 + UserRole userRole=new UserRole(); + userRole.setUserId(userId); + List userRoles=userRoleService.selectUserRoleList(userRole); + if(!StringUtils.isEmpty(userRoles)&&userRoles.size()>0){ + userInfoResponse.setRoleCodes(userRoles.stream().map(UserRole::getRoleCode).collect(Collectors.toList())); + } + + //个人生涯 + PersonalCareerVo personalCareerVo = competitionMembersScoreService.getUserScoreByUserId(userId); + if(personalCareerVo==null){ + personalCareerVo = new PersonalCareerVo(); + } + userInfoResponse.setPersonalCareerVo(personalCareerVo); + return AjaxResult.success(userInfoResponse); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingInfoDetail.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingInfoDetail.java new file mode 100644 index 000000000..cee7477b8 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingInfoDetail.java @@ -0,0 +1,78 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.*; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 building_info_detail + * + * @author ruoyi + * @date 2023-07-06 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) +public class BuildingInfoDetail extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long buildingId; + + /** 营业时间 */ + @Excel(name = "营业时间") + private String businessHours; + + /** 联系人 */ + @Excel(name = "联系人") + private String linkman; + + /** 联系电话 */ + @Excel(name = "联系电话") + private String linkphone; + + /** 收费标准 */ + @Excel(name = "收费标准") + private String feeStandard; + + /** 球馆标签 */ + @Excel(name = "球馆标签") + private String labelDesc; + + /** 公告 */ + @Excel(name = "公告") + private String notice; + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingLabel.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingLabel.java new file mode 100644 index 000000000..0fca87039 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingLabel.java @@ -0,0 +1,138 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 building_label + * + * @author ruoyi + * @date 2023-07-04 + */ +public class BuildingLabel extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Integer isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** 场馆id */ + @Excel(name = "场馆id") + private Long buildingId; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long featureLabelId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setIsDeleted(Integer isDeleted) + { + this.isDeleted = isDeleted; + } + + public Integer getIsDeleted() + { + return isDeleted; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + public void setBuildingId(Long buildingId) + { + this.buildingId = buildingId; + } + + public Long getBuildingId() + { + return buildingId; + } + public void setFeatureLabelId(Long featureLabelId) + { + this.featureLabelId = featureLabelId; + } + + public Long getFeatureLabelId() + { + return featureLabelId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("isDeleted", getIsDeleted()) + .append("createdTime", getCreatedTime()) + .append("createdBy", getCreatedBy()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .append("buildingId", getBuildingId()) + .append("featureLabelId", getFeatureLabelId()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingTeamRel.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingTeamRel.java new file mode 100644 index 000000000..95da08a34 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingTeamRel.java @@ -0,0 +1,137 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 building_team_rel + * + * @author ruoyi + * @date 2023-07-04 + */ +public class BuildingTeamRel extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** 场馆id */ + @Excel(name = "场馆id") + private Long buildingId; + + /** 球队场馆关联表 */ + @Excel(name = "球队场馆关联表") + private Long teamId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setIsDeleted(String isDeleted) + { + this.isDeleted = isDeleted; + } + + public String getIsDeleted() + { + return isDeleted; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + public void setBuildingId(Long buildingId) + { + this.buildingId = buildingId; + } + + public Long getBuildingId() + { + return buildingId; + } + public void setTeamId(Long teamId) + { + this.teamId = teamId; + } + + public Long getTeamId() + { + return teamId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("isDeleted", getIsDeleted()) + .append("createdTime", getCreatedTime()) + .append("createdBy", getCreatedBy()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .append("buildingId", getBuildingId()) + .append("teamId", getTeamId()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CameraInfo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CameraInfo.java new file mode 100644 index 000000000..c4b549d96 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CameraInfo.java @@ -0,0 +1,208 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 camera_info + * + * @author ruoyi + * @date 2023-07-04 + */ +public class CameraInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** 状态 */ + @Excel(name = "状态") + private String status; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String cityCode; + + /** 产品类型 */ + @Excel(name = "产品类型") + private String type; + + /** 名称 */ + @Excel(name = "名称") + private String name; + + /** 设备号 */ + @Excel(name = "设备号") + private String sn; + + /** 场地ID */ + @Excel(name = "场地ID") + private Long buildingId; + + /** 播放路径 */ + @Excel(name = "播放路径") + private String url; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setIsDeleted(Long isDeleted) + { + this.isDeleted = isDeleted; + } + + public Long getIsDeleted() + { + return isDeleted; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + public void setCityCode(String cityCode) + { + this.cityCode = cityCode; + } + + public String getCityCode() + { + return cityCode; + } + public void setType(String type) + { + this.type = type; + } + + public String getType() + { + return type; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setSn(String sn) + { + this.sn = sn; + } + + public String getSn() + { + return sn; + } + public void setBuildingId(Long buildingId) + { + this.buildingId = buildingId; + } + + public Long getBuildingId() + { + return buildingId; + } + public void setUrl(String url) + { + this.url = url; + } + + public String getUrl() + { + return url; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("isDeleted", getIsDeleted()) + .append("createdTime", getCreatedTime()) + .append("createdBy", getCreatedBy()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .append("status", getStatus()) + .append("cityCode", getCityCode()) + .append("type", getType()) + .append("name", getName()) + .append("sn", getSn()) + .append("buildingId", getBuildingId()) + .append("remark", getRemark()) + .append("url", getUrl()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Competition.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Competition.java index 21eea9d89..f726601b8 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Competition.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Competition.java @@ -1,7 +1,10 @@ package com.ruoyi.system.domain; +import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.*; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -13,6 +16,12 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2022-11-02 */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) public class Competition extends BaseEntity { private static final long serialVersionUID = 1L; @@ -27,10 +36,14 @@ public class Competition extends BaseEntity /** 主队名 */ @Excel(name = "主队名") private String mainTeamName; + @ApiModelProperty(value = "主队logo", required = false) + private String mainTeamLogo; /** 客队ID */ @Excel(name = "客队ID") private Long guestTeamId; + @ApiModelProperty(value = "客队logo", required = false) + private String guestTeamLogo; /** 客队名 */ @Excel(name = "客队名") @@ -109,15 +122,15 @@ public class Competition extends BaseEntity /** 是否删除 */ @Excel(name = "是否删除") - private Long isDeleted; + private Integer isDeleted; /** 经度 */ @Excel(name = "经度") - private Long longitude; + private BigDecimal longitude; /** 纬度 */ @Excel(name = "纬度") - private Long latitude; + private BigDecimal latitude; /** 比赛性质(0=约战;1=赛事) */ @Excel(name = "比赛性质", readConverterExp = "0==约战;1=赛事") @@ -183,411 +196,4 @@ public class Competition extends BaseEntity @Excel(name = "赞助商") private String sponsor; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setMainTeamId(Long mainTeamId) - { - this.mainTeamId = mainTeamId; - } - - public Long getMainTeamId() - { - return mainTeamId; - } - public void setMainTeamName(String mainTeamName) - { - this.mainTeamName = mainTeamName; - } - - public String getMainTeamName() - { - return mainTeamName; - } - public void setGuestTeamId(Long guestTeamId) - { - this.guestTeamId = guestTeamId; - } - - public Long getGuestTeamId() - { - return guestTeamId; - } - public void setGuestTeamName(String guestTeamName) - { - this.guestTeamName = guestTeamName; - } - - public String getGuestTeamName() - { - return guestTeamName; - } - public void setCompetitionCode(String competitionCode) - { - this.competitionCode = competitionCode; - } - - public String getCompetitionCode() - { - return competitionCode; - } - public void setCompetitionName(String competitionName) - { - this.competitionName = competitionName; - } - - public String getCompetitionName() - { - return competitionName; - } - public void setDesignated(Integer designated) - { - this.designated = designated; - } - - public Integer getDesignated() - { - return designated; - } - public void setCompetitionType(Long competitionType) - { - this.competitionType = competitionType; - } - - public Long getCompetitionType() - { - return competitionType; - } - public void setCompetitionTime(Date competitionTime) - { - this.competitionTime = competitionTime; - } - - public Date getCompetitionTime() - { - return competitionTime; - } - public void setBuildingId(Long buildingId) - { - this.buildingId = buildingId; - } - - public Long getBuildingId() - { - return buildingId; - } - public void setBuildingName(String buildingName) - { - this.buildingName = buildingName; - } - - public String getBuildingName() - { - return buildingName; - } - public void setCompetitionAddress(String competitionAddress) - { - this.competitionAddress = competitionAddress; - } - - public String getCompetitionAddress() - { - return competitionAddress; - } - public void setFounder(Long founder) - { - this.founder = founder; - } - - public Long getFounder() - { - return founder; - } - public void setStatus(Integer status) - { - this.status = status; - } - - public Integer getStatus() - { - return status; - } - public void setCityCode(String cityCode) - { - this.cityCode = cityCode; - } - - public String getCityCode() - { - return cityCode; - } - public void setCityName(String cityName) - { - this.cityName = cityName; - } - - public String getCityName() - { - return cityName; - } - public void setMaxPlayer(Long maxPlayer) - { - this.maxPlayer = maxPlayer; - } - - public Long getMaxPlayer() - { - return maxPlayer; - } - public void setCreatedTime(Date createdTime) - { - this.createdTime = createdTime; - } - - public Date getCreatedTime() - { - return createdTime; - } - public void setLastUpdatedTime(Date lastUpdatedTime) - { - this.lastUpdatedTime = lastUpdatedTime; - } - - public Date getLastUpdatedTime() - { - return lastUpdatedTime; - } - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - public String getCreatedBy() - { - return createdBy; - } - public void setModifiedBy(String modifiedBy) - { - this.modifiedBy = modifiedBy; - } - - public String getModifiedBy() - { - return modifiedBy; - } - public void setIsDeleted(Long isDeleted) - { - this.isDeleted = isDeleted; - } - - public Long getIsDeleted() - { - return isDeleted; - } - public void setLongitude(Long longitude) - { - this.longitude = longitude; - } - - public Long getLongitude() - { - return longitude; - } - public void setLatitude(Long latitude) - { - this.latitude = latitude; - } - - public Long getLatitude() - { - return latitude; - } - public void setCompetitionNature(Integer competitionNature) - { - this.competitionNature = competitionNature; - } - - public Integer getCompetitionNature() - { - return competitionNature; - } - public void setEnrollBeginTime(Date enrollBeginTime) - { - this.enrollBeginTime = enrollBeginTime; - } - - public Date getEnrollBeginTime() - { - return enrollBeginTime; - } - public void setEnrollEndTime(Date enrollEndTime) - { - this.enrollEndTime = enrollEndTime; - } - - public Date getEnrollEndTime() - { - return enrollEndTime; - } - public void setContacts(String contacts) - { - this.contacts = contacts; - } - - public String getContacts() - { - return contacts; - } - public void setContactsAreaCode(String contactsAreaCode) - { - this.contactsAreaCode = contactsAreaCode; - } - - public String getContactsAreaCode() - { - return contactsAreaCode; - } - public void setContactsTel(String contactsTel) - { - this.contactsTel = contactsTel; - } - - public String getContactsTel() - { - return contactsTel; - } - public void setCompetitionBeginTime(Date competitionBeginTime) - { - this.competitionBeginTime = competitionBeginTime; - } - - public Date getCompetitionBeginTime() - { - return competitionBeginTime; - } - public void setCompetitionEndTime(Date competitionEndTime) - { - this.competitionEndTime = competitionEndTime; - } - - public Date getCompetitionEndTime() - { - return competitionEndTime; - } - public void setOrganizer(String organizer) - { - this.organizer = organizer; - } - - public String getOrganizer() - { - return organizer; - } - public void setUndertake(String undertake) - { - this.undertake = undertake; - } - - public String getUndertake() - { - return undertake; - } - public void setCompetitionBackImg(String competitionBackImg) - { - this.competitionBackImg = competitionBackImg; - } - - public String getCompetitionBackImg() - { - return competitionBackImg; - } - public void setCreatedId(Long createdId) - { - this.createdId = createdId; - } - - public Long getCreatedId() - { - return createdId; - } - public void setAuditStatus(Long auditStatus) - { - this.auditStatus = auditStatus; - } - - public Long getAuditStatus() - { - return auditStatus; - } - public void setHeightHide(Integer heightHide) - { - this.heightHide = heightHide; - } - - public Integer getHeightHide() - { - return heightHide; - } - public void setSponsor(String sponsor) - { - this.sponsor = sponsor; - } - - public String getSponsor() - { - return sponsor; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("mainTeamId", getMainTeamId()) - .append("mainTeamName", getMainTeamName()) - .append("guestTeamId", getGuestTeamId()) - .append("guestTeamName", getGuestTeamName()) - .append("competitionCode", getCompetitionCode()) - .append("competitionName", getCompetitionName()) - .append("designated", getDesignated()) - .append("competitionType", getCompetitionType()) - .append("competitionTime", getCompetitionTime()) - .append("buildingId", getBuildingId()) - .append("buildingName", getBuildingName()) - .append("competitionAddress", getCompetitionAddress()) - .append("founder", getFounder()) - .append("status", getStatus()) - .append("cityCode", getCityCode()) - .append("cityName", getCityName()) - .append("maxPlayer", getMaxPlayer()) - .append("createdTime", getCreatedTime()) - .append("lastUpdatedTime", getLastUpdatedTime()) - .append("createdBy", getCreatedBy()) - .append("modifiedBy", getModifiedBy()) - .append("isDeleted", getIsDeleted()) - .append("longitude", getLongitude()) - .append("latitude", getLatitude()) - .append("remark", getRemark()) - .append("competitionNature", getCompetitionNature()) - .append("enrollBeginTime", getEnrollBeginTime()) - .append("enrollEndTime", getEnrollEndTime()) - .append("contacts", getContacts()) - .append("contactsAreaCode", getContactsAreaCode()) - .append("contactsTel", getContactsTel()) - .append("competitionBeginTime", getCompetitionBeginTime()) - .append("competitionEndTime", getCompetitionEndTime()) - .append("organizer", getOrganizer()) - .append("undertake", getUndertake()) - .append("competitionBackImg", getCompetitionBackImg()) - .append("createdId", getCreatedId()) - .append("auditStatus", getAuditStatus()) - .append("heightHide", getHeightHide()) - .append("sponsor", getSponsor()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionMembers.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionMembers.java index abe9cc447..4454b33f0 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionMembers.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionMembers.java @@ -1,7 +1,9 @@ package com.ruoyi.system.domain; +import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -13,6 +15,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2022-11-03 */ +@Data public class CompetitionMembers extends BaseEntity { private static final long serialVersionUID = 1L; @@ -100,7 +103,7 @@ public class CompetitionMembers extends BaseEntity /** 比赛性质(0=约战;1=赛事) */ @Excel(name = "比赛性质", readConverterExp = "0==约战;1=赛事") - private Long competitionNature; + private Integer competitionNature; /** 真实姓名 */ @Excel(name = "真实姓名") @@ -137,311 +140,11 @@ public class CompetitionMembers extends BaseEntity /** $column.columnComment */ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Integer isFirstLaunch; + @Excel(name = "位置") + private String teamPosition; + @Excel(name = "身高") + private BigDecimal height; + @Excel(name = "体重") + private BigDecimal weight; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getUserId() - { - return userId; - } - public void setRoleCode(String roleCode) - { - this.roleCode = roleCode; - } - - public String getRoleCode() - { - return roleCode; - } - public void setCompetitionId(Long competitionId) - { - this.competitionId = competitionId; - } - - public Long getCompetitionId() - { - return competitionId; - } - public void setCompetitionTeamId(Long competitionTeamId) - { - this.competitionTeamId = competitionTeamId; - } - - public Long getCompetitionTeamId() - { - return competitionTeamId; - } - public void setScore(Integer score) - { - this.score = score; - } - - public Integer getScore() - { - return score; - } - public void setPenalty(Integer penalty) - { - this.penalty = penalty; - } - - public Integer getPenalty() - { - return penalty; - } - public void setTwoPoints(Integer twoPoints) - { - this.twoPoints = twoPoints; - } - - public Integer getTwoPoints() - { - return twoPoints; - } - public void setThreePoints(Integer threePoints) - { - this.threePoints = threePoints; - } - - public Integer getThreePoints() - { - return threePoints; - } - public void setBreaks(Integer breaks) - { - this.breaks = breaks; - } - - public Integer getBreaks() - { - return breaks; - } - public void setRebound(Integer rebound) - { - this.rebound = rebound; - } - - public Integer getRebound() - { - return rebound; - } - public void setBlock(Integer block) - { - this.block = block; - } - - public Integer getBlock() - { - return block; - } - public void setIsDeleted(Integer isDeleted) - { - this.isDeleted = isDeleted; - } - - public Integer getIsDeleted() - { - return isDeleted; - } - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - public String getCreatedBy() - { - return createdBy; - } - public void setModifiedBy(String modifiedBy) - { - this.modifiedBy = modifiedBy; - } - - public String getModifiedBy() - { - return modifiedBy; - } - public void setCreatedTime(Date createdTime) - { - this.createdTime = createdTime; - } - - public Date getCreatedTime() - { - return createdTime; - } - public void setLastUpdatedTime(Date lastUpdatedTime) - { - this.lastUpdatedTime = lastUpdatedTime; - } - - public Date getLastUpdatedTime() - { - return lastUpdatedTime; - } - public void setStatus(Integer status) - { - this.status = status; - } - - public Integer getStatus() - { - return status; - } - public void setUserType(Integer userType) - { - this.userType = userType; - } - - public Integer getUserType() - { - return userType; - } - public void setCompetitionOfTeamId(Long competitionOfTeamId) - { - this.competitionOfTeamId = competitionOfTeamId; - } - - public Long getCompetitionOfTeamId() - { - return competitionOfTeamId; - } - public void setCompetitionNature(Long competitionNature) - { - this.competitionNature = competitionNature; - } - - public Long getCompetitionNature() - { - return competitionNature; - } - public void setRealName(String realName) - { - this.realName = realName; - } - - public String getRealName() - { - return realName; - } - public void setJerseyNumber(String jerseyNumber) - { - this.jerseyNumber = jerseyNumber; - } - - public String getJerseyNumber() - { - return jerseyNumber; - } - public void setIdType(String idType) - { - this.idType = idType; - } - - public String getIdType() - { - return idType; - } - public void setIdCardNo(String idCardNo) - { - this.idCardNo = idCardNo; - } - - public String getIdCardNo() - { - return idCardNo; - } - public void setContactsTel(String contactsTel) - { - this.contactsTel = contactsTel; - } - - public String getContactsTel() - { - return contactsTel; - } - public void setContacts(String contacts) - { - this.contacts = contacts; - } - - public String getContacts() - { - return contacts; - } - public void setContactsAreaCode(String contactsAreaCode) - { - this.contactsAreaCode = contactsAreaCode; - } - - public String getContactsAreaCode() - { - return contactsAreaCode; - } - public void setPersonalPhoto(String personalPhoto) - { - this.personalPhoto = personalPhoto; - } - - public String getPersonalPhoto() - { - return personalPhoto; - } - public void setIsFirstLaunch(Integer isFirstLaunch) - { - this.isFirstLaunch = isFirstLaunch; - } - - public Integer getIsFirstLaunch() - { - return isFirstLaunch; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("userId", getUserId()) - .append("roleCode", getRoleCode()) - .append("competitionId", getCompetitionId()) - .append("competitionTeamId", getCompetitionTeamId()) - .append("score", getScore()) - .append("penalty", getPenalty()) - .append("twoPoints", getTwoPoints()) - .append("threePoints", getThreePoints()) - .append("breaks", getBreaks()) - .append("rebound", getRebound()) - .append("block", getBlock()) - .append("isDeleted", getIsDeleted()) - .append("createdBy", getCreatedBy()) - .append("modifiedBy", getModifiedBy()) - .append("createdTime", getCreatedTime()) - .append("lastUpdatedTime", getLastUpdatedTime()) - .append("status", getStatus()) - .append("userType", getUserType()) - .append("competitionOfTeamId", getCompetitionOfTeamId()) - .append("competitionNature", getCompetitionNature()) - .append("realName", getRealName()) - .append("jerseyNumber", getJerseyNumber()) - .append("idType", getIdType()) - .append("idCardNo", getIdCardNo()) - .append("contactsTel", getContactsTel()) - .append("contacts", getContacts()) - .append("contactsAreaCode", getContactsAreaCode()) - .append("personalPhoto", getPersonalPhoto()) - .append("isFirstLaunch", getIsFirstLaunch()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionMembersScore.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionMembersScore.java index a10ace08c..b354dd318 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionMembersScore.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionMembersScore.java @@ -2,6 +2,8 @@ package com.ruoyi.system.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -13,6 +15,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2022-11-03 */ +@Data public class CompetitionMembersScore extends BaseEntity { private static final long serialVersionUID = 1L; @@ -122,271 +125,7 @@ public class CompetitionMembersScore extends BaseEntity @Excel(name = "是否首发球员") private Integer isFirstLaunch; - public void setId(Long id) - { - this.id = id; - } + @ApiModelProperty(value = "真实姓名", required = false) + private String realName; - public Long getId() - { - return id; - } - public void setCompetitionId(Long competitionId) - { - this.competitionId = competitionId; - } - - public Long getCompetitionId() - { - return competitionId; - } - public void setCompetitionVsId(Long competitionVsId) - { - this.competitionVsId = competitionVsId; - } - - public Long getCompetitionVsId() - { - return competitionVsId; - } - public void setTeamId(Long teamId) - { - this.teamId = teamId; - } - - public Long getTeamId() - { - return teamId; - } - public void setTeamName(String teamName) - { - this.teamName = teamName; - } - - public String getTeamName() - { - return teamName; - } - public void setNodeNum(Long nodeNum) - { - this.nodeNum = nodeNum; - } - - public Long getNodeNum() - { - return nodeNum; - } - public void setTeamUserId(Long teamUserId) - { - this.teamUserId = teamUserId; - } - - public Long getTeamUserId() - { - return teamUserId; - } - public void setJerseyNumber(String jerseyNumber) - { - this.jerseyNumber = jerseyNumber; - } - - public String getJerseyNumber() - { - return jerseyNumber; - } - public void setTotalScore(Long totalScore) - { - this.totalScore = totalScore; - } - - public Long getTotalScore() - { - return totalScore; - } - public void setTwoPoints(Long twoPoints) - { - this.twoPoints = twoPoints; - } - - public Long getTwoPoints() - { - return twoPoints; - } - public void setThreePoints(Long threePoints) - { - this.threePoints = threePoints; - } - - public Long getThreePoints() - { - return threePoints; - } - public void setPenalty(Long penalty) - { - this.penalty = penalty; - } - - public Long getPenalty() - { - return penalty; - } - public void setBackboard(Long backboard) - { - this.backboard = backboard; - } - - public Long getBackboard() - { - return backboard; - } - public void setFrontPlate(Long frontPlate) - { - this.frontPlate = frontPlate; - } - - public Long getFrontPlate() - { - return frontPlate; - } - public void setBackPlate(Long backPlate) - { - this.backPlate = backPlate; - } - - public Long getBackPlate() - { - return backPlate; - } - public void setAssists(Long assists) - { - this.assists = assists; - } - - public Long getAssists() - { - return assists; - } - public void setSnatch(Long snatch) - { - this.snatch = snatch; - } - - public Long getSnatch() - { - return snatch; - } - public void setBlock(Long block) - { - this.block = block; - } - - public Long getBlock() - { - return block; - } - public void setFault(Long fault) - { - this.fault = fault; - } - - public Long getFault() - { - return fault; - } - public void setBreaks(Long breaks) - { - this.breaks = breaks; - } - - public Long getBreaks() - { - return breaks; - } - public void setCreatedTime(Date createdTime) - { - this.createdTime = createdTime; - } - - public Date getCreatedTime() - { - return createdTime; - } - public void setLastUpdatedTime(Date lastUpdatedTime) - { - this.lastUpdatedTime = lastUpdatedTime; - } - - public Date getLastUpdatedTime() - { - return lastUpdatedTime; - } - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - public String getCreatedBy() - { - return createdBy; - } - public void setModifiedBy(String modifiedBy) - { - this.modifiedBy = modifiedBy; - } - - public String getModifiedBy() - { - return modifiedBy; - } - public void setIsDeleted(Long isDeleted) - { - this.isDeleted = isDeleted; - } - - public Long getIsDeleted() - { - return isDeleted; - } - public void setIsFirstLaunch(Integer isFirstLaunch) - { - this.isFirstLaunch = isFirstLaunch; - } - - public Integer getIsFirstLaunch() - { - return isFirstLaunch; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("competitionId", getCompetitionId()) - .append("competitionVsId", getCompetitionVsId()) - .append("teamId", getTeamId()) - .append("teamName", getTeamName()) - .append("nodeNum", getNodeNum()) - .append("teamUserId", getTeamUserId()) - .append("jerseyNumber", getJerseyNumber()) - .append("totalScore", getTotalScore()) - .append("twoPoints", getTwoPoints()) - .append("threePoints", getThreePoints()) - .append("penalty", getPenalty()) - .append("backboard", getBackboard()) - .append("frontPlate", getFrontPlate()) - .append("backPlate", getBackPlate()) - .append("assists", getAssists()) - .append("snatch", getSnatch()) - .append("block", getBlock()) - .append("fault", getFault()) - .append("breaks", getBreaks()) - .append("createdTime", getCreatedTime()) - .append("lastUpdatedTime", getLastUpdatedTime()) - .append("createdBy", getCreatedBy()) - .append("modifiedBy", getModifiedBy()) - .append("isDeleted", getIsDeleted()) - .append("remark", getRemark()) - .append("isFirstLaunch", getIsFirstLaunch()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionOfTeam.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionOfTeam.java index 8dd2527fa..2164f9b1a 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionOfTeam.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionOfTeam.java @@ -2,6 +2,7 @@ package com.ruoyi.system.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -13,6 +14,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2022-11-03 */ +@Data public class CompetitionOfTeam extends BaseEntity { private static final long serialVersionUID = 1L; @@ -76,163 +78,6 @@ public class CompetitionOfTeam extends BaseEntity /** 组内的序号 */ @Excel(name = "组内的序号") - private Long serialNumber; + private Integer serialNumber; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setCompetitionId(Long competitionId) - { - this.competitionId = competitionId; - } - - public Long getCompetitionId() - { - return competitionId; - } - public void setTeamId(Long teamId) - { - this.teamId = teamId; - } - - public Long getTeamId() - { - return teamId; - } - public void setTeamName(String teamName) - { - this.teamName = teamName; - } - - public String getTeamName() - { - return teamName; - } - public void setCompetitionGroup(String competitionGroup) - { - this.competitionGroup = competitionGroup; - } - - public String getCompetitionGroup() - { - return competitionGroup; - } - public void setCreatedTime(Date createdTime) - { - this.createdTime = createdTime; - } - - public Date getCreatedTime() - { - return createdTime; - } - public void setStatus(Integer status) - { - this.status = status; - } - - public Integer getStatus() - { - return status; - } - public void setLastUpdatedTime(Date lastUpdatedTime) - { - this.lastUpdatedTime = lastUpdatedTime; - } - - public Date getLastUpdatedTime() - { - return lastUpdatedTime; - } - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - public String getCreatedBy() - { - return createdBy; - } - public void setModifiedBy(String modifiedBy) - { - this.modifiedBy = modifiedBy; - } - - public String getModifiedBy() - { - return modifiedBy; - } - public void setIsDeleted(Long isDeleted) - { - this.isDeleted = isDeleted; - } - - public Long getIsDeleted() - { - return isDeleted; - } - public void setContacts(String contacts) - { - this.contacts = contacts; - } - - public String getContacts() - { - return contacts; - } - public void setContactsTel(String contactsTel) - { - this.contactsTel = contactsTel; - } - - public String getContactsTel() - { - return contactsTel; - } - public void setContactsAreaCode(String contactsAreaCode) - { - this.contactsAreaCode = contactsAreaCode; - } - - public String getContactsAreaCode() - { - return contactsAreaCode; - } - public void setSerialNumber(Long serialNumber) - { - this.serialNumber = serialNumber; - } - - public Long getSerialNumber() - { - return serialNumber; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("competitionId", getCompetitionId()) - .append("teamId", getTeamId()) - .append("teamName", getTeamName()) - .append("competitionGroup", getCompetitionGroup()) - .append("createdTime", getCreatedTime()) - .append("status", getStatus()) - .append("lastUpdatedTime", getLastUpdatedTime()) - .append("createdBy", getCreatedBy()) - .append("modifiedBy", getModifiedBy()) - .append("isDeleted", getIsDeleted()) - .append("remark", getRemark()) - .append("contacts", getContacts()) - .append("contactsTel", getContactsTel()) - .append("contactsAreaCode", getContactsAreaCode()) - .append("serialNumber", getSerialNumber()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionResult.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionResult.java index a67896dc8..3f27886f8 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionResult.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionResult.java @@ -2,6 +2,8 @@ package com.ruoyi.system.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -13,6 +15,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2022-11-03 */ +@Data public class CompetitionResult extends BaseEntity { private static final long serialVersionUID = 1L; @@ -38,11 +41,11 @@ public class CompetitionResult extends BaseEntity /** 比赛节数1计分 */ @Excel(name = "比赛节数1计分") - private Long oneNodeScore; + private Integer oneNodeScore; /** 比赛节数2计分 */ @Excel(name = "比赛节数2计分") - private Long twoNodeScore; + private Integer twoNodeScore; /** 比赛分组(A,B,C) */ @Excel(name = "比赛分组(A,B,C)") @@ -76,219 +79,26 @@ public class CompetitionResult extends BaseEntity /** 比赛节数3计分 */ @Excel(name = "比赛节数3计分") - private Long threeNodeScore; + private Integer threeNodeScore; /** 比赛节数4计分 */ @Excel(name = "比赛节数4计分") - private Long fourNodeScore; + private Integer fourNodeScore; /** 比赛节数5计分 */ @Excel(name = "比赛节数5计分") - private Long fiveNodeScore; + private Integer fiveNodeScore; /** 比赛节数6计分 */ @Excel(name = "比赛节数6计分") - private Long sixNodeScore; + private Integer sixNodeScore; /** 比赛积分 */ @Excel(name = "比赛积分") - private Long integral; + private Integer integral; + @ApiModelProperty(value = "比赛结果", required = false) + private String vsResult; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setCompetitionId(Long competitionId) - { - this.competitionId = competitionId; - } - - public Long getCompetitionId() - { - return competitionId; - } - public void setCompetitionVsId(Long competitionVsId) - { - this.competitionVsId = competitionVsId; - } - - public Long getCompetitionVsId() - { - return competitionVsId; - } - public void setTeamId(Long teamId) - { - this.teamId = teamId; - } - - public Long getTeamId() - { - return teamId; - } - public void setTeamName(String teamName) - { - this.teamName = teamName; - } - - public String getTeamName() - { - return teamName; - } - public void setOneNodeScore(Long oneNodeScore) - { - this.oneNodeScore = oneNodeScore; - } - - public Long getOneNodeScore() - { - return oneNodeScore; - } - public void setTwoNodeScore(Long twoNodeScore) - { - this.twoNodeScore = twoNodeScore; - } - - public Long getTwoNodeScore() - { - return twoNodeScore; - } - public void setCompetitionGroup(String competitionGroup) - { - this.competitionGroup = competitionGroup; - } - - public String getCompetitionGroup() - { - return competitionGroup; - } - public void setStatus(Integer status) - { - this.status = status; - } - - public Integer getStatus() - { - return status; - } - public void setCreatedTime(Date createdTime) - { - this.createdTime = createdTime; - } - - public Date getCreatedTime() - { - return createdTime; - } - public void setLastUpdatedTime(Date lastUpdatedTime) - { - this.lastUpdatedTime = lastUpdatedTime; - } - - public Date getLastUpdatedTime() - { - return lastUpdatedTime; - } - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - public String getCreatedBy() - { - return createdBy; - } - public void setModifiedBy(String modifiedBy) - { - this.modifiedBy = modifiedBy; - } - - public String getModifiedBy() - { - return modifiedBy; - } - public void setIsDeleted(Long isDeleted) - { - this.isDeleted = isDeleted; - } - - public Long getIsDeleted() - { - return isDeleted; - } - public void setThreeNodeScore(Long threeNodeScore) - { - this.threeNodeScore = threeNodeScore; - } - - public Long getThreeNodeScore() - { - return threeNodeScore; - } - public void setFourNodeScore(Long fourNodeScore) - { - this.fourNodeScore = fourNodeScore; - } - - public Long getFourNodeScore() - { - return fourNodeScore; - } - public void setFiveNodeScore(Long fiveNodeScore) - { - this.fiveNodeScore = fiveNodeScore; - } - - public Long getFiveNodeScore() - { - return fiveNodeScore; - } - public void setSixNodeScore(Long sixNodeScore) - { - this.sixNodeScore = sixNodeScore; - } - - public Long getSixNodeScore() - { - return sixNodeScore; - } - public void setIntegral(Long integral) - { - this.integral = integral; - } - - public Long getIntegral() - { - return integral; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("competitionId", getCompetitionId()) - .append("competitionVsId", getCompetitionVsId()) - .append("teamId", getTeamId()) - .append("teamName", getTeamName()) - .append("oneNodeScore", getOneNodeScore()) - .append("twoNodeScore", getTwoNodeScore()) - .append("competitionGroup", getCompetitionGroup()) - .append("status", getStatus()) - .append("createdTime", getCreatedTime()) - .append("lastUpdatedTime", getLastUpdatedTime()) - .append("createdBy", getCreatedBy()) - .append("modifiedBy", getModifiedBy()) - .append("isDeleted", getIsDeleted()) - .append("remark", getRemark()) - .append("threeNodeScore", getThreeNodeScore()) - .append("fourNodeScore", getFourNodeScore()) - .append("fiveNodeScore", getFiveNodeScore()) - .append("sixNodeScore", getSixNodeScore()) - .append("integral", getIntegral()) - .toString(); - } + @ApiModelProperty(value = "比赛总分", required = false) + private Integer totalScore; } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionTeamGroup.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionTeamGroup.java index 5aabf45b1..4efa994e7 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionTeamGroup.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionTeamGroup.java @@ -2,6 +2,7 @@ package com.ruoyi.system.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.*; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -13,6 +14,12 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2022-11-03 */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) public class CompetitionTeamGroup extends BaseEntity { private static final long serialVersionUID = 1L; @@ -52,117 +59,10 @@ public class CompetitionTeamGroup extends BaseEntity /** 是否删除 */ @Excel(name = "是否删除") - private Long isDeleted; + private Integer isDeleted; /** 循环赛编排状态 0=未编排,1=已编排 */ @Excel(name = "循环赛编排状态 0=未编排,1=已编排") - private Long isCycle; + private Integer isCycle; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setCompetitionId(Long competitionId) - { - this.competitionId = competitionId; - } - - public Long getCompetitionId() - { - return competitionId; - } - public void setCompetitionGroup(String competitionGroup) - { - this.competitionGroup = competitionGroup; - } - - public String getCompetitionGroup() - { - return competitionGroup; - } - public void setCreatedTime(Date createdTime) - { - this.createdTime = createdTime; - } - - public Date getCreatedTime() - { - return createdTime; - } - public void setStatus(Integer status) - { - this.status = status; - } - - public Integer getStatus() - { - return status; - } - public void setLastUpdatedTime(Date lastUpdatedTime) - { - this.lastUpdatedTime = lastUpdatedTime; - } - - public Date getLastUpdatedTime() - { - return lastUpdatedTime; - } - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - public String getCreatedBy() - { - return createdBy; - } - public void setModifiedBy(String modifiedBy) - { - this.modifiedBy = modifiedBy; - } - - public String getModifiedBy() - { - return modifiedBy; - } - public void setIsDeleted(Long isDeleted) - { - this.isDeleted = isDeleted; - } - - public Long getIsDeleted() - { - return isDeleted; - } - public void setIsCycle(Long isCycle) - { - this.isCycle = isCycle; - } - - public Long getIsCycle() - { - return isCycle; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("competitionId", getCompetitionId()) - .append("competitionGroup", getCompetitionGroup()) - .append("createdTime", getCreatedTime()) - .append("status", getStatus()) - .append("lastUpdatedTime", getLastUpdatedTime()) - .append("createdBy", getCreatedBy()) - .append("modifiedBy", getModifiedBy()) - .append("isDeleted", getIsDeleted()) - .append("remark", getRemark()) - .append("isCycle", getIsCycle()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionTeamVsTeam.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionTeamVsTeam.java index 7a5e5754f..8333aa88d 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionTeamVsTeam.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/CompetitionTeamVsTeam.java @@ -2,6 +2,7 @@ package com.ruoyi.system.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -13,6 +14,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2022-11-03 */ +@Data public class CompetitionTeamVsTeam extends BaseEntity { private static final long serialVersionUID = 1L; @@ -85,15 +87,15 @@ public class CompetitionTeamVsTeam extends BaseEntity /** 是否删除 */ @Excel(name = "是否删除") - private Long isDeleted; + private Integer isDeleted; /** 主队得分 */ @Excel(name = "主队得分") - private Long mainTeamScore; + private Integer mainTeamScore; /** 客队得分 */ @Excel(name = "客队得分") - private Long guestTeamScore; + private Integer guestTeamScore; /** 比赛类型:循环赛,淘汰赛 */ @Excel(name = "比赛类型:循环赛,淘汰赛") @@ -103,221 +105,4 @@ public class CompetitionTeamVsTeam extends BaseEntity @Excel(name = "系统生成的赛程的批次号") private String batchNumber; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setCompetitionId(Long competitionId) - { - this.competitionId = competitionId; - } - - public Long getCompetitionId() - { - return competitionId; - } - public void setMainTeamId(Long mainTeamId) - { - this.mainTeamId = mainTeamId; - } - - public Long getMainTeamId() - { - return mainTeamId; - } - public void setMainTeamName(String mainTeamName) - { - this.mainTeamName = mainTeamName; - } - - public String getMainTeamName() - { - return mainTeamName; - } - public void setGuestTeamId(Long guestTeamId) - { - this.guestTeamId = guestTeamId; - } - - public Long getGuestTeamId() - { - return guestTeamId; - } - public void setGuestTeamName(String guestTeamName) - { - this.guestTeamName = guestTeamName; - } - - public String getGuestTeamName() - { - return guestTeamName; - } - public void setCompetitionTime(Date competitionTime) - { - this.competitionTime = competitionTime; - } - - public Date getCompetitionTime() - { - return competitionTime; - } - public void setBuildingId(Long buildingId) - { - this.buildingId = buildingId; - } - - public Long getBuildingId() - { - return buildingId; - } - public void setBuildingName(String buildingName) - { - this.buildingName = buildingName; - } - - public String getBuildingName() - { - return buildingName; - } - public void setCompetitionAddress(String competitionAddress) - { - this.competitionAddress = competitionAddress; - } - - public String getCompetitionAddress() - { - return competitionAddress; - } - public void setCompetitionGroup(String competitionGroup) - { - this.competitionGroup = competitionGroup; - } - - public String getCompetitionGroup() - { - return competitionGroup; - } - public void setStatus(Integer status) - { - this.status = status; - } - - public Integer getStatus() - { - return status; - } - public void setCreatedTime(Date createdTime) - { - this.createdTime = createdTime; - } - - public Date getCreatedTime() - { - return createdTime; - } - public void setLastUpdatedTime(Date lastUpdatedTime) - { - this.lastUpdatedTime = lastUpdatedTime; - } - - public Date getLastUpdatedTime() - { - return lastUpdatedTime; - } - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - public String getCreatedBy() - { - return createdBy; - } - public void setModifiedBy(String modifiedBy) - { - this.modifiedBy = modifiedBy; - } - - public String getModifiedBy() - { - return modifiedBy; - } - public void setIsDeleted(Long isDeleted) - { - this.isDeleted = isDeleted; - } - - public Long getIsDeleted() - { - return isDeleted; - } - public void setMainTeamScore(Long mainTeamScore) - { - this.mainTeamScore = mainTeamScore; - } - - public Long getMainTeamScore() - { - return mainTeamScore; - } - public void setGuestTeamScore(Long guestTeamScore) - { - this.guestTeamScore = guestTeamScore; - } - - public Long getGuestTeamScore() - { - return guestTeamScore; - } - public void setVsType(String vsType) - { - this.vsType = vsType; - } - - public String getVsType() - { - return vsType; - } - public void setBatchNumber(String batchNumber) - { - this.batchNumber = batchNumber; - } - - public String getBatchNumber() - { - return batchNumber; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("competitionId", getCompetitionId()) - .append("mainTeamId", getMainTeamId()) - .append("mainTeamName", getMainTeamName()) - .append("guestTeamId", getGuestTeamId()) - .append("guestTeamName", getGuestTeamName()) - .append("competitionTime", getCompetitionTime()) - .append("buildingId", getBuildingId()) - .append("buildingName", getBuildingName()) - .append("competitionAddress", getCompetitionAddress()) - .append("competitionGroup", getCompetitionGroup()) - .append("status", getStatus()) - .append("createdTime", getCreatedTime()) - .append("lastUpdatedTime", getLastUpdatedTime()) - .append("createdBy", getCreatedBy()) - .append("modifiedBy", getModifiedBy()) - .append("isDeleted", getIsDeleted()) - .append("remark", getRemark()) - .append("mainTeamScore", getMainTeamScore()) - .append("guestTeamScore", getGuestTeamScore()) - .append("vsType", getVsType()) - .append("batchNumber", getBatchNumber()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/DataDictionary.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/DataDictionary.java new file mode 100644 index 000000000..540ba1121 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/DataDictionary.java @@ -0,0 +1,179 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 data_dictionary + * + * @author ruoyi + * @date 2023-07-04 + */ +public class DataDictionary extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long isDeleted; + + /** key */ + @Excel(name = "key") + private String key; + + /** 名称 */ + @Excel(name = "名称") + private String name; + + /** 停用 */ + @Excel(name = "停用") + private Integer enabled; + + /** 父节点 */ + @Excel(name = "父节点") + private Long parentId; + + /** 排序 */ + @Excel(name = "排序") + private Long sortNumber; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + public void setIsDeleted(Long isDeleted) + { + this.isDeleted = isDeleted; + } + + public Long getIsDeleted() + { + return isDeleted; + } + public void setKey(String key) + { + this.key = key; + } + + public String getKey() + { + return key; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setEnabled(Integer enabled) + { + this.enabled = enabled; + } + + public Integer getEnabled() + { + return enabled; + } + public void setParentId(Long parentId) + { + this.parentId = parentId; + } + + public Long getParentId() + { + return parentId; + } + public void setSortNumber(Long sortNumber) + { + this.sortNumber = sortNumber; + } + + public Long getSortNumber() + { + return sortNumber; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("createdBy", getCreatedBy()) + .append("createdTime", getCreatedTime()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .append("isDeleted", getIsDeleted()) + .append("key", getKey()) + .append("name", getName()) + .append("enabled", getEnabled()) + .append("parentId", getParentId()) + .append("sortNumber", getSortNumber()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/FeatureLabel.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/FeatureLabel.java new file mode 100644 index 000000000..b56b250ac --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/FeatureLabel.java @@ -0,0 +1,138 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 球馆特征对象 feature_label + * + * @author ruoyi + * @date 2023-07-06 + */ +public class FeatureLabel extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Integer isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** 描述 */ + @Excel(name = "描述") + private String description; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long buildingId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setIsDeleted(Integer isDeleted) + { + this.isDeleted = isDeleted; + } + + public Integer getIsDeleted() + { + return isDeleted; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + public void setDescription(String description) + { + this.description = description; + } + + public String getDescription() + { + return description; + } + public void setBuildingId(Long buildingId) + { + this.buildingId = buildingId; + } + + public Long getBuildingId() + { + return buildingId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("isDeleted", getIsDeleted()) + .append("createdTime", getCreatedTime()) + .append("createdBy", getCreatedBy()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .append("description", getDescription()) + .append("remark", getRemark()) + .append("buildingId", getBuildingId()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/GlobalAttachment.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/GlobalAttachment.java new file mode 100644 index 000000000..cbef39ed4 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/GlobalAttachment.java @@ -0,0 +1,207 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 global_attachment + * + * @author ruoyi + * @date 2023-07-04 + */ +public class GlobalAttachment extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键id */ + private Long id; + + /** 单据类型 */ + @Excel(name = "单据类型") + private String bizType; + + /** 单据id */ + @Excel(name = "单据id") + private Long bizId; + + /** 附件名称 */ + @Excel(name = "附件名称") + private String attachmentName; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long attachmentType; + + /** url */ + @Excel(name = "url") + private String attachmentUrl; + + /** 版本号 */ + @Excel(name = "版本号") + private Long version; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String consultType; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setBizType(String bizType) + { + this.bizType = bizType; + } + + public String getBizType() + { + return bizType; + } + public void setBizId(Long bizId) + { + this.bizId = bizId; + } + + public Long getBizId() + { + return bizId; + } + public void setAttachmentName(String attachmentName) + { + this.attachmentName = attachmentName; + } + + public String getAttachmentName() + { + return attachmentName; + } + public void setAttachmentType(Long attachmentType) + { + this.attachmentType = attachmentType; + } + + public Long getAttachmentType() + { + return attachmentType; + } + public void setAttachmentUrl(String attachmentUrl) + { + this.attachmentUrl = attachmentUrl; + } + + public String getAttachmentUrl() + { + return attachmentUrl; + } + public void setVersion(Long version) + { + this.version = version; + } + + public Long getVersion() + { + return version; + } + public void setIsDeleted(Long isDeleted) + { + this.isDeleted = isDeleted; + } + + public Long getIsDeleted() + { + return isDeleted; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + public void setConsultType(String consultType) + { + this.consultType = consultType; + } + + public String getConsultType() + { + return consultType; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("bizType", getBizType()) + .append("bizId", getBizId()) + .append("attachmentName", getAttachmentName()) + .append("attachmentType", getAttachmentType()) + .append("attachmentUrl", getAttachmentUrl()) + .append("version", getVersion()) + .append("isDeleted", getIsDeleted()) + .append("createdTime", getCreatedTime()) + .append("createdBy", getCreatedBy()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .append("consultType", getConsultType()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/GroupWechat.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/GroupWechat.java new file mode 100644 index 000000000..a65a89ec7 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/GroupWechat.java @@ -0,0 +1,221 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 group_wechat + * + * @author ruoyi + * @date 2023-07-04 + */ +public class GroupWechat extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long buildingId; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String groupName; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String headerPicture; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String groupCode; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String scanNum; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String serviceUser; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String serviceUserQrcode; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String remarks; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setBuildingId(Long buildingId) + { + this.buildingId = buildingId; + } + + public Long getBuildingId() + { + return buildingId; + } + public void setGroupName(String groupName) + { + this.groupName = groupName; + } + + public String getGroupName() + { + return groupName; + } + public void setHeaderPicture(String headerPicture) + { + this.headerPicture = headerPicture; + } + + public String getHeaderPicture() + { + return headerPicture; + } + public void setGroupCode(String groupCode) + { + this.groupCode = groupCode; + } + + public String getGroupCode() + { + return groupCode; + } + public void setScanNum(String scanNum) + { + this.scanNum = scanNum; + } + + public String getScanNum() + { + return scanNum; + } + public void setServiceUser(String serviceUser) + { + this.serviceUser = serviceUser; + } + + public String getServiceUser() + { + return serviceUser; + } + public void setServiceUserQrcode(String serviceUserQrcode) + { + this.serviceUserQrcode = serviceUserQrcode; + } + + public String getServiceUserQrcode() + { + return serviceUserQrcode; + } + public void setRemarks(String remarks) + { + this.remarks = remarks; + } + + public String getRemarks() + { + return remarks; + } + public void setIsDeleted(Long isDeleted) + { + this.isDeleted = isDeleted; + } + + public Long getIsDeleted() + { + return isDeleted; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("buildingId", getBuildingId()) + .append("groupName", getGroupName()) + .append("headerPicture", getHeaderPicture()) + .append("groupCode", getGroupCode()) + .append("scanNum", getScanNum()) + .append("serviceUser", getServiceUser()) + .append("serviceUserQrcode", getServiceUserQrcode()) + .append("remarks", getRemarks()) + .append("isDeleted", getIsDeleted()) + .append("createdTime", getCreatedTime()) + .append("createdBy", getCreatedBy()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Message.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Message.java new file mode 100644 index 000000000..22f86ccff --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Message.java @@ -0,0 +1,222 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 message + * + * @author ruoyi + * @date 2023-07-04 + */ +public class Message extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Integer isDeleted; + + /** 消息标题 */ + @Excel(name = "消息标题") + private String messageTitle; + + /** 消息类型【字典】 */ + @Excel(name = "消息类型【字典】") + private String messageType; + + /** 业务标识 */ + @Excel(name = "业务标识") + private String flowType; + + /** 审核人 */ + @Excel(name = "审核人") + private Long auditor; + + /** 审核时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date auditDate; + + /** 来源id */ + @Excel(name = "来源id") + private Long sourceId; + + /** 是否同意【0.拒绝 1.同意】 */ + @Excel(name = "是否同意【0.拒绝 1.同意】") + private Integer agreeFlag; + + /** 流程参数【json】 */ + @Excel(name = "流程参数【json】") + private String flowEntity; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + public void setIsDeleted(Integer isDeleted) + { + this.isDeleted = isDeleted; + } + + public Integer getIsDeleted() + { + return isDeleted; + } + public void setMessageTitle(String messageTitle) + { + this.messageTitle = messageTitle; + } + + public String getMessageTitle() + { + return messageTitle; + } + public void setMessageType(String messageType) + { + this.messageType = messageType; + } + + public String getMessageType() + { + return messageType; + } + public void setFlowType(String flowType) + { + this.flowType = flowType; + } + + public String getFlowType() + { + return flowType; + } + public void setAuditor(Long auditor) + { + this.auditor = auditor; + } + + public Long getAuditor() + { + return auditor; + } + public void setAuditDate(Date auditDate) + { + this.auditDate = auditDate; + } + + public Date getAuditDate() + { + return auditDate; + } + public void setSourceId(Long sourceId) + { + this.sourceId = sourceId; + } + + public Long getSourceId() + { + return sourceId; + } + public void setAgreeFlag(Integer agreeFlag) + { + this.agreeFlag = agreeFlag; + } + + public Integer getAgreeFlag() + { + return agreeFlag; + } + public void setFlowEntity(String flowEntity) + { + this.flowEntity = flowEntity; + } + + public String getFlowEntity() + { + return flowEntity; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("createdBy", getCreatedBy()) + .append("createdTime", getCreatedTime()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .append("isDeleted", getIsDeleted()) + .append("messageTitle", getMessageTitle()) + .append("messageType", getMessageType()) + .append("flowType", getFlowType()) + .append("auditor", getAuditor()) + .append("auditDate", getAuditDate()) + .append("sourceId", getSourceId()) + .append("agreeFlag", getAgreeFlag()) + .append("flowEntity", getFlowEntity()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ShArea.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ShArea.java new file mode 100644 index 000000000..264fefd36 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ShArea.java @@ -0,0 +1,263 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 sh_area + * + * @author ruoyi + * @date 2023-07-04 + */ +public class ShArea extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** ID */ + private Long id; + + /** 父id */ + @Excel(name = "父id") + private Long pid; + + /** 简称 */ + @Excel(name = "简称") + private String shortname; + + /** 名称 */ + @Excel(name = "名称") + private String cityname; + + /** 全称 */ + @Excel(name = "全称") + private String mergerName; + + /** 层级 0 1 2 省市区县 */ + @Excel(name = "层级 0 1 2 省市区县") + private Integer level; + + /** 拼音 */ + @Excel(name = "拼音") + private String pinyin; + + /** 长途区号 */ + @Excel(name = "长途区号") + private String code; + + /** 邮编 */ + @Excel(name = "邮编") + private String zipCode; + + /** 首字母 */ + @Excel(name = "首字母") + private String first; + + /** 经度 */ + @Excel(name = "经度") + private String longitude; + + /** 纬度 */ + @Excel(name = "纬度") + private String latitude; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setPid(Long pid) + { + this.pid = pid; + } + + public Long getPid() + { + return pid; + } + public void setShortname(String shortname) + { + this.shortname = shortname; + } + + public String getShortname() + { + return shortname; + } + public void setCityname(String cityname) + { + this.cityname = cityname; + } + + public String getCityname() + { + return cityname; + } + public void setMergerName(String mergerName) + { + this.mergerName = mergerName; + } + + public String getMergerName() + { + return mergerName; + } + public void setLevel(Integer level) + { + this.level = level; + } + + public Integer getLevel() + { + return level; + } + public void setPinyin(String pinyin) + { + this.pinyin = pinyin; + } + + public String getPinyin() + { + return pinyin; + } + public void setCode(String code) + { + this.code = code; + } + + public String getCode() + { + return code; + } + public void setZipCode(String zipCode) + { + this.zipCode = zipCode; + } + + public String getZipCode() + { + return zipCode; + } + public void setFirst(String first) + { + this.first = first; + } + + public String getFirst() + { + return first; + } + public void setLongitude(String longitude) + { + this.longitude = longitude; + } + + public String getLongitude() + { + return longitude; + } + public void setLatitude(String latitude) + { + this.latitude = latitude; + } + + public String getLatitude() + { + return latitude; + } + public void setIsDeleted(Long isDeleted) + { + this.isDeleted = isDeleted; + } + + public Long getIsDeleted() + { + return isDeleted; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("pid", getPid()) + .append("shortname", getShortname()) + .append("cityname", getCityname()) + .append("mergerName", getMergerName()) + .append("level", getLevel()) + .append("pinyin", getPinyin()) + .append("code", getCode()) + .append("zipCode", getZipCode()) + .append("first", getFirst()) + .append("longitude", getLongitude()) + .append("latitude", getLatitude()) + .append("isDeleted", getIsDeleted()) + .append("createdTime", getCreatedTime()) + .append("createdBy", getCreatedBy()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Sms.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Sms.java new file mode 100644 index 000000000..fccdfc632 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Sms.java @@ -0,0 +1,44 @@ +package com.ruoyi.system.domain; + +import com.ruoyi.common.core.constant.Constants; +import lombok.Getter; +import lombok.Setter; + +/** + * + * 此类的描述:短信的封装类型。 + */ +@Getter +@Setter +public class Sms { + /** + * 发送内容,如果含有空格,百分数等特殊内容,请用utf8方式进行编码,最多500个文字(1个英文或数字也算1个文字) + */ + private String content; + /** + * 发送用户帐号 + */ + private String account = Constants.SMS_PAOPAO_ACCOUNT; + /** + * 发送帐号密码 + */ + private String password = Constants.SMS_PAOPAO_PASSWORD; + + /**发送任务命令*/ + private String action; + + /**发送的目的号码*/ + private String mobile; + /** + * 原来内容 + */ + private String ms; + /** + * 原来手机号 + */ + private String mb; + /** + * 接入号 + */ + private String extno = Constants.SMS_PAOPAO_EXTNO; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/TeamMembers.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/TeamMembers.java index bdf5c4a08..88e574361 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/TeamMembers.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/TeamMembers.java @@ -2,6 +2,7 @@ package com.ruoyi.system.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.*; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -13,6 +14,12 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2022-11-03 */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) public class TeamMembers extends BaseEntity { private static final long serialVersionUID = 1L; @@ -66,131 +73,4 @@ public class TeamMembers extends BaseEntity @Excel(name = "角色名称") private String roleName; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setTeamId(Long teamId) - { - this.teamId = teamId; - } - - public Long getTeamId() - { - return teamId; - } - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getUserId() - { - return userId; - } - public void setRoleCode(String roleCode) - { - this.roleCode = roleCode; - } - - public String getRoleCode() - { - return roleCode; - } - public void setJerseyNumber(String jerseyNumber) - { - this.jerseyNumber = jerseyNumber; - } - - public String getJerseyNumber() - { - return jerseyNumber; - } - public void setStatus(Integer status) - { - this.status = status; - } - - public Integer getStatus() - { - return status; - } - public void setCreatedTime(Date createdTime) - { - this.createdTime = createdTime; - } - - public Date getCreatedTime() - { - return createdTime; - } - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - public String getCreatedBy() - { - return createdBy; - } - public void setIsDeleted(Long isDeleted) - { - this.isDeleted = isDeleted; - } - - public Long getIsDeleted() - { - return isDeleted; - } - public void setLastUpdatedTime(Date lastUpdatedTime) - { - this.lastUpdatedTime = lastUpdatedTime; - } - - public Date getLastUpdatedTime() - { - return lastUpdatedTime; - } - public void setModifiedBy(String modifiedBy) - { - this.modifiedBy = modifiedBy; - } - - public String getModifiedBy() - { - return modifiedBy; - } - public void setRoleName(String roleName) - { - this.roleName = roleName; - } - - public String getRoleName() - { - return roleName; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("teamId", getTeamId()) - .append("userId", getUserId()) - .append("roleCode", getRoleCode()) - .append("jerseyNumber", getJerseyNumber()) - .append("status", getStatus()) - .append("remark", getRemark()) - .append("createdTime", getCreatedTime()) - .append("createdBy", getCreatedBy()) - .append("isDeleted", getIsDeleted()) - .append("lastUpdatedTime", getLastUpdatedTime()) - .append("modifiedBy", getModifiedBy()) - .append("roleName", getRoleName()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/TokenInfo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/TokenInfo.java new file mode 100644 index 000000000..38ced85cb --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/TokenInfo.java @@ -0,0 +1,137 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 token_info + * + * @author ruoyi + * @date 2023-07-04 + */ +public class TokenInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String mainToken; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String kikToken; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setIsDeleted(Long isDeleted) + { + this.isDeleted = isDeleted; + } + + public Long getIsDeleted() + { + return isDeleted; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + public void setMainToken(String mainToken) + { + this.mainToken = mainToken; + } + + public String getMainToken() + { + return mainToken; + } + public void setKikToken(String kikToken) + { + this.kikToken = kikToken; + } + + public String getKikToken() + { + return kikToken; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("isDeleted", getIsDeleted()) + .append("createdTime", getCreatedTime()) + .append("createdBy", getCreatedBy()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .append("mainToken", getMainToken()) + .append("kikToken", getKikToken()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/TrainingInfo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/TrainingInfo.java new file mode 100644 index 000000000..ae96713c4 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/TrainingInfo.java @@ -0,0 +1,207 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 training_info + * + * @author ruoyi + * @date 2023-07-04 + */ +public class TrainingInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** 培训机构名称 */ + @Excel(name = "培训机构名称") + private String trainName; + + /** 联系电话 */ + @Excel(name = "联系电话") + private String phone; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String linkman; + + /** 培训公告 */ + @Excel(name = "培训公告") + private String trainDesc; + + /** 场馆ID */ + @Excel(name = "场馆ID") + private Long buildId; + + /** 默认图片 */ + @Excel(name = "默认图片") + private String defaultPicture; + + /** 培训价格 */ + @Excel(name = "培训价格") + private String price; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setIsDeleted(Long isDeleted) + { + this.isDeleted = isDeleted; + } + + public Long getIsDeleted() + { + return isDeleted; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + public void setTrainName(String trainName) + { + this.trainName = trainName; + } + + public String getTrainName() + { + return trainName; + } + public void setPhone(String phone) + { + this.phone = phone; + } + + public String getPhone() + { + return phone; + } + public void setLinkman(String linkman) + { + this.linkman = linkman; + } + + public String getLinkman() + { + return linkman; + } + public void setTrainDesc(String trainDesc) + { + this.trainDesc = trainDesc; + } + + public String getTrainDesc() + { + return trainDesc; + } + public void setBuildId(Long buildId) + { + this.buildId = buildId; + } + + public Long getBuildId() + { + return buildId; + } + public void setDefaultPicture(String defaultPicture) + { + this.defaultPicture = defaultPicture; + } + + public String getDefaultPicture() + { + return defaultPicture; + } + public void setPrice(String price) + { + this.price = price; + } + + public String getPrice() + { + return price; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("isDeleted", getIsDeleted()) + .append("createdTime", getCreatedTime()) + .append("createdBy", getCreatedBy()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .append("trainName", getTrainName()) + .append("phone", getPhone()) + .append("linkman", getLinkman()) + .append("trainDesc", getTrainDesc()) + .append("buildId", getBuildId()) + .append("defaultPicture", getDefaultPicture()) + .append("price", getPrice()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserBuildingRel.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserBuildingRel.java new file mode 100644 index 000000000..a8e23873a --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserBuildingRel.java @@ -0,0 +1,137 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 user_building_rel + * + * @author ruoyi + * @date 2023-07-04 + */ +public class UserBuildingRel extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String userCode; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long buildingId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setIsDeleted(String isDeleted) + { + this.isDeleted = isDeleted; + } + + public String getIsDeleted() + { + return isDeleted; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + public void setUserCode(String userCode) + { + this.userCode = userCode; + } + + public String getUserCode() + { + return userCode; + } + public void setBuildingId(Long buildingId) + { + this.buildingId = buildingId; + } + + public Long getBuildingId() + { + return buildingId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("isDeleted", getIsDeleted()) + .append("createdTime", getCreatedTime()) + .append("createdBy", getCreatedBy()) + .append("modifiedBy", getModifiedBy()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .append("userCode", getUserCode()) + .append("buildingId", getBuildingId()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserRole.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserRole.java new file mode 100644 index 000000000..373743022 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserRole.java @@ -0,0 +1,62 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.*; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 user_role + * + * @author ruoyi + * @date 2023-07-04 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) +public class UserRole extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 用户id */ + @Excel(name = "用户id") + private Long userId; + + /** 角色编码 */ + @Excel(name = "角色编码") + private String roleCode; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Integer isDeleted; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; + + /** 角色编码 */ + @Excel(name = "角色id") + private Long roleId; + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxBuildingInfo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxBuildingInfo.java index ee814d5d5..e49a8ee74 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxBuildingInfo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxBuildingInfo.java @@ -23,7 +23,7 @@ public class WxBuildingInfo extends BaseEntity /** 删除 */ @Excel(name = "删除") - private Long isDeleted; + private Integer isDeleted; /** 创建时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @@ -85,7 +85,7 @@ public class WxBuildingInfo extends BaseEntity /** 球馆状态 */ @Excel(name = "球馆状态") - private Long status; + private Integer status; /** 拒绝原因 */ @Excel(name = "拒绝原因") @@ -120,12 +120,12 @@ public class WxBuildingInfo extends BaseEntity { return id; } - public void setIsDeleted(Long isDeleted) + public void setIsDeleted(Integer isDeleted) { this.isDeleted = isDeleted; } - public Long getIsDeleted() + public Integer getIsDeleted() { return isDeleted; } @@ -255,12 +255,12 @@ public class WxBuildingInfo extends BaseEntity { return isSupportlive; } - public void setStatus(Long status) + public void setStatus(Integer status) { this.status = status; } - public Long getStatus() + public Integer getStatus() { return status; } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxUser.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxUser.java index 205fda2bb..efacb2790 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxUser.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxUser.java @@ -65,7 +65,7 @@ public class WxUser extends BaseEntity /** 性别 */ @Excel(name = "性别") - private String gender; + private Integer gender; /** 用户名称 */ @Excel(name = "用户名称") @@ -98,7 +98,7 @@ public class WxUser extends BaseEntity /** 状态 */ @Excel(name = "状态") - private String enabled; + private Integer enabled; /** 微信多平台唯一ID */ @Excel(name = "微信多平台唯一ID") @@ -211,12 +211,12 @@ public class WxUser extends BaseEntity { return avatar; } - public void setGender(String gender) + public void setGender(Integer gender) { this.gender = gender; } - public String getGender() + public Integer getGender() { return gender; } @@ -283,12 +283,12 @@ public class WxUser extends BaseEntity { return tag; } - public void setEnabled(String enabled) + public void setEnabled(Integer enabled) { this.enabled = enabled; } - public String getEnabled() + public Integer getEnabled() { return enabled; } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/CompetitionStatusEnum.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/CompetitionStatusEnum.java new file mode 100644 index 000000000..211281a91 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/CompetitionStatusEnum.java @@ -0,0 +1,31 @@ +package com.ruoyi.system.domain.enums; + +import lombok.Getter; +import lombok.Setter; + +/** : 比赛状态 + * @author : + * @date : 2019/11/30 + */ +public enum CompetitionStatusEnum { + TREATY_WAR("treatyWar",0, "约战中"), + ACCEPT_WAR("acceptWar", 1,"已应战"), + WAREND("warEnd",2 ,"已结束"); + + @Getter + @Setter + private String code; + @Getter + @Setter + private Integer value; + @Getter + @Setter + private String desc; + + CompetitionStatusEnum(String code, Integer value, String desc) { + this.code = code; + this.desc = desc; + this.value = value; + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/FowTypeEnum.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/FowTypeEnum.java new file mode 100644 index 000000000..1f4f0839f --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/FowTypeEnum.java @@ -0,0 +1,29 @@ +package com.ruoyi.system.domain.enums; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author : + * @date : 2019/11/30 + */ +public enum FowTypeEnum { + + MEMBER_APPLY("memberApply", "队员申请"), + + MAKE_AN_APPOINTMENT("makeAnAppointment", "约战消息"); + + @Getter + @Setter + private String code; + + @Getter + @Setter + private String desc; + + FowTypeEnum(String code, String desc) { + this.code = code; + this.desc = desc; + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/RoleEnum.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/RoleEnum.java new file mode 100644 index 000000000..5813cca17 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/RoleEnum.java @@ -0,0 +1,33 @@ +package com.ruoyi.system.domain.enums; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author : + * @date : 2019/11/30 + */ +public enum RoleEnum { + + GUEST("guest", "游客"), + + TEAM_MANAGER("teamManager", "队长"), + + TEAM_MEMBER("teamMember", "队员"), + + REFEREES("referees", "裁判员"); + + @Getter + @Setter + private String code; + + @Getter + @Setter + private String desc; + + RoleEnum(String code, String desc) { + this.code = code; + this.desc = desc; + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/UserRoles.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/UserRoles.java new file mode 100644 index 000000000..dbb14c40b --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/UserRoles.java @@ -0,0 +1,41 @@ +package com.ruoyi.system.domain.enums; + +import org.springframework.util.StringUtils; + +/** + * Created by jackma on 2020/1/17. + */ +public enum UserRoles { + ADMIN("admin", "管理员"), + CURATOR("curator", "球馆负责人"), + customer("customer", "普通用户"); + + private String code; + + private String message; + + UserRoles(String code, String message) { + this.code = code; + this.message = message; + } + + public static String getMessageByCode(String code){ + if(StringUtils.isEmpty(code)){ + return null; + } + for(UserRoles roles:UserRoles.values()){ + if(code.equals(roles.code())){ + return roles.message(); + } + } + return null; + } + + public String code() { + return this.code; + } + + public String message() { + return this.message; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/VsResultEnums.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/VsResultEnums.java new file mode 100644 index 000000000..45251655e --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/VsResultEnums.java @@ -0,0 +1,37 @@ +package com.ruoyi.system.domain.enums; + +import org.springframework.util.StringUtils; + +public enum VsResultEnums { + win("win", "胜"), + fail("fail", "负"); + + private String code; + + private String message; + + VsResultEnums(String code, String message) { + this.code = code; + this.message = message; + } + + public static String getMessageByCode(String code){ + if(StringUtils.isEmpty(code)){ + return null; + } + for(VsResultEnums roles:VsResultEnums.values()){ + if(code.equals(roles.code())){ + return roles.message(); + } + } + return null; + } + + public String code() { + return this.code; + } + + public String message() { + return this.message; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/WxAppletsSendErrCodesEnum.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/WxAppletsSendErrCodesEnum.java new file mode 100644 index 000000000..7f368570e --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/WxAppletsSendErrCodesEnum.java @@ -0,0 +1,42 @@ +package com.ruoyi.system.domain.enums; + +import lombok.Getter; +import lombok.Setter; +import org.springframework.util.StringUtils; + +/**微信小程序发送模版消息返回errcode + * @author :wyb + * @date : 2019/11/30 + */ +public enum WxAppletsSendErrCodesEnum { + ERR_CODES_40003("40003", "touser字段openid为空或者不正确"), + ERR_CODES_40037("40037", "订阅模板id为空不正确"), + ERR_CODES_43101 ("43101", "用户拒绝接受消息,如果用户之前曾经订阅过,则表示用户取消了订阅关系"), + ERR_CODES_47003("47003", "模板参数不准确,可能为空或者不满足规则,errmsg会提示具体是哪个字段出错"), + ERR_CODES_41030 ("41030", "page路径不正确,需要保证在现网版本小程序中存在,与app.json保持一致"); + + @Getter + @Setter + private String code; + + @Getter + @Setter + private String desc; + + WxAppletsSendErrCodesEnum(String code, String desc) { + this.code = code; + this.desc = desc; + } + public static String getDescByCode(String code){ + if(StringUtils.isEmpty(code)){ + return null; + } + for(WxAppletsSendErrCodesEnum codesEnum:WxAppletsSendErrCodesEnum.values()){ + if(code.equals(codesEnum.code)){ + return codesEnum.desc; + } + } + return null; + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/WxAppletsTemplateIdsEnum.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/WxAppletsTemplateIdsEnum.java new file mode 100644 index 000000000..ad82e3996 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/enums/WxAppletsTemplateIdsEnum.java @@ -0,0 +1,31 @@ +package com.ruoyi.system.domain.enums; + +import lombok.Getter; +import lombok.Setter; + +/**微信小程序模版id + * @author :wyb + * @date : 2019/11/30 + */ +public enum WxAppletsTemplateIdsEnum { + COMPETITION_SIGN_UP("nsYn7oicXL4bdmQcLgvjIj7tKK3cdTgk8fo1AtOgbMU", "赛事报名通知"), + JOIN_COMPETITION_REMIND("F827c-LWDS3UTaJYthC-i_V_2G1ZlmDhiaipzcl8_Xk", "参赛提醒"), + COMPETITION_COURSE_REMIND("PpYtjeEGaP12P3ZptJAkIeaaF3WAlwrjy5Kd7qjF22Y", "比赛赛程提醒"), + TREATY_WAR("Ixgc13ZUMPrOZbR05EvdicqpsH88WMByfXULm7IGrmQ", "约战准备提醒"), + TREATY_WAR_SUCCESS("Ixgc13ZUMPrOZbR05EvdicqpsH88WMByfXULm7IGrmQ", "约战成功提醒"), + ACCEPT_WAR ("QfLtKHzgj7R-Qa73x1loykHbcy4FkiAGLWeZPpSqEQk", "应战提醒"); + + @Getter + @Setter + private String code; + + @Getter + @Setter + private String desc; + + WxAppletsTemplateIdsEnum(String code, String desc) { + this.code = code; + this.desc = desc; + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BasketballTeamRequest.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BasketballTeamRequest.java new file mode 100644 index 000000000..bd6da16ef --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BasketballTeamRequest.java @@ -0,0 +1,27 @@ +package com.ruoyi.system.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.io.Serializable; + +/** + * Created by liguanghui on 2019/12/26. + */ +public class BasketballTeamRequest implements Serializable{ + private static final long serialVersionUID = 1L; + /** + *市 + */ + @Setter + @Getter + private String cityCode; + /** + *球队名称 + */ + @Setter + @Getter + @ApiModelProperty(value="球队名称",required=false) + private String teamName; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BasketballTeamResponse.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BasketballTeamResponse.java new file mode 100644 index 000000000..3a1d4fa74 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BasketballTeamResponse.java @@ -0,0 +1,50 @@ +package com.ruoyi.system.domain.vo; + +import com.ruoyi.system.domain.WxBasketballTeam; +import lombok.Getter; +import lombok.Setter; + +import java.math.BigDecimal; + +/** + * Created by liguanghui on 2019/12/26. + */ +public class BasketballTeamResponse extends WxBasketballTeam { + /** + *名称 + */ + @Setter + @Getter + private String buildingName; + /** + * + */ + @Setter + @Getter + private String address; + /** + *经度 + */ + @Setter + @Getter + private BigDecimal longitude; + + /** + *纬度 + */ + @Setter + @Getter + private BigDecimal latitude; + /** + * 场馆照片 + */ + @Setter + @Getter + private String defaultPicture; + /** + *备注 + */ + @Setter + @Getter + private String desc; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BuildingInfoRequest.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BuildingInfoRequest.java new file mode 100644 index 000000000..8eb552b09 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BuildingInfoRequest.java @@ -0,0 +1,60 @@ +package com.ruoyi.system.domain.vo; + +import com.ruoyi.system.domain.WxBuildingInfo; +import lombok.Getter; +import lombok.Setter; + +/** + * Created by liguanghui on 2020/1/17. + */ +public class BuildingInfoRequest extends WxBuildingInfo { + @Setter + @Getter + private String openId; + /** + * + */ + @Setter + @Getter + private Long buildingId; + /** + *营业时间 + */ + @Setter + @Getter + private String businessHours; + + /** + *联系人 + */ + @Setter + @Getter + private String linkman; + + /** + *联系电话 + */ + @Setter + @Getter + private String linkphone; + + /** + *收费标准 + */ + @Setter + @Getter + private String feeStandard; + + /** + *球馆标签 + */ + @Setter + @Getter + private String labelDesc; + /** + *公告 + */ + @Setter + @Getter + private String notice; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BuildingInfoResponse.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BuildingInfoResponse.java new file mode 100644 index 000000000..ba0244a4c --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/BuildingInfoResponse.java @@ -0,0 +1,113 @@ +package com.ruoyi.system.domain.vo; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.system.domain.BuildingInfoDetail; +import com.ruoyi.system.domain.FeatureLabel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.math.BigDecimal; +import java.util.List; + +@Setter +@Getter +@ApiModel(value="球馆全部详情") +public class BuildingInfoResponse extends BuildingInfoDetail { + @ApiModelProperty(value="球馆ID",required=false) + private Long id; + /** + *名称 + */ + + @ApiModelProperty(value="球馆名称",required=false) + private String buildingName; + /** + * + */ + @ApiModelProperty(value="球馆地址",required=false) + private String address; + /** + *经度 + */ + @ApiModelProperty(value="球馆经度",required=false) + private BigDecimal longitude; + + /** + *纬度 + */ + @ApiModelProperty(value="球馆维度",required=false) + private BigDecimal latitude; + /** + *省 + */ + @ApiModelProperty(value="省",required=false) + private String provinceCode; + /** + *市 + */ + @ApiModelProperty(value="市",required=false) + private String cityCode; + /** + *区县编码 + */ + @ApiModelProperty(value="区县编码",required=false) + private String countyCode; + /** + *备注 + */ + @ApiModelProperty(value="备注",required=false) + private String desc; + + @ApiModelProperty(value="备注1",required=false) + private String remark; + /** + *场馆特征 + */ + @ApiModelProperty(value="场馆特征",required=false) + private List labels; + /** + * 场馆照片 + */ + @ApiModelProperty(value="场馆照片",required=false) + private String defaultPicture; + + /** + * 球场距离 + */ + @ApiModelProperty(value="球场距离",required=false) + private Double distance; + /** + * 球馆状态 + */ + @ApiModelProperty(value="球馆状态",required=false) + private Long status; + /** + * 拒绝原因 + */ + @ApiModelProperty(value="拒绝原因",required=false) + private String rejectReason; + + /** + * 是否在线球场 + */ + @ApiModelProperty(value="是否在线球场",required=false) + private String isSupportlive; + /** + *市名称 + */ + @ApiModelProperty(value="城市名称",required=false) + private String cityName; + /** + * 球馆状态中文 + */ + @ApiModelProperty(value="球馆状态中文",required=false) + private String statusName; + + + private String mittelkurs; + @Excel(name = "创建人ID") + private Long createdId; + + private String chatGroupUrl; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionExcleVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionExcleVo.java new file mode 100644 index 000000000..1ed33a640 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionExcleVo.java @@ -0,0 +1,22 @@ +package com.ruoyi.system.domain.vo; + +import com.ruoyi.system.domain.Competition; +import com.ruoyi.system.domain.CompetitionMembers; +import com.ruoyi.system.domain.CompetitionOfTeam; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author 吴一博 + * @date 2023年04月14日 10:39 + * @Description + */ +@Data +public class CompetitionExcleVo extends Competition { + @ApiModelProperty(value = "球队", required = false) + public CompetitionOfTeam ofTeam; + @ApiModelProperty(value = "参赛人员", required = false) + List teamMemberList; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionMembersVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionMembersVo.java new file mode 100644 index 000000000..371fffa82 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionMembersVo.java @@ -0,0 +1,72 @@ +package com.ruoyi.system.domain.vo; +import com.ruoyi.system.domain.CompetitionMembers; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +/** + * 系统名称:future篮球后台系统系统
+ * 模块名称:BASKETBALL-DOMAIN
+ * 中文类名:比赛参与人员表 实体类
+ * 概要说明:比赛参与人员表 实体类
+ * @version:v1.0
+ * 版本 修改人 备注
+ * + * @author : gc + * @date : 2020年08月07日 + */ +@ApiModel(value = "比赛参与人员Vo") +@Setter +@Getter +public class CompetitionMembersVo extends CompetitionMembers { + + private static final long serialVersionUID = 1L; + /** + *用户名称 + */ + @ApiModelProperty(value="用户名称",required=false) + private String userName; + /** + *用户CODE + */ + @ApiModelProperty(value="用户CODE",required=false) + private String userCode; + /** + *登录名 + */ + @ApiModelProperty(value="登录名",required=false) + private String loginName; + + /** + *角色 + */ + @ApiModelProperty(value="角色",required=false) + private String role; + /** + *头像 + */ + @ApiModelProperty(value="头像",required=false) + private String avatar; + /** + *性别 + */ + @ApiModelProperty(value="性别",required=false) + private String gender; + + @ApiModelProperty(value = "短信验证码", required = false) + private String captcha; + + @ApiModelProperty(value="身高",required=false) + private java.math.BigDecimal height; + + + @ApiModelProperty(value="体重",required=false) + private java.math.BigDecimal weight; + + /** + *球队位置【字典】 + */ + @ApiModelProperty(value="球队位置【字典】",required=false) + private String teamPosition; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionOfTeamGroupVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionOfTeamGroupVo.java new file mode 100644 index 000000000..e0b17eb5b --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionOfTeamGroupVo.java @@ -0,0 +1,20 @@ +package com.ruoyi.system.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Setter +@Getter +public class CompetitionOfTeamGroupVo { + + @ApiModelProperty(value = "分组名", required = false) + private String groupName; + + @ApiModelProperty(value="球队列表",required=false) + private List teamList; + + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionOfTeamVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionOfTeamVo.java index 12cf43482..d235ab223 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionOfTeamVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionOfTeamVo.java @@ -1,6 +1,7 @@ package com.ruoyi.system.domain.vo; import com.ruoyi.system.domain.CompetitionOfTeam; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** @@ -13,4 +14,28 @@ public class CompetitionOfTeamVo extends CompetitionOfTeam { /** 球队logo */ private String teamLogo; private String defaultPicture; + + private String captain; + + + @ApiModelProperty(value="球队图片",required=false) + private String teamImg; + + @ApiModelProperty(value="用户id",required=false) + private Long userId; + + @ApiModelProperty(value="球队队长userId",required=false) + private String teamManagerUserId; + + @ApiModelProperty(value="胜场",required=false) + private int victory; + + @ApiModelProperty(value="负场",required=false) + private int lose; + + @ApiModelProperty(value="积分",required=false) + private Integer integral = 0; + + @ApiModelProperty(value="赛程类型【0 循环赛 1 淘汰赛】",required=false) + private int vsType; } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionResponse.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionResponse.java new file mode 100644 index 000000000..1829e07ad --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionResponse.java @@ -0,0 +1,49 @@ +package com.ruoyi.system.domain.vo; +import com.ruoyi.system.domain.Competition; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +/** + * 系统名称:future篮球后台系统系统
+ * 模块名称:BASKETBALL-DOMAIN
+ * 中文类名:比赛信息表 实体类
+ * 概要说明:比赛信息表 实体类
+ * @version:v1.0
+ * 版本 修改人 备注
+ * + * @author : gc + * @date : 2020年08月06日 + */ +@ApiModel(value = "比赛详情实体") +@Setter +@Getter +public class CompetitionResponse extends Competition { + + @ApiModelProperty(value = "主队合照", required = false) + private String mainTeamPhoto; + + @ApiModelProperty(value = "主队介绍", required = false) + private String mainTeamDes; + + @ApiModelProperty(value = "客队合照", required = false) + private String guestTeamPhoto; + + @ApiModelProperty(value = "客队介绍", required = false) + private String guestTeamDes; + + @ApiModelProperty(value = "主队参赛人员", required = false) + List mainTeamMemberList; + + @ApiModelProperty(value = "主队最近赛事", required = false) + List mainCompetitionTeamVsTeamList; + + @ApiModelProperty(value = "客队参赛人员", required = false) + List guestTeamMemberList; + + @ApiModelProperty(value = "客队最近赛事", required = false) + List guestCompetitionTeamVsTeamList; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamGroupVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamGroupVo.java new file mode 100644 index 000000000..2a3cd945a --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamGroupVo.java @@ -0,0 +1,26 @@ +package com.ruoyi.system.domain.vo; + +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Getter +@Setter +public class CompetitionTeamGroupVo { + + private List isNotGroup; + + private List isGroup; + @Getter + @Setter + public static class IsGroupBean { + /** + * competitionOfTeamList : [{"createdTime":"2020-10-28 21:27:33","lastUpdatedTime":"2020-11-03 10:09:38","createdBy":"柯里","modifiedBy":"柯里","isDeleted":0,"id":9,"competitionId":26,"teamId":3,"teamName":"爱的表达","competitionGroup":"A","status":1,"remark":"","contacts":"张三","contactsTel":"15202838161","contactsAreaCode":"86","captcha":null,"teamLogo":"https://mall.lzsport.cn/image/2020/10/29/ae3756ab-c721-4277-bf0f-506d83c34818.jpg","teamImg":"https://adu.shjmall.cn/liguanghui/image//2020/10/28/19b257f9-433e-403c-abfd-f6d4fec88953.jpg","userId":null,"teamManagerUserId":6},{"createdTime":"2020-10-28 15:55:24","lastUpdatedTime":"2020-11-03 10:09:32","createdBy":"辉","modifiedBy":"博博","isDeleted":0,"id":5,"competitionId":26,"teamId":6,"teamName":"超燃队","competitionGroup":"A","status":1,"remark":"","contacts":"看看哇","contactsTel":"18202860065","contactsAreaCode":"86","captcha":null,"teamLogo":"https://adu.shjmall.cn/liguanghui/image//2020/10/29/8178f499-3114-4512-af3b-28ec535cee6a.jpg","teamImg":"https://adu.shjmall.cn/liguanghui/image//2020/09/18/ff110b5f-3e4c-4a4f-a3a3-dcfcfbf6560e.jpg","userId":null,"teamManagerUserId":5}] + * competitionGroup : A + */ + private String competitionGroup; + private List competitionOfTeamList; + + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamIntegralVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamIntegralVo.java new file mode 100644 index 000000000..9782f4cfb --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamIntegralVo.java @@ -0,0 +1,20 @@ +package com.ruoyi.system.domain.vo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author 吴一博 + * @date 2023年06月26日 17:36 + * @Description + */ +@Data +public class CompetitionTeamIntegralVo implements Serializable { + private String teamName; + private String teamLogo; + private Integer win; + private Integer fail; + private Integer totalScore; + private Integer integral; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamVsTeamRequest.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamVsTeamRequest.java new file mode 100644 index 000000000..227dfa8fd --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamVsTeamRequest.java @@ -0,0 +1,28 @@ +package com.ruoyi.system.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Setter +@Getter +public class CompetitionTeamVsTeamRequest { + @ApiModelProperty(value="比赛赛事ID",required=false) + Long competitionId; + @ApiModelProperty(value="比赛日期",required=false) + + String competitionDate; + @ApiModelProperty(value="日期对应的星期几",required=false) + String weekDay; + + @ApiModelProperty(value="比赛方式:循环赛,淘汰赛",required=false) + String vsType; + + @ApiModelProperty(value="禁止操作",required=false) + Boolean isDisabled; + + @ApiModelProperty(value="比赛的双方球队",required=false) + List teamVsTeamList; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamVsTeamVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamVsTeamVo.java index 4feb7fcba..65943b903 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamVsTeamVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionTeamVsTeamVo.java @@ -23,9 +23,8 @@ public class CompetitionTeamVsTeamVo extends CompetitionTeamVsTeam { @ApiModelProperty(value = "中文状态", required = false) private String statusName; - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "比赛时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date competitionDate; + @ApiModelProperty(value = "比赛日期", required = false) + private String competitionDate; private String weekDayName; private String theTime; } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionVo.java new file mode 100644 index 000000000..3c14ef731 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CompetitionVo.java @@ -0,0 +1,19 @@ +package com.ruoyi.system.domain.vo; +import com.ruoyi.system.domain.Competition; +import io.swagger.annotations.ApiModelProperty; +import lombok.*; +@Data +@NoArgsConstructor +@AllArgsConstructor +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) +public class CompetitionVo extends Competition { + @ApiModelProperty(value = "多字段过滤条件", required = false) + private String word; + + @ApiModelProperty(value = "用户id", required = false) + private Long userId; + + @ApiModelProperty(value = "短信验证码", required = false) + private String captcha; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/PersonalCareerVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/PersonalCareerVo.java new file mode 100644 index 000000000..10731b7d8 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/PersonalCareerVo.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.domain.vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.math.BigDecimal; + +/** + * + */ +@ApiModel(value = "个人生涯Vo") +@Setter +@Getter +public class PersonalCareerVo { + + private static final long serialVersionUID = 1L; + + /** + *场均得分 + */ + @ApiModelProperty(value="场均得分",required=false) + private BigDecimal totalScore; + + /** + *场均篮板 + */ + @ApiModelProperty(value="场均篮板",required=false) + private BigDecimal backboard; + + /** + *场均3分 + */ + @ApiModelProperty(value="场均3分",required=false) + private BigDecimal threePoints; + + /** + *场均2分 + */ + @ApiModelProperty(value="场均2分",required=false) + private BigDecimal twoPoints; + + /** + *场均罚球 + */ + @ApiModelProperty(value="场均罚球",required=false) + private BigDecimal penalty; + + /** + *场均抢断 + */ + @ApiModelProperty(value="场均抢断",required=false) + private BigDecimal snatch; + + /** + *场均盖帽 + */ + @ApiModelProperty(value="场均盖帽",required=false) + private BigDecimal block; + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/PersonalHonorResponse.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/PersonalHonorResponse.java new file mode 100644 index 000000000..22d479b1d --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/PersonalHonorResponse.java @@ -0,0 +1,26 @@ +package com.ruoyi.system.domain.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + + +/** + * 个人荣誉榜 + */ +@ApiModel(value = "个人荣誉榜") +@Setter +@Getter +public class PersonalHonorResponse { + + @ApiModelProperty(value = "荣誉名称", required = false) + private String honorName; + + @ApiModelProperty(value = "荣誉人员", required = false) + private String honoraryPersonnel; + + @ApiModelProperty(value = "球队名称", required = false) + private String teamName; + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/PhoneRequest.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/PhoneRequest.java new file mode 100644 index 000000000..f0a172d42 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/PhoneRequest.java @@ -0,0 +1,29 @@ +package com.ruoyi.system.domain.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.io.Serializable; + +@ApiModel(value="用户登录获取手机号码请求信息") +@Setter +@Getter +public class PhoneRequest implements Serializable { + @ApiModelProperty(value="包括敏感数据在内的完整用户信息的加密数据",required=false) + private String encryptedData; + @ApiModelProperty(value = "动态令牌。可通过动态令牌换取用户手机号",required=false) + private String code; + + private String cloudID; + @ApiModelProperty(value="加密算法的初始向量",required=false) + private String iv; + @ApiModelProperty(value="sessionKey",required=false) + private String sessionKey; + @ApiModelProperty(value="错误信息",required=false) + private String errMsg; + + @ApiModelProperty(value="userid",required=false) + private String userId; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SmsResponse.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SmsResponse.java new file mode 100644 index 000000000..5615de8b9 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SmsResponse.java @@ -0,0 +1,14 @@ +package com.ruoyi.system.domain.vo; + +import lombok.Getter; +import lombok.Setter; + +import java.io.Serializable; + +@Setter +@Getter +public class SmsResponse implements Serializable { + private int status; + private String batchNo; + private String msg; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TeamGroupRequest.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TeamGroupRequest.java new file mode 100644 index 000000000..8c709e8f4 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TeamGroupRequest.java @@ -0,0 +1,18 @@ +package com.ruoyi.system.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Setter +@Getter +public class TeamGroupRequest { + @ApiModelProperty(value = "分组", required = false) + private String group; + @ApiModelProperty(value = "比赛ID", required = false) + private Long competitionId; + @ApiModelProperty(value = "IDS", required = false) + private List ofTeamIds; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TeamMembersResponse.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TeamMembersResponse.java new file mode 100644 index 000000000..7b2dd50ea --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TeamMembersResponse.java @@ -0,0 +1,63 @@ +package com.ruoyi.system.domain.vo; + +import com.ruoyi.system.domain.TeamMembers; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +/** + * 系统名称:future篮球后台系统系统
+ * 模块名称:BASKETBALL-DOMAIN
+ * 中文类名:球队人员表 实体类
+ * 概要说明:球队人员表 实体类
+ * @version:v1.0
+ * 版本 修改人 备注
+ * + * @author : gc + * @date : 2020年08月06日 + */ +@ApiModel(value = "参与球队人员数据") +@Setter +@Getter +public class TeamMembersResponse extends TeamMembers { + + private static final long serialVersionUID = 1L; + + /** + *用户名称 + */ + @ApiModelProperty(value="用户名称",required=false) + private String userName; + /** + *用户CODE + */ + @ApiModelProperty(value="用户CODE",required=false) + private String userCode; + /** + *登录名 + */ + @ApiModelProperty(value="登录名",required=false) + private String loginName; + + /** + *角色 + */ + @ApiModelProperty(value="角色",required=false) + private String role; + /** + *头像 + */ + @ApiModelProperty(value="头像",required=false) + private String avatar; + /** + *性别 + */ + @ApiModelProperty(value="性别",required=false) + private String gender; + /** + *手机号 + */ + @ApiModelProperty(value="手机号",required=false) + private String telephone; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TemplateDataVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TemplateDataVo.java new file mode 100644 index 000000000..4355eda56 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TemplateDataVo.java @@ -0,0 +1,26 @@ +package com.ruoyi.system.domain.vo; + +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/* + * 设置推送的文字和颜色 + * */ +@Builder +@Data +@NoArgsConstructor +public class TemplateDataVo implements Serializable { + //字段值例如:keyword1:订单类型,keyword2:下单金额,keyword3:配送地址,keyword4:取件地址,keyword5备注 + private String value;//依次排下去 + private String color; + public TemplateDataVo(String value) { + this.value = value; + } + public TemplateDataVo(String value, String color) { + this.value = value; + this.color = color; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/UserInfoResponse.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/UserInfoResponse.java new file mode 100644 index 000000000..1a2de0ac6 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/UserInfoResponse.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.domain.vo; +import com.ruoyi.system.domain.WxUser; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +/** + * Created by jackma on 2020/5/25. + */ +@ApiModel(value="个人中心-用户信息") +public class UserInfoResponse extends WxUser { + private static final long serialVersionUID = 1L; + + /** + *年龄 + */ + @Setter + @Getter + @ApiModelProperty(value="年龄",required=false) + private int age; + + /** + *角色名称 + */ + @Setter + @Getter + @ApiModelProperty(value="角色名称",required=false) + private String roleName; + + /** + *球队位置-中文 + */ + @Setter + @Getter + @ApiModelProperty(value="球队位置-中文",required=false) + private List teamPositionName; + + /** + *标签名称-中文 + */ + @Setter + @Getter + @ApiModelProperty(value="标签名称-中文",required=false) + private List tagName; + @Setter + @Getter + @ApiModelProperty(value="角色codes",required=false) + private List roleCodes; + + /** + * 个人生涯 + */ + @Setter + @Getter + @ApiModelProperty(value="个人生涯",required=false) + private PersonalCareerVo personalCareerVo; + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxApplesRes.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxApplesRes.java new file mode 100644 index 000000000..b7ea66b95 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxApplesRes.java @@ -0,0 +1,12 @@ +package com.ruoyi.system.domain.vo; + +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class WxApplesRes { + private String errcode; + private String errmsg; + private String msgid; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxLoginRequest.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxLoginRequest.java new file mode 100644 index 000000000..236f8c6d2 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxLoginRequest.java @@ -0,0 +1,66 @@ +package com.ruoyi.system.domain.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * Created by jackma on 2020/7/20. + */ +@ApiModel(value="用户登录请求信息") +public class WxLoginRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 账号(手机号/微信code) + */ + @Setter + @Getter + @ApiModelProperty(value="账号(手机号/微信code)",required=false) + @NotBlank(message = "登录账号不能为空") + private String loginName; + /** + * 登录密码 + */ + @Setter + @Getter + @ApiModelProperty(value = "用户密码") + private String password; + /** + * 用户手机号(微信登录需要传) + */ + @Setter + @Getter + @ApiModelProperty(value = "用户手机号") + private String telephone; + /** + *头像(微信登录需要传) + */ + @Setter + @Getter + private String avatar; + /** + *性别(微信登录需要传) + */ + @Setter + @Getter + private Integer gender; + /** + *昵称(微信登录需要传) + */ + @Setter + @Getter + private String nickname; + /** + * 登录类型(1:pc;2:wx) + */ + @Setter + @Getter + @ApiModelProperty(value = "登录类型(1:pc;2:wx)") + @NotBlank(message = "登录类型不能为空") + private String type; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxMssVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxMssVo.java new file mode 100644 index 000000000..528e117af --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxMssVo.java @@ -0,0 +1,33 @@ +package com.ruoyi.system.domain.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.*; + +import java.io.Serializable; +import java.util.Map; + +/* + * 小程序推送所需数据 + * */ +@Builder +@Data +@AllArgsConstructor(access = AccessLevel.PRIVATE) +@NoArgsConstructor +@ApiModel(value="微信小程序发送模版消息专用vo") +public class WxMssVo implements Serializable { + @ApiModelProperty(value="用户openid",required=true) + private String touser; + @ApiModelProperty(value="消息模版id",required=true) + private String template_id; + @ApiModelProperty(value="默认跳到小程序首页地址路径",required=false) + private String page = "pages/my/my"; + @ApiModelProperty(value="跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版",required=false) + private String miniprogram_state="formal"; + @ApiModelProperty(value="进入小程序查看”的语言类型,支持zh_CN(简体中文)、en_US(英文)、zh_HK(繁体中文)、zh_TW(繁体中文),默认为zh_CN",required=false) + private String lang="zh_CN"; + @ApiModelProperty(value="模板内容,格式形如 { \"key1\": { \"value\": any }, \"key2\": { \"value\": any } }",required=true) + private Map data; + @ApiModelProperty(value="小程序全局唯一后台接口调用凭据",required=false) + private String accessToken; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxPhoneNumberVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxPhoneNumberVo.java new file mode 100644 index 000000000..3c965c750 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxPhoneNumberVo.java @@ -0,0 +1,50 @@ +package com.ruoyi.system.domain.vo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author 吴一博 + * @date 2022年11月01日 17:17 + * @Description 微信小程序获取手机号码返回对象 + */ +@Data +public class WxPhoneNumberVo implements Serializable { + + /** + * errcode : 0 + * errmsg : ok + * phone_info : {"phoneNumber":"xxxxxx","purePhoneNumber":"xxxxxx","countryCode":86,"watermark":{"timestamp":1637744274,"appid":"xxxx"}} + */ + + private int errcode; + private String errmsg; + private PhoneInfoBean phone_info; + + @Data + public static class PhoneInfoBean implements Serializable { + /** + * phoneNumber : xxxxxx + * purePhoneNumber : xxxxxx + * countryCode : 86 + * watermark : {"timestamp":1637744274,"appid":"xxxx"} + */ + + private String phoneNumber; + private String purePhoneNumber; + private int countryCode; + private WatermarkBean watermark; + + @Data + public static class WatermarkBean implements Serializable { + /** + * timestamp : 1637744274 + * appid : xxxx + */ + + private int timestamp; + private String appid; + } + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxRegisterRequest.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxRegisterRequest.java new file mode 100644 index 000000000..68d785982 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WxRegisterRequest.java @@ -0,0 +1,51 @@ +package com.ruoyi.system.domain.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import javax.validation.constraints.NotBlank; + +/** + * Created by jackma on 2020/7/20. + */ +@ApiModel(value="用户注册请求信息") +public class WxRegisterRequest { + @Setter + @Getter + @ApiModelProperty(value = "账号") + @NotBlank(message = "账号不能为空") + private String account; + + @Setter + @Getter + @ApiModelProperty(value = "密码") + @NotBlank(message = "密码不能为空") + private String password; + + @Setter + @Getter + @ApiModelProperty(value = "电话") + private String telephone; + + @Setter + @Getter + @ApiModelProperty(value = "真实名称") + private String realName; + + @Setter + @Getter + @ApiModelProperty(value = "昵称") + private String nickName; + + @Setter + @Getter + @ApiModelProperty(value = "邮箱") + private String email; + + @Setter + @Getter + @ApiModelProperty(value = "性别(1.男 2.女) ") + private Integer gender; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BuildingInfoDetailMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BuildingInfoDetailMapper.java new file mode 100644 index 000000000..805457550 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BuildingInfoDetailMapper.java @@ -0,0 +1,63 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.BuildingInfoDetail; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-06 + */ +public interface BuildingInfoDetailMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public BuildingInfoDetail selectBuildingInfoDetailById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param buildingInfoDetail 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectBuildingInfoDetailList(BuildingInfoDetail buildingInfoDetail); + + /** + * 新增【请填写功能名称】 + * + * @param buildingInfoDetail 【请填写功能名称】 + * @return 结果 + */ + public int insertBuildingInfoDetail(BuildingInfoDetail buildingInfoDetail); + + /** + * 修改【请填写功能名称】 + * + * @param buildingInfoDetail 【请填写功能名称】 + * @return 结果 + */ + public int updateBuildingInfoDetail(BuildingInfoDetail buildingInfoDetail); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteBuildingInfoDetailById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBuildingInfoDetailByIds(Long[] ids); + + BuildingInfoDetail selectOneByBuildingId(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BuildingLabelMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BuildingLabelMapper.java new file mode 100644 index 000000000..6ed74cd46 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BuildingLabelMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.BuildingLabel; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface BuildingLabelMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public BuildingLabel selectBuildingLabelById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param buildingLabel 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectBuildingLabelList(BuildingLabel buildingLabel); + + /** + * 新增【请填写功能名称】 + * + * @param buildingLabel 【请填写功能名称】 + * @return 结果 + */ + public int insertBuildingLabel(BuildingLabel buildingLabel); + + /** + * 修改【请填写功能名称】 + * + * @param buildingLabel 【请填写功能名称】 + * @return 结果 + */ + public int updateBuildingLabel(BuildingLabel buildingLabel); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteBuildingLabelById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBuildingLabelByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BuildingTeamRelMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BuildingTeamRelMapper.java new file mode 100644 index 000000000..72fd41a35 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BuildingTeamRelMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.BuildingTeamRel; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface BuildingTeamRelMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public BuildingTeamRel selectBuildingTeamRelById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param buildingTeamRel 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectBuildingTeamRelList(BuildingTeamRel buildingTeamRel); + + /** + * 新增【请填写功能名称】 + * + * @param buildingTeamRel 【请填写功能名称】 + * @return 结果 + */ + public int insertBuildingTeamRel(BuildingTeamRel buildingTeamRel); + + /** + * 修改【请填写功能名称】 + * + * @param buildingTeamRel 【请填写功能名称】 + * @return 结果 + */ + public int updateBuildingTeamRel(BuildingTeamRel buildingTeamRel); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteBuildingTeamRelById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBuildingTeamRelByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CameraInfoMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CameraInfoMapper.java new file mode 100644 index 000000000..ea5083037 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CameraInfoMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.CameraInfo; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface CameraInfoMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public CameraInfo selectCameraInfoById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param cameraInfo 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectCameraInfoList(CameraInfo cameraInfo); + + /** + * 新增【请填写功能名称】 + * + * @param cameraInfo 【请填写功能名称】 + * @return 结果 + */ + public int insertCameraInfo(CameraInfo cameraInfo); + + /** + * 修改【请填写功能名称】 + * + * @param cameraInfo 【请填写功能名称】 + * @return 结果 + */ + public int updateCameraInfo(CameraInfo cameraInfo); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteCameraInfoById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCameraInfoByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMapper.java index c08de9b65..1dfebb4ca 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMapper.java @@ -2,6 +2,8 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.Competition; +import com.ruoyi.system.domain.vo.CompetitionExcleVo; +import com.ruoyi.system.domain.vo.CompetitionVo; /** * 比赛信息Mapper接口 @@ -58,4 +60,10 @@ public interface CompetitionMapper * @return 结果 */ public int deleteCompetitionByIds(Long[] ids); + + List getCompetitionByCondition(CompetitionVo competition); + + CompetitionExcleVo getTeamEnrollExcleImpData(Long competitionId, Long userId); + + List getMyJoinCompetition(CompetitionVo competition); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMembersMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMembersMapper.java index 072c31560..4fba8e16f 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMembersMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMembersMapper.java @@ -2,6 +2,8 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.CompetitionMembers; +import com.ruoyi.system.domain.vo.CompetitionMembersVo; +import org.apache.ibatis.annotations.Param; /** * 比赛参与人员Mapper接口 @@ -58,4 +60,12 @@ public interface CompetitionMembersMapper * @return 结果 */ public int deleteCompetitionMembersByIds(Long[] ids); + + List getJoinCompetitionMembersPage(CompetitionMembersVo entity); + + void deleteByMembers(Long competitionId, Long teamOfId); + + List getCompetitionMembersByCompetitionId(Long competitionId); + + void bindCompetitionMembersByTel(@Param(value = "userId") Long userId,@Param(value = "telephone") String telephone); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMembersScoreMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMembersScoreMapper.java index 2f9eaa4cb..6f0922cab 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMembersScoreMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMembersScoreMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.CompetitionMembersScore; import com.ruoyi.system.domain.vo.CompetitionMembersScoreVo; +import com.ruoyi.system.domain.vo.PersonalCareerVo; import org.apache.ibatis.annotations.Param; /** @@ -62,4 +63,8 @@ public interface CompetitionMembersScoreMapper public int deleteCompetitionMembersScoreByIds(Long[] ids); public List findMembersScoreByCompetitionVsId(@Param("competitionId") Long competitionId, @Param("competitionVsId") Long competitionVsId); + + PersonalCareerVo getUserScoreByUserId(@Param(value = "teamUserId") Long teamUserId); + + List getHonorList(@Param("competitionId") Long competitionId,@Param("userId") Long userId); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionOfTeamMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionOfTeamMapper.java index 4f742aec1..458dcfb53 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionOfTeamMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionOfTeamMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.CompetitionOfTeam; import com.ruoyi.system.domain.vo.CompetitionOfTeamVo; +import org.apache.ibatis.annotations.Param; /** * 赛会中-参赛队伍Mapper接口 @@ -63,4 +64,14 @@ public interface CompetitionOfTeamMapper int removeTeamGroup(Long[] ids); int intoTeamGroup(String competitionGroup, List ids); + + List getJoinCompetitionTeam(CompetitionOfTeam entity); + + List findCompetitionTeamGroupList(CompetitionOfTeamVo entity); + + CompetitionOfTeam selectOneByTeamName(String teamName); + + CompetitionOfTeam selectOneByUserId(@Param("competitionId") Long competitionId,@Param("userId") String userId); + + List getJoinCompetitionGroupTeam(CompetitionOfTeam ofTeam); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionTeamGroupMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionTeamGroupMapper.java index c9d3ee261..ab5f76817 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionTeamGroupMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionTeamGroupMapper.java @@ -58,4 +58,6 @@ public interface CompetitionTeamGroupMapper * @return 结果 */ public int deleteCompetitionTeamGroupByIds(Long[] ids); + + List getTeamGroupByCondition(CompetitionTeamGroup entity); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionTeamVsTeamMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionTeamVsTeamMapper.java index 03b3b2aa1..e244f3e2e 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionTeamVsTeamMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionTeamVsTeamMapper.java @@ -2,7 +2,9 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.CompetitionTeamVsTeam; +import com.ruoyi.system.domain.vo.CompetitionTeamIntegralVo; import com.ruoyi.system.domain.vo.CompetitionTeamVsTeamVo; +import org.apache.ibatis.annotations.Param; /** * 赛会中-球队VS球队关系Mapper接口 @@ -68,4 +70,10 @@ public interface CompetitionTeamVsTeamMapper public int updateCompetitionTeamVsTeamByCondition(CompetitionTeamVsTeam teamVsTeam); public CompetitionTeamVsTeamVo getCompetitionById(Long id); + + List getCompetitionSchedule(CompetitionTeamVsTeam entity); + + List getLatelySchedule(CompetitionTeamVsTeam competitionTeamVsTeam); + + List getCompetitionTeamIntegralListById(@Param("id") Long id); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/DataDictionaryMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/DataDictionaryMapper.java new file mode 100644 index 000000000..8ce3720a8 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/DataDictionaryMapper.java @@ -0,0 +1,66 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.DataDictionary; +import org.apache.ibatis.annotations.Select; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface DataDictionaryMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public DataDictionary selectDataDictionaryById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param dataDictionary 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectDataDictionaryList(DataDictionary dataDictionary); + + /** + * 新增【请填写功能名称】 + * + * @param dataDictionary 【请填写功能名称】 + * @return 结果 + */ + public int insertDataDictionary(DataDictionary dataDictionary); + + /** + * 修改【请填写功能名称】 + * + * @param dataDictionary 【请填写功能名称】 + * @return 结果 + */ + public int updateDataDictionary(DataDictionary dataDictionary); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteDataDictionaryById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDataDictionaryByIds(Long[] ids); + + @Select("SELECT * FROM data_dictionary a where a.is_deleted = 0 and a.enabled = 1 " + + "and a.parent_id in (SELECT id FROM data_dictionary b where is_deleted = 0 and enabled = 1 and b.key = #{parentKey})") + List getChildByParentKey(String parentKey); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FeatureLabelMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FeatureLabelMapper.java new file mode 100644 index 000000000..124600d42 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FeatureLabelMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.FeatureLabel; + +/** + * 球馆特征Mapper接口 + * + * @author ruoyi + * @date 2023-07-06 + */ +public interface FeatureLabelMapper +{ + /** + * 查询球馆特征 + * + * @param id 球馆特征主键 + * @return 球馆特征 + */ + public FeatureLabel selectFeatureLabelById(Long id); + + /** + * 查询球馆特征列表 + * + * @param featureLabel 球馆特征 + * @return 球馆特征集合 + */ + public List selectFeatureLabelList(FeatureLabel featureLabel); + + /** + * 新增球馆特征 + * + * @param featureLabel 球馆特征 + * @return 结果 + */ + public int insertFeatureLabel(FeatureLabel featureLabel); + + /** + * 修改球馆特征 + * + * @param featureLabel 球馆特征 + * @return 结果 + */ + public int updateFeatureLabel(FeatureLabel featureLabel); + + /** + * 删除球馆特征 + * + * @param id 球馆特征主键 + * @return 结果 + */ + public int deleteFeatureLabelById(Long id); + + /** + * 批量删除球馆特征 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteFeatureLabelByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/GlobalAttachmentMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/GlobalAttachmentMapper.java new file mode 100644 index 000000000..3d3935452 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/GlobalAttachmentMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.GlobalAttachment; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface GlobalAttachmentMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public GlobalAttachment selectGlobalAttachmentById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param globalAttachment 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectGlobalAttachmentList(GlobalAttachment globalAttachment); + + /** + * 新增【请填写功能名称】 + * + * @param globalAttachment 【请填写功能名称】 + * @return 结果 + */ + public int insertGlobalAttachment(GlobalAttachment globalAttachment); + + /** + * 修改【请填写功能名称】 + * + * @param globalAttachment 【请填写功能名称】 + * @return 结果 + */ + public int updateGlobalAttachment(GlobalAttachment globalAttachment); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteGlobalAttachmentById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteGlobalAttachmentByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/GroupWechatMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/GroupWechatMapper.java new file mode 100644 index 000000000..076e2a767 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/GroupWechatMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.GroupWechat; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface GroupWechatMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public GroupWechat selectGroupWechatById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param groupWechat 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectGroupWechatList(GroupWechat groupWechat); + + /** + * 新增【请填写功能名称】 + * + * @param groupWechat 【请填写功能名称】 + * @return 结果 + */ + public int insertGroupWechat(GroupWechat groupWechat); + + /** + * 修改【请填写功能名称】 + * + * @param groupWechat 【请填写功能名称】 + * @return 结果 + */ + public int updateGroupWechat(GroupWechat groupWechat); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteGroupWechatById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteGroupWechatByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MessageMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MessageMapper.java new file mode 100644 index 000000000..56be620a6 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MessageMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.Message; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface MessageMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public Message selectMessageById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param message 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectMessageList(Message message); + + /** + * 新增【请填写功能名称】 + * + * @param message 【请填写功能名称】 + * @return 结果 + */ + public int insertMessage(Message message); + + /** + * 修改【请填写功能名称】 + * + * @param message 【请填写功能名称】 + * @return 结果 + */ + public int updateMessage(Message message); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteMessageById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMessageByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShAreaMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShAreaMapper.java new file mode 100644 index 000000000..a7b908130 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShAreaMapper.java @@ -0,0 +1,63 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.ShArea; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface ShAreaMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public ShArea selectShAreaById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param shArea 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectShAreaList(ShArea shArea); + + /** + * 新增【请填写功能名称】 + * + * @param shArea 【请填写功能名称】 + * @return 结果 + */ + public int insertShArea(ShArea shArea); + + /** + * 修改【请填写功能名称】 + * + * @param shArea 【请填写功能名称】 + * @return 结果 + */ + public int updateShArea(ShArea shArea); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteShAreaById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteShAreaByIds(Long[] ids); + + List findMyCity(ShArea entity); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TeamMembersMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TeamMembersMapper.java index ff210dd4a..d35723c4d 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TeamMembersMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TeamMembersMapper.java @@ -2,7 +2,9 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.TeamMembers; +import com.ruoyi.system.domain.vo.TeamMembersResponse; import com.ruoyi.system.domain.vo.TeamMembersVo; +import org.apache.ibatis.annotations.Param; /** * 球队人员Mapper接口 @@ -59,4 +61,8 @@ public interface TeamMembersMapper * @return 结果 */ public int deleteTeamMembersByIds(Long[] ids); + + List getTeamMembersByTeamId(Long teamId); + + TeamMembers getOneByTeamIdAndRoleCode(@Param("teamId") Long teamId,@Param("roleCode") String roleCode); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TokenInfoMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TokenInfoMapper.java new file mode 100644 index 000000000..58410ca93 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TokenInfoMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.TokenInfo; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface TokenInfoMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public TokenInfo selectTokenInfoById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param tokenInfo 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectTokenInfoList(TokenInfo tokenInfo); + + /** + * 新增【请填写功能名称】 + * + * @param tokenInfo 【请填写功能名称】 + * @return 结果 + */ + public int insertTokenInfo(TokenInfo tokenInfo); + + /** + * 修改【请填写功能名称】 + * + * @param tokenInfo 【请填写功能名称】 + * @return 结果 + */ + public int updateTokenInfo(TokenInfo tokenInfo); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteTokenInfoById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTokenInfoByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TrainingInfoMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TrainingInfoMapper.java new file mode 100644 index 000000000..95099b8fe --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TrainingInfoMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.TrainingInfo; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface TrainingInfoMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public TrainingInfo selectTrainingInfoById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param trainingInfo 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectTrainingInfoList(TrainingInfo trainingInfo); + + /** + * 新增【请填写功能名称】 + * + * @param trainingInfo 【请填写功能名称】 + * @return 结果 + */ + public int insertTrainingInfo(TrainingInfo trainingInfo); + + /** + * 修改【请填写功能名称】 + * + * @param trainingInfo 【请填写功能名称】 + * @return 结果 + */ + public int updateTrainingInfo(TrainingInfo trainingInfo); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteTrainingInfoById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTrainingInfoByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserBuildingRelMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserBuildingRelMapper.java new file mode 100644 index 000000000..ffc17b826 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserBuildingRelMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.UserBuildingRel; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface UserBuildingRelMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public UserBuildingRel selectUserBuildingRelById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param userBuildingRel 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectUserBuildingRelList(UserBuildingRel userBuildingRel); + + /** + * 新增【请填写功能名称】 + * + * @param userBuildingRel 【请填写功能名称】 + * @return 结果 + */ + public int insertUserBuildingRel(UserBuildingRel userBuildingRel); + + /** + * 修改【请填写功能名称】 + * + * @param userBuildingRel 【请填写功能名称】 + * @return 结果 + */ + public int updateUserBuildingRel(UserBuildingRel userBuildingRel); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteUserBuildingRelById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteUserBuildingRelByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserRoleMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserRoleMapper.java new file mode 100644 index 000000000..6b14c0a08 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserRoleMapper.java @@ -0,0 +1,63 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.UserRole; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface UserRoleMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public UserRole selectUserRoleById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param userRole 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectUserRoleList(UserRole userRole); + + /** + * 新增【请填写功能名称】 + * + * @param userRole 【请填写功能名称】 + * @return 结果 + */ + public int insertUserRole(UserRole userRole); + + /** + * 修改【请填写功能名称】 + * + * @param userRole 【请填写功能名称】 + * @return 结果 + */ + public int updateUserRole(UserRole userRole); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteUserRoleById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteUserRoleByIds(Long[] ids); + + UserRole selectByCode(String roleCode); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxBasketballTeamMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxBasketballTeamMapper.java index 6e5fa7715..60b300502 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxBasketballTeamMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxBasketballTeamMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.WxBasketballTeam; +import org.apache.ibatis.annotations.Param; /** * 球队管理Mapper接口 @@ -58,4 +59,8 @@ public interface WxBasketballTeamMapper * @return 结果 */ public int deleteWxBasketballTeamByIds(Long[] ids); + + List getMyBasketBallTeam(WxBasketballTeam entity); + + List selectBatchIds(@Param("teamIds") List teamIds); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxBuildingInfoMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxBuildingInfoMapper.java index 929366040..2da76a916 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxBuildingInfoMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxBuildingInfoMapper.java @@ -2,6 +2,8 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.WxBuildingInfo; +import com.ruoyi.system.domain.vo.BuildingInfoRequest; +import com.ruoyi.system.domain.vo.BuildingInfoResponse; /** * 球场管理Mapper接口 @@ -58,4 +60,12 @@ public interface WxBuildingInfoMapper * @return 结果 */ public int deleteWxBuildingInfoByIds(Long[] ids); + + List findNearbyBuilding(WxBuildingInfo entity); + + List getBuildingByCity(WxBuildingInfo entity); + + List getAllBuildingByCondition(BuildingInfoRequest entity); + + List getAuditPage(WxBuildingInfo buildingInfo); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxUserMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxUserMapper.java index 49e85256f..7f5f403b8 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxUserMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/WxUserMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.WxUser; +import org.apache.ibatis.annotations.Param; /** * 微信用户Mapper接口 @@ -58,4 +59,8 @@ public interface WxUserMapper * @return 结果 */ public int deleteWxUserByIds(Long[] ids); + + WxUser selectByOpenId(String openId); + + List listByIds(@Param("userIds") List userIds); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IBuildingInfoDetailService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IBuildingInfoDetailService.java new file mode 100644 index 000000000..506cd9c36 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IBuildingInfoDetailService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.BuildingInfoDetail; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-06 + */ +public interface IBuildingInfoDetailService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public BuildingInfoDetail selectBuildingInfoDetailById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param buildingInfoDetail 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectBuildingInfoDetailList(BuildingInfoDetail buildingInfoDetail); + + /** + * 新增【请填写功能名称】 + * + * @param buildingInfoDetail 【请填写功能名称】 + * @return 结果 + */ + public int insertBuildingInfoDetail(BuildingInfoDetail buildingInfoDetail); + + /** + * 修改【请填写功能名称】 + * + * @param buildingInfoDetail 【请填写功能名称】 + * @return 结果 + */ + public int updateBuildingInfoDetail(BuildingInfoDetail buildingInfoDetail); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteBuildingInfoDetailByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteBuildingInfoDetailById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IBuildingLabelService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IBuildingLabelService.java new file mode 100644 index 000000000..074e54891 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IBuildingLabelService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.BuildingLabel; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface IBuildingLabelService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public BuildingLabel selectBuildingLabelById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param buildingLabel 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectBuildingLabelList(BuildingLabel buildingLabel); + + /** + * 新增【请填写功能名称】 + * + * @param buildingLabel 【请填写功能名称】 + * @return 结果 + */ + public int insertBuildingLabel(BuildingLabel buildingLabel); + + /** + * 修改【请填写功能名称】 + * + * @param buildingLabel 【请填写功能名称】 + * @return 结果 + */ + public int updateBuildingLabel(BuildingLabel buildingLabel); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteBuildingLabelByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteBuildingLabelById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IBuildingTeamRelService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IBuildingTeamRelService.java new file mode 100644 index 000000000..8070a8fb5 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IBuildingTeamRelService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.BuildingTeamRel; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface IBuildingTeamRelService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public BuildingTeamRel selectBuildingTeamRelById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param buildingTeamRel 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectBuildingTeamRelList(BuildingTeamRel buildingTeamRel); + + /** + * 新增【请填写功能名称】 + * + * @param buildingTeamRel 【请填写功能名称】 + * @return 结果 + */ + public int insertBuildingTeamRel(BuildingTeamRel buildingTeamRel); + + /** + * 修改【请填写功能名称】 + * + * @param buildingTeamRel 【请填写功能名称】 + * @return 结果 + */ + public int updateBuildingTeamRel(BuildingTeamRel buildingTeamRel); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteBuildingTeamRelByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteBuildingTeamRelById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICameraInfoService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICameraInfoService.java new file mode 100644 index 000000000..b4e20ed7e --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICameraInfoService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.CameraInfo; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface ICameraInfoService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public CameraInfo selectCameraInfoById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param cameraInfo 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectCameraInfoList(CameraInfo cameraInfo); + + /** + * 新增【请填写功能名称】 + * + * @param cameraInfo 【请填写功能名称】 + * @return 结果 + */ + public int insertCameraInfo(CameraInfo cameraInfo); + + /** + * 修改【请填写功能名称】 + * + * @param cameraInfo 【请填写功能名称】 + * @return 结果 + */ + public int updateCameraInfo(CameraInfo cameraInfo); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteCameraInfoByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteCameraInfoById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionMembersScoreService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionMembersScoreService.java index 976590732..ca0f3fc79 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionMembersScoreService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionMembersScoreService.java @@ -2,6 +2,7 @@ package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.CompetitionMembersScore; +import com.ruoyi.system.domain.vo.PersonalCareerVo; /** * 赛会中-赛程-人员得分Service接口 @@ -58,4 +59,8 @@ public interface ICompetitionMembersScoreService * @return 结果 */ public int deleteCompetitionMembersScoreById(Long id); + + PersonalCareerVo getUserScoreByUserId(Long userId); + + List getHonorList(Long competitionId, Long userId); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionMembersService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionMembersService.java index ab9f19c69..4a6e4845a 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionMembersService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionMembersService.java @@ -2,6 +2,7 @@ package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.CompetitionMembers; +import com.ruoyi.system.domain.vo.CompetitionMembersVo; /** * 比赛参与人员Service接口 @@ -58,4 +59,10 @@ public interface ICompetitionMembersService * @return 结果 */ public int deleteCompetitionMembersById(Long id); + + List getJoinCompetitionMembersPage(CompetitionMembersVo entity); + + void deleteByMembers(Long competitionId, Long teamOfId); + + void bindCompetitionMembersByTel(Long userId, String telephone); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionOfTeamService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionOfTeamService.java index f06d67e90..5f9cd8642 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionOfTeamService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionOfTeamService.java @@ -70,4 +70,14 @@ public interface ICompetitionOfTeamService int removeTeamGroup(Long[] ids); int intoTeamGroup(String competitionGroup,List ids); + + List getJoinCompetitionTeam(CompetitionOfTeam entity); + + List findCompetitionTeamGroupList(CompetitionOfTeamVo entity); + + CompetitionOfTeam selectOneByTeamName(String teamName); + + Boolean edit(CompetitionOfTeam entity); + + List getJoinCompetitionGroupTeam(CompetitionOfTeam ofTeam); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionResultService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionResultService.java index 7db08cb2b..495dcaedf 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionResultService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionResultService.java @@ -2,6 +2,7 @@ package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.CompetitionResult; +import com.ruoyi.system.domain.vo.CompetitionResultVo; import com.ruoyi.system.domain.vo.CompetitionVsRecordVo; /** @@ -63,4 +64,10 @@ public interface ICompetitionResultService public int batchUpdateCompetitionResult(List list); int editData(CompetitionVsRecordVo obj); + + List findByCompetitionVsId(Long competitionId, Long id); + + Boolean add(CompetitionResult competitionResult); + + Boolean edit(CompetitionResult competitionResult); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionService.java index f723b545a..05796dedc 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionService.java @@ -4,6 +4,10 @@ import java.util.List; import com.ruoyi.system.api.domain.vo.WxAppletsCodeVo; import com.ruoyi.system.domain.Competition; +import com.ruoyi.system.domain.vo.CompetitionExcleVo; +import com.ruoyi.system.domain.vo.CompetitionResponse; +import com.ruoyi.system.domain.vo.CompetitionVo; +import org.springframework.transaction.annotation.Transactional; /** * 比赛信息Service接口 @@ -62,4 +66,20 @@ public interface ICompetitionService public int deleteCompetitionById(Long id); WxAppletsCodeVo genCompetitionCommonAqrSpread(WxAppletsCodeVo wxAppletsCodeVo); + + List getCompetitionByCondition(CompetitionVo competition); + + CompetitionExcleVo getTeamEnrollExcleImpData(Long competitionId, Long userId); + + CompetitionResponse getCompetitionById(Long id); + + Boolean establishCompetition(CompetitionVo entity); + + Boolean challengeConfirm(Competition entity); + + List getMyJoinCompetition(CompetitionVo entity); + + Boolean add(Competition entity); + + Boolean edit(Competition entity); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionTeamGroupService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionTeamGroupService.java index 84e6e57e0..c8d9bf5c1 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionTeamGroupService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionTeamGroupService.java @@ -3,6 +3,7 @@ package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.CompetitionTeamGroup; +import com.ruoyi.system.domain.vo.TeamGroupRequest; /** * 赛会中-分组Service接口 @@ -61,4 +62,12 @@ public interface ICompetitionTeamGroupService public int deleteCompetitionTeamGroupById(Long id); //赛会中-一键编排分组内的球队的单组循环赛赛程 public Boolean arrangeTeamGroupSchedule(CompetitionTeamGroup competitionTeamGroup); + + List getTeamGroupByCondition(CompetitionTeamGroup entity); + + Boolean batchEditTeamGroup(TeamGroupRequest entity); + + Boolean randomTeamGroup(List list, Long competitionId); + + Boolean add(CompetitionTeamGroup entity); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionTeamVsTeamService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionTeamVsTeamService.java index d0b9537cb..be938909b 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionTeamVsTeamService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionTeamVsTeamService.java @@ -1,10 +1,11 @@ package com.ruoyi.system.service; import java.util.List; +import java.util.Map; + +import com.ruoyi.system.domain.CompetitionResult; import com.ruoyi.system.domain.CompetitionTeamVsTeam; -import com.ruoyi.system.domain.vo.CompetitionTeamVsTeamVo; -import com.ruoyi.system.domain.vo.CompetitionUnifiedRecordVo; -import com.ruoyi.system.domain.vo.CompetitionVsRecordVo; +import com.ruoyi.system.domain.vo.*; /** * 赛会中-球队VS球队关系Service接口 @@ -65,4 +66,12 @@ public interface ICompetitionTeamVsTeamService public CompetitionUnifiedRecordVo getCompetitionUnifiedRecordById(Long id); public CompetitionVsRecordVo getCompetitionVsRecordById(Long id); + + Map> getCompetitionSchedule(CompetitionTeamVsTeam entity); + + List getCompetitionTeamIntegralListById(Long id); + + Boolean competitionScheduleSubmit(List vsTeamRequestList); + + Boolean competitionScoreSubmit(List request); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IDataDictionaryService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IDataDictionaryService.java new file mode 100644 index 000000000..a840b8c0d --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IDataDictionaryService.java @@ -0,0 +1,67 @@ +package com.ruoyi.system.service; + +import java.util.List; +import java.util.Map; + +import com.ruoyi.system.domain.DataDictionary; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface IDataDictionaryService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public DataDictionary selectDataDictionaryById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param dataDictionary 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectDataDictionaryList(DataDictionary dataDictionary); + + /** + * 新增【请填写功能名称】 + * + * @param dataDictionary 【请填写功能名称】 + * @return 结果 + */ + public int insertDataDictionary(DataDictionary dataDictionary); + + /** + * 修改【请填写功能名称】 + * + * @param dataDictionary 【请填写功能名称】 + * @return 结果 + */ + public int updateDataDictionary(DataDictionary dataDictionary); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteDataDictionaryByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteDataDictionaryById(Long id); + + Map getChildByParentKey(String parentKey); + + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IFeatureLabelService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IFeatureLabelService.java new file mode 100644 index 000000000..a7ffef0e7 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IFeatureLabelService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.FeatureLabel; + +/** + * 球馆特征Service接口 + * + * @author ruoyi + * @date 2023-07-06 + */ +public interface IFeatureLabelService +{ + /** + * 查询球馆特征 + * + * @param id 球馆特征主键 + * @return 球馆特征 + */ + public FeatureLabel selectFeatureLabelById(Long id); + + /** + * 查询球馆特征列表 + * + * @param featureLabel 球馆特征 + * @return 球馆特征集合 + */ + public List selectFeatureLabelList(FeatureLabel featureLabel); + + /** + * 新增球馆特征 + * + * @param featureLabel 球馆特征 + * @return 结果 + */ + public int insertFeatureLabel(FeatureLabel featureLabel); + + /** + * 修改球馆特征 + * + * @param featureLabel 球馆特征 + * @return 结果 + */ + public int updateFeatureLabel(FeatureLabel featureLabel); + + /** + * 批量删除球馆特征 + * + * @param ids 需要删除的球馆特征主键集合 + * @return 结果 + */ + public int deleteFeatureLabelByIds(Long[] ids); + + /** + * 删除球馆特征信息 + * + * @param id 球馆特征主键 + * @return 结果 + */ + public int deleteFeatureLabelById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IGlobalAttachmentService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IGlobalAttachmentService.java new file mode 100644 index 000000000..16df34540 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IGlobalAttachmentService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.GlobalAttachment; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface IGlobalAttachmentService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public GlobalAttachment selectGlobalAttachmentById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param globalAttachment 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectGlobalAttachmentList(GlobalAttachment globalAttachment); + + /** + * 新增【请填写功能名称】 + * + * @param globalAttachment 【请填写功能名称】 + * @return 结果 + */ + public int insertGlobalAttachment(GlobalAttachment globalAttachment); + + /** + * 修改【请填写功能名称】 + * + * @param globalAttachment 【请填写功能名称】 + * @return 结果 + */ + public int updateGlobalAttachment(GlobalAttachment globalAttachment); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteGlobalAttachmentByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteGlobalAttachmentById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IGroupWechatService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IGroupWechatService.java new file mode 100644 index 000000000..645e8a8a2 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IGroupWechatService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.GroupWechat; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface IGroupWechatService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public GroupWechat selectGroupWechatById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param groupWechat 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectGroupWechatList(GroupWechat groupWechat); + + /** + * 新增【请填写功能名称】 + * + * @param groupWechat 【请填写功能名称】 + * @return 结果 + */ + public int insertGroupWechat(GroupWechat groupWechat); + + /** + * 修改【请填写功能名称】 + * + * @param groupWechat 【请填写功能名称】 + * @return 结果 + */ + public int updateGroupWechat(GroupWechat groupWechat); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteGroupWechatByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteGroupWechatById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMessageService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMessageService.java new file mode 100644 index 000000000..0de66c998 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMessageService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.Message; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface IMessageService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public Message selectMessageById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param message 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectMessageList(Message message); + + /** + * 新增【请填写功能名称】 + * + * @param message 【请填写功能名称】 + * @return 结果 + */ + public int insertMessage(Message message); + + /** + * 修改【请填写功能名称】 + * + * @param message 【请填写功能名称】 + * @return 结果 + */ + public int updateMessage(Message message); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteMessageByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteMessageById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IShAreaService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IShAreaService.java new file mode 100644 index 000000000..3e0c3bafb --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IShAreaService.java @@ -0,0 +1,63 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.ShArea; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface IShAreaService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public ShArea selectShAreaById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param shArea 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectShAreaList(ShArea shArea); + + /** + * 新增【请填写功能名称】 + * + * @param shArea 【请填写功能名称】 + * @return 结果 + */ + public int insertShArea(ShArea shArea); + + /** + * 修改【请填写功能名称】 + * + * @param shArea 【请填写功能名称】 + * @return 结果 + */ + public int updateShArea(ShArea shArea); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteShAreaByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteShAreaById(Long id); + + List findMyCity(ShArea entity); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ITeamMembersService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ITeamMembersService.java index cd97ca18a..ce846efe8 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ITeamMembersService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ITeamMembersService.java @@ -2,6 +2,7 @@ package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.TeamMembers; +import com.ruoyi.system.domain.vo.TeamMembersResponse; import com.ruoyi.system.domain.vo.TeamMembersVo; /** @@ -59,4 +60,8 @@ public interface ITeamMembersService * @return 结果 */ public int deleteTeamMembersById(Long id); + + List getTeamMembersByTeamId(Long teamId); + + TeamMembers getOneByTeamIdAndRoleCode(Long teamId, String roleCode); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ITokenInfoService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ITokenInfoService.java new file mode 100644 index 000000000..eab8ec03b --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ITokenInfoService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.TokenInfo; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface ITokenInfoService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public TokenInfo selectTokenInfoById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param tokenInfo 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectTokenInfoList(TokenInfo tokenInfo); + + /** + * 新增【请填写功能名称】 + * + * @param tokenInfo 【请填写功能名称】 + * @return 结果 + */ + public int insertTokenInfo(TokenInfo tokenInfo); + + /** + * 修改【请填写功能名称】 + * + * @param tokenInfo 【请填写功能名称】 + * @return 结果 + */ + public int updateTokenInfo(TokenInfo tokenInfo); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteTokenInfoByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteTokenInfoById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ITrainingInfoService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ITrainingInfoService.java new file mode 100644 index 000000000..13f40718a --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ITrainingInfoService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.TrainingInfo; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface ITrainingInfoService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public TrainingInfo selectTrainingInfoById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param trainingInfo 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectTrainingInfoList(TrainingInfo trainingInfo); + + /** + * 新增【请填写功能名称】 + * + * @param trainingInfo 【请填写功能名称】 + * @return 结果 + */ + public int insertTrainingInfo(TrainingInfo trainingInfo); + + /** + * 修改【请填写功能名称】 + * + * @param trainingInfo 【请填写功能名称】 + * @return 结果 + */ + public int updateTrainingInfo(TrainingInfo trainingInfo); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteTrainingInfoByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteTrainingInfoById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserBuildingRelService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserBuildingRelService.java new file mode 100644 index 000000000..c6349b7aa --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserBuildingRelService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.UserBuildingRel; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface IUserBuildingRelService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public UserBuildingRel selectUserBuildingRelById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param userBuildingRel 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectUserBuildingRelList(UserBuildingRel userBuildingRel); + + /** + * 新增【请填写功能名称】 + * + * @param userBuildingRel 【请填写功能名称】 + * @return 结果 + */ + public int insertUserBuildingRel(UserBuildingRel userBuildingRel); + + /** + * 修改【请填写功能名称】 + * + * @param userBuildingRel 【请填写功能名称】 + * @return 结果 + */ + public int updateUserBuildingRel(UserBuildingRel userBuildingRel); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteUserBuildingRelByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteUserBuildingRelById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserRoleService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserRoleService.java new file mode 100644 index 000000000..0efd34a06 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserRoleService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.UserRole; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2023-07-04 + */ +public interface IUserRoleService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public UserRole selectUserRoleById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param userRole 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectUserRoleList(UserRole userRole); + + /** + * 新增【请填写功能名称】 + * + * @param userRole 【请填写功能名称】 + * @return 结果 + */ + public int insertUserRole(UserRole userRole); + + /** + * 修改【请填写功能名称】 + * + * @param userRole 【请填写功能名称】 + * @return 结果 + */ + public int updateUserRole(UserRole userRole); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteUserRoleByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteUserRoleById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IWxBasketballTeamService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IWxBasketballTeamService.java index 890e414c3..d332ea490 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IWxBasketballTeamService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IWxBasketballTeamService.java @@ -58,4 +58,6 @@ public interface IWxBasketballTeamService * @return 结果 */ public int deleteWxBasketballTeamById(Long id); + + List getMyBasketBallTeam(WxBasketballTeam entity); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IWxBuildingInfoService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IWxBuildingInfoService.java index 8c6607240..5909bf26a 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IWxBuildingInfoService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IWxBuildingInfoService.java @@ -2,6 +2,8 @@ package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.WxBuildingInfo; +import com.ruoyi.system.domain.vo.BuildingInfoRequest; +import com.ruoyi.system.domain.vo.BuildingInfoResponse; /** * 球场管理Service接口 @@ -58,4 +60,14 @@ public interface IWxBuildingInfoService * @return 结果 */ public int deleteWxBuildingInfoById(Long id); + + List findNearbyBuilding(WxBuildingInfo entity); + + List getBuildingByCity(WxBuildingInfo entity); + + BuildingInfoResponse findAllInfoById(Long id); + + List getAllBuildingByCondition(BuildingInfoRequest entity); + + List getAuditPage(WxBuildingInfo buildingInfo); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SmsService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SmsService.java new file mode 100644 index 000000000..0c1f2e17c --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SmsService.java @@ -0,0 +1,13 @@ +package com.ruoyi.system.service; + +import com.ruoyi.system.domain.Sms; +import com.ruoyi.system.domain.vo.SmsResponse; + +/** + * @author 吴一博 + * @date 2023年07月07日 15:23 + * @Description 短信服务 + */ +public interface SmsService { + SmsResponse sendSms(Sms sms); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/WxAppletsService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/WxAppletsService.java new file mode 100644 index 000000000..d84e28cd4 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/WxAppletsService.java @@ -0,0 +1,23 @@ +package com.ruoyi.system.service; + +import com.ruoyi.system.api.domain.vo.WxAppletsCodeVo; +import com.ruoyi.system.domain.vo.PhoneRequest; +import com.ruoyi.system.domain.vo.WxApplesRes; +import com.ruoyi.system.domain.vo.WxMssVo; + +/** + * @author 吴一博 + * @date 2023年07月07日 16:18 + * @Description + */ +public interface WxAppletsService { + String getAccessToken(); + + WxApplesRes pushOneUser(WxMssVo wxMssVo); + + String getPhoneNumber(PhoneRequest request); + + String updatePhoneNumber(PhoneRequest request); + + WxAppletsCodeVo getWxacodeunlimit(WxAppletsCodeVo wxAppletsCodeVo, String accessToken); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/WxLoginService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/WxLoginService.java new file mode 100644 index 000000000..71498684a --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/WxLoginService.java @@ -0,0 +1,16 @@ +package com.ruoyi.system.service; + +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.api.model.WxLoginUser; +import com.ruoyi.system.domain.vo.WxLoginRequest; + +/** + * @author 吴一博 + * @date 2023年07月06日 10:47 + * @Description + */ +public interface WxLoginService { + WxLoginUser loginInFromWx(WxLoginRequest entity); + + LoginUser loginFromWx(LoginUser loginUser); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BuildingInfoDetailServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BuildingInfoDetailServiceImpl.java new file mode 100644 index 000000000..b1e2e3e29 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BuildingInfoDetailServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.BuildingInfoDetailMapper; +import com.ruoyi.system.domain.BuildingInfoDetail; +import com.ruoyi.system.service.IBuildingInfoDetailService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-06 + */ +@Service +public class BuildingInfoDetailServiceImpl implements IBuildingInfoDetailService +{ + @Autowired + private BuildingInfoDetailMapper buildingInfoDetailMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public BuildingInfoDetail selectBuildingInfoDetailById(Long id) + { + return buildingInfoDetailMapper.selectBuildingInfoDetailById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param buildingInfoDetail 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectBuildingInfoDetailList(BuildingInfoDetail buildingInfoDetail) + { + return buildingInfoDetailMapper.selectBuildingInfoDetailList(buildingInfoDetail); + } + + /** + * 新增【请填写功能名称】 + * + * @param buildingInfoDetail 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertBuildingInfoDetail(BuildingInfoDetail buildingInfoDetail) + { + return buildingInfoDetailMapper.insertBuildingInfoDetail(buildingInfoDetail); + } + + /** + * 修改【请填写功能名称】 + * + * @param buildingInfoDetail 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateBuildingInfoDetail(BuildingInfoDetail buildingInfoDetail) + { + return buildingInfoDetailMapper.updateBuildingInfoDetail(buildingInfoDetail); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteBuildingInfoDetailByIds(Long[] ids) + { + return buildingInfoDetailMapper.deleteBuildingInfoDetailByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteBuildingInfoDetailById(Long id) + { + return buildingInfoDetailMapper.deleteBuildingInfoDetailById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BuildingLabelServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BuildingLabelServiceImpl.java new file mode 100644 index 000000000..74597fb79 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BuildingLabelServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.BuildingLabelMapper; +import com.ruoyi.system.domain.BuildingLabel; +import com.ruoyi.system.service.IBuildingLabelService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class BuildingLabelServiceImpl implements IBuildingLabelService +{ + @Autowired + private BuildingLabelMapper buildingLabelMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public BuildingLabel selectBuildingLabelById(Long id) + { + return buildingLabelMapper.selectBuildingLabelById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param buildingLabel 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectBuildingLabelList(BuildingLabel buildingLabel) + { + return buildingLabelMapper.selectBuildingLabelList(buildingLabel); + } + + /** + * 新增【请填写功能名称】 + * + * @param buildingLabel 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertBuildingLabel(BuildingLabel buildingLabel) + { + return buildingLabelMapper.insertBuildingLabel(buildingLabel); + } + + /** + * 修改【请填写功能名称】 + * + * @param buildingLabel 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateBuildingLabel(BuildingLabel buildingLabel) + { + return buildingLabelMapper.updateBuildingLabel(buildingLabel); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteBuildingLabelByIds(Long[] ids) + { + return buildingLabelMapper.deleteBuildingLabelByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteBuildingLabelById(Long id) + { + return buildingLabelMapper.deleteBuildingLabelById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BuildingTeamRelServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BuildingTeamRelServiceImpl.java new file mode 100644 index 000000000..da286f891 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BuildingTeamRelServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.BuildingTeamRelMapper; +import com.ruoyi.system.domain.BuildingTeamRel; +import com.ruoyi.system.service.IBuildingTeamRelService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class BuildingTeamRelServiceImpl implements IBuildingTeamRelService +{ + @Autowired + private BuildingTeamRelMapper buildingTeamRelMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public BuildingTeamRel selectBuildingTeamRelById(Long id) + { + return buildingTeamRelMapper.selectBuildingTeamRelById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param buildingTeamRel 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectBuildingTeamRelList(BuildingTeamRel buildingTeamRel) + { + return buildingTeamRelMapper.selectBuildingTeamRelList(buildingTeamRel); + } + + /** + * 新增【请填写功能名称】 + * + * @param buildingTeamRel 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertBuildingTeamRel(BuildingTeamRel buildingTeamRel) + { + return buildingTeamRelMapper.insertBuildingTeamRel(buildingTeamRel); + } + + /** + * 修改【请填写功能名称】 + * + * @param buildingTeamRel 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateBuildingTeamRel(BuildingTeamRel buildingTeamRel) + { + return buildingTeamRelMapper.updateBuildingTeamRel(buildingTeamRel); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteBuildingTeamRelByIds(Long[] ids) + { + return buildingTeamRelMapper.deleteBuildingTeamRelByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteBuildingTeamRelById(Long id) + { + return buildingTeamRelMapper.deleteBuildingTeamRelById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CameraInfoServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CameraInfoServiceImpl.java new file mode 100644 index 000000000..4492c1993 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CameraInfoServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.CameraInfoMapper; +import com.ruoyi.system.domain.CameraInfo; +import com.ruoyi.system.service.ICameraInfoService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class CameraInfoServiceImpl implements ICameraInfoService +{ + @Autowired + private CameraInfoMapper cameraInfoMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public CameraInfo selectCameraInfoById(Long id) + { + return cameraInfoMapper.selectCameraInfoById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param cameraInfo 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectCameraInfoList(CameraInfo cameraInfo) + { + return cameraInfoMapper.selectCameraInfoList(cameraInfo); + } + + /** + * 新增【请填写功能名称】 + * + * @param cameraInfo 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertCameraInfo(CameraInfo cameraInfo) + { + return cameraInfoMapper.insertCameraInfo(cameraInfo); + } + + /** + * 修改【请填写功能名称】 + * + * @param cameraInfo 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateCameraInfo(CameraInfo cameraInfo) + { + return cameraInfoMapper.updateCameraInfo(cameraInfo); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteCameraInfoByIds(Long[] ids) + { + return cameraInfoMapper.deleteCameraInfoByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteCameraInfoById(Long id) + { + return cameraInfoMapper.deleteCameraInfoById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionMembersScoreServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionMembersScoreServiceImpl.java index 607d34e47..3a8db869e 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionMembersScoreServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionMembersScoreServiceImpl.java @@ -1,6 +1,8 @@ package com.ruoyi.system.service.impl; import java.util.List; + +import com.ruoyi.system.domain.vo.PersonalCareerVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.CompetitionMembersScoreMapper; @@ -90,4 +92,14 @@ public class CompetitionMembersScoreServiceImpl implements ICompetitionMembersSc { return competitionMembersScoreMapper.deleteCompetitionMembersScoreById(id); } + + @Override + public PersonalCareerVo getUserScoreByUserId(Long userId) { + return competitionMembersScoreMapper.getUserScoreByUserId(userId); + } + + @Override + public List getHonorList(Long competitionId, Long userId) { + return competitionMembersScoreMapper.getHonorList(competitionId,userId); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionMembersServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionMembersServiceImpl.java index 14e9dd1da..d1ffab2f9 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionMembersServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionMembersServiceImpl.java @@ -1,6 +1,8 @@ package com.ruoyi.system.service.impl; import java.util.List; + +import com.ruoyi.system.domain.vo.CompetitionMembersVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.CompetitionMembersMapper; @@ -90,4 +92,19 @@ public class CompetitionMembersServiceImpl implements ICompetitionMembersService { return competitionMembersMapper.deleteCompetitionMembersById(id); } + + @Override + public List getJoinCompetitionMembersPage(CompetitionMembersVo entity) { + return competitionMembersMapper.getJoinCompetitionMembersPage(entity); + } + + @Override + public void deleteByMembers(Long competitionId, Long teamOfId) { + competitionMembersMapper.deleteByMembers(competitionId,teamOfId); + } + + @Override + public void bindCompetitionMembersByTel(Long userId, String telephone) { + competitionMembersMapper.bindCompetitionMembersByTel(userId,telephone); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionOfTeamServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionOfTeamServiceImpl.java index 8e4273053..26fdc385c 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionOfTeamServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionOfTeamServiceImpl.java @@ -1,8 +1,12 @@ package com.ruoyi.system.service.impl; +import java.util.Date; import java.util.List; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.system.api.model.LoginUser; import com.ruoyi.system.domain.vo.CompetitionOfTeamVo; +import com.ruoyi.system.utils.LoginUserUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.CompetitionOfTeamMapper; @@ -111,4 +115,33 @@ public class CompetitionOfTeamServiceImpl implements ICompetitionOfTeamService public int intoTeamGroup(String competitionGroup, List ids) { return competitionOfTeamMapper.intoTeamGroup(competitionGroup,ids); } + + @Override + public List getJoinCompetitionTeam(CompetitionOfTeam entity) { + return competitionOfTeamMapper.getJoinCompetitionTeam(entity); + } + + @Override + public List findCompetitionTeamGroupList(CompetitionOfTeamVo entity) { + return competitionOfTeamMapper.findCompetitionTeamGroupList(entity); + } + + @Override + public CompetitionOfTeam selectOneByTeamName(String teamName) { + return competitionOfTeamMapper.selectOneByTeamName(teamName); + } + + @Override + public Boolean edit(CompetitionOfTeam entity) { + LoginUser user = SecurityUtils.getLoginUser(); + entity.setModifiedBy(String.valueOf(user.getUserid())); + entity.setLastUpdatedTime(new Date()); + competitionOfTeamMapper.updateCompetitionOfTeam(entity); + return true; + } + + @Override + public List getJoinCompetitionGroupTeam(CompetitionOfTeam ofTeam) { + return competitionOfTeamMapper.getJoinCompetitionGroupTeam(ofTeam); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionResultServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionResultServiceImpl.java index 96a41e241..d89f582c2 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionResultServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionResultServiceImpl.java @@ -1,10 +1,18 @@ package com.ruoyi.system.service.impl; +import java.util.Date; import java.util.List; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.api.model.WxLoginUser; +import com.ruoyi.system.domain.CompetitionTeamVsTeam; +import com.ruoyi.system.domain.enums.VsResultEnums; import com.ruoyi.system.domain.vo.CompetitionResultVo; import com.ruoyi.system.domain.vo.CompetitionVsRecordVo; import com.ruoyi.system.mapper.CompetitionTeamVsTeamMapper; +import com.ruoyi.system.utils.LoginUserUtil; +import com.ruoyi.system.utils.UtilTool; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.CompetitionResultMapper; @@ -139,4 +147,138 @@ public class CompetitionResultServiceImpl implements ICompetitionResultService } return 1; } + + @Override + public List findByCompetitionVsId(Long competitionId, Long id) { + return competitionResultMapper.findByCompetitionVsId(competitionId,id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean add(CompetitionResult entity) { + LoginUser user = SecurityUtils.getLoginUser(); +// entity.fillOperationInfo(user.getUserId().toString()); + entity.setCreatedBy(String.valueOf(user.getUserid())); + entity.setCreatedTime(new Date()); + competitionResultMapper.insertCompetitionResult(entity); + this.calculateScore(entity,user); + return true; + } + + /** + * 计算更新分数和积分 + * @param entity + */ + private void calculateScore(CompetitionResult entity,LoginUser user) { + + //得分 + int mainScore = 0; + int gustScore = 0; + + //主队 + Boolean flag = true; + + //得分 + Long mainId = null; + Long gustId = null; + + /** + * 更新积分和总分 + */ + CompetitionTeamVsTeam teamVsTeam = competitionTeamVsTeamMapper.selectCompetitionTeamVsTeamById(entity.getCompetitionVsId()); + //查询比赛数据 + CompetitionResult result = new CompetitionResult(); + result.setCompetitionVsId(teamVsTeam.getId()); + List competitionResultList = competitionResultMapper.selectCompetitionResultList(result); + + if(UtilTool.isNotNull(competitionResultList)){ + for(CompetitionResult competitionResult : competitionResultList ){ + //小节分数可能为空 + int oneNodeScore = competitionResult.getOneNodeScore()==null?0:competitionResult.getOneNodeScore(); + int twoNodeScore = competitionResult.getTwoNodeScore()==null?0:competitionResult.getTwoNodeScore(); + int threeNodeScore = competitionResult.getThreeNodeScore()==null?0:competitionResult.getThreeNodeScore(); + int fourNodeScore = competitionResult.getFourNodeScore()==null?0:competitionResult.getFourNodeScore(); + int fiveNodeScore = competitionResult.getFiveNodeScore()==null?0:competitionResult.getFiveNodeScore(); + int sixNodeScore = competitionResult.getSixNodeScore()==null?0:competitionResult.getSixNodeScore(); + + //合计总分 + int score = oneNodeScore+twoNodeScore+threeNodeScore+fourNodeScore+fiveNodeScore+sixNodeScore; + //主队 + if(teamVsTeam.getMainTeamId().equals(competitionResult.getTeamId())){ + mainId = competitionResult.getId(); + mainScore = score; + teamVsTeam.setMainTeamScore(score); + } else {//客队 + gustId = competitionResult.getId(); + gustScore = score; + teamVsTeam.setGuestTeamScore(score); + //客队标识 + if(entity.getTeamId()==competitionResult.getTeamId()){ + flag = false; + } + } + + //设置更新人 + teamVsTeam.setModifiedBy(String.valueOf(user.getUserid())); + teamVsTeam.setLastUpdatedTime(new Date()); + competitionTeamVsTeamMapper.updateCompetitionTeamVsTeam(teamVsTeam); + } + } + + //积分统计 默认1分 + entity.setIntegral(1); + CompetitionResult competitionResult = new CompetitionResult(); + if(flag){ + if(mainScore>gustScore){ + entity.setIntegral(2); + entity.setVsResult(VsResultEnums.win.code()); + if(gustId!=null){ + competitionResult.setId(gustId); + competitionResult.setIntegral(1); + competitionResult.setVsResult(VsResultEnums.fail.code()); + competitionResultMapper.updateCompetitionResult(competitionResult); + } + } else { + if(gustId!=null){ + competitionResult.setId(gustId); + competitionResult.setIntegral(2); + competitionResult.setVsResult(VsResultEnums.win.code()); + competitionResultMapper.updateCompetitionResult(competitionResult); + } + } + + } else { + if(gustScore>mainScore){ + entity.setIntegral(2); + entity.setVsResult(VsResultEnums.win.code()); + if(mainId!=null){ + competitionResult.setId(mainId); + competitionResult.setIntegral(1); + competitionResult.setVsResult(VsResultEnums.fail.code()); + competitionResultMapper.updateCompetitionResult(competitionResult); + } + } else { + if(mainId!=null){ + competitionResult.setId(mainId); + competitionResult.setIntegral(2); + competitionResult.setVsResult(VsResultEnums.win.code()); + competitionResultMapper.updateCompetitionResult(competitionResult); + } + } + } + entity.setModifiedBy(String.valueOf(user.getUserid())); + entity.setLastUpdatedTime(new Date()); + competitionResultMapper.updateCompetitionResult(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean edit(CompetitionResult entity) { + LoginUser user = SecurityUtils.getLoginUser(); + entity.setModifiedBy(String.valueOf(user.getUserid())); + entity.setLastUpdatedTime(new Date()); + competitionResultMapper.updateCompetitionResult(entity); + this.calculateScore(entity,user); + return true; + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionServiceImpl.java index de8be2ffb..6bf0cf5e0 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionServiceImpl.java @@ -1,18 +1,34 @@ package com.ruoyi.system.service.impl; -import java.util.List; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.*; import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.crypto.digest.DigestUtil; +import com.alibaba.fastjson.JSON; import com.ruoyi.common.core.constant.CacheConstants; +import com.ruoyi.common.core.constant.Constants; +import com.ruoyi.common.core.exception.ServiceException; import com.ruoyi.common.redis.service.RedisService; +import com.ruoyi.common.security.utils.SecurityUtils; import com.ruoyi.system.api.domain.vo.WxAppletsCodeVo; -import com.ruoyi.system.service.WxApplesCodeService; +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.domain.*; +import com.ruoyi.system.domain.enums.*; +import com.ruoyi.system.domain.vo.*; +import com.ruoyi.system.mapper.*; +import com.ruoyi.system.service.*; +import com.ruoyi.system.utils.UtilTool; import org.apache.commons.lang3.ObjectUtils; -import org.springframework.beans.factory.annotation.Autowired; +import org.apache.commons.lang3.RandomStringUtils; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.CompetitionMapper; -import com.ruoyi.system.domain.Competition; -import com.ruoyi.system.service.ICompetitionService; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.StringUtils; import javax.annotation.Resource; @@ -30,6 +46,26 @@ public class CompetitionServiceImpl implements ICompetitionService @Resource private WxApplesCodeService wxApplesCodeService; @Resource + private CompetitionOfTeamMapper competitionOfTeamMapper; + @Resource + private CompetitionMembersMapper competitionMembersMapper; + @Resource + private WxBasketballTeamMapper wxBasketballTeamMapper; + @Resource + private CompetitionTeamVsTeamMapper competitionTeamVsTeamMapper; + @Resource + private UserRoleMapper userRoleMapper; + @Resource + private WxUserMapper wxUserMapper; + @Resource + private WxAppletsService wxAppletsService; + @Resource + private IWxBuildingInfoService wxBuildingInfoService; + @Resource + private ITeamMembersService teamMembersService; + @Resource + private IMessageService messageService; + @Resource private RedisService redisService; /** * 查询比赛信息 @@ -114,4 +150,292 @@ public class CompetitionServiceImpl implements ICompetitionService } return wxAppletsCodeVo; } + + @Override + public List getCompetitionByCondition(CompetitionVo competition) { + return competitionMapper.getCompetitionByCondition(competition); + } + + @Override + public CompetitionExcleVo getTeamEnrollExcleImpData(Long competitionId, Long userId) { + CompetitionExcleVo excleVo = new CompetitionExcleVo(); + Competition competition = competitionMapper.selectCompetitionById(competitionId); + if(ObjectUtil.isNull(competition)){ + return excleVo; + } + //todo 获取球队数据 + CompetitionOfTeam team = competitionOfTeamMapper.selectOneByUserId(competitionId,String.valueOf(userId)); + if(ObjectUtil.isNull(team)){ + return excleVo; + } + BeanUtil.copyProperties(competition,excleVo); + excleVo.setOfTeam(team); + //todo 查询球队队员数据 + CompetitionMembers condtion = new CompetitionMembers(); + condtion.setCompetitionId(competitionId); + condtion.setCompetitionOfTeamId(team.getId()); + List members = competitionMembersMapper.selectCompetitionMembersList(condtion); + excleVo.setTeamMemberList(members); + return excleVo; + } + + @Override + public CompetitionResponse getCompetitionById(Long id) { + //查询比赛信息 + CompetitionResponse competitionResponse=new CompetitionResponse(); + Competition competition = competitionMapper.selectCompetitionById(id); + if(UtilTool.isNull(competition)){ + throw new ServiceException("根据id未查询到约战信息"); + } + BeanUtils.copyProperties(competition,competitionResponse); + //查询比赛参与人员列表数据 + List membersList = competitionMembersMapper.getCompetitionMembersByCompetitionId(competition.getId()); + if(competition.getCompetitionNature().intValue()==0) { + Map> groupByTeamIdMap = membersList.stream().collect(Collectors.groupingBy(CompetitionMembers::getCompetitionTeamId)); //查询主队下的队员信息 + for (Map.Entry> entry : groupByTeamIdMap.entrySet()) { + if (!StringUtils.isEmpty(competition.getMainTeamId()) && entry.getKey().equals(competition.getMainTeamId())) { + competitionResponse.setMainTeamMemberList(entry.getValue()); + } else if (!StringUtils.isEmpty(competition.getGuestTeamId()) && entry.getKey().equals(competition.getGuestTeamId())) { + competitionResponse.setGuestTeamMemberList(entry.getValue()); + } + } + } + //查询球队的合照 + List teamIds =new ArrayList<>(); + if(!StringUtils.isEmpty(competition.getMainTeamId())) { + teamIds.add(competition.getMainTeamId()); + } + if(!StringUtils.isEmpty(competition.getGuestTeamId())) { + teamIds.add(competition.getGuestTeamId()); + } + if(teamIds.size()>0) { + List basketballTeamList = wxBasketballTeamMapper.selectBatchIds(teamIds); + CompetitionTeamVsTeam competitionTeamVsTeam = new CompetitionTeamVsTeam(); + for (WxBasketballTeam team : basketballTeamList) { + //设置主队数据 + if (!StringUtils.isEmpty(competition.getMainTeamId()) && team.getId().equals(competition.getMainTeamId())) { + competitionResponse.setMainTeamPhoto(team.getDefaultPicture()); + competitionResponse.setMainTeamDes(team.getTeamDes()); + competitionTeamVsTeam.setMainTeamId(team.getId()); + List mainCompetitionTeamVsTeamList = competitionTeamVsTeamMapper.getLatelySchedule(competitionTeamVsTeam); + competitionResponse.setMainCompetitionTeamVsTeamList(mainCompetitionTeamVsTeamList); + } else if (!StringUtils.isEmpty(competition.getGuestTeamId()) && team.getId().equals(competition.getGuestTeamId())) { + //组装客队数据 + competitionResponse.setGuestTeamPhoto(team.getDefaultPicture()); + competitionResponse.setGuestTeamDes(team.getTeamDes()); + competitionTeamVsTeam.setGuestTeamId(team.getId()); + List guestCompetitionTeamVsTeamList = competitionTeamVsTeamMapper.getLatelySchedule(competitionTeamVsTeam); + competitionResponse.setGuestCompetitionTeamVsTeamList(guestCompetitionTeamVsTeamList); + } + } + } + return competitionResponse; + } + + @Override + public Boolean establishCompetition(CompetitionVo entity) { + //使用赛会名称加密缓存防止重复提交 + Object key = redisService.getCacheObject(Constants.COMPETITION_CREATE_KEY + DigestUtil.md5(entity.getCompetitionName().trim())); + if(ObjectUtil.isNotNull(key)){ + throw new ServiceException("当前创建赛会数据已提交到系统,毋须重复提交!"); + } + LoginUser user = SecurityUtils.getLoginUser(); + entity.setCreatedBy(String.valueOf(user.getUserid())); + entity.setCreatedTime(new Date()); + DateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + entity.setCompetitionCode(sdf.format(new Date())+ RandomStringUtils.randomNumeric(6)); + //判断是否已经存在 + List existList = competitionMapper.selectCompetitionList( Competition.builder().competitionName(entity.getCompetitionName()).competitionNature(entity.getCompetitionNature()).build()); + if(existList.size()>0) { + throw new ServiceException("当前赛会已存在,毋须重复提交!"); + } + //小程序-推送赛会通知给系统管理员。管理员好及时去审核赛会 + List userRoles = userRoleMapper.selectUserRoleList(UserRole.builder().roleCode(UserRoles.ADMIN.code()).build()); + List userIds = userRoles.stream().map(UserRole::getUserId).collect(Collectors.toList()); + List managerUsers = wxUserMapper.listByIds(userIds); + if(!StringUtils.isEmpty(managerUsers)&&!StringUtils.isEmpty(managerUsers.size()>0)){ + for (WxUser managerUser:managerUsers){ + if(!StringUtils.isEmpty(managerUser.getOpenid())) { + WxMssVo wxMssVo = new WxMssVo(); + wxMssVo.setTemplate_id(WxAppletsTemplateIdsEnum.COMPETITION_SIGN_UP.getCode()); + wxMssVo.setTouser(managerUser.getOpenid()); + Map map = new HashMap<>(); + map.put("thing3", new TemplateDataVo(entity.getCompetitionName())); + map.put("name1", new TemplateDataVo(entity.getContacts())); + map.put("phone_number2", new TemplateDataVo(entity.getContactsTel())); + map.put("thing7", new TemplateDataVo("有新的赛会被创建,请尽快审核!")); + wxMssVo.setData(map); + wxAppletsService.pushOneUser(wxMssVo); + } + } + } + if(competitionMapper.insertCompetition(entity)>0){ + redisService.setCacheObject(Constants.COMPETITION_CREATE_KEY + DigestUtil.md5(entity.getCompetitionName().trim()),entity.getCompetitionName(),20L,TimeUnit.SECONDS); + } + return Boolean.TRUE; + } + + @Override + public Boolean challengeConfirm(Competition entity) { + //使用赛会名称加密缓存防止重复提交 + Object key = redisService.getCacheObject(Constants.COMPETITION_CREATE_KEY + DigestUtil.md5(entity.getCompetitionName().trim())); + if(UtilTool.isNotNull(key)){ + throw new ServiceException("当前创建赛会数据已提交到系统,毋须重复提交!"); + } + LoginUser user = SecurityUtils.getLoginUser(); + entity.setCreatedBy(String.valueOf(user.getUserid())); + entity.setCreatedTime(new Date()); + DateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + entity.setCompetitionCode(sdf.format(new Date())+ RandomStringUtils.randomNumeric(6)); + //判断是否已经存在 + List dbList = competitionMapper.selectCompetitionList(Competition.builder().competitionNature(entity.getCompetitionNature()) + .competitionName(entity.getCompetitionName()).build()); + if(dbList.size()>0) { + throw new ServiceException("当前赛会已存在,毋须重复提交!"); + } + //小程序-推送赛会通知给系统管理员。管理员好及时去审核赛会 + List userRoles = userRoleMapper.selectUserRoleList(UserRole.builder().roleCode(UserRoles.ADMIN.code()).build()); + List userIds = userRoles.stream().map(UserRole::getUserId).collect(Collectors.toList()); + List managerUsers = wxUserMapper.listByIds(userIds); + if(!StringUtils.isEmpty(managerUsers)&&!StringUtils.isEmpty(managerUsers.size()>0)){ + for (WxUser managerUser:managerUsers){ + if(!StringUtils.isEmpty(managerUser.getOpenid())) { + WxMssVo wxMssVo = new WxMssVo(); + wxMssVo.setTemplate_id(WxAppletsTemplateIdsEnum.COMPETITION_SIGN_UP.getCode()); + wxMssVo.setTouser(managerUser.getOpenid()); + Map map = new HashMap<>(); + map.put("thing3", new TemplateDataVo(entity.getCompetitionName())); + map.put("name1", new TemplateDataVo(entity.getContacts())); + map.put("phone_number2", new TemplateDataVo(entity.getContactsTel())); + map.put("thing7", new TemplateDataVo("有新的赛会被创建,请尽快审核!")); + wxMssVo.setData(map); + wxAppletsService.pushOneUser(wxMssVo); + } + } + } + if(ObjectUtil.isNull(entity.getId())) { + if (competitionMapper.insertCompetition(entity) > 0) { + redisService.setCacheObject(Constants.COMPETITION_CREATE_KEY + DigestUtil.md5(entity.getCompetitionName().trim()), entity.getCompetitionName(), 20L, TimeUnit.SECONDS); + } + }else { + competitionMapper.updateCompetition(entity); + } + return Boolean.TRUE; + } + + @Override + public List getMyJoinCompetition(CompetitionVo competition) { + LoginUser user = SecurityUtils.getLoginUser(); + //查询登录用户的系统角色 + List userRoles = userRoleMapper.selectUserRoleList(UserRole.builder().roleCode(UserRoles.ADMIN.code()).build()); + if(!StringUtils.isEmpty(userRoles) && userRoles.size()>0) { + List userIds = userRoles.stream().map(UserRole::getUserId).collect(Collectors.toList()); + //如果是管理员就直接可以查看所有的赛事 + if (userIds.contains(user.getUserid())) { + competition.setUserId(null); + competition.setFounder(null); + } + } + List list=competitionMapper.getMyJoinCompetition(competition); + for (Competition comp:list){ + if(competition.getCompetitionNature()==0){ + WxBasketballTeam mainTeam = wxBasketballTeamMapper.selectWxBasketballTeamById(comp.getMainTeamId()); + if(!org.springframework.util.ObjectUtils.isEmpty(mainTeam)) { + comp.setMainTeamLogo(mainTeam.getTeamLogo()); + } + if(comp.getGuestTeamId()!=null) { + WxBasketballTeam guestTeam = wxBasketballTeamMapper.selectWxBasketballTeamById(comp.getGuestTeamId()); + if(!org.springframework.util.ObjectUtils.isEmpty(guestTeam)) { + comp.setGuestTeamLogo(guestTeam.getTeamLogo()); + } + } + } + } + return list; + } + @Transactional + @Override + public Boolean add(Competition entity) { + entity.setCompetitionNature(0); + Long id=entity.getId(); + LoginUser user = SecurityUtils.getLoginUser(); + //判断是否存在 + List competitions = competitionMapper.selectCompetitionList(Competition.builder() + .competitionNature(entity.getCompetitionNature()) + .mainTeamId(entity.getMainTeamId()) + .buildingId(entity.getBuildingId()) + .cityCode(entity.getCityCode()).build()); + if(competitions.size()>0){ + throw new ServiceException("当前约战数据已存在,毋须重复提交!"); + } + //获取场馆数据 + if(!StringUtils.isEmpty(entity.getBuildingId())){ + WxBuildingInfo buildingInfo = wxBuildingInfoService.selectWxBuildingInfoById(entity.getBuildingId()); + entity.setBuildingName(buildingInfo.getBuildingName()); + entity.setCityCode(buildingInfo.getCityCode()); + entity.setCityName(buildingInfo.getCityName()); + entity.setCompetitionAddress(buildingInfo.getAddress()); + entity.setLatitude(buildingInfo.getLatitude()); + entity.setLongitude(buildingInfo.getLongitude()); + } + entity.setCreatedBy(String.valueOf(user.getUserid())); + entity.setCreatedTime(new Date()); + entity.setFounder(user.getUserid()); + entity.setStatus(CompetitionStatusEnum.TREATY_WAR.getValue()); + if(ObjectUtil.isNull(entity.getId())){ + competitionMapper.insertCompetition(entity); + }else { + competitionMapper.updateCompetition(entity); + } + if(!StringUtils.isEmpty(entity.getGuestTeamId())) { + TeamMembers teamMembers = teamMembersService.getOneByTeamIdAndRoleCode(entity.getGuestTeamId(), RoleEnum.TEAM_MANAGER.getCode()); + //如果指定了约战的对象就需要给约战的球队的队长发一个消息 + Message message = new Message(); + //审核人是球队队长 + message.setCreatedBy(String.valueOf(user.getUserid())); + message.setAuditor(teamMembers.getUserId()); + message.setMessageType("0"); + message.setFlowType(FowTypeEnum.MAKE_AN_APPOINTMENT.getCode()); + message.setSourceId(entity.getId()); + message.setFlowEntity(JSON.toJSONString(entity)); + message.setCreatedTime(new Date()); + message.setMessageTitle("您收到一条【"+entity.getMainTeamName()+"】"+FowTypeEnum.MAKE_AN_APPOINTMENT.getDesc()+",请及时处理"); + messageService.insertMessage(message); + //小程序-查询用户数据看看是否可以推送服务消息根据unionId是否存在 + WxUser guestUser = wxUserMapper.selectWxUserById(teamMembers.getUserId()); + if(!StringUtils.isEmpty(guestUser)&&!StringUtils.isEmpty(guestUser.getOpenid())){ + WxMssVo wxMssVo=new WxMssVo(); + wxMssVo.setTemplate_id(WxAppletsTemplateIdsEnum.TREATY_WAR.getCode()); + wxMssVo.setTouser(guestUser.getOpenid()); + Map map = new HashMap<>(); + map.put("thing1",new TemplateDataVo(entity.getMainTeamName())); + map.put("thing2",new TemplateDataVo(entity.getGuestTeamName())); + map.put("thing3",new TemplateDataVo("您有新的约战信息,请在小程序中进行处理")); + wxMssVo.setData(map); + wxAppletsService.pushOneUser(wxMssVo); + } + } + if(StringUtils.isEmpty(id)) { + //保存创建人到比赛参与人员表 + CompetitionMembers competitionMembers = new CompetitionMembers(); + competitionMembers.setCompetitionId(entity.getId()); + competitionMembers.setCreatedTime(new Date()); + competitionMembers.setCompetitionTeamId(entity.getMainTeamId()); + competitionMembers.setRoleCode(RoleEnum.TEAM_MANAGER.getCode()); + competitionMembers.setCreatedBy(String.valueOf(user.getUserid())); + competitionMembers.setUserId(user.getUserid()); + competitionMembers.setUserType(1); + competitionMembers.setStatus(1); + competitionMembersMapper.insertCompetitionMembers(competitionMembers); + } + return true; + } + @Override + public Boolean edit(Competition entity) { + LoginUser user = SecurityUtils.getLoginUser(); + entity.setLastUpdatedTime(new Date()); + entity.setModifiedBy(String.valueOf(user.getUserid())); + competitionMapper.updateCompetition(entity); + return true; + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionTeamGroupServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionTeamGroupServiceImpl.java index 3822aa31e..5ab00b5af 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionTeamGroupServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionTeamGroupServiceImpl.java @@ -6,21 +6,26 @@ import java.util.concurrent.TimeUnit; import com.ruoyi.common.core.constant.CacheConstants; import com.ruoyi.common.core.exception.ServiceException; import com.ruoyi.common.redis.service.RedisService; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.system.api.model.LoginUser; import com.ruoyi.system.domain.Competition; import com.ruoyi.system.domain.CompetitionOfTeam; import com.ruoyi.system.domain.CompetitionTeamVsTeam; import com.ruoyi.system.domain.vo.BegerArrangementVo; import com.ruoyi.system.domain.vo.CompetitionOfTeamVo; import com.ruoyi.system.domain.vo.CompetitionTeamVsTeamVo; +import com.ruoyi.system.domain.vo.TeamGroupRequest; import com.ruoyi.system.mapper.CompetitionMapper; import com.ruoyi.system.mapper.CompetitionOfTeamMapper; import com.ruoyi.system.mapper.CompetitionTeamVsTeamMapper; import com.ruoyi.system.utils.BegerSingleCycleUtil; +import com.ruoyi.system.utils.LoginUserUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.CompetitionTeamGroupMapper; import com.ruoyi.system.domain.CompetitionTeamGroup; import com.ruoyi.system.service.ICompetitionTeamGroupService; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; import javax.annotation.Resource; @@ -168,7 +173,7 @@ public class CompetitionTeamGroupServiceImpl implements ICompetitionTeamGroupSer } CompetitionTeamGroup teamGroup2 = new CompetitionTeamGroup(); teamGroup2.setId(teamGroup.getId()); - teamGroup2.setIsCycle(1L); + teamGroup2.setIsCycle(1); competitionTeamGroupMapper.updateCompetitionTeamGroup(teamGroup2); }else { throw new ServiceException("当前分组中暂无球队数据"); @@ -177,4 +182,61 @@ public class CompetitionTeamGroupServiceImpl implements ICompetitionTeamGroupSer } return Boolean.TRUE; } + + @Override + public List getTeamGroupByCondition(CompetitionTeamGroup entity) { + return competitionTeamGroupMapper.getTeamGroupByCondition(entity); + } + @Transactional + @Override + public Boolean batchEditTeamGroup(TeamGroupRequest teamGroupRequest) { + List list = new ArrayList<>(); + for (Long id:teamGroupRequest.getOfTeamIds()) { + CompetitionOfTeam c = new CompetitionOfTeam(); + c.setId(id); + c.setCompetitionGroup(teamGroupRequest.getGroup()); + c.setCompetitionId(teamGroupRequest.getCompetitionId()); + competitionOfTeamMapper.updateCompetitionOfTeam(c); + } + return Boolean.TRUE; + } + + @Transactional + @Override + public Boolean randomTeamGroup(List list, Long competitionId) { + LoginUser user = SecurityUtils.getLoginUser(); + List groupList=new ArrayList<>(); + for (TeamGroupRequest groupRequest:list) { + CompetitionTeamGroup group = new CompetitionTeamGroup(); + group.setCompetitionId(competitionId); + group.setRemark("主办方使用随机分组"); + group.setCompetitionGroup(groupRequest.getGroup()); + group.setCreatedBy(String.valueOf(user.getUserid())); + group.setCreatedTime(new Date()); + competitionTeamGroupMapper.insertCompetitionTeamGroup(group); + //获取oftema 的ids + if(groupRequest.getOfTeamIds().size()>0){ + List updateList = new ArrayList<>(); + for (Long id:groupRequest.getOfTeamIds()){ + CompetitionOfTeam c = new CompetitionOfTeam(); + c.setId(id); + c.setCompetitionGroup(groupRequest.getGroup()); + c.setCompetitionId(competitionId); + c.setCreatedBy(String.valueOf(user.getUserid())); + c.setCreatedTime(new Date()); + competitionOfTeamMapper.updateCompetitionOfTeam(c); + } + } + } + return Boolean.TRUE; + } + + @Override + public Boolean add(CompetitionTeamGroup entity) { + LoginUser user = SecurityUtils.getLoginUser(); + entity.setCreatedBy(String.valueOf(user.getUserid())); + entity.setCreatedTime(new Date()); + competitionTeamGroupMapper.insertCompetitionTeamGroup(entity); + return Boolean.TRUE; + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionTeamVsTeamServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionTeamVsTeamServiceImpl.java index ee5f39534..9edae4838 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionTeamVsTeamServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionTeamVsTeamServiceImpl.java @@ -1,22 +1,28 @@ package com.ruoyi.system.service.impl; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; +import java.security.InvalidParameterException; +import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; +import cn.hutool.core.util.ObjectUtil; import com.ruoyi.common.core.exception.ServiceException; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.api.model.WxLoginUser; import com.ruoyi.system.domain.CompetitionMembersScore; import com.ruoyi.system.domain.CompetitionResult; import com.ruoyi.system.domain.vo.*; import com.ruoyi.system.mapper.CompetitionMembersScoreMapper; import com.ruoyi.system.mapper.CompetitionResultMapper; +import com.ruoyi.system.service.ICompetitionResultService; +import com.ruoyi.system.utils.LoginUserUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.CompetitionTeamVsTeamMapper; import com.ruoyi.system.domain.CompetitionTeamVsTeam; import com.ruoyi.system.service.ICompetitionTeamVsTeamService; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; @@ -35,7 +41,7 @@ public class CompetitionTeamVsTeamServiceImpl implements ICompetitionTeamVsTeamS private CompetitionTeamVsTeamMapper competitionTeamVsTeamMapper; @Resource - private CompetitionResultMapper competitionResultMapper; + private ICompetitionResultService competitionResultService; @Resource private CompetitionMembersScoreMapper competitionMembersScoreMapper; @@ -121,7 +127,7 @@ public class CompetitionTeamVsTeamServiceImpl implements ICompetitionTeamVsTeamS unifiedRecordVo.setTeamVsTeamVo(competitionTeamVsTeamVo); //查询队伍数据 - List competitionResultList = competitionResultMapper.findByCompetitionVsId(competitionTeamVsTeamVo.getCompetitionId(),competitionTeamVsTeamVo.getId()); + List competitionResultList = competitionResultService.findByCompetitionVsId(competitionTeamVsTeamVo.getCompetitionId(),competitionTeamVsTeamVo.getId()); unifiedRecordVo.setCompetitionResultList(competitionResultList); //查询赛程中个人成绩 @@ -167,7 +173,7 @@ public class CompetitionTeamVsTeamServiceImpl implements ICompetitionTeamVsTeamS throw new ServiceException("赛程不存在"); } //获取主队每节数据 - List competitionResultList = competitionResultMapper.findByCompetitionVsId(competitionTeamVsTeamVo.getCompetitionId(),competitionTeamVsTeamVo.getId()); + List competitionResultList = competitionResultService.findByCompetitionVsId(competitionTeamVsTeamVo.getCompetitionId(),competitionTeamVsTeamVo.getId()); Optional main = competitionResultList.stream().filter(a -> a.getTeamId().equals(competitionTeamVsTeamVo.getMainTeamId())).findFirst(); Optional guest = competitionResultList.stream().filter(a -> a.getTeamId().equals(competitionTeamVsTeamVo.getGuestTeamId())).findFirst(); List membersScoreList = competitionMembersScoreMapper.findMembersScoreByCompetitionVsId(competitionTeamVsTeamVo.getCompetitionId(),competitionTeamVsTeamVo.getId()); @@ -186,4 +192,104 @@ public class CompetitionTeamVsTeamServiceImpl implements ICompetitionTeamVsTeamS recordVo.setTeamVsTeamVo(competitionTeamVsTeamVo); return recordVo; } + + @Override + public Map> getCompetitionSchedule(CompetitionTeamVsTeam entity) { + List list = competitionTeamVsTeamMapper.getCompetitionSchedule(entity); + //Java8 stream根据字段分组并排序 + //1.根据字符串类型日期分组,并按照日期升序排序,返回TreeMap,map的key为字符串日期,value为list + TreeMap> dataGroupMap = list.stream().collect(Collectors.groupingBy(a->a.getCompetitionDate(), TreeMap::new,Collectors.toList())); + // 2.将value中的list按照时间早晚排序 + Set>> entrySet = dataGroupMap.entrySet(); + for(Map.Entry> entry : entrySet){ + List sortedList = entry.getValue().stream().sorted(Comparator.comparing(CompetitionTeamVsTeamVo :: getTheTime)).collect(Collectors.toList()); + } + return dataGroupMap; + } + + @Override + public List getCompetitionTeamIntegralListById(Long id) { + return competitionTeamVsTeamMapper.getCompetitionTeamIntegralListById(id); + } + @Transactional + @Override + public Boolean competitionScheduleSubmit(List vsTeamRequestList) { + LoginUser user = SecurityUtils.getLoginUser(); + List allList = new ArrayList<>(); + //校验数据 + for (CompetitionTeamVsTeamRequest request : vsTeamRequestList) { + if(StringUtils.isEmpty(request.getCompetitionId())){ + throw new InvalidParameterException("参数competitionId不能为空"); + }else if(StringUtils.isEmpty(request.getCompetitionDate())){ + throw new InvalidParameterException("比赛日期[competitionDate]不能为空"); + }else if(StringUtils.isEmpty(request.getTeamVsTeamList())||request.getTeamVsTeamList().size()==0){ + throw new InvalidParameterException("赛程对阵[teamVsTeamList]不能为空"); + } + for (CompetitionTeamVsTeamVo vo: request.getTeamVsTeamList()) { + if(StringUtils.isEmpty(vo.getMainTeamId())){ + throw new InvalidParameterException("主队[mainTeamId]不能为空"); + }if(StringUtils.isEmpty(vo.getTheTime())){ + throw new InvalidParameterException("比赛时间[theTime]不能为空"); + }else if(StringUtils.isEmpty(vo.getMainTeamName())){ + throw new InvalidParameterException("主队[mainTeamName]不能为空"); + }else if(StringUtils.isEmpty(vo.getGuestTeamId())){ + throw new InvalidParameterException("客队[guestTeamId]不能为空"); + }else if(StringUtils.isEmpty(vo.getGuestTeamName())){ + throw new InvalidParameterException("客队[guestTeamName]不能为空"); + }else if(StringUtils.isEmpty(vo.getBuildingId())){ + throw new InvalidParameterException("比赛场地[buildingId]不能为空"); + }else if(StringUtils.isEmpty(vo.getBuildingName())){ + throw new InvalidParameterException("比赛场地[buildingName]不能为空"); + }else if(StringUtils.isEmpty(vo.getMainTeamLogo())){ + throw new InvalidParameterException("主队logo[mainTeamLogo]不能为空"); + }else if(StringUtils.isEmpty(vo.getGuestTeamLogo())){ + throw new InvalidParameterException("客队logo[guestTeamLogo]不能为空"); + } + vo.setCreatedBy(String.valueOf(user.getUserid())); + vo.setCreatedTime(new Date()); + vo.setVsType(request.getVsType()); + vo.setCompetitionId(request.getCompetitionId()); + if(ObjectUtil.isNull(vo.getId())){ + competitionTeamVsTeamMapper.insertCompetitionTeamVsTeam(vo); + }else { + competitionTeamVsTeamMapper.updateCompetitionTeamVsTeam(vo); + } + } + } + return Boolean.TRUE; + } + + @Override + public Boolean competitionScoreSubmit(List request) { + + for(CompetitionResult competitionResult : request){ + //小节分数可能为空 + int oneNodeScore = competitionResult.getOneNodeScore()==null?0:competitionResult.getOneNodeScore(); + int twoNodeScore = competitionResult.getTwoNodeScore()==null?0:competitionResult.getTwoNodeScore(); + int threeNodeScore = competitionResult.getThreeNodeScore()==null?0:competitionResult.getThreeNodeScore(); + int fourNodeScore = competitionResult.getFourNodeScore()==null?0:competitionResult.getFourNodeScore(); + int fiveNodeScore = competitionResult.getFiveNodeScore()==null?0:competitionResult.getFiveNodeScore(); + int sixNodeScore = competitionResult.getSixNodeScore()==null?0:competitionResult.getSixNodeScore(); + + int score = oneNodeScore+twoNodeScore+threeNodeScore+fourNodeScore+fiveNodeScore+sixNodeScore; + if(score>0&&competitionResult.getTotalScore()!=null){ + if(score!=competitionResult.getTotalScore()){ + throw new InvalidParameterException("总分和小节分之和 不等 请检查!"); + } + } else if(score==0&&competitionResult.getTotalScore()!=null){ + competitionResult.setOneNodeScore(competitionResult.getTotalScore()); + } + + //新增 + if(competitionResult.getId()==null){ + competitionResultService.add(competitionResult); + } else {//编辑 + if(StringUtils.isEmpty(competitionResult.getId())){ + throw new InvalidParameterException("id为空"); + } + competitionResultService.edit(competitionResult); + } + } + return true; + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DataDictionaryServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DataDictionaryServiceImpl.java new file mode 100644 index 000000000..f2aa8087e --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DataDictionaryServiceImpl.java @@ -0,0 +1,106 @@ +package com.ruoyi.system.service.impl; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.DataDictionaryMapper; +import com.ruoyi.system.domain.DataDictionary; +import com.ruoyi.system.service.IDataDictionaryService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class DataDictionaryServiceImpl implements IDataDictionaryService +{ + @Autowired + private DataDictionaryMapper dataDictionaryMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public DataDictionary selectDataDictionaryById(Long id) + { + return dataDictionaryMapper.selectDataDictionaryById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param dataDictionary 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectDataDictionaryList(DataDictionary dataDictionary) + { + return dataDictionaryMapper.selectDataDictionaryList(dataDictionary); + } + + /** + * 新增【请填写功能名称】 + * + * @param dataDictionary 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertDataDictionary(DataDictionary dataDictionary) + { + return dataDictionaryMapper.insertDataDictionary(dataDictionary); + } + + /** + * 修改【请填写功能名称】 + * + * @param dataDictionary 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateDataDictionary(DataDictionary dataDictionary) + { + return dataDictionaryMapper.updateDataDictionary(dataDictionary); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteDataDictionaryByIds(Long[] ids) + { + return dataDictionaryMapper.deleteDataDictionaryByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteDataDictionaryById(Long id) + { + return dataDictionaryMapper.deleteDataDictionaryById(id); + } + + @Override + public Map getChildByParentKey(String parentKey) { + Map dataMap = new HashMap(); + List dictionaryList = dataDictionaryMapper.getChildByParentKey(parentKey); + for(DataDictionary d:dictionaryList){ + dataMap.put(d.getKey(), d.getName()); + } + return dataMap; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FeatureLabelServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FeatureLabelServiceImpl.java new file mode 100644 index 000000000..10257cfff --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FeatureLabelServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.FeatureLabelMapper; +import com.ruoyi.system.domain.FeatureLabel; +import com.ruoyi.system.service.IFeatureLabelService; + +/** + * 球馆特征Service业务层处理 + * + * @author ruoyi + * @date 2023-07-06 + */ +@Service +public class FeatureLabelServiceImpl implements IFeatureLabelService +{ + @Autowired + private FeatureLabelMapper featureLabelMapper; + + /** + * 查询球馆特征 + * + * @param id 球馆特征主键 + * @return 球馆特征 + */ + @Override + public FeatureLabel selectFeatureLabelById(Long id) + { + return featureLabelMapper.selectFeatureLabelById(id); + } + + /** + * 查询球馆特征列表 + * + * @param featureLabel 球馆特征 + * @return 球馆特征 + */ + @Override + public List selectFeatureLabelList(FeatureLabel featureLabel) + { + return featureLabelMapper.selectFeatureLabelList(featureLabel); + } + + /** + * 新增球馆特征 + * + * @param featureLabel 球馆特征 + * @return 结果 + */ + @Override + public int insertFeatureLabel(FeatureLabel featureLabel) + { + return featureLabelMapper.insertFeatureLabel(featureLabel); + } + + /** + * 修改球馆特征 + * + * @param featureLabel 球馆特征 + * @return 结果 + */ + @Override + public int updateFeatureLabel(FeatureLabel featureLabel) + { + return featureLabelMapper.updateFeatureLabel(featureLabel); + } + + /** + * 批量删除球馆特征 + * + * @param ids 需要删除的球馆特征主键 + * @return 结果 + */ + @Override + public int deleteFeatureLabelByIds(Long[] ids) + { + return featureLabelMapper.deleteFeatureLabelByIds(ids); + } + + /** + * 删除球馆特征信息 + * + * @param id 球馆特征主键 + * @return 结果 + */ + @Override + public int deleteFeatureLabelById(Long id) + { + return featureLabelMapper.deleteFeatureLabelById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GlobalAttachmentServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GlobalAttachmentServiceImpl.java new file mode 100644 index 000000000..b3f242694 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GlobalAttachmentServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.GlobalAttachmentMapper; +import com.ruoyi.system.domain.GlobalAttachment; +import com.ruoyi.system.service.IGlobalAttachmentService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class GlobalAttachmentServiceImpl implements IGlobalAttachmentService +{ + @Autowired + private GlobalAttachmentMapper globalAttachmentMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public GlobalAttachment selectGlobalAttachmentById(Long id) + { + return globalAttachmentMapper.selectGlobalAttachmentById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param globalAttachment 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectGlobalAttachmentList(GlobalAttachment globalAttachment) + { + return globalAttachmentMapper.selectGlobalAttachmentList(globalAttachment); + } + + /** + * 新增【请填写功能名称】 + * + * @param globalAttachment 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertGlobalAttachment(GlobalAttachment globalAttachment) + { + return globalAttachmentMapper.insertGlobalAttachment(globalAttachment); + } + + /** + * 修改【请填写功能名称】 + * + * @param globalAttachment 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateGlobalAttachment(GlobalAttachment globalAttachment) + { + return globalAttachmentMapper.updateGlobalAttachment(globalAttachment); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteGlobalAttachmentByIds(Long[] ids) + { + return globalAttachmentMapper.deleteGlobalAttachmentByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteGlobalAttachmentById(Long id) + { + return globalAttachmentMapper.deleteGlobalAttachmentById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GroupWechatServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GroupWechatServiceImpl.java new file mode 100644 index 000000000..3f62f6eb5 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GroupWechatServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.GroupWechatMapper; +import com.ruoyi.system.domain.GroupWechat; +import com.ruoyi.system.service.IGroupWechatService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class GroupWechatServiceImpl implements IGroupWechatService +{ + @Autowired + private GroupWechatMapper groupWechatMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public GroupWechat selectGroupWechatById(Long id) + { + return groupWechatMapper.selectGroupWechatById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param groupWechat 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectGroupWechatList(GroupWechat groupWechat) + { + return groupWechatMapper.selectGroupWechatList(groupWechat); + } + + /** + * 新增【请填写功能名称】 + * + * @param groupWechat 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertGroupWechat(GroupWechat groupWechat) + { + return groupWechatMapper.insertGroupWechat(groupWechat); + } + + /** + * 修改【请填写功能名称】 + * + * @param groupWechat 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateGroupWechat(GroupWechat groupWechat) + { + return groupWechatMapper.updateGroupWechat(groupWechat); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteGroupWechatByIds(Long[] ids) + { + return groupWechatMapper.deleteGroupWechatByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteGroupWechatById(Long id) + { + return groupWechatMapper.deleteGroupWechatById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MessageServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MessageServiceImpl.java new file mode 100644 index 000000000..573f77179 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MessageServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.MessageMapper; +import com.ruoyi.system.domain.Message; +import com.ruoyi.system.service.IMessageService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class MessageServiceImpl implements IMessageService +{ + @Autowired + private MessageMapper messageMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public Message selectMessageById(Long id) + { + return messageMapper.selectMessageById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param message 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectMessageList(Message message) + { + return messageMapper.selectMessageList(message); + } + + /** + * 新增【请填写功能名称】 + * + * @param message 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertMessage(Message message) + { + return messageMapper.insertMessage(message); + } + + /** + * 修改【请填写功能名称】 + * + * @param message 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateMessage(Message message) + { + return messageMapper.updateMessage(message); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteMessageByIds(Long[] ids) + { + return messageMapper.deleteMessageByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteMessageById(Long id) + { + return messageMapper.deleteMessageById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShAreaServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShAreaServiceImpl.java new file mode 100644 index 000000000..c9a322305 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShAreaServiceImpl.java @@ -0,0 +1,98 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.ShAreaMapper; +import com.ruoyi.system.domain.ShArea; +import com.ruoyi.system.service.IShAreaService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class ShAreaServiceImpl implements IShAreaService +{ + @Autowired + private ShAreaMapper shAreaMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public ShArea selectShAreaById(Long id) + { + return shAreaMapper.selectShAreaById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param shArea 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectShAreaList(ShArea shArea) + { + return shAreaMapper.selectShAreaList(shArea); + } + + /** + * 新增【请填写功能名称】 + * + * @param shArea 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertShArea(ShArea shArea) + { + return shAreaMapper.insertShArea(shArea); + } + + /** + * 修改【请填写功能名称】 + * + * @param shArea 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateShArea(ShArea shArea) + { + return shAreaMapper.updateShArea(shArea); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteShAreaByIds(Long[] ids) + { + return shAreaMapper.deleteShAreaByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteShAreaById(Long id) + { + return shAreaMapper.deleteShAreaById(id); + } + + @Override + public List findMyCity(ShArea entity) { + return shAreaMapper.findMyCity(entity); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsServiceImpl.java new file mode 100644 index 000000000..e0f47bfa9 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsServiceImpl.java @@ -0,0 +1,60 @@ +package com.ruoyi.system.service.impl; + +import com.alibaba.fastjson.JSON; +import com.ruoyi.common.core.constant.Constants; +import com.ruoyi.system.domain.Sms; +import com.ruoyi.system.domain.vo.SmsResponse; +import com.ruoyi.system.service.SmsService; +import lombok.extern.log4j.Log4j2; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author 吴一博 + * @date 2023年07月07日 15:39 + * @Description 短信发送接口服务 + */ +@Log4j2 +@Service +public class SmsServiceImpl implements SmsService { + @Autowired + private RestTemplate restTemplate; + @Override + public SmsResponse sendSms(Sms sms) { + sms.setAccount(Constants.SMS_PAOPAO_ACCOUNT); + sms.setPassword(Constants.SMS_PAOPAO_PASSWORD); + sms.setExtno(Constants.SMS_PAOPAO_EXTNO); + sms.setMobile(sms.getMb()); + sms.setContent(sms.getMs()); + //发送短信 + if(restTemplate==null){ + restTemplate = new RestTemplate(); + } + //2. 模拟表单参数 请求体携带参数 + //String url = Constant.SMS_PAOPAO_URL+"?phone={phone}&msg={phone}"; + String url = Constants.SMS_PAOPAO_URL+"?action=send&account={account}&password={password}&mobile={mobile}&content={content}&extno={extno}"; + Map uriVariables = new HashMap(); + uriVariables.put("account", sms.getAccount()); + uriVariables.put("password",sms.getPassword()); + uriVariables.put("mobile",sms.getMobile()); + uriVariables.put("content",sms.getContent()); + uriVariables.put("extno",sms.getExtno()); + String responseEntity = restTemplate.getForObject(url, String.class, uriVariables); + log.info("短信发送url={} 请求参数{}", url, JSON.toJSONString(uriVariables)); + log.info("短信发送结果={}", responseEntity); + /* String[] smsres = res.split(","); + int status = Integer.parseInt(smsres[0]); + String batchNo = smsres[1]; + + */ + SmsResponse smsResponse = new SmsResponse(); + //smsResponse.setMsg(SmsResponseTypeEnum.getSmsResponseTypeByCode(1).getMsg()); + smsResponse.setBatchNo("batchNo"); + smsResponse.setStatus(0); + return smsResponse; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TeamMembersServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TeamMembersServiceImpl.java index 4237a96a5..341c70397 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TeamMembersServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TeamMembersServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl; import java.util.List; +import com.ruoyi.system.domain.vo.TeamMembersResponse; import com.ruoyi.system.domain.vo.TeamMembersVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -92,4 +93,14 @@ public class TeamMembersServiceImpl implements ITeamMembersService { return teamMembersMapper.deleteTeamMembersById(id); } + + @Override + public List getTeamMembersByTeamId(Long teamId) { + return teamMembersMapper.getTeamMembersByTeamId(teamId); + } + + @Override + public TeamMembers getOneByTeamIdAndRoleCode(Long guestTeamId, String code) { + return teamMembersMapper.getOneByTeamIdAndRoleCode(guestTeamId,code); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TokenInfoServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TokenInfoServiceImpl.java new file mode 100644 index 000000000..c3a11429a --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TokenInfoServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.TokenInfoMapper; +import com.ruoyi.system.domain.TokenInfo; +import com.ruoyi.system.service.ITokenInfoService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class TokenInfoServiceImpl implements ITokenInfoService +{ + @Autowired + private TokenInfoMapper tokenInfoMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public TokenInfo selectTokenInfoById(Long id) + { + return tokenInfoMapper.selectTokenInfoById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param tokenInfo 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectTokenInfoList(TokenInfo tokenInfo) + { + return tokenInfoMapper.selectTokenInfoList(tokenInfo); + } + + /** + * 新增【请填写功能名称】 + * + * @param tokenInfo 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertTokenInfo(TokenInfo tokenInfo) + { + return tokenInfoMapper.insertTokenInfo(tokenInfo); + } + + /** + * 修改【请填写功能名称】 + * + * @param tokenInfo 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateTokenInfo(TokenInfo tokenInfo) + { + return tokenInfoMapper.updateTokenInfo(tokenInfo); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteTokenInfoByIds(Long[] ids) + { + return tokenInfoMapper.deleteTokenInfoByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteTokenInfoById(Long id) + { + return tokenInfoMapper.deleteTokenInfoById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TrainingInfoServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TrainingInfoServiceImpl.java new file mode 100644 index 000000000..68fb4ae05 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TrainingInfoServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.TrainingInfoMapper; +import com.ruoyi.system.domain.TrainingInfo; +import com.ruoyi.system.service.ITrainingInfoService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class TrainingInfoServiceImpl implements ITrainingInfoService +{ + @Autowired + private TrainingInfoMapper trainingInfoMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public TrainingInfo selectTrainingInfoById(Long id) + { + return trainingInfoMapper.selectTrainingInfoById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param trainingInfo 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectTrainingInfoList(TrainingInfo trainingInfo) + { + return trainingInfoMapper.selectTrainingInfoList(trainingInfo); + } + + /** + * 新增【请填写功能名称】 + * + * @param trainingInfo 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertTrainingInfo(TrainingInfo trainingInfo) + { + return trainingInfoMapper.insertTrainingInfo(trainingInfo); + } + + /** + * 修改【请填写功能名称】 + * + * @param trainingInfo 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateTrainingInfo(TrainingInfo trainingInfo) + { + return trainingInfoMapper.updateTrainingInfo(trainingInfo); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteTrainingInfoByIds(Long[] ids) + { + return trainingInfoMapper.deleteTrainingInfoByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteTrainingInfoById(Long id) + { + return trainingInfoMapper.deleteTrainingInfoById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserBuildingRelServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserBuildingRelServiceImpl.java new file mode 100644 index 000000000..28ff21c8d --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserBuildingRelServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.UserBuildingRelMapper; +import com.ruoyi.system.domain.UserBuildingRel; +import com.ruoyi.system.service.IUserBuildingRelService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class UserBuildingRelServiceImpl implements IUserBuildingRelService +{ + @Autowired + private UserBuildingRelMapper userBuildingRelMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public UserBuildingRel selectUserBuildingRelById(Long id) + { + return userBuildingRelMapper.selectUserBuildingRelById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param userBuildingRel 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectUserBuildingRelList(UserBuildingRel userBuildingRel) + { + return userBuildingRelMapper.selectUserBuildingRelList(userBuildingRel); + } + + /** + * 新增【请填写功能名称】 + * + * @param userBuildingRel 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertUserBuildingRel(UserBuildingRel userBuildingRel) + { + return userBuildingRelMapper.insertUserBuildingRel(userBuildingRel); + } + + /** + * 修改【请填写功能名称】 + * + * @param userBuildingRel 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateUserBuildingRel(UserBuildingRel userBuildingRel) + { + return userBuildingRelMapper.updateUserBuildingRel(userBuildingRel); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteUserBuildingRelByIds(Long[] ids) + { + return userBuildingRelMapper.deleteUserBuildingRelByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteUserBuildingRelById(Long id) + { + return userBuildingRelMapper.deleteUserBuildingRelById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserRoleServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserRoleServiceImpl.java new file mode 100644 index 000000000..6e6e4e5c1 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserRoleServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.UserRoleMapper; +import com.ruoyi.system.domain.UserRole; +import com.ruoyi.system.service.IUserRoleService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2023-07-04 + */ +@Service +public class UserRoleServiceImpl implements IUserRoleService +{ + @Autowired + private UserRoleMapper userRoleMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public UserRole selectUserRoleById(Long id) + { + return userRoleMapper.selectUserRoleById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param userRole 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectUserRoleList(UserRole userRole) + { + return userRoleMapper.selectUserRoleList(userRole); + } + + /** + * 新增【请填写功能名称】 + * + * @param userRole 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertUserRole(UserRole userRole) + { + return userRoleMapper.insertUserRole(userRole); + } + + /** + * 修改【请填写功能名称】 + * + * @param userRole 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateUserRole(UserRole userRole) + { + return userRoleMapper.updateUserRole(userRole); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteUserRoleByIds(Long[] ids) + { + return userRoleMapper.deleteUserRoleByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteUserRoleById(Long id) + { + return userRoleMapper.deleteUserRoleById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxAppletsServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxAppletsServiceImpl.java new file mode 100644 index 000000000..47328f93b --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxAppletsServiceImpl.java @@ -0,0 +1,258 @@ +package com.ruoyi.system.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.ruoyi.common.core.constant.Constants; +import com.ruoyi.common.core.exception.ServiceException; +import com.ruoyi.common.redis.service.RedisService; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.system.api.domain.vo.WxAppletsCodeVo; +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.api.model.WxLoginUser; +import com.ruoyi.system.domain.WxUser; +import com.ruoyi.system.domain.enums.WxAppletsSendErrCodesEnum; +import com.ruoyi.system.domain.enums.WxAppletsTemplateIdsEnum; +import com.ruoyi.system.domain.vo.PhoneRequest; +import com.ruoyi.system.domain.vo.WxApplesRes; +import com.ruoyi.system.domain.vo.WxMssVo; +import com.ruoyi.system.domain.vo.WxPhoneNumberVo; +import com.ruoyi.system.service.ICompetitionMembersService; +import com.ruoyi.system.service.IWxUserService; +import com.ruoyi.system.service.WxAppletsService; +import com.ruoyi.system.utils.LoginUserUtil; +import lombok.extern.log4j.Log4j2; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.util.StringUtils; +import org.springframework.web.client.RestTemplate; +import sun.misc.BASE64Encoder; + +import javax.annotation.Resource; +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +/** + * @author 吴一博 + * @date 2023年07月07日 16:19 + * @Description + */ +@Log4j2 +@Service +public class WxAppletsServiceImpl implements WxAppletsService { + @Autowired + private RestTemplate restTemplate; + @Resource + private RedisService redisService; + @Autowired + private IWxUserService wxUserService; + @Value("${image.location.linux}") + private String linuxLocation; + @Value("${image.location.windows}") + private String winLocation; + @Value("${image.domainName}") + private String domainName; + @Autowired + private ICompetitionMembersService competitionMembersService; + @Override + public String getAccessToken() { + String accessToken=null; + //如果已经获取就不需要再次请求了 + if(StringUtils.isEmpty(redisService.getCacheObject(Constants.WX_APPLETS_REDIS_ACCESS_TOKEN_KEY))) { + //获取access_token + String appid = Constants.WX_APPLETS_APP_ID; + String appsecret = Constants.WX_APPLETS_APP_SERCERT; + String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential" + + "&appid=" + appid + "&secret=" + appsecret; + if (restTemplate == null) { + restTemplate = new RestTemplate(); + } + String json = restTemplate.getForObject(url, String.class); + JSONObject myJson = JSONObject.parseObject(json); + log.info("获取AccessToken={}", JSON.toJSONString(myJson)); + //保存到缓存 + accessToken = myJson.get("access_token").toString(); + Long expires_in=myJson.getLong("expires_in"); + redisService.setCacheObject(Constants.WX_APPLETS_REDIS_ACCESS_TOKEN_KEY,accessToken,expires_in-100, TimeUnit.SECONDS); + return accessToken; + }else { + return (String) redisService.getCacheObject(Constants.WX_APPLETS_REDIS_ACCESS_TOKEN_KEY); + } + } + @Override + public WxApplesRes pushOneUser(WxMssVo wxMssVo) { + //如果access_token为空则从新获取 + if(StringUtils.isEmpty(wxMssVo.getAccessToken())){ + wxMssVo.setAccessToken(getAccessToken()); + } + String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + wxMssVo.getAccessToken(); + //拼接推送的模版 + // Map map = new HashMap<>(); + if(wxMssVo.getTemplate_id().equals(WxAppletsTemplateIdsEnum.ACCEPT_WAR.getCode())){ //应战 +// map.put("thing1", new TemplateDataVo("admin")); +// map.put("thing2", new TemplateDataVo(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date()))); +// map.put("thing3", new TemplateDataVo("队长邀请成员给成员发通知")); + }else if(wxMssVo.getTemplate_id().equals(WxAppletsTemplateIdsEnum.TREATY_WAR.getCode())){ //约战准备提醒 + + }else if(wxMssVo.getTemplate_id().equals(WxAppletsTemplateIdsEnum.TREATY_WAR_SUCCESS.getCode())){ //约战成功提醒 + + } + if(restTemplate==null){ + restTemplate = new RestTemplate(); + } + + ResponseEntity responseEntity = + restTemplate.postForEntity(url, wxMssVo, WxApplesRes.class); + log.info("小程序推送结果={}", JSON.toJSONString(responseEntity.getBody())); + responseEntity.getBody().setErrmsg(WxAppletsSendErrCodesEnum.getDescByCode(responseEntity.getBody().getErrcode())); + return responseEntity.getBody(); + } + + @Override + public String getPhoneNumber(PhoneRequest request) { + String accessToken = this.getAccessToken(); + String url = "https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=" + accessToken; + if (restTemplate == null) { + restTemplate = new RestTemplate(); + } + Map param = new HashMap<>(); + param.put("code", request.getCode()); + /* param.put("access_token", accessToken);*/ + MultiValueMap headers = new LinkedMultiValueMap<>(); + HttpEntity requestEntity = new HttpEntity(param, headers); + ResponseEntity obj = restTemplate.exchange(url, HttpMethod.POST, requestEntity, WxPhoneNumberVo.class); + if(obj.getBody().getErrcode()!=0){ + throw new ServiceException("手机号码获取失败"); + } + //obj = restTemplate.postForEntity(url, param, WxPhoneNumberVo.class); + return obj.getBody().getPhone_info().getPhoneNumber(); + } + + @Override + public String updatePhoneNumber(PhoneRequest request) { + LoginUser user = SecurityUtils.getLoginUser(); + //更新用户表的tel + WxUser userInfo = new WxUser(); + userInfo.setId(user.getUserid()); + userInfo.setTelephone(this.getPhoneNumber(request)); + wxUserService.updateWxUser(userInfo); + //todo 赛会参赛人员通过手机号码绑定userid + competitionMembersService.bindCompetitionMembersByTel(user.getUserid(),userInfo.getTelephone()); + return userInfo.getTelephone(); + } + + @Override + public WxAppletsCodeVo getWxacodeunlimit(WxAppletsCodeVo wxAppletsCodeVo, String accessToken) { + if(restTemplate==null){ + restTemplate = new RestTemplate(); + } + InputStream inputStream = null; + OutputStream outputStream = null; + //根据APPid和密钥获取存取令牌 + try { + String url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + this.getAccessToken(); + //定义生产二维码所需的参数、样式 + Map param = new HashMap<>(); + param.put("scene", wxAppletsCodeVo.getScene()); + param.put("page", wxAppletsCodeVo.getPage()); + param.put("width", org.apache.commons.lang3.StringUtils.isEmpty(wxAppletsCodeVo.getPage())?10:wxAppletsCodeVo.getPage()); + param.put("auto_color", wxAppletsCodeVo.getAutoColor()==null?false:wxAppletsCodeVo.getAutoColor()); + param.put("is_hyaline",wxAppletsCodeVo.getIsHyaline()==null?false:wxAppletsCodeVo.getIsHyaline()); + Map line_color = new HashMap<>(); + line_color.put("r", 0); + line_color.put("g", 0); + line_color.put("b", 0); + param.put("line_color", line_color); + System.out.println(param+"调用微信URL传参"); + MultiValueMap headers = new LinkedMultiValueMap<>(); + HttpEntity requestEntity = new HttpEntity(param, headers); + // System.out.println("协议请求头"+headers+""+requestEntity); + ResponseEntity entity = restTemplate.exchange(url, HttpMethod.POST, requestEntity, byte[].class, new Object[0]); + // LOG.info("调用小程序生成微信永久小程序码URL接口返回结果:" + entity.getBody()); + // System.out.println("返回结果"+entity.getBody()+".."+entity); + byte[] result = entity.getBody(); +// LOG.info(Base64.encodeBase64String(result)); + // System.out.println("不知道是什么:"+Base64.encodeBase64String(result)); + inputStream = new ByteArrayInputStream(result); +// 生成随机数命名图片 + String filename = UUID.randomUUID().toString(); + // System.out.println(filename); + Date date = new Date(); + String time = new SimpleDateFormat("yyyy-MM-dd").format(date); + String[] str = time.split("-");//根据‘-’进行拆分字符串 拆分出来的日期有,年,日,月,根据年日月创建文件夹 + String datePath="/"+str[0]+"/"+str[1]+"/"+str[2]+"/"; + //创建文件夹 + String xdpath = datePath+filename+".png"; + String filePath = linuxLocation+datePath+filename+".png"; +// 服务器存放位置 + File file = new File(filePath); + //文件目录不存在需要先创建 + if(!file.getParentFile().exists()){ + file.getParentFile().mkdirs(); + } + outputStream = new FileOutputStream(file); + int len = 0; + byte[] buf = new byte[1024]; + while ((len = inputStream.read(buf, 0, 1024)) != -1) { + outputStream.write(buf, 0, len); + } + outputStream.flush(); + wxAppletsCodeVo.setBase64(getBase64(file)); + wxAppletsCodeVo.setCodeImgUrl(domainName+xdpath); + return wxAppletsCodeVo; + + } catch (Exception e) { +// LOG.error("调用小程序生成微信永久小程序码URL接口异常", e); + } finally { + if (inputStream != null) { + try { + inputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (outputStream != null) { + try { + outputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + System.out.println("获取二维码"); + return wxAppletsCodeVo; + } + public static String getBase64(File file){ + String imgStr = ""; + try { + FileInputStream fis = new FileInputStream(file); + byte[] buffer = new byte[(int) file.length()]; + int offset = 0; + int numRead = 0; + while (offset < buffer.length && (numRead = fis.read(buffer, offset, buffer.length - offset)) >= 0) { + offset += numRead; + } + + if (offset != buffer.length) { + throw new IOException("Could not completely read file " + + file.getName()); + } + fis.close(); + BASE64Encoder encoder = new BASE64Encoder(); + imgStr = encoder.encode(buffer); + } catch (Exception e) { + e.printStackTrace(); + } + return imgStr; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxBasketballTeamServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxBasketballTeamServiceImpl.java index 3da3db540..b0cd979c3 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxBasketballTeamServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxBasketballTeamServiceImpl.java @@ -90,4 +90,9 @@ public class WxBasketballTeamServiceImpl implements IWxBasketballTeamService { return wxBasketballTeamMapper.deleteWxBasketballTeamById(id); } + + @Override + public List getMyBasketBallTeam(WxBasketballTeam entity) { + return wxBasketballTeamMapper.getMyBasketBallTeam(entity); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxBuildingInfoServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxBuildingInfoServiceImpl.java index 465b836a4..a126848ad 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxBuildingInfoServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxBuildingInfoServiceImpl.java @@ -1,11 +1,24 @@ package com.ruoyi.system.service.impl; +import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; + +import com.alibaba.fastjson.JSON; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.api.model.WxLoginUser; +import com.ruoyi.system.domain.*; +import com.ruoyi.system.domain.vo.BuildingInfoRequest; +import com.ruoyi.system.domain.vo.BuildingInfoResponse; +import com.ruoyi.system.mapper.*; +import com.ruoyi.system.utils.LoginUserUtil; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.WxBuildingInfoMapper; -import com.ruoyi.system.domain.WxBuildingInfo; import com.ruoyi.system.service.IWxBuildingInfoService; +import org.springframework.util.ObjectUtils; +import org.springframework.util.StringUtils; /** * 球场管理Service业务层处理 @@ -18,7 +31,14 @@ public class WxBuildingInfoServiceImpl implements IWxBuildingInfoService { @Autowired private WxBuildingInfoMapper wxBuildingInfoMapper; - + @Autowired + private BuildingInfoDetailMapper buildingInfoDetailMapper; + @Autowired + private BuildingLabelMapper buildingLabelMapper; + @Autowired + private FeatureLabelMapper featureLabelMapper; + @Autowired + private UserRoleMapper userRoleMapper; /** * 查询球场管理 * @@ -90,4 +110,73 @@ public class WxBuildingInfoServiceImpl implements IWxBuildingInfoService { return wxBuildingInfoMapper.deleteWxBuildingInfoById(id); } + + @Override + public List findNearbyBuilding(WxBuildingInfo entity) { + return wxBuildingInfoMapper.findNearbyBuilding(entity); + } + + @Override + public List getBuildingByCity(WxBuildingInfo entity) { + entity.setStatus(2); + entity.setIsDeleted(0); + return wxBuildingInfoMapper.selectWxBuildingInfoList(entity); + } + + @Override + public BuildingInfoResponse findAllInfoById(Long id) { + BuildingInfoResponse response=new BuildingInfoResponse(); + //查询场馆信息 + WxBuildingInfo info=wxBuildingInfoMapper.selectWxBuildingInfoById(id); + BeanUtils.copyProperties(info,response); + //查询场馆详情 + BuildingInfoDetail detail=buildingInfoDetailMapper.selectOneByBuildingId(id); + if(!ObjectUtils.isEmpty(detail)){ + BeanUtils.copyProperties(detail,response); + } + response.setId(id); + //查询场馆特征标签信息 + BuildingLabel buildingLabel = new BuildingLabel(); + buildingLabel.setBuildingId(id); + List buildingLabelList=buildingLabelMapper.selectBuildingLabelList(buildingLabel); + if(buildingLabelList!=null&&buildingLabelList.size()>0){ + List labels=new ArrayList<>(); + for(BuildingLabel blabel:buildingLabelList){ + FeatureLabel label=featureLabelMapper.selectFeatureLabelById(blabel.getFeatureLabelId()); + if(label!=null){ + labels.add(label); + } + } + response.setLabels(labels); + } + return response; + } + + @Override + public List getAllBuildingByCondition(BuildingInfoRequest entity) { + return wxBuildingInfoMapper.getAllBuildingByCondition(entity); + } + + @Override + public List getAuditPage(WxBuildingInfo buildingInfo) { + LoginUser user = SecurityUtils.getLoginUser(); + System.out.println("user="+ JSON.toJSONString(user)); + // 查询当前登录的用户的系统角色 + List userRoles = userRoleMapper.selectUserRoleList(UserRole.builder().userId(user.getUserid()).build()); + if(!StringUtils.isEmpty(userRoles)&&userRoles.size()>0){ + List roleCodes = userRoles.stream().map(UserRole::getRoleCode).collect(Collectors.toList()); + if(roleCodes.contains("admin")){ + //查询所有 + buildingInfo.setCreatedId(null); + }else { + //查询自己上传的球馆 + buildingInfo.setCreatedId(user.getUserid()); + } + }else{ + //查询自己上传的球馆 + buildingInfo.setCreatedId(user.getUserid()); + } + List list= wxBuildingInfoMapper.getAuditPage(buildingInfo); + return list; + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxLoginServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxLoginServiceImpl.java new file mode 100644 index 000000000..feaff89ab --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WxLoginServiceImpl.java @@ -0,0 +1,354 @@ +package com.ruoyi.system.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import com.alibaba.fastjson.JSONObject; +import com.ruoyi.common.core.constant.Constants; +import com.ruoyi.common.core.exception.ServiceException; +import com.ruoyi.system.api.domain.SysUser; +import com.ruoyi.system.api.model.LoginUser; +import com.ruoyi.system.api.model.WxLoginUser; +import com.ruoyi.system.domain.UserRole; +import com.ruoyi.system.domain.WxUser; +import com.ruoyi.system.domain.enums.UserRoles; +import com.ruoyi.system.domain.vo.WxLoginRequest; +import com.ruoyi.system.mapper.UserRoleMapper; +import com.ruoyi.system.mapper.WxUserMapper; +import com.ruoyi.system.service.WxLoginService; +import com.ruoyi.system.utils.jwt.JwtUtil; +import org.apache.http.HttpEntity; +import org.apache.http.ParseException; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.util.EntityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author 吴一博 + * @date 2023年07月06日 11:08 + * @Description + */ +@Service +public class WxLoginServiceImpl implements WxLoginService { + @Autowired + private WxUserMapper wxUserMapper; + @Autowired + private UserRoleMapper userRoleMapper; + @Override + public WxLoginUser loginInFromWx(WxLoginRequest entity) { + //获取openId + String openId=""; + //多平台的唯一id + String unionid=""; + //登录成功后返回的 sessionKey + String sessionKey = ""; + // 获得Http客户端(可以理解为:你得先有一个浏览器) + CloseableHttpClient httpClient = HttpClientBuilder.create().build(); + // 参数 + StringBuffer params = new StringBuffer(); + try { + //组装参数 + params.append("appid=" + URLEncoder.encode(Constants.WX_APPLETS_APP_ID, "utf-8")); + params.append("&"); + params.append("secret="+Constants.WX_APPLETS_APP_SERCERT); + params.append("&"); + params.append("js_code="+entity.getLoginName()); + params.append("&"); + params.append("grant_type=authorization_code"); + } catch (UnsupportedEncodingException e1) { + e1.printStackTrace(); + } + // 创建Get请求微信接口获取openId + HttpGet httpGet = new HttpGet("https://api.weixin.qq.com/sns/jscode2session" + "?" + params); + // 响应模型 + CloseableHttpResponse response = null; + try { + // 配置信息 + RequestConfig requestConfig = RequestConfig.custom() + // 设置连接超时时间(单位毫秒) + .setConnectTimeout(5000) + // 设置请求超时时间(单位毫秒) + .setConnectionRequestTimeout(5000) + // socket读写超时时间(单位毫秒) + .setSocketTimeout(5000) + // 设置是否允许重定向(默认为true) + .setRedirectsEnabled(true).build(); + + // 将上面的配置信息 运用到这个Get请求里 + httpGet.setConfig(requestConfig); + // 由客户端执行(发送)Get请求 + response = httpClient.execute(httpGet); + // 从响应模型中获取响应实体 + HttpEntity responseEntity = response.getEntity(); + System.out.println("响应状态为:" + response.getStatusLine()); + if (responseEntity != null) { + String responseStr= EntityUtils.toString(responseEntity); + System.out.println("响应内容为:"+responseStr); + JSONObject jsonObject = JSONObject.parseObject(responseStr); + openId = jsonObject.getString("openid"); + unionid = jsonObject.getString("unionid"); + sessionKey = jsonObject.getString("session_key"); + } + } catch (ClientProtocolException e) { + e.printStackTrace(); + } catch (ParseException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + // 释放请求资源 + if (httpClient != null) { + httpClient.close(); + } + if (response != null) { + response.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + List codes =new ArrayList<>(); + if(StringUtils.isEmpty(openId)){ + throw new ServiceException("获取openId失败"); + } + //openId="oQUGq5cR1a1X_1_cqJZOC5AOeXHk"; + //根据openid查询登录信息是否存在 + WxUser login= wxUserMapper.selectByOpenId(openId); + //如果为空,则表示是新用户登录,将该用户写入信息 + if(login==null){ + login=new WxUser(); + login.setUserName(entity.getNickname()); + if(StringUtils.isEmpty(entity.getTelephone())){ + login.setLoginName(entity.getLoginName()); + }else { + login.setLoginName(entity.getTelephone()); + } + login.setAvatar(entity.getAvatar()); + login.setGender(entity.getGender()); + login.setTelephone(entity.getTelephone()); + login.setOpenid(openId); + login.setUnionid(unionid); + login.setEnabled(1); + login.setCreatedBy("admin"); + login.setCreatedTime(new Date()); + wxUserMapper.insertWxUser(login); + //插入用户角色关联信息 + UserRole userRole=new UserRole(); + userRole.setRoleCode(UserRoles.customer.code()); + userRole.setUserId(login.getId()); + UserRole role = userRoleMapper.selectByCode(userRole.getRoleCode()); + if(StringUtils.isEmpty(role)){ + userRole.setRoleId(3L); + }else { + userRole.setRoleId(role.getId()); + } + userRoleMapper.insertUserRole(userRole); + codes.add(userRole.getRoleCode()); + }else{ + if(login.getEnabled()!=null&&0==login.getEnabled()){ + throw new ServiceException("账号已被冻结,请联系管理员!"); + } + //唯一id为空就更新 + if(StringUtils.isEmpty(login.getUnionid()) && !StringUtils.isEmpty(unionid)){ + WxUser userInfo1=new WxUser(); + userInfo1.setId(login.getId()); + userInfo1.setUnionid(unionid); + userInfo1.setLastUpdatedTime(new Date()); + wxUserMapper.updateWxUser(userInfo1); + } + + //查询登录用户的系统角色 + UserRole userRole = new UserRole(); + userRole.setUserId(login.getId()); + List userRoles = userRoleMapper.selectUserRoleList(userRole); + codes = userRoles.stream().map(UserRole::getRoleCode).collect(Collectors.toList()); + } + //查询用户角色 + //List roleCodes=userRoleService.findUserRoleListByUserId(login.getBusinessId()); + //查询用户权限 + //List permissions=rolePermissionService.findUserPermissionByUserId(login.getBusinessId()); + Map claims=new HashMap<>(); + //claims.put(Constants.JWT_PERMISSIONS_KEY,permissions); + //claims.put(Constants.JWT_ROLES_KEY,roleCodes); + claims.put(Constants.JWT_USER_ID,login.getId()); + claims.put(Constants.JWT_USER_NAME,login.getUserName()); + claims.put(Constants.JWT_LOGIN_NAME,login.getLoginName()); + claims.put(Constants.JWT_UNIONID,unionid); + claims.put(Constants.JWT_SESSION_KEY,sessionKey); + claims.put(Constants.JWT_OPEN_ID,openId); + claims.put(Constants.JWT_REAL_NAME,login.getRealName()); + //生成token + String accessToken= JwtUtil.getAccessToken(login.getId().toString(),claims); + //生产刷新token + String refreshToken= JwtUtil.getWxRefreshToken(login.getId().toString(),claims); + WxLoginUser loginUser=new WxLoginUser(); + loginUser.setUserId(login.getId()); + loginUser.setLoginName(login.getLoginName()); + loginUser.setUserName(login.getUserName()); + loginUser.setAccessToken(accessToken); + loginUser.setRefreshToken(refreshToken); + loginUser.setUnionid(unionid); + loginUser.setRoleCodes(codes); + return loginUser; + } + + @Override + public LoginUser loginFromWx(LoginUser entity) { + //获取openId + String openId=""; + //多平台的唯一id + String unionid=""; + //登录成功后返回的 sessionKey + String sessionKey = ""; + // 获得Http客户端(可以理解为:你得先有一个浏览器) + CloseableHttpClient httpClient = HttpClientBuilder.create().build(); + // 参数 + StringBuffer params = new StringBuffer(); + try { + //组装参数 + params.append("appid=" + URLEncoder.encode(Constants.WX_APPLETS_APP_ID, "utf-8")); + params.append("&"); + params.append("secret="+Constants.WX_APPLETS_APP_SERCERT); + params.append("&"); + params.append("js_code="+entity.getUsername()); + params.append("&"); + params.append("grant_type=authorization_code"); + } catch (UnsupportedEncodingException e1) { + e1.printStackTrace(); + } + // 创建Get请求微信接口获取openId + HttpGet httpGet = new HttpGet("https://api.weixin.qq.com/sns/jscode2session" + "?" + params); + // 响应模型 + CloseableHttpResponse response = null; + try { + // 配置信息 + RequestConfig requestConfig = RequestConfig.custom() + // 设置连接超时时间(单位毫秒) + .setConnectTimeout(5000) + // 设置请求超时时间(单位毫秒) + .setConnectionRequestTimeout(5000) + // socket读写超时时间(单位毫秒) + .setSocketTimeout(5000) + // 设置是否允许重定向(默认为true) + .setRedirectsEnabled(true).build(); + + // 将上面的配置信息 运用到这个Get请求里 + httpGet.setConfig(requestConfig); + // 由客户端执行(发送)Get请求 + response = httpClient.execute(httpGet); + // 从响应模型中获取响应实体 + HttpEntity responseEntity = response.getEntity(); + System.out.println("响应状态为:" + response.getStatusLine()); + if (responseEntity != null) { + String responseStr= EntityUtils.toString(responseEntity); + System.out.println("响应内容为:"+responseStr); + JSONObject jsonObject = JSONObject.parseObject(responseStr); + openId = jsonObject.getString("openid"); + unionid = jsonObject.getString("unionid"); + sessionKey = jsonObject.getString("session_key"); + } + } catch (ClientProtocolException e) { + e.printStackTrace(); + } catch (ParseException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + // 释放请求资源 + if (httpClient != null) { + httpClient.close(); + } + if (response != null) { + response.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + Set codes =new HashSet<>(); + if(StringUtils.isEmpty(openId)){ + throw new ServiceException("获取openId失败"); + } + //openId="oQUGq5cR1a1X_1_cqJZOC5AOeXHk"; + //根据openid查询登录信息是否存在 + //SysUser sysUser = userService.selectUserByUserName(username); + WxUser login= wxUserMapper.selectByOpenId(openId); + //如果为空,则表示是新用户登录,将该用户写入信息 + if(login==null){ + login=new WxUser(); + login.setUserName(entity.getUsername()); +/* if(StringUtils.isEmpty(entity.getTelephone())){ + login.setLoginName(entity.getLoginName()); + }else { + login.setLoginName(entity.getTelephone()); + } + login.setAvatar(entity.getAvatar()); + login.setGender(entity.getGender()); + login.setTelephone(entity.getTelephone());*/ + login.setOpenid(openId); + login.setUnionid(unionid); + login.setEnabled(1); + login.setCreatedBy("admin"); + login.setCreatedTime(new Date()); + wxUserMapper.insertWxUser(login); + //插入用户角色关联信息 + UserRole userRole=new UserRole(); + userRole.setRoleCode(UserRoles.customer.code()); + userRole.setUserId(login.getId()); + UserRole role = userRoleMapper.selectByCode(userRole.getRoleCode()); + if(StringUtils.isEmpty(role)){ + userRole.setRoleId(3L); + }else { + userRole.setRoleId(role.getId()); + } + userRoleMapper.insertUserRole(userRole); + codes.add(userRole.getRoleCode()); + }else{ + if(login.getEnabled()!=null&&0==login.getEnabled()){ + throw new ServiceException("账号已被冻结,请联系管理员!"); + } + //唯一id为空就更新 + if(StringUtils.isEmpty(login.getUnionid()) && !StringUtils.isEmpty(unionid)){ + WxUser userInfo1=new WxUser(); + userInfo1.setId(login.getId()); + userInfo1.setUnionid(unionid); + userInfo1.setLastUpdatedTime(new Date()); + wxUserMapper.updateWxUser(userInfo1); + } + + //查询登录用户的系统角色 + UserRole userRole = new UserRole(); + userRole.setUserId(login.getId()); + List userRoles = userRoleMapper.selectUserRoleList(userRole); + for (UserRole role:userRoles){ + codes.add(role.getRoleCode()); + } + // codes = (Set) userRoles.stream().map(UserRole::getRoleCode).collect(Collectors.toList()); + } + SysUser sysUser = new SysUser(); + BeanUtil.copyProperties(login,sysUser); + //查询用户角色 + //List roleCodes=userRoleService.findUserRoleListByUserId(login.getBusinessId()); + //查询用户权限 + //List permissions=rolePermissionService.findUserPermissionByUserId(login.getBusinessId()); + LoginUser loginUser=new LoginUser(); + loginUser.setUserid(Long.valueOf(login.getId())); + loginUser.setUsername(login.getOpenid()); + loginUser.setRoles(codes); + loginUser.setSysUser(sysUser); + return loginUser; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/AgeUtils.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/AgeUtils.java new file mode 100644 index 000000000..400f6bc82 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/AgeUtils.java @@ -0,0 +1,65 @@ +package com.ruoyi.system.utils; + +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +/** + * Created by qing on 2017/3/28. + */ +public class AgeUtils { + // 根据年月日计算年龄,birthTimeString:"1994-11-14" + public static int getAgeFromBirthTime(String birthTimeString) { + // 先截取到字符串中的年、月、日 + String strs[] = birthTimeString.trim().split("-"); + int selectYear = Integer.parseInt(strs[0]); + int selectMonth = Integer.parseInt(strs[1]); + int selectDay = Integer.parseInt(strs[2]); + // 得到当前时间的年、月、日 + Calendar cal = Calendar.getInstance(); + int yearNow = cal.get(Calendar.YEAR); + int monthNow = cal.get(Calendar.MONTH) + 1; + int dayNow = cal.get(Calendar.DATE); + + // 用当前年月日减去生日年月日 + int yearMinus = yearNow - selectYear; + int monthMinus = monthNow - selectMonth; + int dayMinus = dayNow - selectDay; + + int age = yearMinus;// 先大致赋值 + if (yearMinus < 0) {// 选了未来的年份 + age = 0; + } else if (yearMinus == 0) {// 同年的,要么为1,要么为0 + if (monthMinus < 0) {// 选了未来的月份 + age = 0; + } else if (monthMinus == 0) {// 同月份的 + if (dayMinus < 0) {// 选了未来的日期 + age = 0; + } else if (dayMinus >= 0) { + age = 1; + } + } else if (monthMinus > 0) { + age = 1; + } + } else if (yearMinus > 0) { + if (monthMinus < 0) {// 当前月>生日月 + } else if (monthMinus == 0) {// 同月份的,再根据日期计算年龄 + if (dayMinus < 0) { + } else if (dayMinus >= 0) { + age = age + 1; + } + } else if (monthMinus > 0) { + age = age + 1; + } + } + return age; + } + + // 根据时间戳计算年龄 + public static int getAgeFromBirthTime(long birthTimeLong) { + Date date = new Date(birthTimeLong * 1000l); + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + String birthTimeString = format.format(date); + return getAgeFromBirthTime(birthTimeString); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/LoginUserUtil.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/LoginUserUtil.java new file mode 100644 index 000000000..896da463b --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/LoginUserUtil.java @@ -0,0 +1,35 @@ +package com.ruoyi.system.utils; +import com.ruoyi.common.core.exception.ServiceException; +import com.ruoyi.system.api.model.WxLoginUser; +import com.ruoyi.system.utils.jwt.JwtUtil; +import lombok.extern.log4j.Log4j2; +import org.apache.commons.lang3.StringUtils; + +/** + * Created by jackma on 2020/8/17. + */ +@Log4j2 +public class LoginUserUtil { + /** + * 获取登录人的userId + * + * @return + */ + public static Long getCurrentUserId() { + String token= JwtUtil.getToken(); + if(StringUtils.isEmpty(token)){ + throw new ServiceException("获取当前登录人token信息失败!"); + } + return JwtUtil.getUserIdByToken(token); + } + + /** + * 获取登录人信息 + * + * @return + */ + public static WxLoginUser getLoginUser() { + String token= JwtUtil.getToken(); + return JwtUtil.getLogUserByToken(token); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/UtilTool.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/UtilTool.java new file mode 100644 index 000000000..33ae1aae9 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/UtilTool.java @@ -0,0 +1,1582 @@ +package com.ruoyi.system.utils; + + +import com.google.common.collect.Lists; +import com.google.common.primitives.Doubles; +import com.google.common.primitives.Floats; +import com.google.common.primitives.Ints; +import com.google.common.primitives.Longs; +import org.apache.commons.lang3.StringUtils; + +import java.beans.BeanInfo; +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.io.*; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * 系统名称:CAAS系统
+ * 模块名称:MATERIAL
+ * 中文类名:工具类
+ * 概要说明:
+ * @version:v1.0
+ * 版本 修改人 备注
+ * @author : YANGWENYE + * @date : 2018年4月25日 + */ +public class UtilTool { + /** + * 初始化一次 + */ + /* static Validator validator = null; + static { + validator = Validation.buildDefaultValidatorFactory() + .getValidator(); + }*/ + + private static Pattern chinesePattern = Pattern.compile("[\u4e00-\u9fa5]"); + /** + * 拆分前端传过来的Ids(id,id,id) 方法名称:getIds
+ * 概要说明:
+ * 版本 修改人 备注
+ * @param Ids + * @return + */ + public static List getIds(String Ids) + { + ArrayList idArr = new ArrayList(); + if (StringUtils.isBlank(Ids)) + { + return idArr; + } + if (Ids.contains(",")) + { + String[] split = StringUtils.split(Ids, ","); + for (String id : split) + { + if (StringUtils.isNotBlank(id)) + { + long idParse = Long.parseLong(id.trim()); + if (!idArr.contains(idParse)) + { + idArr.add(idParse); + } + } + } + } + else + { + idArr.add(Long.parseLong(Ids.trim())); + } + return idArr; + } + + /** + * 拆分前端传过来的codes(code,code,code) 方法名称:getCodes
+ * 概要说明:
+ * 版本 修改人 备注
+ * @param codes + * @return + */ + public static List getCodes(String codes) + { + ArrayList codeArr = new ArrayList(); + if (StringUtils.isBlank(codes)) + { + return codeArr; + } + + if (codes.contains(",")) + { + String[] split = StringUtils.split(codes, ","); + for (String code : split) + { + if (StringUtils.isNotBlank(code) && !codeArr.contains(code.trim())) + { + codeArr.add(code.trim()); + } + } + } + else + { + codeArr.add(codes.trim()); + } + + return codeArr; + } + + /** + * @param obj + * @return boolean 为空返回true,否则返回false 创建人:生活家.杨青见 创建时间:2016年7月31日 下午5:05:26 + * @Title:isNull + * @Description:判断对象是否为空 序号 修改人: 修改时间: 备注 001 生活家.杨青见 2016年7月31日 下午5:05:26 + * 001 生活家.杨青见 2017年7月10日 上午 10:34:25 + * 增加coolection.map.set的空判断 + * @version + */ + public static boolean isNull(Object... obj) + { + if (null == obj || obj.length == 0) + { + return true; + } + for (Object object : obj) + { + if (object == null || object.toString().trim().length() == 0) + { + return true; + } + + if (object instanceof Collection) + { + if (((Collection) object).isEmpty() || ((Collection) object).size() == 0) + { + return true; + } + } + + if (object instanceof Map) + { + if (((Map) object).isEmpty() || ((Map) object).size() == 0) + { + return true; + } + } + + if (object instanceof Set) + { + if (((Set) object).isEmpty() || ((Set) object).size() == 0) + { + return true; + } + } + } + return false; + } + + + public static boolean isNotNull(Object... obj) + { + return !isNull(obj); + } + + + + /** + * 流转String + * @param is + * @return + * @throws IOException + */ + public static String inputStream2String(InputStream is) throws IOException + { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int i = -1; + while ((i = is.read()) != -1) + { + baos.write(i); + } + return baos.toString(); + } + + /** + * 两个时间相差距离多少天多少小时多少分多少秒 + * @param diff + * @return String 返回值为:xx天xx小时xx分xx秒 + */ + public static String getDistanceTime(long diff) + { + long day = diff / (24 * 60 * 60 * 1000); + long hour = (diff / (60 * 60 * 1000) - day * 24); + long min = ((diff / (60 * 1000)) - day * 24 * 60 - hour * 60); + long sec = (diff / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60); + return day + "天" + hour + "小时" + min + "分" + sec + "秒"; + } + + /** + * + * 方法名称:verifyIds
+ * 概要说明:ids校验规则
+ * 版本 修改人 备注
+ * @param ids + * @return + */ + public static boolean verifyIds(String ids) + { + return !ids.matches("[\\d*,?]*"); + } + + + /** + * + * 方法名称:getValuessFromList
+ * 概要说明:得到集合
+ * 版本 修改人 备注
+ * @param results + * @param property + * @param srcValue + * @param equalflag + * @return + */ + public static List getValuessFromList(List results, String property, Object srcValue, boolean equalflag) { + if (UtilTool.isNull(results, property, srcValue)) { + return Lists.newArrayList(); + } + List retValues = new ArrayList(); + if (UtilTool.isNull(results)) { + return retValues; + } + try { + Method method = null; + if (!results.isEmpty()) { + method = results.get(0).getClass().getMethod("get" + firstUpperStr(property)); + } + if (UtilTool.isNull(method)) { + throw new Exception("未能获取到方法"); + } + for (E e : results) { + Object ret_value = method.invoke(e); + if (UtilTool.isNull(ret_value)) { + continue; + } + if (equalflag) { + if (ret_value.toString().equals(srcValue.toString())) { + retValues.add(e); + } + } else { + if (ret_value.toString().contains(srcValue.toString())) { + retValues.add(e); + } + } + } + } catch (Exception e) { + e.printStackTrace(); + } + return retValues; + } + + /** + * + * 方法名称:getCountsFromList
+ * 概要说明:得到数量
+ * 版本 修改人 备注
+ * @param results + * @param property + * @param srcValue + * @param equalflag + * @return + */ + public static int getCountsFromList(List results, String property, Object srcValue, boolean equalflag) { + if(UtilTool.isNull(results)){ + return 0; + } + List retValues = getValuessFromList(results, property, srcValue, equalflag); + if(UtilTool.isNull(retValues)){ + return 0; + } + return retValues.size(); + } + /** + * + * 方法名称:getCountsFromList
+ * 概要说明:
+ * 版本 修改人 备注
+ * @param results + * @param propertys + * @param srcValues + * @param equalflag + * @return + */ + public static int getCountsFromList(List results, String[] propertys, Object[] srcValues, boolean equalflag) { + if(UtilTool.isNull(results)){ + return 0; + } + List retValues = getValuessFromList(results, propertys, srcValues, equalflag); + if(UtilTool.isNull(retValues)){ + return 0; + } + return retValues.size(); + } + + /** + * + * 方法名称:convertValue
+ * 概要说明:转换
+ * 版本 修改人 备注
+ * @param sourceValue + * @param clazz + * @return + */ + public static Object convertValue(Object sourceValue, Class clazz) { + if (UtilTool.isNull(sourceValue, clazz)) { + return null; + } + if (String.class.equals(clazz)) { + return sourceValue.toString(); + } else if (Integer.class.equals(clazz) || int.class.equals(clazz)) { + return Ints.tryParse(sourceValue.toString()); + } else if (Double.class.equals(clazz) || double.class.equals(clazz)) { + return Doubles.tryParse(sourceValue.toString()); + } else if (Float.class.equals(clazz) || float.class.equals(clazz)) { + return Floats.tryParse(sourceValue.toString()); + } else if (Long.class.equals(clazz) || long.class.equals(clazz)) { + return Longs.tryParse(sourceValue.toString()); + } else if (BigDecimal.class.equals(clazz)) { + return BigDecimal.valueOf(Doubles.tryParse(sourceValue.toString())); + } else if (Short.class.equals(clazz) || short.class.equals(clazz)) { + return Short.valueOf(sourceValue.toString()); + } else if (Boolean.class.equals(clazz) || boolean.class.equals(clazz)) { + return sourceValue.toString().equals("1") ? true : Boolean.valueOf(sourceValue.toString()); + } else if (Byte.class.equals(clazz) || byte.class.equals(clazz)) { + return Byte.valueOf(sourceValue.toString()); + } else if (Character.class.equals(clazz) || char.class.equals(clazz)) { + return Character.valueOf((char) sourceValue); + } else if (Date.class.equals(clazz)) { + if (sourceValue instanceof String) { + //return DateUtil.strToDate(sourceValue.toString()); + } + return sourceValue; + } else { + return sourceValue; + } + } + + public static List getValuessFromList(List results, String[] propertys, Object[] srcValues, boolean equalflag) { + if (UtilTool.isNull(results, propertys, srcValues)) { + return Lists.newArrayList(); + } + if (propertys.length != srcValues.length) { + //throw new SystemException("对比参数不一致"); + } + List retValues = new ArrayList(); + if (UtilTool.isNull(results)) { + return retValues; + } + try { + for (E e : results) { + boolean flag = false; + for (int i = 0; i < propertys.length; i++) { + /** + * 判断一下当前的值以及当前的属性是否为空 + */ + if(UtilTool.isNull(srcValues[i])) { + flag = true; + break; + } + if(UtilTool.isNull(propertys[i])) { + flag = true; + break; + } + String prop = propertys[i]; + Method method = null; + if (!results.isEmpty()) { + method = results.get(0).getClass().getMethod("get" + firstUpperStr(prop)); + } + if (UtilTool.isNull(method)) { + throw new Exception("未能获取到方法"); + } + /** + * 只要有一个对象的值为空,就不满足条件 + */ + Object ret_value = method.invoke(e); + if (UtilTool.isNull(ret_value)) { + flag = true; + break; + } + if (equalflag) { + if (ret_value.toString().equals(srcValues[i].toString())) { + continue; + } + flag = true; + break; + } else { + if (ret_value.toString().contains(srcValues[i].toString())) { + continue; + } + flag = true; + break; + } + } + if (!flag) { + retValues.add(e); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + return retValues; + } + + public static void copyIncludeProperty(Object src, Object target, String... inludeFields) { + if (UtilTool.isNull(src, target, inludeFields)) { + return; + } + try { + BeanInfo targetBeaninfo = Introspector.getBeanInfo(target.getClass()); + PropertyDescriptor[] targetProps = targetBeaninfo.getPropertyDescriptors(); + BeanInfo srcBeaninfo = Introspector.getBeanInfo(src.getClass()); + PropertyDescriptor[] srcProps = srcBeaninfo.getPropertyDescriptors(); + for (PropertyDescriptor prop : srcProps) { + try { + if (prop.getName().equalsIgnoreCase("class")) { + continue; + } + if (org.apache.commons.lang3.ArrayUtils.contains(inludeFields, prop.getName())) { + Object srcPropValue = prop.getReadMethod().invoke(src); + PropertyDescriptor targetProp = getPropertyDescriptor(targetProps, prop.getName()); + try { + targetProp.getWriteMethod().invoke(target, convertValue(srcPropValue, targetProp.getPropertyType())); + } catch (Exception e) { + } + } + } catch (Exception e) { + continue; + } + } + } catch (Exception e) { + } + } + + public static void copyProperty(Object src, Object target, String... exludeFields) { + if (UtilTool.isNull(src, target)) { + return; + } + try { + BeanInfo targetBeaninfo = Introspector.getBeanInfo(target.getClass()); + PropertyDescriptor[] targetProps = targetBeaninfo.getPropertyDescriptors(); + BeanInfo srcBeaninfo = Introspector.getBeanInfo(src.getClass()); + PropertyDescriptor[] srcProps = srcBeaninfo.getPropertyDescriptors(); + for (PropertyDescriptor prop : srcProps) { + try { + if (prop.getName().equalsIgnoreCase("class")) { + continue; + } + if (!UtilTool.isNull(exludeFields)) { + if (org.apache.commons.lang3.ArrayUtils.contains(exludeFields, prop.getName())) { + continue; + } + } + Object srcPropValue = prop.getReadMethod().invoke(src); + if (!UtilTool.isNull(srcPropValue)) { + PropertyDescriptor targetProp = getPropertyDescriptor(targetProps, prop.getName()); + try { + targetProp.getWriteMethod().invoke(target, convertValue(srcPropValue, targetProp.getPropertyType())); + } catch (Exception e) { + } + } + } catch (Exception e) { + continue; + } + } + } catch (Exception e) { + } + } + + + private static PropertyDescriptor getPropertyDescriptor(PropertyDescriptor[] props, String propertyName) { + if (UtilTool.isNull(props, propertyName)) { + return null; + } + for (PropertyDescriptor prop : props) { + if (prop.getName().equals(propertyName)) { + return prop; + } + } + return null; + } + + public static BigDecimal sumTotal(List results, String property) { + if (UtilTool.isNull(property)) { + return null; + } + if (UtilTool.isNull(results)) { + return null; + } + BigDecimal tempValue = new BigDecimal(0L); + BeanInfo targetBeaninfo = null; + try { + targetBeaninfo = Introspector.getBeanInfo(results.get(0).getClass()); + } catch (IntrospectionException e) { + e.printStackTrace(); + } + PropertyDescriptor[] targetProps = targetBeaninfo.getPropertyDescriptors(); + PropertyDescriptor propDescript = getPropertyDescriptor(targetProps, property); + try { + for (E e : results) { + Object value = propDescript.getReadMethod().invoke(e); + if (!UtilTool.isNull(value)) { + tempValue = tempValue.add(BigDecimal.valueOf(Double.valueOf(value.toString()))); + } + } + } catch (Exception ex) { + ex.printStackTrace(); + } + return tempValue; + } + + + public static List getListObjectByField(List lists, String property) { + List result = new ArrayList(); + if (UtilTool.isNull(lists, property)) { + return result; + } + if (UtilTool.isNull(lists)) { + return result; + } + BeanInfo targetBeaninfo = null; + PropertyDescriptor prop = null; + try { + targetBeaninfo = Introspector.getBeanInfo(lists.get(0).getClass()); + PropertyDescriptor[] targetProps = targetBeaninfo.getPropertyDescriptors(); + prop = getPropertyDescriptor(targetProps, property); + } catch (IntrospectionException e) { + e.printStackTrace(); + } + if (UtilTool.isNull(targetBeaninfo, prop)) { + return null; + } + for (Object object : lists) { + try { + result.add(prop.getReadMethod().invoke(object)); + } catch (Exception e) { + e.printStackTrace(); + } + } + return result; + } + + //List的去重 + public static List getDistinctList(List values){ + if(UtilTool.isNull(values)){ + return new ArrayList<>(); + } + List returnValues = new ArrayList<>(); + for (E object : values) { + if(!UtilTool.isNull(object) && !returnValues.contains(object) ){ + returnValues.add(object); + } + } + return returnValues; + } + //获取最大值 + public static T getMaxByList(List list){ + return Collections.max(list); + } + + //获取最小值 + public static T getMinByList(List list){ + return Collections.min(list); + } + + public static String formatDate(Date date, String... format) { + if (UtilTool.isNull(date)) { + return ""; + } + String formatStr = ""; + if (format == null || format.length == 0) { + formatStr = "yyyy-MM-dd"; + } else { + if (!UtilTool.isNull(format[0])) { + formatStr = format[0]; + } else { + formatStr = "yyyy-MM-dd"; + } + } + SimpleDateFormat sp = new SimpleDateFormat(formatStr); + return sp.format(date); + } + + private static String firstUpperStr(String property){ + if(null!=property){ + char[] ch = property.toCharArray(); + if (ch[0] >= 'a' && ch[0] <= 'z') { + ch[0] = (char) (ch[0] - 32); + } + return new String(ch); + } + return null; + } + + + + + public static void sort(List results, String property, String order) { + //升序 + if (UtilTool.isNull(results)) { + return; + } + if (UtilTool.isNull(property, order)) { + return; + } + BeanInfo targetBeaninfo = null; + try { + targetBeaninfo = Introspector.getBeanInfo(results.get(0).getClass()); + } catch (IntrospectionException e) { + e.printStackTrace(); + } + PropertyDescriptor[] targetProps = targetBeaninfo.getPropertyDescriptors(); + final PropertyDescriptor prop = getPropertyDescriptor(targetProps, property); + final String order_temp = order; + Comparator comparator = new Comparator() { + @Override + public int compare(T s1, T s2) { + try { + + if(s1 == null || s2 == null){ + if (order_temp.equalsIgnoreCase("asc")) { + return 1; + } else { + return -1; + } + } + + Object s1Value = prop.getReadMethod().invoke(s1); + Object s2Value = prop.getReadMethod().invoke(s2); + if (UtilTool.isNull(s1Value) || UtilTool.isNull(s2Value)) { + if (order_temp.equalsIgnoreCase("asc")) { + return 1; + } else { + return -1; + } + } + if ( s1Value instanceof Number) { + Double d1 = Double.valueOf(s1Value.toString()); + Double d2 = Double.valueOf(s2Value.toString()); + if (order_temp.equalsIgnoreCase("asc")) { + return d1.compareTo(d2); + } else { + return d2.compareTo(d1); + } + }else if ( s1Value instanceof Date) { + Date d1 = (Date)s1Value; + Date d2 = (Date)s2Value; + if (order_temp.equalsIgnoreCase("asc")) { + return d1.compareTo(d2); + } else { + return d2.compareTo(d1); + } + }else { + if (order_temp.equalsIgnoreCase("asc")) { + return s1Value.toString().length() - s2Value.toString().length(); + } else { + return s2Value.toString().length() - s1Value.toString().length(); + } + } + } catch (Exception ex) { + ex.printStackTrace(); + } + return 0; + } + }; + try{ + Collections.sort(results, comparator);//注意:是根据的 + }catch(Exception ex){ + ex.printStackTrace(); + } + + } + + + + + /** + * 将字符串数组转变为list + * @param str + * @return + */ + public static List getStrListByStrs(String ... str){ + List result=new ArrayList<>(); + if(str==null||str.length==0){ + return null; + }else{ + for(String s:str){ + if(StringUtils.isNotBlank(s)){ + result.add(s); + } + } + return result; + } + } + + /** + * 求两个集合的交集 + * @param ls + * @param ls2 + * @return + */ + public static List intersect(List ls, List ls2) { + List list = new ArrayList(Arrays.asList(new Object[ls.size()])); + Collections.copy(list, ls); + list.retainAll(ls2); + return list; + } + + /** + * 求两个集合的差集 + * @param ls + * @param ls2 + * @return + */ + public static List diff(List ls, List ls2) { + List list = new ArrayList(Arrays.asList(new Object[ls.size()])); + Collections.copy(list, ls); + list.removeAll(ls2); + return list; + } + + /** + * 获取删除的code数据集合 + * @param oldCodeList + * @param codeList + * @return + */ + public static List getRemoveList(List oldCodeList, List codeList) { + List result = diff(oldCodeList,codeList); + return result; + } + + /** + * 获取新增的code数据集合 + * @param oldCodeList + * @param codeList + * @return + */ + public static List getInsertList(List oldCodeList, List codeList) { + List result = diff(codeList,oldCodeList); + return result; + } + + /** + * 转义正则特殊字符 ($()*+.[]?\^{},|) + * + * @param keyword + * @return + */ + public static String escapeExprSpecialWord(String keyword) { + if (StringUtils.isNotBlank(keyword)) { + String[] fbsArr = { "\\", "$", "(", ")", "*", "+", ".", "[", "]", "?", "^", "{", "}", "|" }; + for (String key : fbsArr) { + if (keyword.contains(key)) { + keyword = keyword.replace(key, "\\" + key); + } + } + } + return keyword; + } + + public static Integer convertDoule2Integer(Double value){ + if(UtilTool.isNotNull(value)){ + String str = value.toString(); + str = str.substring(0, str.lastIndexOf(".")); + return Integer.valueOf(str); + } + return null; + } + + /** + * + * 方法名称:getSqlStrByList
+ * 概要说明:返回SQL查询的字符串(length不能大于1000)
+ * 版本 修改人 备注
+ * @param list + * @return + * @throws Exception + */ + public static String getSqlStrByList(Collection list) throws Exception{ + if(null == list || list.size() == 0){ + return ""; + } + if(list.size() > 1000){ + throw new Exception("数组长度大于1000,ORACLE数据库不支持"); + } + StringBuffer sb = new StringBuffer(); + for (E string : list) { + if(UtilTool.isNotNull(string)) { + sb.append("'"+string+"',"); + } + } + sb.deleteCharAt(sb.lastIndexOf(",")); + return sb.toString(); + } + + /** + * + * 方法名称:getOracleSQLIn
+ * 概要说明:针对数量超过1000的做法
+ * 版本 修改人 备注
+ * @param ids + * @param count + * @param field + * @return 返回描述:field in (?,?) or field in (?,?) + * @throws Exception + */ + public static String getOracleSQLIn(List ids, int count, String field) throws Exception { + if(UtilTool.isNull(ids)){ + throw new Exception("ids参数不能为空"); + } + if(count <=0 ){ + throw new Exception("count参数不能小于等于0"); + } + if(UtilTool.isNull(field)){ + throw new Exception("field参数不能为空"); + } + count = Math.min(count, 1000); + int len = ids.size(); + int size = len % count; + if (size == 0) { + size = len / count; + } else { + size = (len / count) + 1; + } + StringBuilder builder = new StringBuilder(); + for (int i = 0; i < size; i++) { + int fromIndex = i * count; + int toIndex = Math.min(fromIndex + count, len); + String productId = StringUtils.defaultIfEmpty(StringUtils.join(ids.subList(fromIndex, toIndex), "','"), ""); + if (i != 0) { + builder.append(" or "); + } + builder.append(field).append(" in ('").append(productId).append("')"); + } + return StringUtils.defaultIfEmpty(builder.toString(), field + " in ('')"); + } + + /** + * + * 方法名称:getOracleSQLNotIn
+ * 概要说明:针对数量超过1000的做法
+ * 版本 修改人 备注
+ * @param ids + * @param count + * @param field + * @return 返回描述:field not in (?,?) or field not in (?,?) + * @throws Exception + */ + public static String getOracleSQLNotIn(List ids, int count, String field) throws Exception { + if(UtilTool.isNull(ids)){ + throw new Exception("ids参数不能为空"); + } + if(count <=0 ){ + throw new Exception("count参数不能小于等于0"); + } + if(UtilTool.isNull(field)){ + throw new Exception("field参数不能为空"); + } + count = Math.min(count, 1000); + int len = ids.size(); + int size = len % count; + if (size == 0) { + size = len / count; + } else { + size = (len / count) + 1; + } + StringBuilder builder = new StringBuilder(); + for (int i = 0; i < size; i++) { + int fromIndex = i * count; + int toIndex = Math.min(fromIndex + count, len); + String productId = StringUtils.defaultIfEmpty(StringUtils.join(ids.subList(fromIndex, toIndex), "','"), ""); + if (i != 0) { + builder.append(" or "); + } + builder.append(field).append(" not in ('").append(productId).append("')"); + } + return StringUtils.defaultIfEmpty(builder.toString(), field + " not in ('')"); + } + + /** + * 判断字符串中是否包含中文 + * @param str + * 待校验字符串 + * @return 是否为中文 + * @warn 不能校验是否为中文标点符号 + */ + public static boolean isContainChinese(String str) { + Matcher m = chinesePattern.matcher(str); + if (m.find()) { + return true; + } + return false; + } + + /** + * 字符串只包含数字和字母 + * @param str + * @return + */ + public static boolean isLetterDigitOrChinese(String str) { + String regex = "^[a-z0-9A-Z\u4e00-\u9fa5]+$"; + return str.matches(regex); + } + + + public static String convertNullToString(Object o) { + if (o == null) { + return ""; + } else { + return o.toString(); + } + } + + /** + * 返回对象 List + * @param dataList + * @param field + * @param + * @return + */ + public static List getLongValue(List dataList, String field){ + if(dataList==null||dataList.size()<=0){ + return Lists.newArrayList(); + } + return getLongValue(dataList, org.springframework.beans.BeanUtils.findMethod(dataList.get(0).getClass(),"get"+upperCaseFirstLetter(field))); + } + + public static List getLongValue(List dataList,Method fieldMethod){ + List list=Lists.newArrayList(); + if(dataList==null||fieldMethod==null){ + return list; + } + for(T t:dataList){ + try{ + Object obj=fieldMethod.invoke(t); + if(obj==null){ + continue; + } + Long value=Long.valueOf(obj.toString()); + list.add(value); + }catch(Exception e){ + e.printStackTrace(); + } + } + Set set = new HashSet<>(list); + list = new ArrayList<>(set); + return list; + } + + /** + * 返回对象 List + * @param dataList + * @param field + * @param + * @return + */ + public static List getStringValue(List dataList,String field){ + if(dataList==null||dataList.size()<=0){ + return Lists.newArrayList(); + } + return getStringValue(dataList, org.springframework.beans.BeanUtils.findMethod(dataList.get(0).getClass(),"get"+upperCaseFirstLetter(field))); + } + + public static List getStringValue(List dataList,Method fieldMethod){ + List list=Lists.newArrayList(); + if(dataList==null||fieldMethod==null){ + return list; + } + for(T t:dataList){ + try{ + Object obj=fieldMethod.invoke(t); + if(obj==null){ + continue; + } + if(StringUtils.isNotBlank(obj.toString())){ + list.add(obj.toString()); + } + }catch(Exception e){ + e.printStackTrace(); + } + } + Set set = new HashSet<>(list); + list = new ArrayList<>(set); + return list; + } + + /** + * 首字母大写 + * @param str + * @return + */ + public static String upperCaseFirstLetter(String str) { + if(str!=null && str.length()>0) { + return str.replaceFirst(str.substring(0, 1), str.substring(0, 1).toUpperCase()); + } else { + return str; + } + } + /** + * + * 方法名称:getCurrentDiffHours
+ * 概要说明:获取小时的时间差,传入的是毫秒
+ * 版本 修改人 备注
+ * @param dateMills + * @return + */ + public static double getCurrentDiffHours(long dateMills){ + long currentMills = System.currentTimeMillis(); + //按照分总数来 + BigDecimal diffHours = new BigDecimal((currentMills - dateMills)).divide(new BigDecimal(3600000L),4,BigDecimal.ROUND_HALF_UP); + return diffHours.doubleValue(); + } + + /** + * + * 方法名称:encode
+ * 概要说明:简单的数字转换成字符
+ * 版本 修改人 备注
+ * @param enc + * @return + */ + public static String encode(Integer enc){ + StringBuffer sb = new StringBuffer(); + String str = enc.toString(); + for(int i=0;i方法名称:decode
+ * 概要说明:将字符转换成数字
+ * 版本 修改人 备注
+ * @param dec + * @return + */ + public static Integer decode(String dec){ + StringBuffer sb = new StringBuffer(); + for(int i=0;i 0) { + num--; + } + letter = ((char) (num % 26 + 'A')) + letter; + num = (num - num % 26) / 26; + } while (num > 0); + + return letter; + } + //字母转数字 A-Z :1-26 + public static int letterToNumber(String letter) { + if(letter.equalsIgnoreCase("X")){ + return 0; + } + int length = letter.length(); + int num = 0; + int number = 0; + for(int i = 0; i < length; i++) { + char ch = letter.charAt(length - i - 1); + num = ch - 'A' + 1 ; + num *= Math.pow(26, i); + number += num; + } + return number; + } + + + /** + * 判断字符串是否全部为中文字符组成 + * @param str 检测的文字 + * @return true:为中文字符串,false:含有非中文字符 + */ + public static boolean isChineseStr(String str){ + Pattern pattern = Pattern.compile("[\u4e00-\u9fa5]"); + char c[] = str.toCharArray(); + for(int i=0;i方法名称:numberToChinese
+ * 概要说明:把数字转换为文字
+ * 版本 修改人 备注
+ * @param number + * @return + */ + public static String numberToChinese(Integer number) { + if(null == number) { + return ""; + } + String numbers = number +""; + String out = ""; + String[] result = new String[numbers.length()]; + for(int i=0;i 0) { + throw new Exception("金额超出最大计算上限"); + } + Long lg1 = Long.parseLong(string1); + // 左边需要补0的数量 + int length = maxchange.length() - arrayValues[0].length(); + char[] cr0 = new char[length]; + for (int r = 0; r < cr0.length; r++) { + cr0[r] = '0'; + } + string0 = new String(cr0) + string0; + + // 最终整数部分的结果 + StringBuffer sf = new StringBuffer(); + // 先处理整数的 亿位组 + int startindexY = 0; + int bgY = BigDecimalToChineseCircle(a1, a3, string0, startindexY, sf, 0); + // 再处理整数的 万位组 + int startindexW = string0.length() - 8; + int bgW = BigDecimalToChineseCircle(a1, a3, string0, startindexW, sf, bgY); + // 再处理整数的 个位组 + int startindex = string0.length() - 4; + int bgG = BigDecimalToChineseCircle(a1, a3, string0, startindex, sf, bgW); + + if (lg0 > 0) { + sf.append(a2[2]); + } + + // 处理小数部分 + if (lg1 > 0) { + char[] charArray = arrayValues[1].toCharArray(); + if (charArray[0] == '0' && charArray[1] == '0' && lg0 == 0) { + return String.valueOf(a1[0] + a2[2]); + } + if (charArray[0] > '0') { + String c = String.valueOf(charArray[0]); + int x = Integer.parseInt(c); + sf.append(a1[x]); + sf.append(a2[1]); + } + if (charArray[1] > '0') { + if (charArray[0] == '0' && lg0 > 0) { + sf.append(a1[0]); + } + String c2 = String.valueOf(charArray[1]); + int x2 = Integer.parseInt(c2); + sf.append(a1[x2]); + sf.append(a2[0]); + } + } + + return sf.toString(); + } + + /** + * + * @param a1 + * 常量,大写数字组 + * @param a3 + * 常量,量级组 + * @param string0 + * 补为"9999 9999 9999"格式的待处理数字转换的字符串 + * @param startindex + * 本方法,四位一组,进行处理,该参数为截取起始位置,常有0 4 8 + * @param sf + * 最终转换的大写数字字符串的buffer + * @param beforeNumber + * 上一组,转换为的数字 + * @return 返回本组转换的数字 + */ + private static int BigDecimalToChineseCircle(char[] a1, char[] a3, String string0, int startindex, StringBuffer sf, + int beforeNumber) { + char[] cr = new char[20]; + int j = cr.length; + String substringG = string0.substring(startindex, startindex + 4); + int intG = Integer.parseInt(substringG); + if (intG > 0) { + // 拼接整数部分 + char[] charArray = substringG.toCharArray(); + // 从右至左,挨个处理,当前位=0时,是否需要补大写零的标志 + boolean hasnumlastalong = false; + // 从右至左,挨个处理,对仟而言,只要佰位不为零则为true + boolean hasnumlast = false; + for (int i = charArray.length - 1; i > -1; i--) { + if (hasnumlast) { + // hasnumlast表示当前位的地位有值,还需要当前位的高位有值, 即上一组数字大于0 + if (beforeNumber > 0) { + hasnumlastalong = true; + } + /// ,若上一组等于0,则当前位的至少前一位有值 + else if (beforeNumber == 0) { + for (int z = 0; z < i; z++) { + // 字符在1-9直接,字符为0时,=48 + if (charArray[z] > 48 && charArray[z] < 58) { + hasnumlastalong = true; + break; + } + } + hasnumlastalong = false; + } else { + hasnumlastalong = false; + } + } + if (i == 3) { + j = j - 1; + cr[j] = (a3[startindex + 3]); + } + // 数字转汉字 + String c = String.valueOf(charArray[i]); + int x = Integer.parseInt(c); + if (x == 0) { + if (hasnumlastalong) { + j = j - 1; + cr[j] = (a1[x]); + hasnumlastalong = false; + } + // 标记当前位置的值,做为下一轮前一位的数据标记 + hasnumlast = false; + } else { + if (i < 3) { + j = j - 1; + cr[j] = a3[startindex + i]; + } + j = j - 1; + cr[j] = a1[x]; + + // 标记当前位置的值,做为下一轮前一位的数据标记 + hasnumlast = true; + } + } + } + + for (int r = 0; r < cr.length; r++) { + if (cr[r] == '\0') { + continue; + } + sf.append(cr[r]); + } + return intG; + } + + + + + + /** + * + * 方法名称:convertEmptyStr
+ * 概要说明:把空字符串转换为null
+ * 版本 修改人 备注
+ * @param src + */ + public static void convertEmptyStr(T src) { + if(null == src) { + return; + } + BeanInfo targetBeaninfo = null; + try { + targetBeaninfo = Introspector.getBeanInfo(src.getClass()); + PropertyDescriptor[] targetProps = targetBeaninfo.getPropertyDescriptors(); + if(null == targetProps) { + return; + } + for (PropertyDescriptor tempProp : targetProps) { + try { + Object value = tempProp.getReadMethod().invoke(src, null); + if(UtilTool.isNull(value)) { + tempProp.getWriteMethod().invoke(src, new Object[] {null}); + } + }catch(Exception ex) { + ex.printStackTrace(); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * + * 方法名称:checkParamNull
+ * 概要说明:校验是否为空
+ * 版本 修改人 备注
+ * @param request + * @param invalidMessage 错误消息 + * @throws Exception + */ + public static void checkParamNull(Object request,String invalidMessage) throws Exception{ + if(isNull(request)){ + throw new Exception(invalidMessage); + } + } + + /** + * + * 方法名称:checkParamNotNull
+ * 概要说明:校验不能为空
+ * 版本 修改人 备注
+ * @param request + * @param invalidMessage 错误消息 + * @throws Exception + */ + public static void checkParamNotNull(Object request,String invalidMessage) throws Exception{ + if(isNotNull(request)){ + throw new Exception(invalidMessage); + } + } + + + /** + * 注释:图片转Base64编码 + * @author erza + * @date 2019/10/15 17:47 + */ + private static String imageChangeBase64(byte[] data){ + // Base64编码 + return Base64.getEncoder().encodeToString(data); + } + + /** + * 对象转map + * + * @param obj + * @return + */ + public static Map ConvertObjToMap(Object obj) { + Map reMap = new HashMap(); + if (obj == null) + return null; + Field[] fields = obj.getClass().getDeclaredFields(); + try { + for (int i = 0; i < fields.length; i++) { + try { + Field f = obj.getClass().getDeclaredField(fields[i].getName()); + f.setAccessible(true); + Object o = f.get(obj); + reMap.put(fields[i].getName(), o); + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } catch (SecurityException e) { + e.printStackTrace(); + } + return reMap; + } + + /** + * 获取随机数 + * @param num 100000 位数 + * @return + */ + public static int getRandomNums(int num) { + return (int) ((Math.random() * 9 + 1) * num); + } + + + + private static Pattern linePattern = Pattern.compile("_(\\w)"); + private static Pattern humpPattern = Pattern.compile("[A-Z]"); + + /** + * 驼峰转下划线 + * @param str + * @return + */ + public static String humpToLine(String str) { + Matcher matcher = humpPattern.matcher(str); + StringBuffer sb = new StringBuffer(); + while (matcher.find()) { + matcher.appendReplacement(sb, "_" + matcher.group(0).toUpperCase()); + } + matcher.appendTail(sb); + return sb.toString(); + } + + /** + * 下划线转驼峰,正常输出 + * @param str + * @return + */ + public static String lineToHump(String str) { + Matcher matcher = linePattern.matcher(str); + StringBuffer sb = new StringBuffer(); + while (matcher.find()) { + matcher.appendReplacement(sb, matcher.group(1).toUpperCase()); + } + matcher.appendTail(sb); + return sb.toString(); + } + /** + * @doc 日期转换星期几 + * @param datetime 日期 例:2017-10-17 + * @return String 例:星期二 + * @history 2020年11月17日 + */ + public static String dateToWeek(String datetime) { + SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd"); + String[] weekDays = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; + Calendar cal = Calendar.getInstance(); // 获得一个日历 + Date datet = null; + try { + datet = f.parse(datetime); + cal.setTime(datet); + } catch (ParseException e) { + e.printStackTrace(); + } + int w = cal.get(Calendar.DAY_OF_WEEK) - 1; // 指示一个星期中的某天。 + if (w < 0) { + w = 0; + } + return weekDays[w]; + } + + /** + * 比较两个日期先后顺序 + * @param beginTime + * @param endTime + * @return + * @throws ParseException + */ + public static Boolean compareToDate(String beginTime,Date endTime) throws ParseException { + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); + Date sd1=df.parse(beginTime.trim()); + return sd1.before(endTime); + } + public static String getFileUploadPath(String linuxLocation){ + Date date = new Date(); + String time = new SimpleDateFormat("yyyy-MM-dd").format(date); + System.out.println("获取到精确到日的时间格式为"+time); + String[] str = time.split("-");//根据‘-’进行拆分字符串 拆分出来的日期有,年,日,月,根据年日月创建文件夹 + String datePath="/"+str[0]+"/"+str[1]+"/"+str[2]+"/"; + return linuxLocation+datePath; + } + /** + * 文件byte[]类型转File + * + * @param bytes bytes + * @param outPath 输出目录 + * @param fileName 文件名 + * @return + */ + public static File bytesToFile(byte[] bytes, String outPath, String fileName) { + BufferedOutputStream bos = null; + FileOutputStream fos = null; + File file = null; + try { + File destFile = new File(outPath + File.separator + fileName); + //文件目录不存在需要先创建 + if(!destFile.getParentFile().exists()){ + destFile.getParentFile().mkdirs(); + } + file = new File(outPath + File.separator + fileName); + fos = new FileOutputStream(file); + bos = new BufferedOutputStream(fos); + bos.write(bytes); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (bos != null) { + try { + bos.close(); + } catch (IOException e1) { + e1.printStackTrace(); + } + } + if (fos != null) { + try { + fos.close(); + } catch (IOException e1) { + e1.printStackTrace(); + } + } + } + return file; + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/jwt/JwtUtil.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/jwt/JwtUtil.java new file mode 100644 index 000000000..e126ef5f5 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/utils/jwt/JwtUtil.java @@ -0,0 +1,244 @@ +package com.ruoyi.system.utils.jwt; + +import com.alibaba.fastjson.JSON; +import com.auth0.jwt.JWT; +import com.auth0.jwt.JWTVerifier; +import com.auth0.jwt.algorithms.Algorithm; +import com.auth0.jwt.interfaces.Claim; +import com.auth0.jwt.interfaces.DecodedJWT; +import com.ruoyi.common.core.constant.Constants; +import com.ruoyi.common.core.exception.ServiceException; +import com.ruoyi.system.api.model.WxLoginUser; +import lombok.extern.log4j.Log4j2; + +import java.time.Duration; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * Created by jackma on 2020/6/8. + */ +@Log4j2 +public class JwtUtil { + + //密钥盐 + private static final String TOKEN_SECRET = "bastket_future"; + //签发者 + private static final String ISSURE = "BMS"; + // Token过期时间2天 + private static final Duration EXPIRE_TIME = Duration.ofDays(15); // Duration.parse("P2D"); + //token刷新时间 + private static final Duration REFRESH_TOKEN_EXPIRE_TIME = Duration.ofDays(1); + //app token刷新时间 + private static final Duration REFRESH_TOKEN_EXPIRE_APP_TIME = Duration.ofDays(5); + + /** + * token放本地线程 + */ + private static ThreadLocal tokenThreadLocal = new InheritableThreadLocal<>(); + + + public static String setToken(String token){ + tokenThreadLocal.set(token); + return token; + } + public static String getToken(){ + return tokenThreadLocal.get(); + } + + /** + * 验证token是否正确 + * + * @param token + * @param userId + * @return + */ + public static boolean verify(String token, Long userId) { + try { + // 设置加密算法 + Algorithm algorithm = Algorithm.HMAC256(TOKEN_SECRET); + JWTVerifier verifier = JWT.require(algorithm) + .withIssuer(ISSURE) + .withClaim("userId", userId) + .build(); + // 效验TOKEN + DecodedJWT jwt = verifier.verify(token); + return true; + } catch (Exception exception) { + return false; + } + } + + public static boolean verifyToken(String token, String secretKey) { + try { + Algorithm algorithm = Algorithm.HMAC256(secretKey); + JWTVerifier jwtVerifier = JWT.require(algorithm).withIssuer(ISSURE).build(); + jwtVerifier.verify(token); + return true; + } catch (Exception ex) { + return false; + } + } + + /** + * 生成 access_token + * + * @param subject + * @param claims + * @return + */ + public static String getAccessToken(String subject, Map claims) { + return generateToken(subject, claims, EXPIRE_TIME.toMillis()); + } + + /** + * 生成 微信端 refresh_token + * + * @param subject + * @param claims + * @return + */ + public static String getWxRefreshToken(String subject, Map claims) { + return generateToken(subject, claims, REFRESH_TOKEN_EXPIRE_APP_TIME.toMillis()); + } + + /** + * 生成 refresh_token + * + * @param subject + * @param claims + * @return + */ + public static String getRefreshToken(String subject, Map claims) { + return generateToken(subject, claims, REFRESH_TOKEN_EXPIRE_TIME.toMillis()); + } + + + /** + * 签发token + * + * @param subject + * @param claims + * @param ttlMillis + * @return + */ + public static String generateToken(String subject, Map claims, long ttlMillis) { + String token = null; + Algorithm algorithm = Algorithm.HMAC256(TOKEN_SECRET); + long nowMillis = System.currentTimeMillis(); + Date now = new Date(nowMillis); + Date exp = now; + if (ttlMillis >= 0) { + long expMillis = nowMillis + ttlMillis; + exp = new Date(expMillis); + } + String userId = String.valueOf(claims.get(Constants.JWT_USER_ID)); + String userName = String.valueOf(claims.get(Constants.JWT_USER_NAME)); + String loginName = String.valueOf(claims.get(Constants.JWT_LOGIN_NAME)); + String sessionKey = String.valueOf(claims.get(Constants.JWT_SESSION_KEY)); + String realName = String.valueOf(claims.get(Constants.JWT_REAL_NAME)); + String openId = String.valueOf(claims.get(Constants.JWT_OPEN_ID)); + /*List roleCodes = (List) claims.get(Constant.JWT_ROLES_KEY); + List permissions = (List) claims.get(Constant.JWT_PERMISSIONS_KEY); + Long userId = (Long) claims.get(Constant.JWT_USER_ID);*/ + try { + token = JWT.create() + .withIssuer(ISSURE) + .withIssuedAt(now) + //.withArrayClaim(Constant.JWT_PERMISSIONS_KEY, permissions.toArray(new String[permissions.size()])) + //.withArrayClaim(Constant.JWT_ROLES_KEY, roleCodes.toArray(new String[roleCodes.size()])) + .withClaim(Constants.JWT_USER_ID, userId) + .withClaim(Constants.JWT_USER_NAME,userName) + .withClaim(Constants.JWT_LOGIN_NAME,loginName) + .withClaim(Constants.JWT_SESSION_KEY,sessionKey) + .withClaim(Constants.JWT_REAL_NAME,realName) + .withClaim(Constants.JWT_OPEN_ID,openId) + .withSubject(subject) + .withExpiresAt(exp) + .sign(algorithm); + } catch (Exception e) { + throw new ServiceException("生成token失败!" + e.getMessage()); + } + return token; + } + + /** + * + * @param request + * @return + */ + /* public static String getUserIdByToken(HttpServletRequest request) { + String token = request.getHeader("token"); + DecodedJWT jwt = JWT.decode(token); + return jwt.getClaim("userId") + .asString(); + }*/ + + /** + * 获取token中userId + * + * @param token + * @return + */ + public static Long getUserIdByToken(String token) { + try { + DecodedJWT jwt = JWT.decode(token); + Map claims=new HashMap<>(); + claims=jwt.getClaims(); + String userId=claims.get(Constants.JWT_USER_ID).asString(); + return Long.parseLong(userId); + } catch (Exception e) { + e.printStackTrace(); + throw new ServiceException("获取token中的用户信息失败!"); + } + + } + + /** + * 获取token中userId + * + * @param token + * @return + */ + public static WxLoginUser getLogUserByToken(String token) { + WxLoginUser user=new WxLoginUser(); + try { + DecodedJWT jwt = JWT.decode(token); + Map claims=new HashMap<>(); + claims=jwt.getClaims(); + String userId=claims.get(Constants.JWT_USER_ID).asString(); + String userName=claims.get(Constants.JWT_USER_NAME).asString(); + String loginName=claims.get(Constants.JWT_LOGIN_NAME).asString(); + String sessionKey=claims.get(Constants.JWT_SESSION_KEY).asString(); + String realName=claims.get(Constants.JWT_REAL_NAME).asString(); + String openId=claims.get(Constants.JWT_OPEN_ID).asString(); + user.setUserId(Long.parseLong(userId)); + user.setUserName(userName); + user.setLoginName(loginName); + user.setSessionKey(sessionKey); + user.setRealName(realName); + user.setOpenId(openId); + log.info("user= "+ JSON.toJSONString(user) +" token= "+token); + return user; + } catch (Exception e) { + e.printStackTrace(); + throw new ServiceException("获取token中的用户信息失败!"); + } + + } + + /** + * 获得token的过期时间 + * + * @return + */ + public static Long getExpireTime(String token) { + try { + DecodedJWT jwt = JWT.decode(token); + return jwt.getClaim("exp").asLong(); + } catch (Exception e) { + throw new ServiceException("获取token中的过期时间戳失败:"); + } + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/BuildingInfoDetailMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/BuildingInfoDetailMapper.xml new file mode 100644 index 000000000..2899dc23e --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/BuildingInfoDetailMapper.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, BUILDING_ID, BUSINESS_HOURS, LINKMAN, LINKPHONE, FEE_STANDARD, LABEL_DESC, NOTICE from building_info_detail + + + + + + + + + insert into building_info_detail + + IS_DELETED, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + LAST_UPDATED_TIME, + BUILDING_ID, + BUSINESS_HOURS, + LINKMAN, + LINKPHONE, + FEE_STANDARD, + LABEL_DESC, + NOTICE, + + + #{isDeleted}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{lastUpdatedTime}, + #{buildingId}, + #{businessHours}, + #{linkman}, + #{linkphone}, + #{feeStandard}, + #{labelDesc}, + #{notice}, + + + + + update building_info_detail + + IS_DELETED = #{isDeleted}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + BUILDING_ID = #{buildingId}, + BUSINESS_HOURS = #{businessHours}, + LINKMAN = #{linkman}, + LINKPHONE = #{linkphone}, + FEE_STANDARD = #{feeStandard}, + LABEL_DESC = #{labelDesc}, + NOTICE = #{notice}, + + where ID = #{id} + + + + delete from building_info_detail where ID = #{id} + + + + delete from building_info_detail where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/BuildingLabelMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/BuildingLabelMapper.xml new file mode 100644 index 000000000..a72203082 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/BuildingLabelMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, BUILDING_ID, FEATURE_LABEL_ID, REMARK from building_label + + + + + + + + insert into building_label + + IS_DELETED, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + LAST_UPDATED_TIME, + BUILDING_ID, + FEATURE_LABEL_ID, + REMARK, + + + #{isDeleted}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{lastUpdatedTime}, + #{buildingId}, + #{featureLabelId}, + #{remark}, + + + + + update building_label + + IS_DELETED = #{isDeleted}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + BUILDING_ID = #{buildingId}, + FEATURE_LABEL_ID = #{featureLabelId}, + REMARK = #{remark}, + + where ID = #{id} + + + + delete from building_label where ID = #{id} + + + + delete from building_label where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/BuildingTeamRelMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/BuildingTeamRelMapper.xml new file mode 100644 index 000000000..dfb29a7bc --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/BuildingTeamRelMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, BUILDING_ID, TEAM_ID from building_team_rel + + + + + + + + insert into building_team_rel + + IS_DELETED, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + LAST_UPDATED_TIME, + BUILDING_ID, + TEAM_ID, + + + #{isDeleted}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{lastUpdatedTime}, + #{buildingId}, + #{teamId}, + + + + + update building_team_rel + + IS_DELETED = #{isDeleted}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + BUILDING_ID = #{buildingId}, + TEAM_ID = #{teamId}, + + where ID = #{id} + + + + delete from building_team_rel where ID = #{id} + + + + delete from building_team_rel where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CameraInfoMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CameraInfoMapper.xml new file mode 100644 index 000000000..59f47dfd5 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CameraInfoMapper.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, STATUS, CITY_CODE, TYPE, NAME, SN, BUILDING_ID, REMARK, URL from camera_info + + + + + + + + insert into camera_info + + IS_DELETED, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + LAST_UPDATED_TIME, + STATUS, + CITY_CODE, + TYPE, + NAME, + SN, + BUILDING_ID, + REMARK, + URL, + + + #{isDeleted}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{lastUpdatedTime}, + #{status}, + #{cityCode}, + #{type}, + #{name}, + #{sn}, + #{buildingId}, + #{remark}, + #{url}, + + + + + update camera_info + + IS_DELETED = #{isDeleted}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + STATUS = #{status}, + CITY_CODE = #{cityCode}, + TYPE = #{type}, + NAME = #{name}, + SN = #{sn}, + BUILDING_ID = #{buildingId}, + REMARK = #{remark}, + URL = #{url}, + + where ID = #{id} + + + + delete from camera_info where ID = #{id} + + + + delete from camera_info where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMapper.xml index 1c26f250e..9260abe7c 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMapper.xml @@ -101,7 +101,115 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - + + + + insert into competition diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMembersMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMembersMapper.xml index 7290a5afa..91368b2a9 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMembersMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMembersMapper.xml @@ -80,7 +80,80 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - + + + insert into competition_members @@ -182,6 +255,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} + + update competition_members set user_id = #{userId} where contacts_tel = #{contactsTel} + delete from competition_members where id = #{id} @@ -193,4 +269,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + delete from competition_members where competition_of_team_id = #{teamOfId} and competition_id = #{competitionId} + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMembersScoreMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMembersScoreMapper.xml index bc4b33f09..1c4ed713d 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMembersScoreMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMembersScoreMapper.xml @@ -115,6 +115,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ORDER BY sco.is_first_launch desc + + insert into competition_members_score diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionOfTeamMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionOfTeamMapper.xml index 1d52dd825..41ed6edd7 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionOfTeamMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionOfTeamMapper.xml @@ -49,6 +49,118 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and t.serial_number = #{serialNumber} + + + + + insert into competition_of_team diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionTeamGroupMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionTeamGroupMapper.xml index 53a6ca966..bb5b2b0b3 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionTeamGroupMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionTeamGroupMapper.xml @@ -41,7 +41,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - + + insert into competition_team_group diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionTeamVsTeamMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionTeamVsTeamMapper.xml index a92cca752..3fa400859 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionTeamVsTeamMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionTeamVsTeamMapper.xml @@ -126,6 +126,130 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND t.is_deleted = 0 LIMIT 1 + + + insert into competition_team_vs_team diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/DataDictionaryMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/DataDictionaryMapper.xml new file mode 100644 index 000000000..70defa787 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/DataDictionaryMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + select ID, CREATED_BY, CREATED_TIME, MODIFIED_BY, LAST_UPDATED_TIME, IS_DELETED, KEY, NAME, ENABLED, PARENT_ID, SORT_NUMBER from data_dictionary + + + + + + + + insert into data_dictionary + + CREATED_BY, + CREATED_TIME, + MODIFIED_BY, + LAST_UPDATED_TIME, + IS_DELETED, + KEY, + NAME, + ENABLED, + PARENT_ID, + SORT_NUMBER, + + + #{createdBy}, + #{createdTime}, + #{modifiedBy}, + #{lastUpdatedTime}, + #{isDeleted}, + #{key}, + #{name}, + #{enabled}, + #{parentId}, + #{sortNumber}, + + + + + update data_dictionary + + CREATED_BY = #{createdBy}, + CREATED_TIME = #{createdTime}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + IS_DELETED = #{isDeleted}, + KEY = #{key}, + NAME = #{name}, + ENABLED = #{enabled}, + PARENT_ID = #{parentId}, + SORT_NUMBER = #{sortNumber}, + + where ID = #{id} + + + + delete from data_dictionary where ID = #{id} + + + + delete from data_dictionary where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/FeatureLabelMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/FeatureLabelMapper.xml new file mode 100644 index 000000000..38135d09f --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/FeatureLabelMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, DESCRIPTION, REMARK, BUILDING_ID from feature_label + + + + + + + + insert into feature_label + + IS_DELETED, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + LAST_UPDATED_TIME, + DESCRIPTION, + REMARK, + BUILDING_ID, + + + #{isDeleted}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{lastUpdatedTime}, + #{description}, + #{remark}, + #{buildingId}, + + + + + update feature_label + + IS_DELETED = #{isDeleted}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + DESCRIPTION = #{description}, + REMARK = #{remark}, + BUILDING_ID = #{buildingId}, + + where ID = #{id} + + + + delete from feature_label where ID = #{id} + + + + delete from feature_label where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/GlobalAttachmentMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/GlobalAttachmentMapper.xml new file mode 100644 index 000000000..58329e2d1 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/GlobalAttachmentMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + select ID, BIZ_TYPE, BIZ_ID, ATTACHMENT_NAME, ATTACHMENT_TYPE, ATTACHMENT_URL, VERSION, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, consult_type from global_attachment + + + + + + + + insert into global_attachment + + BIZ_TYPE, + BIZ_ID, + ATTACHMENT_NAME, + ATTACHMENT_TYPE, + ATTACHMENT_URL, + VERSION, + IS_DELETED, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + LAST_UPDATED_TIME, + consult_type, + + + #{bizType}, + #{bizId}, + #{attachmentName}, + #{attachmentType}, + #{attachmentUrl}, + #{version}, + #{isDeleted}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{lastUpdatedTime}, + #{consultType}, + + + + + update global_attachment + + BIZ_TYPE = #{bizType}, + BIZ_ID = #{bizId}, + ATTACHMENT_NAME = #{attachmentName}, + ATTACHMENT_TYPE = #{attachmentType}, + ATTACHMENT_URL = #{attachmentUrl}, + VERSION = #{version}, + IS_DELETED = #{isDeleted}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + consult_type = #{consultType}, + + where ID = #{id} + + + + delete from global_attachment where ID = #{id} + + + + delete from global_attachment where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/GroupWechatMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/GroupWechatMapper.xml new file mode 100644 index 000000000..0e143ac60 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/GroupWechatMapper.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + select ID, BUILDING_ID, GROUP_NAME, HEADER_PICTURE, GROUP_CODE, SCAN_NUM, SERVICE_USER, SERVICE_USER_QRCODE, REMARKS, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME from group_wechat + + + + + + + + insert into group_wechat + + BUILDING_ID, + GROUP_NAME, + HEADER_PICTURE, + GROUP_CODE, + SCAN_NUM, + SERVICE_USER, + SERVICE_USER_QRCODE, + REMARKS, + IS_DELETED, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + LAST_UPDATED_TIME, + + + #{buildingId}, + #{groupName}, + #{headerPicture}, + #{groupCode}, + #{scanNum}, + #{serviceUser}, + #{serviceUserQrcode}, + #{remarks}, + #{isDeleted}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{lastUpdatedTime}, + + + + + update group_wechat + + BUILDING_ID = #{buildingId}, + GROUP_NAME = #{groupName}, + HEADER_PICTURE = #{headerPicture}, + GROUP_CODE = #{groupCode}, + SCAN_NUM = #{scanNum}, + SERVICE_USER = #{serviceUser}, + SERVICE_USER_QRCODE = #{serviceUserQrcode}, + REMARKS = #{remarks}, + IS_DELETED = #{isDeleted}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + + where ID = #{id} + + + + delete from group_wechat where ID = #{id} + + + + delete from group_wechat where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MessageMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MessageMapper.xml new file mode 100644 index 000000000..c9c813836 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MessageMapper.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + select ID, CREATED_BY, CREATED_TIME, MODIFIED_BY, LAST_UPDATED_TIME, IS_DELETED, MESSAGE_TITLE, MESSAGE_TYPE, FLOW_TYPE, AUDITOR, AUDIT_DATE, SOURCE_ID, AGREE_FLAG, FLOW_ENTITY from message + + + + + + + + insert into message + + CREATED_BY, + CREATED_TIME, + MODIFIED_BY, + LAST_UPDATED_TIME, + IS_DELETED, + MESSAGE_TITLE, + MESSAGE_TYPE, + FLOW_TYPE, + AUDITOR, + AUDIT_DATE, + SOURCE_ID, + AGREE_FLAG, + FLOW_ENTITY, + + + #{createdBy}, + #{createdTime}, + #{modifiedBy}, + #{lastUpdatedTime}, + #{isDeleted}, + #{messageTitle}, + #{messageType}, + #{flowType}, + #{auditor}, + #{auditDate}, + #{sourceId}, + #{agreeFlag}, + #{flowEntity}, + + + + + update message + + CREATED_BY = #{createdBy}, + CREATED_TIME = #{createdTime}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + IS_DELETED = #{isDeleted}, + MESSAGE_TITLE = #{messageTitle}, + MESSAGE_TYPE = #{messageType}, + FLOW_TYPE = #{flowType}, + AUDITOR = #{auditor}, + AUDIT_DATE = #{auditDate}, + SOURCE_ID = #{sourceId}, + AGREE_FLAG = #{agreeFlag}, + FLOW_ENTITY = #{flowEntity}, + + where ID = #{id} + + + + delete from message where ID = #{id} + + + + delete from message where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ShAreaMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ShAreaMapper.xml new file mode 100644 index 000000000..f4562a036 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ShAreaMapper.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select id, pid, shortname, cityName, merger_name, level, pinyin, code, zip_code, first, longitude, latitude, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME from sh_area + + + + + + + + + insert into sh_area + + pid, + shortname, + cityName, + merger_name, + level, + pinyin, + code, + zip_code, + first, + longitude, + latitude, + IS_DELETED, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + LAST_UPDATED_TIME, + + + #{pid}, + #{shortname}, + #{cityname}, + #{mergerName}, + #{level}, + #{pinyin}, + #{code}, + #{zipCode}, + #{first}, + #{longitude}, + #{latitude}, + #{isDeleted}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{lastUpdatedTime}, + + + + + update sh_area + + pid = #{pid}, + shortname = #{shortname}, + cityName = #{cityname}, + merger_name = #{mergerName}, + level = #{level}, + pinyin = #{pinyin}, + code = #{code}, + zip_code = #{zipCode}, + first = #{first}, + longitude = #{longitude}, + latitude = #{latitude}, + IS_DELETED = #{isDeleted}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + + where id = #{id} + + + + delete from sh_area where id = #{id} + + + + delete from sh_area where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/TeamMembersMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/TeamMembersMapper.xml index 1021f325e..2ac16068c 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/TeamMembersMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/TeamMembersMapper.xml @@ -46,6 +46,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and t.user_name like concat('%', #{userName}, '%') + + insert into team_members diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/TokenInfoMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/TokenInfoMapper.xml new file mode 100644 index 000000000..b23d53963 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/TokenInfoMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, MAIN_TOKEN, KIK_TOKEN from token_info + + + + + + + + insert into token_info + + IS_DELETED, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + LAST_UPDATED_TIME, + MAIN_TOKEN, + KIK_TOKEN, + + + #{isDeleted}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{lastUpdatedTime}, + #{mainToken}, + #{kikToken}, + + + + + update token_info + + IS_DELETED = #{isDeleted}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + MAIN_TOKEN = #{mainToken}, + KIK_TOKEN = #{kikToken}, + + where ID = #{id} + + + + delete from token_info where ID = #{id} + + + + delete from token_info where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/TrainingInfoMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/TrainingInfoMapper.xml new file mode 100644 index 000000000..014a63a77 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/TrainingInfoMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, TRAIN_NAME, PHONE, LINKMAN, TRAIN_DESC, BUILD_ID, DEFAULT_PICTURE, PRICE from training_info + + + + + + + + insert into training_info + + IS_DELETED, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + LAST_UPDATED_TIME, + TRAIN_NAME, + PHONE, + LINKMAN, + TRAIN_DESC, + BUILD_ID, + DEFAULT_PICTURE, + PRICE, + + + #{isDeleted}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{lastUpdatedTime}, + #{trainName}, + #{phone}, + #{linkman}, + #{trainDesc}, + #{buildId}, + #{defaultPicture}, + #{price}, + + + + + update training_info + + IS_DELETED = #{isDeleted}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + TRAIN_NAME = #{trainName}, + PHONE = #{phone}, + LINKMAN = #{linkman}, + TRAIN_DESC = #{trainDesc}, + BUILD_ID = #{buildId}, + DEFAULT_PICTURE = #{defaultPicture}, + PRICE = #{price}, + + where ID = #{id} + + + + delete from training_info where ID = #{id} + + + + delete from training_info where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/UserBuildingRelMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/UserBuildingRelMapper.xml new file mode 100644 index 000000000..8ab868310 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/UserBuildingRelMapper.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, USER_CODE, BUILDING_ID from user_building_rel + + + + + + + + insert into user_building_rel + + ID, + IS_DELETED, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + LAST_UPDATED_TIME, + USER_CODE, + BUILDING_ID, + + + #{id}, + #{isDeleted}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{lastUpdatedTime}, + #{userCode}, + #{buildingId}, + + + + + update user_building_rel + + IS_DELETED = #{isDeleted}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + USER_CODE = #{userCode}, + BUILDING_ID = #{buildingId}, + + where ID = #{id} + + + + delete from user_building_rel where ID = #{id} + + + + delete from user_building_rel where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/UserRoleMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/UserRoleMapper.xml new file mode 100644 index 000000000..b3fe36478 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/UserRoleMapper.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + select ID, USER_ID, ROLE_CODE, CREATED_TIME, CREATED_BY, MODIFIED_BY, IS_DELETED, LAST_UPDATED_TIME, ROLE_ID from user_role + + + + + + + + + insert into user_role + + USER_ID, + ROLE_CODE, + CREATED_TIME, + CREATED_BY, + MODIFIED_BY, + IS_DELETED, + LAST_UPDATED_TIME, + ROLE_ID, + + + #{userId}, + #{roleCode}, + #{createdTime}, + #{createdBy}, + #{modifiedBy}, + #{isDeleted}, + #{lastUpdatedTime}, + #{roleId}, + + + + + update user_role + + USER_ID = #{userId}, + ROLE_CODE = #{roleCode}, + CREATED_TIME = #{createdTime}, + CREATED_BY = #{createdBy}, + MODIFIED_BY = #{modifiedBy}, + IS_DELETED = #{isDeleted}, + LAST_UPDATED_TIME = #{lastUpdatedTime}, + ROLE_ID = #{roleId}, + + where ID = #{id} + + + + delete from user_role where ID = #{id} + + + + delete from user_role where ID in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBasketballTeamMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBasketballTeamMapper.xml index c4de93983..94fbe3a88 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBasketballTeamMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBasketballTeamMapper.xml @@ -40,7 +40,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where ID = #{id} + + insert into basketball_team @@ -108,4 +111,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBuildingInfoMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBuildingInfoMapper.xml index cd0c443b4..df3c7176e 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBuildingInfoMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBuildingInfoMapper.xml @@ -61,7 +61,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where ID = #{id} - + + + + + insert into building_info diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxUserMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxUserMapper.xml index 80a7fcb22..5822ee0b3 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxUserMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxUserMapper.xml @@ -66,7 +66,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where ID = #{id} - + + + insert into user_info diff --git a/ruoyi-ui/src/api/system/area.js b/ruoyi-ui/src/api/system/area.js new file mode 100644 index 000000000..f8fdae654 --- /dev/null +++ b/ruoyi-ui/src/api/system/area.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listArea(query) { + return request({ + url: '/system/area/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getArea(id) { + return request({ + url: '/system/area/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addArea(data) { + return request({ + url: '/system/area', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateArea(data) { + return request({ + url: '/system/area', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delArea(id) { + return request({ + url: '/system/area/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/attachment.js b/ruoyi-ui/src/api/system/attachment.js new file mode 100644 index 000000000..213d9bd94 --- /dev/null +++ b/ruoyi-ui/src/api/system/attachment.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listAttachment(query) { + return request({ + url: '/system/attachment/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getAttachment(id) { + return request({ + url: '/system/attachment/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addAttachment(data) { + return request({ + url: '/system/attachment', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateAttachment(data) { + return request({ + url: '/system/attachment', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delAttachment(id) { + return request({ + url: '/system/attachment/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/detail.js b/ruoyi-ui/src/api/system/detail.js new file mode 100644 index 000000000..f4c8a73f5 --- /dev/null +++ b/ruoyi-ui/src/api/system/detail.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listDetail(query) { + return request({ + url: '/system/detail/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getDetail(id) { + return request({ + url: '/system/detail/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addDetail(data) { + return request({ + url: '/system/detail', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateDetail(data) { + return request({ + url: '/system/detail', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delDetail(id) { + return request({ + url: '/system/detail/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/dictionary.js b/ruoyi-ui/src/api/system/dictionary.js new file mode 100644 index 000000000..f5a4b964d --- /dev/null +++ b/ruoyi-ui/src/api/system/dictionary.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listDictionary(query) { + return request({ + url: '/system/dictionary/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getDictionary(id) { + return request({ + url: '/system/dictionary/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addDictionary(data) { + return request({ + url: '/system/dictionary', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateDictionary(data) { + return request({ + url: '/system/dictionary', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delDictionary(id) { + return request({ + url: '/system/dictionary/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/featureLabel.js b/ruoyi-ui/src/api/system/featureLabel.js new file mode 100644 index 000000000..8d0ede437 --- /dev/null +++ b/ruoyi-ui/src/api/system/featureLabel.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询球馆特征列表 +export function listFeatureLabel(query) { + return request({ + url: '/system/featureLabel/list', + method: 'get', + params: query + }) +} + +// 查询球馆特征详细 +export function getFeatureLabel(id) { + return request({ + url: '/system/featureLabel/' + id, + method: 'get' + }) +} + +// 新增球馆特征 +export function addFeatureLabel(data) { + return request({ + url: '/system/featureLabel', + method: 'post', + data: data + }) +} + +// 修改球馆特征 +export function updateFeatureLabel(data) { + return request({ + url: '/system/featureLabel', + method: 'put', + data: data + }) +} + +// 删除球馆特征 +export function delFeatureLabel(id) { + return request({ + url: '/system/featureLabel/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/info.js b/ruoyi-ui/src/api/system/info.js new file mode 100644 index 000000000..c4795b044 --- /dev/null +++ b/ruoyi-ui/src/api/system/info.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listInfo(query) { + return request({ + url: '/system/info/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getInfo(id) { + return request({ + url: '/system/info/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addInfo(data) { + return request({ + url: '/system/info', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateInfo(data) { + return request({ + url: '/system/info', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delInfo(id) { + return request({ + url: '/system/info/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/label.js b/ruoyi-ui/src/api/system/label.js new file mode 100644 index 000000000..af9fe8f05 --- /dev/null +++ b/ruoyi-ui/src/api/system/label.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listLabel(query) { + return request({ + url: '/system/label/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getLabel(id) { + return request({ + url: '/system/label/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addLabel(data) { + return request({ + url: '/system/label', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateLabel(data) { + return request({ + url: '/system/label', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delLabel(id) { + return request({ + url: '/system/label/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/message.js b/ruoyi-ui/src/api/system/message.js new file mode 100644 index 000000000..7187d6ea0 --- /dev/null +++ b/ruoyi-ui/src/api/system/message.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listMessage(query) { + return request({ + url: '/system/message/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getMessage(id) { + return request({ + url: '/system/message/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addMessage(data) { + return request({ + url: '/system/message', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateMessage(data) { + return request({ + url: '/system/message', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delMessage(id) { + return request({ + url: '/system/message/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/rel.js b/ruoyi-ui/src/api/system/rel.js new file mode 100644 index 000000000..91e62a0d1 --- /dev/null +++ b/ruoyi-ui/src/api/system/rel.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listRel(query) { + return request({ + url: '/system/rel/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getRel(id) { + return request({ + url: '/system/rel/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addRel(data) { + return request({ + url: '/system/rel', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateRel(data) { + return request({ + url: '/system/rel', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delRel(id) { + return request({ + url: '/system/rel/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/wechat.js b/ruoyi-ui/src/api/system/wechat.js new file mode 100644 index 000000000..6f64f8488 --- /dev/null +++ b/ruoyi-ui/src/api/system/wechat.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listWechat(query) { + return request({ + url: '/system/wechat/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getWechat(id) { + return request({ + url: '/system/wechat/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addWechat(data) { + return request({ + url: '/system/wechat', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateWechat(data) { + return request({ + url: '/system/wechat', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delWechat(id) { + return request({ + url: '/system/wechat/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/system/area/index.vue b/ruoyi-ui/src/views/system/area/index.vue new file mode 100644 index 000000000..ec206ee4c --- /dev/null +++ b/ruoyi-ui/src/views/system/area/index.vue @@ -0,0 +1,473 @@ + + + diff --git a/ruoyi-ui/src/views/system/attachment/index.vue b/ruoyi-ui/src/views/system/attachment/index.vue new file mode 100644 index 000000000..fd9244f2f --- /dev/null +++ b/ruoyi-ui/src/views/system/attachment/index.vue @@ -0,0 +1,376 @@ + + + diff --git a/ruoyi-ui/src/views/system/detail/index.vue b/ruoyi-ui/src/views/system/detail/index.vue new file mode 100644 index 000000000..e866bb85f --- /dev/null +++ b/ruoyi-ui/src/views/system/detail/index.vue @@ -0,0 +1,409 @@ + + + diff --git a/ruoyi-ui/src/views/system/dictionary/index.vue b/ruoyi-ui/src/views/system/dictionary/index.vue new file mode 100644 index 000000000..7a98b0826 --- /dev/null +++ b/ruoyi-ui/src/views/system/dictionary/index.vue @@ -0,0 +1,389 @@ + + + diff --git a/ruoyi-ui/src/views/system/featureLabel/index.vue b/ruoyi-ui/src/views/system/featureLabel/index.vue new file mode 100644 index 000000000..f09c95c66 --- /dev/null +++ b/ruoyi-ui/src/views/system/featureLabel/index.vue @@ -0,0 +1,361 @@ + + + diff --git a/ruoyi-ui/src/views/system/info/index.vue b/ruoyi-ui/src/views/system/info/index.vue new file mode 100644 index 000000000..7986034de --- /dev/null +++ b/ruoyi-ui/src/views/system/info/index.vue @@ -0,0 +1,347 @@ + + + diff --git a/ruoyi-ui/src/views/system/label/index.vue b/ruoyi-ui/src/views/system/label/index.vue new file mode 100644 index 000000000..365ca4b0a --- /dev/null +++ b/ruoyi-ui/src/views/system/label/index.vue @@ -0,0 +1,361 @@ + + + diff --git a/ruoyi-ui/src/views/system/message/index.vue b/ruoyi-ui/src/views/system/message/index.vue new file mode 100644 index 000000000..9c3174380 --- /dev/null +++ b/ruoyi-ui/src/views/system/message/index.vue @@ -0,0 +1,405 @@ + + + diff --git a/ruoyi-ui/src/views/system/rel/index.vue b/ruoyi-ui/src/views/system/rel/index.vue new file mode 100644 index 000000000..3544a839c --- /dev/null +++ b/ruoyi-ui/src/views/system/rel/index.vue @@ -0,0 +1,347 @@ + + + diff --git a/ruoyi-ui/src/views/system/wechat/index.vue b/ruoyi-ui/src/views/system/wechat/index.vue new file mode 100644 index 000000000..b1a34199e --- /dev/null +++ b/ruoyi-ui/src/views/system/wechat/index.vue @@ -0,0 +1,431 @@ + + +