Compare commits
No commits in common. "1c9287d2daea7c71298efda412c4fb728a287a24" and "bc1ff1422e7659dd7906d1f809058017c4dd6d5c" have entirely different histories.
1c9287d2da
...
bc1ff1422e
|
@ -202,7 +202,7 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
|
||||||
Assert.notNull(loginUser, "登录失效,请重新登录!");
|
Assert.notNull(loginUser, "登录失效,请重新登录!");
|
||||||
List<RechargeOrderDO> orderDOS = rechargeOrderMapper.selectList(Wrappers.<RechargeOrderDO>lambdaQuery()
|
List<RechargeOrderDO> orderDOS = rechargeOrderMapper.selectList(Wrappers.<RechargeOrderDO>lambdaQuery()
|
||||||
.eq(RechargeOrderDO::getUid, loginUser.getId())
|
.eq(RechargeOrderDO::getUid, loginUser.getId())
|
||||||
.ne(RechargeOrderDO::getPaid, 1)
|
.ne(RechargeOrderDO::getPaid, 0)
|
||||||
.orderByDesc(RechargeOrderDO::getCreateTime));
|
.orderByDesc(RechargeOrderDO::getCreateTime));
|
||||||
if (!CollectionUtils.isEmpty(orderDOS)) {
|
if (!CollectionUtils.isEmpty(orderDOS)) {
|
||||||
List<RechargeOrderRespVO> rechargeOrderRespVOS = RechargeOrderConvert.INSTANCE.convertList(orderDOS);
|
List<RechargeOrderRespVO> rechargeOrderRespVOS = RechargeOrderConvert.INSTANCE.convertList(orderDOS);
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
package cn.iocoder.yudao.module.member.controller.admin.promoter.vo;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
|
||||||
import cn.iocoder.yudao.framework.common.validation.Mobile;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Title:AppPromoterCreateReqVO
|
|
||||||
* @Description: app扫码创建推广员
|
|
||||||
* @author: tangqian
|
|
||||||
* @date: 2023/6/5 14:21
|
|
||||||
* @version: V1.0.0
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class AppPromoterCreateReqVO implements Serializable {
|
|
||||||
@Schema(description = "推广员名称", required = true, example = "5841")
|
|
||||||
@NotEmpty(message = "推广员名称不能为空")
|
|
||||||
@Size(max = 10,message = "推广员名称最长不能超过{max}")
|
|
||||||
private String nickname;
|
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "推广员手机号", example = "15601691300")
|
|
||||||
@Mobile
|
|
||||||
@NotEmpty(message = "推广员手机号不能为空")
|
|
||||||
private String mobile;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 帐号状态
|
|
||||||
* <p>
|
|
||||||
* 枚举 {@link CommonStatusEnum}
|
|
||||||
*/
|
|
||||||
@Schema(description = "帐号状态")
|
|
||||||
@NotNull
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
@Schema(description = "注册来源,通过字典获取:source_type")
|
|
||||||
@NotEmpty(message = "注册来源不能为空")
|
|
||||||
private String sourceType;
|
|
||||||
}
|
|
|
@ -37,8 +37,5 @@ public class PromoterBaseVO {
|
||||||
@Schema(description = "帐号状态")
|
@Schema(description = "帐号状态")
|
||||||
@NotNull
|
@NotNull
|
||||||
private Integer status;
|
private Integer status;
|
||||||
@Schema(description = "注册来源,通过字典获取:source_type")
|
|
||||||
@NotEmpty(message = "注册来源不能为空")
|
|
||||||
private String sourceType;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,4 @@ public class PromoterRespVO extends PromoterBaseVO {
|
||||||
|
|
||||||
@Schema(description = "组织简称", required = true, example = "18443")
|
@Schema(description = "组织简称", required = true, example = "18443")
|
||||||
private String deptName;
|
private String deptName;
|
||||||
@Schema(description = "注册来源", required = true, example = "1")
|
|
||||||
private String sourceType;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,6 @@ import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
import cn.iocoder.yudao.module.member.controller.admin.promoter.vo.AppPromoterCreateReqVO;
|
|
||||||
import cn.iocoder.yudao.module.member.controller.admin.promoter.vo.PromoterCreateReqVO;
|
|
||||||
import cn.iocoder.yudao.module.member.controller.admin.promoter.vo.PromoterRespVO;
|
import cn.iocoder.yudao.module.member.controller.admin.promoter.vo.PromoterRespVO;
|
||||||
import cn.iocoder.yudao.module.member.controller.admin.user.vo.AppUserInfoReqVO;
|
import cn.iocoder.yudao.module.member.controller.admin.user.vo.AppUserInfoReqVO;
|
||||||
import cn.iocoder.yudao.module.member.controller.app.user.vo.AppUserInfoRespVO;
|
import cn.iocoder.yudao.module.member.controller.app.user.vo.AppUserInfoRespVO;
|
||||||
|
@ -15,8 +13,8 @@ import cn.iocoder.yudao.module.member.convert.user.UserConvert;
|
||||||
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
|
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
|
||||||
import cn.iocoder.yudao.module.member.service.promoter.PromoterService;
|
import cn.iocoder.yudao.module.member.service.promoter.PromoterService;
|
||||||
import cn.iocoder.yudao.module.member.service.user.MemberUserService;
|
import cn.iocoder.yudao.module.member.service.user.MemberUserService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -24,6 +22,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -83,7 +82,6 @@ public class AppUserController {
|
||||||
appUserInfoRespVO.setUserType(UserTypeEnum.MEMBER);
|
appUserInfoRespVO.setUserType(UserTypeEnum.MEMBER);
|
||||||
}
|
}
|
||||||
appUserInfoRespVO.setUserId(user.getId());
|
appUserInfoRespVO.setUserId(user.getId());
|
||||||
appUserInfoRespVO.setIsPromoter(promoterService.checkIsPromoterByUserId(user.getId()));
|
|
||||||
return success(appUserInfoRespVO);
|
return success(appUserInfoRespVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,11 +120,5 @@ public class AppUserController {
|
||||||
list.add(userSpreadBannerVO);
|
list.add(userSpreadBannerVO);
|
||||||
return CommonResult.success(list);
|
return CommonResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/create")
|
|
||||||
@Operation(summary = "扫码创建推广员")
|
|
||||||
public CommonResult<Long> appCreatePromoter(@Valid @RequestBody AppPromoterCreateReqVO createReqVO) {
|
|
||||||
return success(promoterService.appCreatePromoter(createReqVO));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,4 @@ public class AppUserInfoRespVO {
|
||||||
|
|
||||||
@Schema(description = "组织全称", required = true, example = "15601691300")
|
@Schema(description = "组织全称", required = true, example = "15601691300")
|
||||||
private String parentDeptName;
|
private String parentDeptName;
|
||||||
|
|
||||||
@Schema(description = "是否是推广员", required = true, example = "15601691300")
|
|
||||||
private Boolean isPromoter;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,8 +42,4 @@ public class PromoterDO implements Serializable {
|
||||||
|
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
/**
|
|
||||||
* 注册来源
|
|
||||||
*/
|
|
||||||
private String sourceType;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,5 +89,4 @@ public interface PromoterService {
|
||||||
PromoterImportRespVO importUserList(List<PromoterImportExcelVO> importUsers, boolean isUpdateSupport);
|
PromoterImportRespVO importUserList(List<PromoterImportExcelVO> importUsers, boolean isUpdateSupport);
|
||||||
PromoterDO getPromoterDOByUserId(Long userId);
|
PromoterDO getPromoterDOByUserId(Long userId);
|
||||||
|
|
||||||
Long appCreatePromoter(AppPromoterCreateReqVO createReqVO);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,41 +93,6 @@ public class PromoterServiceImpl implements PromoterService {
|
||||||
return promoter.getId();
|
return promoter.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long appCreatePromoter(AppPromoterCreateReqVO createReqVO) {
|
|
||||||
//判断手机号是否注册
|
|
||||||
MemberUserDO memberUserDO = memberUserService.getUserByMobile(createReqVO.getMobile());
|
|
||||||
if (memberUserDO == null) {
|
|
||||||
//创建用户
|
|
||||||
memberUserDO = new MemberUserDO();
|
|
||||||
memberUserDO.setNickname(createReqVO.getNickname());
|
|
||||||
memberUserDO.setMobile(createReqVO.getMobile());
|
|
||||||
memberUserDO.setStatus(createReqVO.getStatus());
|
|
||||||
memberUserDO.setPassword(createReqVO.getMobile().substring(createReqVO.getMobile().length() - 6));
|
|
||||||
memberUserDO = memberUserService.createUserIfAbsent(createReqVO.getMobile(), createReqVO.getNickname(), getClientIP());
|
|
||||||
}
|
|
||||||
if(!TenantContextHolder.getTenantId().equals(memberUserDO.getTenantId())){
|
|
||||||
throw new ServiceException(PROMOTER_EXISTS_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (checkIsPromoterByUserId(memberUserDO.getId())) {
|
|
||||||
throw new ServiceException(PROMOTER_EXISTS);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 插入
|
|
||||||
Long tenantId = TenantContextHolder.getTenantId();
|
|
||||||
DeptRespDTO deptRespDTO = deptApi.findParentDept(tenantId);
|
|
||||||
PromoterDO promoter = new PromoterDO();
|
|
||||||
promoter.setDeptId(deptRespDTO.getId());
|
|
||||||
promoter.setUserId(memberUserDO.getId());
|
|
||||||
promoter.setTenantId(tenantId);
|
|
||||||
promoter.setCreateTime(LocalDateTime.now());
|
|
||||||
promoter.setSourceType(createReqVO.getSourceType());
|
|
||||||
promoterMapper.insert(promoter);
|
|
||||||
// 返回
|
|
||||||
return promoter.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void updatePromoter(PromoterUpdateReqVO updateReqVO) {
|
public void updatePromoter(PromoterUpdateReqVO updateReqVO) {
|
||||||
|
@ -225,7 +190,7 @@ public class PromoterServiceImpl implements PromoterService {
|
||||||
Set<String> collect = importUsers.stream().map(PromoterImportExcelVO::getMobile).collect(Collectors.toSet());
|
Set<String> collect = importUsers.stream().map(PromoterImportExcelVO::getMobile).collect(Collectors.toSet());
|
||||||
List<String> collect2 = importUsers.stream().map(PromoterImportExcelVO::getMobile).collect(Collectors.toList());
|
List<String> collect2 = importUsers.stream().map(PromoterImportExcelVO::getMobile).collect(Collectors.toList());
|
||||||
if (collect.size() != collect2.size()) {
|
if (collect.size() != collect2.size()) {
|
||||||
respVO.getFailureUsernames().put("导入文件电话号码存在重复请检查!", "");
|
respVO.getFailureUsernames().put("导入文件电话号码存在重复请检查!", "电话号码" + collect);
|
||||||
return respVO;
|
return respVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,7 +226,6 @@ public class PromoterServiceImpl implements PromoterService {
|
||||||
promoter.setTenantId(SecurityFrameworkUtils.getLoginUser().getTenantId());
|
promoter.setTenantId(SecurityFrameworkUtils.getLoginUser().getTenantId());
|
||||||
promoter.setUserId(userIfAbsent.getId());
|
promoter.setUserId(userIfAbsent.getId());
|
||||||
promoter.setCreateTime(LocalDateTime.now());
|
promoter.setCreateTime(LocalDateTime.now());
|
||||||
promoter.setSourceType("1");
|
|
||||||
Long count = promoterMapper.selectCount(Wrappers.lambdaQuery(PromoterDO.class).eq(PromoterDO::getUserId, memberUserDO.getId()));
|
Long count = promoterMapper.selectCount(Wrappers.lambdaQuery(PromoterDO.class).eq(PromoterDO::getUserId, memberUserDO.getId()));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
respVO.getFailureUsernames().put(importUser.getNickName(), "已经是推广员");
|
respVO.getFailureUsernames().put(importUser.getNickName(), "已经是推广员");
|
||||||
|
|
|
@ -99,6 +99,8 @@ public class MemberUserServiceImpl implements MemberUserService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private MemberUserDO createUser(String mobile, String realName, String registerIp,Long promoterId) {
|
private MemberUserDO createUser(String mobile, String realName, String registerIp,Long promoterId) {
|
||||||
|
// 生成密码
|
||||||
|
String password = IdUtil.fastSimpleUUID();
|
||||||
// 插入用户
|
// 插入用户
|
||||||
MemberUserDO user = new MemberUserDO();
|
MemberUserDO user = new MemberUserDO();
|
||||||
user.setMobile(mobile);
|
user.setMobile(mobile);
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
<if test="data.mobile!=null and data.mobile!=''">
|
<if test="data.mobile!=null and data.mobile!=''">
|
||||||
and b.mobile like CONCAT('%',#{data.mobile},'%')
|
and b.mobile like CONCAT('%',#{data.mobile},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="data.sourceType!=null">
|
|
||||||
and b.source_type =#{data.sourceType}
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'test'
|
ENV = 'development'
|
||||||
|
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 创盈商户管理系统
|
VUE_APP_TITLE = 创盈商户管理系统
|
||||||
|
|
||||||
# 创盈管理系统/本地环境
|
# 创盈管理系统/本地环境
|
||||||
VUE_APP_BASE_API = 'http://api.nnhwl.top'
|
VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
|
@ -7,11 +7,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"local": "vue-cli-service serve --mode local",
|
"local": "vue-cli-service serve --mode local",
|
||||||
"dev": "vue-cli-service serve --mode dev",
|
"dev": "vue-cli-service serve --mode dev",
|
||||||
"test": "vue-cli-service serve --mode test",
|
"front": "vue-cli-service serve --mode front",
|
||||||
"build:prod": "vue-cli-service build --mode prod",
|
"build:prod": "vue-cli-service build --mode prod",
|
||||||
"build:stage": "vue-cli-service build --mode stage",
|
"build:stage": "vue-cli-service build --mode stage",
|
||||||
"build:dev": "vue-cli-service build --mode dev",
|
"build:dev": "vue-cli-service build --mode dev",
|
||||||
"build:test": "vue-cli-service build --mode test",
|
|
||||||
"build:static": "vue-cli-service build --mode static",
|
"build:static": "vue-cli-service build --mode static",
|
||||||
"preview": "node build/index.js --preview",
|
"preview": "node build/index.js --preview",
|
||||||
"lint": "eslint --ext .js,.vue src",
|
"lint": "eslint --ext .js,.vue src",
|
||||||
|
|
|
@ -3,7 +3,7 @@ module.exports = {
|
||||||
/**
|
/**
|
||||||
* 推广链接域名
|
* 推广链接域名
|
||||||
*/
|
*/
|
||||||
spreadDomain: process.env.ENV === 'production' ? 'http://h5.cyywl.top' : 'http://h5.nnhwl.top',
|
spreadDomain: 'http://h5.cyywl.top',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推广码生成访问H5链接地址
|
* 推广码生成访问H5链接地址
|
||||||
|
|
|
@ -29,15 +29,7 @@ module.exports = {
|
||||||
//分页最多显示条数
|
//分页最多显示条数
|
||||||
LIMIT: 10,
|
LIMIT: 10,
|
||||||
// 推广链接域名
|
// 推广链接域名
|
||||||
// #ifdef DEV
|
|
||||||
SPREAD_DOMAIN: 'http://h5.nnhwl.top',
|
|
||||||
// #endif
|
|
||||||
// #ifdef TEST
|
|
||||||
SPREAD_DOMAIN: 'http://h5.nnhwl.top',
|
|
||||||
// #endif
|
|
||||||
// #ifdef PROD
|
|
||||||
SPREAD_DOMAIN: 'http://h5.cyywl.top',
|
SPREAD_DOMAIN: 'http://h5.cyywl.top',
|
||||||
// #endif
|
|
||||||
// 推广码生成访问H5链接地址
|
// 推广码生成访问H5链接地址
|
||||||
SPREAD_LINK: '/pages/member_application/index',
|
SPREAD_LINK: '/pages/member_application/index',
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,20 +22,6 @@
|
||||||
"UNI_PLATFORM": "h5",
|
"UNI_PLATFORM": "h5",
|
||||||
"isVConsole": true,
|
"isVConsole": true,
|
||||||
"APP_BASE_URL": "http://192.168.1.188:48080"
|
"APP_BASE_URL": "http://192.168.1.188:48080"
|
||||||
},
|
|
||||||
"define": {
|
|
||||||
"DEV": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"test": {
|
|
||||||
"title": "测试版",
|
|
||||||
"env": {
|
|
||||||
"UNI_PLATFORM": "h5",
|
|
||||||
"isVConsole": true,
|
|
||||||
"APP_BASE_URL": "http://api.nnhwl.top"
|
|
||||||
},
|
|
||||||
"define": {
|
|
||||||
"TEST": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"prod": {
|
"prod": {
|
||||||
|
@ -44,9 +30,6 @@
|
||||||
"UNI_PLATFORM": "h5",
|
"UNI_PLATFORM": "h5",
|
||||||
"isVConsole": false,
|
"isVConsole": false,
|
||||||
"APP_BASE_URL": "http://api.cyywl.top"
|
"APP_BASE_URL": "http://api.cyywl.top"
|
||||||
},
|
|
||||||
"define": {
|
|
||||||
"PROD": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue