From c77ce47a7c4f593573dbea29917343b2c4e81c52 Mon Sep 17 00:00:00 2001 From: cgx <2606784146@qq.com> Date: Sat, 19 Oct 2024 16:29:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E9=99=86=E6=B3=A8=E5=86=8C=E9=93=9D?= =?UTF-8?q?=E4=BB=B7=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg-system-cloud-api.iml | 4 +- .../jeecg-system-local-api.iml | 4 +- .../jeecg-boot-base-core/jeecg-boot-base-core.iml | 4 +- .../org/jeecg/common/constant/CommonConstant.java | 8 +- .../main/java/org/jeecg/config/Swagger2Config.java | 3 +- .../java/org/jeecg/config/shiro/ShiroConfig.java | 2 +- .../java/org/jeecg/config/shiro/ShiroRealm.java | 3 + .../userRole/controller/TbUserRoleController.java | 156 +++++++++ .../jeecg/modules/userRole/entity/TbUserRole.java | 107 ++++++ .../modules/userRole/mapper/TbUserRoleMapper.java | 14 + .../userRole/mapper/xml/TbUserRoleMapper.xml | 5 + .../userRole/service/ITbUserRoleService.java | 14 + .../service/impl/TbUserRoleServiceImpl.java | 19 + .../jeecg/modules/userRole/vue/TbUserRoleList.vue | 278 +++++++++++++++ .../userRole/vue/modules/TbUserRoleForm.vue | 159 +++++++++ .../vue/modules/TbUserRoleModal.Style#Drawer.vue | 84 +++++ .../userRole/vue/modules/TbUserRoleModal.vue | 60 ++++ .../jeecg/modules/userRole/vue3/TbUserRole.api.ts | 61 ++++ .../jeecg/modules/userRole/vue3/TbUserRole.data.ts | 184 ++++++++++ .../jeecg/modules/userRole/vue3/TbUserRoleList.vue | 162 +++++++++ .../userRole/vue3/components/TbUserRoleModal.vue | 58 ++++ .../webTeam/controller/WebTeamController.java | 3 + .../jeecg-boot-module-system.iml | 4 +- .../modules/alUser/controller/IndexController.java | 43 +++ .../alUser/controller/UserLoginController.java | 130 +++++++ .../jeecg/modules/alUser/service/UserService.java | 25 ++ .../alUser/service/impl/UserServiceImpl.java | 204 +++++++++++ .../api/service/impl/YaoDuApiServiceImpl.java | 2 +- .../modules/api/yaoduapi/YaoDuApiController.java | 2 +- .../api/yaoduapi/YaoDuApiTokenController.java | 2 +- .../org/jeecg/modules/postBean/ReqUserRole.java | 83 +++++ .../org/jeecg/modules/postBean/UserLoginModel.java | 29 ++ .../java/org/jeecg/modules/utils/HttpUtil.java | 140 ++++++++ .../java/org/jeecg/modules/utils/SmsClient.java | 1 - .../java/org/jeecg/modules/utils/ValidateTool.java | 381 +++++++++++++++++++++ .../src/main/resources/application-dev.yml | 4 + 36 files changed, 2431 insertions(+), 11 deletions(-) create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/controller/TbUserRoleController.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/entity/TbUserRole.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/mapper/TbUserRoleMapper.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/mapper/xml/TbUserRoleMapper.xml create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/ITbUserRoleService.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/impl/TbUserRoleServiceImpl.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/TbUserRoleList.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleForm.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleModal.Style#Drawer.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleModal.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRole.api.ts create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRole.data.ts create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRoleList.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/components/TbUserRoleModal.vue create mode 100644 jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/controller/IndexController.java create mode 100644 jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/controller/UserLoginController.java create mode 100644 jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/service/UserService.java create mode 100644 jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/service/impl/UserServiceImpl.java create mode 100644 jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/ReqUserRole.java create mode 100644 jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/UserLoginModel.java create mode 100644 jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/HttpUtil.java create mode 100644 jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/ValidateTool.java diff --git a/jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/jeecg-system-cloud-api.iml b/jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/jeecg-system-cloud-api.iml index e6fcbcf..a59849c 100644 --- a/jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/jeecg-system-cloud-api.iml +++ b/jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/jeecg-system-cloud-api.iml @@ -10,7 +10,9 @@ - + + + diff --git a/jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/jeecg-system-local-api.iml b/jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/jeecg-system-local-api.iml index 1b52415..890cb15 100644 --- a/jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/jeecg-system-local-api.iml +++ b/jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/jeecg-system-local-api.iml @@ -10,7 +10,9 @@ - + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/jeecg-boot-base-core.iml b/jeecg-boot-base/jeecg-boot-base-core/jeecg-boot-base-core.iml index f1c7418..1ddf35a 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/jeecg-boot-base-core.iml +++ b/jeecg-boot-base/jeecg-boot-base-core/jeecg-boot-base-core.iml @@ -10,7 +10,9 @@ - + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java index 507dd72..9f765a3 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java @@ -6,7 +6,13 @@ package org.jeecg.common.constant; */ public interface CommonConstant { - /** + + public static final String PHONE_CODE="phone_code:"; + public static final String PHONE_SMS="phone_sms:"; + + + + /** * 正常状态 */ public static final Integer STATUS_NORMAL = 0; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger2Config.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger2Config.java index 83cecf2..6096847 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger2Config.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger2Config.java @@ -68,7 +68,8 @@ public class Swagger2Config implements WebMvcConfigurer { .apiInfo(apiInfo()) .select() //此包路径下的类,才生成接口文档 - .apis(RequestHandlerSelectors.basePackage("org.jeecg.modules.api")) +// .apis(RequestHandlerSelectors.basePackage("org.jeecg.modules.api")) + .apis(RequestHandlerSelectors.basePackage("org.jeecg.modules.alUser")) //加了ApiOperation注解的类,才生成接口文档 .apis(RequestHandlerSelectors.withClassAnnotation(RestController.class)) .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index 9a9b070..665762e 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -74,7 +74,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/web/**", "anon"); //官网接口开放验证 filterChainDefinitionMap.put("/city/**", "anon"); - + filterChainDefinitionMap.put("/alUser/**", "anon"); filterChainDefinitionMap.put("/sys/oss/file/upload", "anon"); //图片上传验证放开 filterChainDefinitionMap.put("/sys/common/upload", "anon"); //图片上传验证放开 diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroRealm.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroRealm.java index d33917a..2cb846a 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroRealm.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroRealm.java @@ -1,5 +1,6 @@ package org.jeecg.config.shiro; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import lombok.extern.slf4j.Slf4j; import org.apache.shiro.authc.*; import org.apache.shiro.authz.AuthorizationInfo; @@ -160,6 +161,8 @@ public class ShiroRealm extends AuthorizingRealm { + + /** * 校验token的有效性 * diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/controller/TbUserRoleController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/controller/TbUserRoleController.java new file mode 100644 index 0000000..ef40e2b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/controller/TbUserRoleController.java @@ -0,0 +1,156 @@ +package org.jeecg.modules.userRole.controller; + +import java.util.Arrays; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.userRole.entity.TbUserRole; +import org.jeecg.modules.userRole.service.ITbUserRoleService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 角色表 + * @Author: jeecg-boot + * @Date: 2024-10-16 + * @Version: V1.0 + */ +@Api(tags="角色表") +@RestController +@RequestMapping("/userRole/tbUserRole") +@Slf4j +public class TbUserRoleController extends JeecgController { + @Autowired + private ITbUserRoleService tbUserRoleService; + + /** + * 分页列表查询 + * + * @param tbUserRole + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "角色表-分页列表查询") + @ApiOperation(value="角色表-分页列表查询", notes="角色表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(TbUserRole tbUserRole, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(tbUserRole, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = tbUserRoleService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param tbUserRole + * @return + */ + @AutoLog(value = "角色表-添加") + @ApiOperation(value="角色表-添加", notes="角色表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody TbUserRole tbUserRole) { + tbUserRoleService.save(tbUserRole); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param tbUserRole + * @return + */ + @AutoLog(value = "角色表-编辑") + @ApiOperation(value="角色表-编辑", notes="角色表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody TbUserRole tbUserRole) { + tbUserRoleService.updateById(tbUserRole); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "角色表-通过id删除") + @ApiOperation(value="角色表-通过id删除", notes="角色表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + tbUserRoleService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "角色表-批量删除") + @ApiOperation(value="角色表-批量删除", notes="角色表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.tbUserRoleService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "角色表-通过id查询") + @ApiOperation(value="角色表-通过id查询", notes="角色表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + TbUserRole tbUserRole = tbUserRoleService.getById(id); + if(tbUserRole==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(tbUserRole); + } + + /** + * 导出excel + * + * @param request + * @param tbUserRole + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, TbUserRole tbUserRole) { + return super.exportXls(request, tbUserRole, TbUserRole.class, "角色表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, TbUserRole.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/entity/TbUserRole.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/entity/TbUserRole.java new file mode 100644 index 0000000..1d078ec --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/entity/TbUserRole.java @@ -0,0 +1,107 @@ +package org.jeecg.modules.userRole.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 角色表 + * @Author: jeecg-boot + * @Date: 2024-10-16 + * @Version: V1.0 + */ +@Data +@TableName("tb_user_role") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="tb_user_role对象", description="角色表") +public class TbUserRole implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**用户id*/ + @Excel(name = "用户id", width = 15) + @ApiModelProperty(value = "用户id") + private java.lang.String userId; + /**角色信息 1供应商 0采购商*/ + @Excel(name = "角色信息 1供应商 0采购商", width = 15, dicCode = "user_role") + @Dict(dicCode = "user_role") + @ApiModelProperty(value = "角色信息 1供应商 0采购商") + private java.lang.Integer role; + /**用户名*/ + @Excel(name = "用户名", width = 15) + @ApiModelProperty(value = "用户名") + private java.lang.String userName; + /**公司名称*/ + @Excel(name = "公司名称", width = 15) + @ApiModelProperty(value = "公司名称") + private java.lang.String companyName; + /**税收编码*/ + @Excel(name = "税收编码", width = 15) + @ApiModelProperty(value = "税收编码") + private java.lang.String taxCode; + /**公司地址*/ + @Excel(name = "公司地址", width = 15) + @ApiModelProperty(value = "公司地址") + private java.lang.String address; + /**公司账号*/ + @Excel(name = "公司账号", width = 15) + @ApiModelProperty(value = "公司账号") + private java.lang.String bankAccount; + /**电话*/ + @Excel(name = "电话", width = 15) + @ApiModelProperty(value = "电话") + private java.lang.String phone; + /**开户行*/ + @Excel(name = "开户行", width = 15) + @ApiModelProperty(value = "开户行") + private java.lang.String bankNama; + /**营业执照上传*/ + @Excel(name = "营业执照上传", width = 15) + @ApiModelProperty(value = "营业执照上传") + private java.lang.String businessLicense; + /**基本户信息照片上传*/ + @Excel(name = "基本户信息照片上传", width = 15) + @ApiModelProperty(value = "基本户信息照片上传") + private java.lang.String basicAccount; + /**收款银行照片上传*/ + @Excel(name = "收款银行照片上传", width = 15) + @ApiModelProperty(value = "收款银行照片上传") + private java.lang.String bankInfo; + /**审核状态 0审核中 1 审核通过 2审核未通过*/ + @Excel(name = "审核状态 0审核中 1 审核通过 2审核未通过", width = 15, dicCode = "audit_status") + @Dict(dicCode = "audit_status") + @ApiModelProperty(value = "审核状态 0审核中 1 审核通过 2审核未通过") + private java.lang.Integer auditStatus; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/mapper/TbUserRoleMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/mapper/TbUserRoleMapper.java new file mode 100644 index 0000000..860e826 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/mapper/TbUserRoleMapper.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.userRole.mapper; + +import org.jeecg.modules.userRole.entity.TbUserRole; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 角色表 + * @Author: jeecg-boot + * @Date: 2024-10-16 + * @Version: V1.0 + */ +public interface TbUserRoleMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/mapper/xml/TbUserRoleMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/mapper/xml/TbUserRoleMapper.xml new file mode 100644 index 0000000..416449a --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/mapper/xml/TbUserRoleMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/ITbUserRoleService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/ITbUserRoleService.java new file mode 100644 index 0000000..79bf19f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/ITbUserRoleService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.userRole.service; + +import org.jeecg.modules.userRole.entity.TbUserRole; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 角色表 + * @Author: jeecg-boot + * @Date: 2024-10-16 + * @Version: V1.0 + */ +public interface ITbUserRoleService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/impl/TbUserRoleServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/impl/TbUserRoleServiceImpl.java new file mode 100644 index 0000000..7f69a57 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/impl/TbUserRoleServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.userRole.service.impl; + +import org.jeecg.modules.userRole.entity.TbUserRole; +import org.jeecg.modules.userRole.mapper.TbUserRoleMapper; +import org.jeecg.modules.userRole.service.ITbUserRoleService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 角色表 + * @Author: jeecg-boot + * @Date: 2024-10-16 + * @Version: V1.0 + */ +@Service +public class TbUserRoleServiceImpl extends ServiceImpl implements ITbUserRoleService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/TbUserRoleList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/TbUserRoleList.vue new file mode 100644 index 0000000..c602242 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/TbUserRoleList.vue @@ -0,0 +1,278 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleForm.vue new file mode 100644 index 0000000..343863d --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleForm.vue @@ -0,0 +1,159 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleModal.Style#Drawer.vue new file mode 100644 index 0000000..8142cb1 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleModal.vue new file mode 100644 index 0000000..9ac4966 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRole.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRole.api.ts new file mode 100644 index 0000000..37d277d --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRole.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/userRole/tbUserRole/list', + save='/userRole/tbUserRole/add', + edit='/userRole/tbUserRole/edit', + deleteOne = '/userRole/tbUserRole/delete', + deleteBatch = '/userRole/tbUserRole/deleteBatch', + importExcel = '/userRole/tbUserRole/importExcel', + exportXls = '/userRole/tbUserRole/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRole.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRole.data.ts new file mode 100644 index 0000000..540f7b4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRole.data.ts @@ -0,0 +1,184 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '角色信息 1供应商 2采购商', + align:"center", + dataIndex: 'role_dictText' + }, + { + title: '用户名', + align:"center", + dataIndex: 'userName' + }, + { + title: '公司名称', + align:"center", + dataIndex: 'companyName' + }, + { + title: '税收编码', + align:"center", + dataIndex: 'taxCode' + }, + { + title: '公司地址', + align:"center", + dataIndex: 'address' + }, + { + title: '公司账号', + align:"center", + dataIndex: 'bankAccount' + }, + { + title: '电话', + align:"center", + dataIndex: 'phone' + }, + { + title: '开户行', + align:"center", + dataIndex: 'bankNama' + }, + { + title: '营业执照上传', + align:"center", + dataIndex: 'businessLicense', + customRender:render.renderAvatar, + }, + { + title: '基本户信息照片上传', + align:"center", + dataIndex: 'basicAccount', + customRender:render.renderAvatar, + }, + { + title: '收款银行照片上传', + align:"center", + dataIndex: 'bankInfo', + customRender:render.renderAvatar, + }, + { + title: '审核状态 0审核中 1 审核通过 2审核未通过', + align:"center", + dataIndex: 'auditStatus_dictText' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "角色信息 1供应商 2采购商", + field: "role", + component: 'JDictSelectTag', + componentProps:{ + dictCode:"user_role" + }, + colProps: {span: 6}, + }, + { + label: "用户名", + field: "userName", + component: 'Input', + colProps: {span: 6}, + }, + { + label: "公司名称", + field: "companyName", + component: 'Input', + colProps: {span: 6}, + }, + { + label: "电话", + field: "phone", + component: 'Input', + colProps: {span: 6}, + }, + { + label: "审核状态 0审核中 1 审核通过 2审核未通过", + field: "auditStatus", + component: 'JDictSelectTag', + componentProps:{ + dictCode:"audit_status" + }, + colProps: {span: 6}, + }, +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '角色信息 1供应商 2采购商', + field: 'role', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"user_role" + }, + }, + { + label: '用户名', + field: 'userName', + component: 'Input', + }, + { + label: '公司名称', + field: 'companyName', + component: 'Input', + }, + { + label: '税收编码', + field: 'taxCode', + component: 'Input', + }, + { + label: '公司地址', + field: 'address', + component: 'Input', + }, + { + label: '公司账号', + field: 'bankAccount', + component: 'Input', + }, + { + label: '电话', + field: 'phone', + component: 'Input', + }, + { + label: '开户行', + field: 'bankNama', + component: 'Input', + }, + { + label: '营业执照上传', + field: 'businessLicense', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '基本户信息照片上传', + field: 'basicAccount', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '收款银行照片上传', + field: 'bankInfo', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '审核状态 0审核中 1 审核通过 2审核未通过', + field: 'auditStatus', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"audit_status" + }, + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRoleList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRoleList.vue new file mode 100644 index 0000000..9c06043 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRoleList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/components/TbUserRoleModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/components/TbUserRoleModal.vue new file mode 100644 index 0000000..3a75d48 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/components/TbUserRoleModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/webTeam/controller/WebTeamController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/webTeam/controller/WebTeamController.java index cb55167..0f672a9 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/webTeam/controller/WebTeamController.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/webTeam/controller/WebTeamController.java @@ -9,6 +9,9 @@ import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import com.alibaba.fastjson.JSONObject; +import com.xkcoding.http.HttpUtil; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.util.oConvertUtils; diff --git a/jeecg-boot-module-system/jeecg-boot-module-system.iml b/jeecg-boot-module-system/jeecg-boot-module-system.iml index 025d9df..eab29e7 100644 --- a/jeecg-boot-module-system/jeecg-boot-module-system.iml +++ b/jeecg-boot-module-system/jeecg-boot-module-system.iml @@ -14,7 +14,9 @@ - + + + diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/controller/IndexController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/controller/IndexController.java new file mode 100644 index 0000000..895d83f --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/controller/IndexController.java @@ -0,0 +1,43 @@ +package org.jeecg.modules.alUser.controller; + +import com.alibaba.fastjson.JSONObject; +import com.xkcoding.http.HttpUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.util.RedisUtil; +import org.jeecg.modules.alUser.service.UserService; +import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +/** + * @Author scott + * @since 2018-12-17 + */ +@RestController +@RequestMapping("/index") +@Api(tags = "首页等展示接口") +@Slf4j +public class IndexController { + @Autowired + private IHanHaiMemberService iHanHaiMemberService; + @Autowired + private RedisUtil redisUtil; + @Autowired + private UserService userService; + + + @ApiOperation(value = "铝价接口") + @RequestMapping(value = "/alprice", method = RequestMethod.POST) + public Result alprice() { + String s = HttpUtil.get("https://www.alphavantage.co/query?function=ALUMINUM&interval=monthly&apikey=AH6NDLVPBHJ8K7OM"); + JSONObject jsonObject = JSONObject.parseObject(s); + return Result.ok(jsonObject); + } + + +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/controller/UserLoginController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/controller/UserLoginController.java new file mode 100644 index 0000000..29c946c --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/controller/UserLoginController.java @@ -0,0 +1,130 @@ +package org.jeecg.modules.alUser.controller; + +import cn.hutool.core.util.RandomUtil; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.constant.CommonConstant; +import org.jeecg.common.util.RedisUtil; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.alUser.service.UserService; +import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; +import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; +import org.jeecg.modules.postBean.ReqUserRole; +import org.jeecg.modules.postBean.UserLoginModel; +import org.jeecg.modules.utils.SmsClient; +import org.jeecg.modules.utils.ValidateTool; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @Author scott + * @since 2018-12-17 + */ +@RestController +@RequestMapping("/alUser") +@Api(tags = "用户登陆注册") +@Slf4j +public class UserLoginController { + @Autowired + private IHanHaiMemberService iHanHaiMemberService; + @Autowired + private RedisUtil redisUtil; + @Autowired + private UserService userService; + + + @ApiOperation(value = "用户登陆") + @RequestMapping(value = "/login", method = RequestMethod.POST) + public Result login(@RequestBody UserLoginModel userLoginModel) { + if (ValidateTool.isNull(userLoginModel)) { + return Result.error("参数错误"); + } + if (ValidateTool.isNull(userLoginModel.getUsername())) { + return Result.error("请填写用户名"); + } + if (ValidateTool.isNull(userLoginModel.getPassword())) { + return Result.error("请填写密码"); + } + return userService.login(userLoginModel); + } + + + @ApiOperation(value = "用户注册") + @RequestMapping(value = "/regUesr", method = RequestMethod.POST) + public Result regUesr(@RequestBody UserLoginModel userLoginModel) { + if (ValidateTool.isNull(userLoginModel)) { + return Result.error("参数错误"); + } + if (ValidateTool.isNull(userLoginModel.getUsername())) { + return Result.error("请填写用户名"); + } + if (ValidateTool.isNull(userLoginModel.getPassword())) { + return Result.error("请填写密码"); + } + return userService.reg(userLoginModel); + } + + @ApiOperation(value = "选择身份") + @RequestMapping(value = "/role", method = RequestMethod.POST) + public Result role(@RequestBody ReqUserRole reqUserRole) { + if (ValidateTool.isNull(reqUserRole)) { + return Result.error("参数错误"); + } + if (ValidateTool.isNull(reqUserRole.getUserName())) { + return Result.error("请填写用户名"); + } + if (ValidateTool.isNull(reqUserRole.getPassword())) { + return Result.error("请填写密码"); + } + return userService.role(reqUserRole); + } + + /** + * 发送短信接口 + * + * @param + * @return + */ + + + @ApiOperation(value = "发送短信接口") + @PostMapping(value = "/sendSms") + public Result sendSms(@RequestBody UserLoginModel userLoginModel) { + Result result = new Result(); + String mobile = userLoginModel.getUsername(); + log.info(mobile); + if (oConvertUtils.isEmpty(mobile)) { + result.setMessage("手机号不允许为空!"); + result.setSuccess(false); + return result; + } + Object object = redisUtil.get(CommonConstant.PHONE_CODE + mobile); + if (object != null) { + result.setMessage("验证码3分钟内,仍然有效!"); + result.setSuccess(false); + return result; + } + //随机数 + String captcha = RandomUtil.randomNumbers(6); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(HanHaiMember::getAccount, mobile); + HanHaiMember one = iHanHaiMemberService.getOne(queryWrapper); + if (ValidateTool.isNull(one)) { + result.error500("请先注册账号"); + return result; + } + + String send = SmsClient.send(mobile, captcha); + log.info("短信发送结果{}", send); + //验证码三分钟过期 + redisUtil.set(CommonConstant.PHONE_CODE + mobile, captcha, 180); + //todo 刷短信接口限制 + return Result.ok(); + } + + +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/service/UserService.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/service/UserService.java new file mode 100644 index 0000000..18389ef --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/service/UserService.java @@ -0,0 +1,25 @@ +package org.jeecg.modules.alUser.service; + +import com.alibaba.fastjson.JSONObject; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.postBean.ReqUserRole; +import org.jeecg.modules.postBean.UserLoginModel; +import org.springframework.web.bind.annotation.RequestBody; + + +public interface UserService { + + //获取首页基础信息 + Result getIndexInfo(); + + + Result login(UserLoginModel userLoginModel); + + Result reg(UserLoginModel userLoginModel); + + + Result role(ReqUserRole reqUserRole); + + + +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/service/impl/UserServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/service/impl/UserServiceImpl.java new file mode 100644 index 0000000..0ce01f1 --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/service/impl/UserServiceImpl.java @@ -0,0 +1,204 @@ +package org.jeecg.modules.alUser.service.impl; + + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.constant.CommonConstant; +import org.jeecg.common.system.util.JwtUtil; +import org.jeecg.common.util.PasswordUtil; +import org.jeecg.common.util.RedisUtil; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.alUser.service.UserService; +import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; +import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; +import org.jeecg.modules.postBean.ReqUserRole; +import org.jeecg.modules.postBean.UserLoginModel; +import org.jeecg.modules.userRole.entity.TbUserRole; +import org.jeecg.modules.userRole.service.ITbUserRoleService; +import org.jeecg.modules.utils.ValidateTool; +import org.jeecg.modules.webBanner.entity.WebBanner; +import org.jeecg.modules.webBanner.service.IWebBannerService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +@Service +public class UserServiceImpl implements UserService { + + @Resource + private IWebBannerService webBannerService; + @Autowired + private IHanHaiMemberService iHanHaiMemberService; + @Autowired + private RedisUtil redisUtil; + @Resource + private ITbUserRoleService tbUserRoleService; + + @Transactional(rollbackFor = Exception.class) + @Override + public Result login(UserLoginModel userLoginModel) { + + + Result result = new Result(); + String username = userLoginModel.getUsername(); + String password = userLoginModel.getPassword(); + //1. 校验用户是否有效 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(HanHaiMember::getAccount, username); + HanHaiMember one = iHanHaiMemberService.getOne(queryWrapper); + if (ValidateTool.isNull(one)) { + result.error500("用户不存在"); + } + if (userLoginModel.getLoginModel() == 0) { +// 账号密码登陆 + //2. 校验用户名或密码是否正确 + String userpassword = PasswordUtil.encrypt(username, password, one.getPasswordSalt()); + String syspassword = one.getPassword(); + if (!syspassword.equals(userpassword)) { + result.error500("用户名或密码错误"); + return result; + } + + } else { + if (ValidateTool.isNull(userLoginModel.getCaptcha())) { + return Result.error("请填写验证码"); + } + String smscode = userLoginModel.getCaptcha(); + //手机验证码登陆 + Object code = redisUtil.get(CommonConstant.PHONE_CODE + username); + if (ValidateTool.isNull(code)) { + result.error500("手机验证码错误"); + } + if (!smscode.equals(code)) { + result.setMessage("手机验证码错误"); + return result; + } + redisUtil.del(CommonConstant.PHONE_CODE + username); + } + //用户登录信息 + // 生成token + String token = JwtUtil.sign(username, one.getPassword()); + //不返回关键信息 + one.setPasswordSalt(null); + one.setPassword(null); + // 设置token缓存有效时间 + redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME * 2 / 1000); + JSONObject obj = new JSONObject(); + obj.put("token", token); + obj.put("userInfo", one); + result.setResult(obj); + result.success("登录成功"); + return result; + } + + + + @Transactional(rollbackFor = Exception.class) + @Override + public Result reg(UserLoginModel userLoginModel) { + Result result = new Result(); + + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(HanHaiMember::getAccount, userLoginModel.getUsername()); + HanHaiMember user = iHanHaiMemberService.getOne(queryWrapper); + if (ValidateTool.isNotNull(user)) { + return result.error500("用户已注册"); + } + HanHaiMember newUser = new HanHaiMember(); + newUser.setAccount(userLoginModel.getUsername()); + newUser.setPhone(userLoginModel.getUsername()); + String salt = oConvertUtils.randomGen(8); + newUser.setPasswordSalt(salt); + String passwordEncode = PasswordUtil.encrypt(newUser.getAccount(), userLoginModel.getPassword(), salt); + newUser.setPassword(passwordEncode); + iHanHaiMemberService.save(newUser); + //用户登录信息 + // 生成token + String token = JwtUtil.sign(userLoginModel.getUsername(), passwordEncode); + // 设置token缓存有效时间 + redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME * 2 / 1000); + JSONObject obj = new JSONObject(); + obj.put("token", token); + obj.put("userInfo", newUser); + result.setResult(obj); + return result; + } + + @Transactional(rollbackFor = Exception.class) + @Override + public Result role(ReqUserRole reqUserRole) { + Result result = new Result(); + + //1. 校验用户是否有效 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(HanHaiMember::getAccount, reqUserRole.getUserName()); + HanHaiMember one = iHanHaiMemberService.getOne(queryWrapper); + if (ValidateTool.isNull(one)) { + result.error500("用户不存在"); + } + //2. 校验用户名或密码是否正确 + String userpassword = PasswordUtil.encrypt(reqUserRole.getUserName(), reqUserRole.getPassword(), one.getPasswordSalt()); + String syspassword = one.getPassword(); + if (!syspassword.equals(userpassword)) { + result.error500("用户名或密码错误"); + return result; + } + LambdaQueryWrapper objectLambdaQueryWrapper = new LambdaQueryWrapper<>(); + objectLambdaQueryWrapper.eq(TbUserRole::getUserName,reqUserRole.getUserName()). + eq(TbUserRole::getRole,reqUserRole.getRole()).in(TbUserRole::getAuditStatus,1,0); + TbUserRole one1 = tbUserRoleService.getOne(objectLambdaQueryWrapper); + + if (ValidateTool.isNotNull(one1) && one1.getAuditStatus()==0){ + result.error500("已提交审核,请耐心等候或联系管理员"); + } + if (ValidateTool.isNotNull(one1) && one1.getAuditStatus()==0){ + result.error500("已提交审核,请勿重复提交"); + } + TbUserRole tbUserRole = new TbUserRole(); + BeanUtils.copyProperties(reqUserRole, tbUserRole); + tbUserRole.setUserId(one1.getUserId()).getId(); + tbUserRole.setAuditStatus(0); + tbUserRoleService.save(tbUserRole); + return result; + } + + //获取首页基础信息 + @Override + public Result getIndexInfo(){ + Map map=new HashMap<>(); + map.put("title","高端网站定制"); + + List list=new ArrayList(); + list.add("企业官网"); + list.add("电商官网"); + list.add("H5官网"); + list.add("小程序"); + map.put("list",list); + map.put("details","网站定制介绍"); + //获取banner + List bannerList = webBannerService.list(); + map.put("bannerList",bannerList); + + return Result.OK(map); + } + + + + + + + + + +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java index a2b710b..3739c3d 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java @@ -113,7 +113,7 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { public Result getIndexHeaderInfo(){ Map map=new HashMap<>(); map.put("headImage","https://dianpin-img.xzaiyp.top/upload/bg_1728634973432.png"); - map.put("name","瑶都万能墙"); + map.put("name","铝材交易"); map.put("userNum","16888"); map.put("num","1888"); return Result.OK(map); diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiController.java index 5914e44..04a650a 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiController.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiController.java @@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; -@Api(tags="瑶都万能墙接口 - 不需要token") +@Api(tags="铝材交易接口 - 不需要token") @RestController @RequestMapping("/city") @Slf4j diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java index 59df22f..592aed2 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java @@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; -@Api(tags="瑶都万能墙接口 - 带token") +@Api(tags="铝材交易接口 - 带token") @RestController @RequestMapping("/token") @Slf4j diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/ReqUserRole.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/ReqUserRole.java new file mode 100644 index 0000000..b82e861 --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/ReqUserRole.java @@ -0,0 +1,83 @@ +package org.jeecg.modules.postBean; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 角色表 + * @Author: jeecg-boot + * @Date: 2024-10-16 + * @Version: V1.0 + */ +@Data +@ApiModel(value="选择身份对象", description="选择身份对象") +public class ReqUserRole implements Serializable { + private static final long serialVersionUID = 1L; + + + + /**角色信息 1供应商 0采购商*/ + @Excel(name = "角色信息 1供应商 0采购商", width = 15, dicCode = "user_role") + @Dict(dicCode = "user_role") + @ApiModelProperty(value = "角色信息 1供应商 0采购商") + private Integer role; + /**用户名*/ + @Excel(name = "用户名", width = 15) + @ApiModelProperty(value = "用户名") + private String userName; + @ApiModelProperty(value = "密码") + private String password; + /**公司名称*/ + @Excel(name = "公司名称", width = 15) + @ApiModelProperty(value = "公司名称") + private String companyName; + /**税收编码*/ + @Excel(name = "税收编码", width = 15) + @ApiModelProperty(value = "税收编码") + private String taxCode; + /**公司地址*/ + @Excel(name = "公司地址", width = 15) + @ApiModelProperty(value = "公司地址") + private String address; + /**公司账号*/ + @Excel(name = "公司账号", width = 15) + @ApiModelProperty(value = "公司账号") + private String bankAccount; + /**电话*/ + @Excel(name = "电话", width = 15) + @ApiModelProperty(value = "电话") + private String phone; + /**开户行*/ + @Excel(name = "开户行", width = 15) + @ApiModelProperty(value = "开户行") + private String bankNama; + /**营业执照上传*/ + @Excel(name = "营业执照上传", width = 15) + @ApiModelProperty(value = "营业执照上传") + private String businessLicense; + /**基本户信息照片上传*/ + @Excel(name = "基本户信息照片上传", width = 15) + @ApiModelProperty(value = "基本户信息照片上传") + private String basicAccount; + /**收款银行照片上传*/ + @Excel(name = "收款银行照片上传", width = 15) + @ApiModelProperty(value = "收款银行照片上传") + private String bankInfo; + /**审核状态 0审核中 1 审核通过 2审核未通过*/ + @Excel(name = "审核状态 0审核中 1 审核通过 2审核未通过", width = 15, dicCode = "audit_status") + @Dict(dicCode = "audit_status") + @ApiModelProperty(value = "审核状态 0审核中 1 审核通过 2审核未通过") + private Integer auditStatus; + +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/UserLoginModel.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/UserLoginModel.java new file mode 100644 index 0000000..cec3b69 --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/UserLoginModel.java @@ -0,0 +1,29 @@ +package org.jeecg.modules.postBean; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 登录表单 + * + * @Author scott + * @since 2019-01-18 + */ +@Data +@ApiModel(value="登录对象", description="登录对象") +public class UserLoginModel { + @ApiModelProperty(value = "账号") + private String username; + @ApiModelProperty(value = "密码") + private String password; + @ApiModelProperty(value = "验证码") + private String captcha; + + @ApiModelProperty(value = "登陆模式 0账号密码登陆 1验证码登陆") + private Integer loginModel; + + + + +} \ No newline at end of file diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/HttpUtil.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/HttpUtil.java new file mode 100644 index 0000000..01e6b5e --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/HttpUtil.java @@ -0,0 +1,140 @@ +package org.jeecg.modules.utils; + +import com.alibaba.fastjson.JSONObject; +import org.apache.http.Consts; +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class HttpUtil { + private static final CloseableHttpClient httpclient = HttpClients.createDefault(); + + /** + * 发送HttpGet请求 + * @param url + * @return + */ + public static String sendGet(String url) { + + HttpGet httpget = new HttpGet(url); + CloseableHttpResponse response = null; + try { + response = httpclient.execute(httpget); + } catch (IOException e1) { + e1.printStackTrace(); + } + String result = null; + try { + HttpEntity entity = response.getEntity(); + if (entity != null) { + result = EntityUtils.toString(entity); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return result; + } + + /** + * 发送HttpPost请求,参数为map + * @param url + * @param map + * @return + */ + public static String sendPost(String url, Map map) { + List formparams = new ArrayList(); + for (Map.Entry entry : map.entrySet()) { + formparams.add(new BasicNameValuePair(entry.getKey(), entry.getValue())); + } + UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formparams, Consts.UTF_8); + HttpPost httppost = new HttpPost(url); + httppost.setEntity(entity); + CloseableHttpResponse response = null; + try { + response = httpclient.execute(httppost); + } catch (IOException e) { + e.printStackTrace(); + } + HttpEntity entity1 = response.getEntity(); + String result = null; + try { + result = EntityUtils.toString(entity1); + } catch (Exception e) { + e.printStackTrace(); + } + return result; + } + + /** + * 发送不带参数的HttpPost请求 + * @param url + * @return + */ + public static String sendPost(String url) { + HttpPost httppost = new HttpPost(url); + CloseableHttpResponse response = null; + try { + response = httpclient.execute(httppost); + } catch (IOException e) { + e.printStackTrace(); + } + HttpEntity entity = response.getEntity(); + String result = null; + try { + result = EntityUtils.toString(entity); + } catch (Exception e) { + e.printStackTrace(); + } + return result; + } + + public static String doPost2(String url, JSONObject param) { + System.out.println("请求地址"+url); + HttpPost httpPost = null; + String result = null; + try { + HttpClient client = new DefaultHttpClient(); + httpPost = new HttpPost(url); + if (param != null) { + StringEntity se = new StringEntity(param.toString(), "utf-8"); + httpPost.setEntity(se); // post方法中,加入json数据 + httpPost.setHeader("Content-Type", "application/json"); + httpPost.setHeader("Authorization", param.getString("authorization")); + } + + HttpResponse response = client.execute(httpPost); + if (response != null) { + HttpEntity resEntity = response.getEntity(); + if (resEntity != null) { + result = EntityUtils.toString(resEntity, "utf-8"); + } + } + + } catch (Exception ex) { + ex.printStackTrace(); + } + return result; + } +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/SmsClient.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/SmsClient.java index d009c41..e789ab4 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/SmsClient.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/SmsClient.java @@ -23,7 +23,6 @@ public class SmsClient { String response = client.sendSms("tairoudj", Arrays.asList( new Message(phone, "【泰柔到家】您的验证码为:"+code) ), System.currentTimeMillis(), "evXRctaIoX22"); - System.out.println(response); return response; } diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/ValidateTool.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/ValidateTool.java new file mode 100644 index 0000000..4a3c192 --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/utils/ValidateTool.java @@ -0,0 +1,381 @@ +package org.jeecg.modules.utils; + +import org.jeecg.common.exception.JeecgBootException; + +import java.text.MessageFormat; +import java.util.Collection; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + + +public class ValidateTool { + + + + public static boolean isEmpty(Collection coll) { + return coll == null || coll.isEmpty(); + } + + public static boolean isEmpty(CharSequence cs) { + return cs == null || cs.length() == 0; + } + + public static boolean isNotEmpty(Collection coll) { + return !isEmpty(coll); + } + + public static boolean isNotEmpty(CharSequence cs) { + return !isEmpty(cs); + } + + /** + * 是否为空白字符串 字符串仅为空格、回车、换行、制表符、空字符串...时 返回false + * @param cs + * @return + */ + public static boolean isBlank(CharSequence cs) { + int strLen = length(cs); + if (strLen == 0) { + return true; + } else { + for(int i = 0; i < strLen; ++i) { + if (!Character.isWhitespace(cs.charAt(i))) { + return false; + } + } + + return true; + } + } + + public static boolean isNotBlank(CharSequence cs) { + return !isBlank(cs); + } + + public static int length(CharSequence cs) { + return cs == null ? 0 : cs.length(); + } + + /** + * 验证参数是否为空 + * + * @param obj + * @return 不为�?:true,为空false + * @throws + */ + public static boolean checkIsNull(Object obj) { + if (obj == null) { + return false; + } + if (obj instanceof String) { + if (((String) obj).trim().equals("")) { + return false; + } + } + return true; + } + + public static boolean isNull(Object obj) { + if (obj == null) { + return true; + } + if (obj instanceof String) { + if (((String) obj).trim().equals("")) { + return true; + } + } + return false; + } + + + public static boolean isNotNull(Object obj) { + if (obj == null) { + return false; + } + if (obj instanceof String) { + if (((String) obj).trim().equals("")) { + return false; + } + } + return true; + } + + + + + + +// String regName = "^[A-Za-z0-9]{6,40}$"; +// if (!userCustomerModel.getUsername().matches(regName)) { +// throw new JeecgBootException(MessageUtil.getMessage("COMMON_CHEECKNAME_ERROR_CODE"), MessageUtil.getMessage("COMMON_CHEECKNAME_ERROR")); +// } + + public static boolean checkIsWX(String str){ + //微信号码 +// 微信号规则:微信账号仅支持6-20个字母、数字、下划线或减号,以字母开头。解释一下,只要是字母开头,可以是纯字母(hjqzHJQZhongjiqiezi),或字母数字混合 + String pattern = "^[a-zA-Z]{1}[-_a-zA-Z0-9]{5,19}+$"; + boolean isMatch = Pattern.matches(pattern, str); + if (isMatch==false) { + throw new JeecgBootException("微信号不合法"); + } + return true; + }; + + public static boolean checkIsQQ(String str){ + //数字范围5-14个之间 + String pattern = "[1-9][0-9]{4,14}"; + boolean isMatch = Pattern.matches(pattern, str); + if (isMatch==false) { + throw new JeecgBootException("QQ号不合法"); + } + return true; + } + +// +//^[a-zA-Z][a-zA-Z0-9_]{4,15}$ + public static boolean checkIsName(String str){ + Pattern p = Pattern.compile("[\\u4e00-\\u9fa5]"); + Matcher m = p.matcher(str); + if (m.matches()) { + return true; + } else { + throw new JeecgBootException("用户名不合法"); + } + } + /** + * 验证参数长度 + * + * @param code 参数名称 + * @param obj + * @param begin + * @param end + * @return boolean + * @throws + */ + public static boolean checkParamLength(String code, Object obj, int begin, int end) { + if (!checkIsNull(obj)) { + throw new JeecgBootException(format("{0}不能为空,请确认", code)); + } + if (obj instanceof String) { + if (!checkLength((String) obj, begin, end)) { + throw new JeecgBootException(format("验证码错误", code)); + } + } + return true; + } + + /** + * @description 验证参数是否为空以及参数长度是否符合要求 + * @param code, obj, begin, end + * @return boolean + * @date 2019/6/24/024 + */ + public static boolean checkParam(String code, Object obj, int begin, int end) { + if (!checkIsNull(obj)) { + throw new JeecgBootException(format("{0}不能为空,请确认", code)); + } + if (obj instanceof String) { + if (!checkLength((String) obj, begin, end)) { + throw new JeecgBootException(format("{0}长度不符合格式", code)); + } + } + + return true; + } + + public static String format(String message, Object... arg) { + MessageFormat formatter = new MessageFormat(message); + String output = formatter.format(arg); + return output; + } + + public static int totalLength(String content) { + String regex = "[\u4e00-\u9fa5]"; + int length = content.length(); + int chineseLength = content.length() - content.replaceAll(regex, "").length(); + return length+chineseLength; + } + + + /** + * @description 判断字符串是不是汉字 + * @param: con + * @param: ignore 是否忽略 · 这个符号 + * @return boolean + * @date 2019/9/20/020 + */ + public static boolean isChinese(String con,boolean ignore) { + + for (int i = 0; i < con.length(); i = i + 1) { + if (ignore){ + if (!Pattern.compile("[\u4e00-\u9fa5]").matcher( + String.valueOf(con.charAt(i))).find() && !"·".equals(String.valueOf(con.charAt(i)))) { + return false; + } + }else { + if (!Pattern.compile("[\u4e00-\u9fa5]").matcher( + String.valueOf(con.charAt(i))).find()) { + return false; + } + } + + } + + return true; + } + + /** + * @description 判断是不是中文或英文字母 + * @param: con + * @return boolean + * @date 2019/9/20/020 + */ + public static boolean conValidate(String con) { + if (null != con && !"".equals(con)) { + if ((isChinese(con,true) || con.matches("^[A-Za-z]+$"))) { + return true; + } + } + return false; + } + + + + /** + * 验证参数长度 + * + * @param code 参数名称 + * @param obj + * @return boolean + * @throws + */ + public static boolean checkParamIsNull(String code, Object obj) { + if (!checkIsNull(obj)) { + throw new JeecgBootException(format("{0}不能为空,请确认", code)); + } + return true; + } + + + + public static boolean checkLength(String str, int begin, int end) { + if (str == null) { + return false; + } + if (str.length() <= end && str.length() >= begin) { + return true; + } + return false; + } + + /** + * 验证是否为手机号�? + * + * @throws JeecgBootException + */ + public static boolean checkParamIsMobile(String mobile) { + if (mobile == null || mobile == "") { + throw new JeecgBootException( "请填写手机号"); + } + if (!isMobileNO(mobile)) { + throw new JeecgBootException( "手机号错误"); + } + return true; + } + + //验证手机号码格式 + public static boolean isMobileNO(String mobiles) { +// if (mobiles == null ) { +// return false; +// } +// else { +// return true; +// } + if (!checkIsNull(mobiles)) { + return false; + } + String pattern = "(0|86)?(13[0-9]|14[0-9]|15[0-9]|16[012345689]|17[2-9]|18[0-9]|19[0-9])[0-9]{8}"; + //手机号码 + Pattern p = Pattern.compile(pattern); + Matcher m = p.matcher(mobiles); + if (m.matches()) { + return true; + } else { + return false; + } + } + + + /** + * 验证输入的邮箱格式是否符合 + * + * @param email + * @return 是否合法 + */ + public static boolean emailFormat(String email) { + boolean tag = true; + final String pattern1 = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; + final Pattern pattern = Pattern.compile(pattern1); + final Matcher mat = pattern.matcher(email); + if (!mat.find()) { + tag = false; + } + return tag; + } + + + public static boolean isNum(String code, String value) { + if (value == null) { + throw new JeecgBootException(format("{0}不能为空,请确认", code)); + } + String pattern = "^[0-9]+$"; + Pattern p = Pattern.compile(pattern); + Matcher m = p.matcher(value); + if (!m.matches()) { + throw new JeecgBootException(format("{0}数据不符合格式", code)); + } + return true; + } + + public static boolean isBankCard(String value) { + if (isNull(value)) { + throw new JeecgBootException("银行卡号不能为空,请确认"); + } + String pattern = "^[0-9]+$"; + Pattern p = Pattern.compile(pattern); + Matcher m = p.matcher(value); + if (!m.matches()) { + throw new JeecgBootException("银行卡号格式错误"); + } + if (value.length()<16 || value.length()>19) { + throw new JeecgBootException("银行卡号格式错误"); + } + return true; + } + + + public static boolean isDecimalValid(String code, String str, int start, int end) { + checkParamIsNull(code, str); + int s = 0; + try { + s = Integer.parseInt(str); + } catch (Exception e) { + throw new JeecgBootException(format("{0}数据不符合格式", code)); + } + + if (end == start) { + if (end == s) { + return true; + } else { + throw new JeecgBootException(format("{0}数据不符合格式", code)); + } + } else { + if (s <= end && s >= start) { + return true; + } + } + throw new JeecgBootException(format("{0}数据不符合格式", code)); + } + + +} diff --git a/jeecg-boot-module-system/src/main/resources/application-dev.yml b/jeecg-boot-module-system/src/main/resources/application-dev.yml index 9332ae7..20e7637 100644 --- a/jeecg-boot-module-system/src/main/resources/application-dev.yml +++ b/jeecg-boot-module-system/src/main/resources/application-dev.yml @@ -12,6 +12,10 @@ server: enabled: true min-response-size: 1024 mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/* +# 清除npm缓存 +# npm cache clean --force +# 取消ssl验证: +# npm config set strict-ssl false management: endpoints: