1. prod
This commit is contained in:
2026-02-05 17:05:39 +08:00
parent 909de11633
commit 8cf6ff1b2e
17 changed files with 678 additions and 85 deletions

View File

@@ -1,4 +1,4 @@
package org.springblade.modules.app.controller;
package org.springblade.modules.api.app;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.v3.oas.annotations.Hidden;

View File

@@ -1,4 +1,4 @@
package org.springblade.modules.app.controller;
package org.springblade.modules.api.app;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.tags.Tag;

View File

@@ -1,13 +1,11 @@
package org.springblade.modules.app.controller;
package org.springblade.modules.api.app;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.modules.develop.pojo.entity.Code;
import org.springblade.modules.system.service.IUserService;
import org.springframework.web.bind.annotation.*;

View File

@@ -0,0 +1,134 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.market.controller;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import jakarta.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.market.pojo.entity.MarketInfoEntity;
import org.springblade.modules.market.pojo.vo.MarketInfoVO;
import org.springblade.modules.market.wrapper.MarketInfoWrapper;
import org.springblade.modules.market.service.IMarketInfoService;
import org.springblade.core.boot.ctrl.BladeController;
import java.util.Map;
/**
* 用户拓展信息表 控制器
*
* @author RayLiu
* @since 2026-02-05
*/
@RestController
@AllArgsConstructor
@RequestMapping("/marcket")
@Tag(name = "用户拓展信息表", description = "用户拓展信息表接口")
public class MarketInfoController extends BladeController {
private final IMarketInfoService marketInfoService;
/**
* 用户拓展信息表 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@Operation(summary = "详情", description = "传入marketInfo")
public R<MarketInfoVO> detail(MarketInfoEntity marketInfo) {
MarketInfoEntity detail = marketInfoService.getOne(Condition.getQueryWrapper(marketInfo));
return R.data(MarketInfoWrapper.build().entityVO(detail));
}
/**
* 用户拓展信息表 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@Operation(summary = "分页", description = "传入marketInfo")
public R<IPage<MarketInfoVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> marketInfo, Query query) {
IPage<MarketInfoEntity> pages = marketInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(marketInfo, MarketInfoEntity.class));
return R.data(MarketInfoWrapper.build().pageVO(pages));
}
/**
* 用户拓展信息表 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@Operation(summary = "分页", description = "传入marketInfo")
public R<IPage<MarketInfoVO>> page(MarketInfoVO marketInfo, Query query) {
IPage<MarketInfoVO> pages = marketInfoService.selectMarketInfoPage(Condition.getPage(query), marketInfo);
return R.data(pages);
}
/**
* 用户拓展信息表 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入marketInfo")
public R save(@Valid @RequestBody MarketInfoEntity marketInfo) {
return R.status(marketInfoService.save(marketInfo));
}
/**
* 用户拓展信息表 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@Operation(summary = "修改", description = "传入marketInfo")
public R update(@Valid @RequestBody MarketInfoEntity marketInfo) {
return R.status(marketInfoService.updateById(marketInfo));
}
/**
* 用户拓展信息表 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@Operation(summary = "新增或修改", description = "传入marketInfo")
public R submit(@Valid @RequestBody MarketInfoEntity marketInfo) {
return R.status(marketInfoService.saveOrUpdate(marketInfo));
}
/**
* 用户拓展信息表 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@Operation(summary = "逻辑删除", description = "传入ids")
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(marketInfoService.deleteLogic(Func.toLongList(ids)));
}
}

View File

@@ -0,0 +1,51 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.market.mapper;
import org.springblade.modules.market.pojo.entity.MarketInfoEntity;
import org.springblade.modules.market.pojo.vo.MarketInfoVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
* 用户拓展信息表 Mapper 接口
*
* @author RayLiu
* @since 2026-02-05
*/
public interface MarketInfoMapper extends BaseMapper<MarketInfoEntity> {
/**
* 自定义分页
*
* @param page 分页参数
* @param marketInfo 查询参数
* @return List<MarketInfoVO>
*/
List<MarketInfoVO> selectMarketInfoPage(IPage page, MarketInfoVO marketInfo);
}

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.market.mapper.MarketInfoMapper">
<!-- 通用查询映射结果 -->
<resultMap id="marketInfoResultMap" type="org.springblade.modules.market.pojo.entity.MarketInfoEntity">
<result column="id" property="id"/>
<result column="pid" property="pid"/>
<result column="has_synchronized" property="hasSynchronized"/>
<result column="vendor" property="vendor"/>
<result column="e_signed" property="eSigned"/>
<result column="e_signed_url" property="eSignedUrl"/>
<result column="verified" property="verified"/>
<result column="verified_date" property="verifiedDate"/>
<result column="real_name" property="realName"/>
<result column="id_card" property="idCard"/>
<result column="create_user" property="createUser"/>
<result column="create_dept" property="createDept"/>
<result column="create_time" property="createTime"/>
<result column="update_user" property="updateUser"/>
<result column="update_time" property="updateTime"/>
<result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/>
</resultMap>
<select id="selectMarketInfoPage" resultMap="marketInfoResultMap">
select * from user_market_info where is_deleted = 0
</select>
</mapper>

View File

@@ -0,0 +1,45 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.market.pojo.dto;
import org.springblade.modules.market.pojo.entity.MarketInfoEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* 用户拓展信息表 数据传输对象实体类
*
* @author RayLiu
* @since 2026-02-05
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class MarketInfoDTO extends MarketInfoEntity {
@Serial
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,97 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.market.pojo.entity;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import java.io.Serial;
/**
* 用户拓展信息表 实体类
*
* @author RayLiu
* @since 2026-02-05
*/
@Data
@TableName("user_market_info")
@Schema(description = "MarketInfo对象")
@EqualsAndHashCode(callSuper = true)
public class MarketInfoEntity extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L;
/**
* 邀请人
*/
@Schema(description = "邀请人")
private Long pid;
/**
* 是否同步族谱 0-否 1-是
*/
@Schema(description = "是否同步族谱 0-否 1-是")
private Integer has_synchronized;
/**
* 是否成为服务商 0-否 1-是
*/
@Schema(description = "是否成为服务商 0-否 1-是")
private Integer vendor;
/**
* 是否签署法大大协议 0-否 1-是
*/
@Schema(description = "是否签署法大大协议 0-否 1-是")
private Integer eSigned;
/**
* 电子合同地址
*/
@Schema(description = "电子合同地址")
private String eSignedUrl;
/**
* 是否实名用户 0-否 1-是
*/
@Schema(description = "是否实名用户 0-否 1-是")
private Integer verified;
/**
* 实名时间
*/
@Schema(description = "实名时间")
private Date verifiedDate;
/**
* 实名姓名
*/
@Schema(description = "实名姓名")
private String realName;
/**
* 实名身份证
*/
@Schema(description = "实名身份证")
private String idCard;
}

View File

@@ -0,0 +1,45 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.market.pojo.vo;
import org.springblade.modules.market.pojo.entity.MarketInfoEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* 用户拓展信息表 视图实体类
*
* @author RayLiu
* @since 2026-02-05
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class MarketInfoVO extends MarketInfoEntity {
@Serial
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,49 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.market.service;
import org.springblade.modules.market.pojo.entity.MarketInfoEntity;
import org.springblade.modules.market.pojo.vo.MarketInfoVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
/**
* 用户拓展信息表 服务类
*
* @author RayLiu
* @since 2026-02-05
*/
public interface IMarketInfoService extends BaseService<MarketInfoEntity> {
/**
* 自定义分页
*
* @param page 分页参数
* @param marketInfo 查询参数
* @return IPage<MarketInfoVO>
*/
IPage<MarketInfoVO> selectMarketInfoPage(IPage<MarketInfoVO> page, MarketInfoVO marketInfo);
}

View File

@@ -0,0 +1,50 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.market.service.impl;
import org.springblade.modules.market.pojo.entity.MarketInfoEntity;
import org.springblade.modules.market.pojo.vo.MarketInfoVO;
import org.springblade.modules.market.mapper.MarketInfoMapper;
import org.springblade.modules.market.service.IMarketInfoService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
/**
* 用户拓展信息表 服务实现类
*
* @author RayLiu
* @since 2026-02-05
*/
@Service
public class MarketInfoServiceImpl extends BaseServiceImpl<MarketInfoMapper, MarketInfoEntity> implements IMarketInfoService {
@Override
public IPage<MarketInfoVO> selectMarketInfoPage(IPage<MarketInfoVO> page, MarketInfoVO marketInfo) {
return page.setRecords(baseMapper.selectMarketInfoPage(page, marketInfo));
}
}

View File

@@ -0,0 +1,59 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.market.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.market.pojo.entity.MarketInfoEntity;
import org.springblade.modules.market.pojo.vo.MarketInfoVO;
import java.util.Objects;
/**
* 用户拓展信息表 包装类,返回视图层所需的字段
*
* @author RayLiu
* @since 2026-02-05
*/
public class MarketInfoWrapper extends BaseEntityWrapper<MarketInfoEntity, MarketInfoVO> {
public static MarketInfoWrapper build() {
return new MarketInfoWrapper();
}
@Override
public MarketInfoVO entityVO(MarketInfoEntity marketInfo) {
MarketInfoVO marketInfoVO = Objects.requireNonNull(BeanUtil.copyProperties(marketInfo, MarketInfoVO.class));
//User createUser = UserCache.getUser(marketInfo.getCreateUser());
//User updateUser = UserCache.getUser(marketInfo.getUpdateUser());
//marketInfoVO.setCreateUserName(createUser.getName());
//marketInfoVO.setUpdateUserName(updateUser.getName());
return marketInfoVO;
}
}

View File

@@ -232,7 +232,7 @@ public interface IUserService extends BaseService<User> {
*/
boolean registerUser(User user);
boolean registerAppUser(User user);
boolean registerAppUser(User user,User invitor);
/**
* 配置用户平台
*

View File

@@ -451,7 +451,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
@Override
@Transactional(rollbackFor = Exception.class)
public boolean registerAppUser(User user) {
public boolean registerAppUser(User user, User invitor) {
Tenant tenant = SysCache.getTenant(user.getTenantId());
if (tenant == null || tenant.getId() == null) {
throw new OAuth2Exception("租户信息错误!");