Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
110
src/main/java/com/gxwebsoft/common/system/entity/UserVerify.java
Normal file
110
src/main/java/com/gxwebsoft/common/system/entity/UserVerify.java
Normal file
@@ -0,0 +1,110 @@
|
||||
package com.gxwebsoft.common.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 实名认证
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-29 23:01:04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "UserVerify对象", description = "实名认证")
|
||||
@TableName("sys_user_verify")
|
||||
public class UserVerify implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "认证类型, 0个人 1企业")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "主体名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "真实姓名")
|
||||
private String realName;
|
||||
|
||||
@Schema(description = "证件号码")
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "出生日期")
|
||||
private LocalDate birthday;
|
||||
|
||||
@Schema(description = "正面")
|
||||
private String sfz1;
|
||||
|
||||
@Schema(description = "反面")
|
||||
private String sfz2;
|
||||
|
||||
@Schema(description = "营业执照号码")
|
||||
private String zzCode;
|
||||
|
||||
@Schema(description = "营业执照照片")
|
||||
private String zzImg;
|
||||
|
||||
@Schema(description = "其他证件")
|
||||
private String files;
|
||||
|
||||
@Schema(description = "审核人")
|
||||
private Integer adminId;
|
||||
|
||||
@Schema(description = "机构ID")
|
||||
private Integer organizationId;
|
||||
|
||||
@Schema(description = "机构ID")
|
||||
@TableField(exist = false)
|
||||
private String organizationName;
|
||||
|
||||
@Schema(description = "用户角色ID")
|
||||
private Integer userRoleId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0待审核, 1已通过审核,2已驳回")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "注册时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
@Schema(description = "手机号码")
|
||||
@TableField(exist = false)
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "状态名称")
|
||||
@TableField(exist = false)
|
||||
private String statusText;
|
||||
|
||||
public String getStatusText() {
|
||||
String[] statusArray = {"待审核", "已审核通过", "已驳回"};
|
||||
return statusArray[this.status];
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.gxwebsoft.sdy.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.entity.UserVerify;
|
||||
import com.gxwebsoft.common.system.param.UserParam;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import com.gxwebsoft.hjm.dto.TemplateMessageRequest;
|
||||
@@ -11,17 +13,17 @@ import com.gxwebsoft.hjm.entity.HjmCar;
|
||||
import com.gxwebsoft.hjm.entity.HjmCourses;
|
||||
import com.gxwebsoft.hjm.service.HjmCarService;
|
||||
import com.gxwebsoft.hjm.service.WxNotificationService;
|
||||
import com.gxwebsoft.pwl.entity.PwlProject;
|
||||
import com.gxwebsoft.shop.entity.ShopDealerUser;
|
||||
import com.gxwebsoft.shop.entity.ShopDealerWithdraw;
|
||||
import com.gxwebsoft.shop.service.ShopDealerUserService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -42,6 +44,11 @@ public class PushTemplateMessageController extends BaseController {
|
||||
@Resource
|
||||
private ShopDealerUserService shopDealerUserService;
|
||||
|
||||
|
||||
final static Integer tenantId = 10560;
|
||||
final static String appId = "wx51962d6ac21f2ed2";
|
||||
final static String toUser = "oKGr42It8OcS1Bl-KpiQj7MM43o8";
|
||||
|
||||
@Operation(summary = "升级为管理员")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<?> pushByUpdateAdmin(@PathVariable("id") Integer id) {
|
||||
@@ -83,11 +90,11 @@ public class PushTemplateMessageController extends BaseController {
|
||||
try {
|
||||
// 发送模板消息
|
||||
final TemplateMessageRequest templateMessageRequest = new TemplateMessageRequest();
|
||||
templateMessageRequest.setToUser("oKGr42It8OcS1Bl-KpiQj7MM43o8");
|
||||
templateMessageRequest.setToUser(toUser);
|
||||
templateMessageRequest.setTemplateId("KxGoeBpHW60QFUIU7Vo3c_48g_3V55tWWr23tUUl8gI");
|
||||
// templateMessageRequest.setUrl("https://mp.websoft.top");
|
||||
final TemplateMessageRequest.MiniProgram miniProgram = new TemplateMessageRequest.MiniProgram();
|
||||
miniProgram.setAppid("wx51962d6ac21f2ed2");
|
||||
miniProgram.setAppid(appId);
|
||||
miniProgram.setPagepath("pages/index/index");
|
||||
templateMessageRequest.setMiniprogram(miniProgram);
|
||||
HashMap<String, TemplateMessageRequest.TemplateDataItem> map = new HashMap<>();
|
||||
@@ -97,7 +104,7 @@ public class PushTemplateMessageController extends BaseController {
|
||||
System.out.println("发送升级管理员通知,数据: " + map);
|
||||
|
||||
// 调用微信通知服务发送模板消息
|
||||
return wxNotificationService.sendTemplateMessage(10560, templateMessageRequest);
|
||||
return wxNotificationService.sendTemplateMessage(tenantId, templateMessageRequest);
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("发送模板消息异常: " + e.getMessage());
|
||||
@@ -106,4 +113,97 @@ public class PushTemplateMessageController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
@Operation(summary = "发送实名审核提醒")
|
||||
@PostMapping("/pushReviewReminder")
|
||||
public ApiResult<?> pushReviewReminder(@RequestBody UserVerify userVerify) {
|
||||
try {
|
||||
// 发送模板消息
|
||||
final TemplateMessageRequest templateMessageRequest = new TemplateMessageRequest();
|
||||
templateMessageRequest.setToUser(toUser);
|
||||
templateMessageRequest.setTemplateId("0FBKFCWXe8WyjReYXwSDEXf1-pxYKQXE0quZre3GYIM");
|
||||
final TemplateMessageRequest.MiniProgram miniProgram = new TemplateMessageRequest.MiniProgram();
|
||||
miniProgram.setAppid(appId);
|
||||
miniProgram.setPagepath("admin/userVerify/index");
|
||||
templateMessageRequest.setMiniprogram(miniProgram);
|
||||
HashMap<String, TemplateMessageRequest.TemplateDataItem> map = new HashMap<>();
|
||||
map.put("thing5", new TemplateMessageRequest.TemplateDataItem(userVerify.getRealName()));
|
||||
// 当前日期
|
||||
map.put("time6", new TemplateMessageRequest.TemplateDataItem(new SimpleDateFormat("yyyy-MM-dd").format(System.currentTimeMillis())));
|
||||
templateMessageRequest.setData(map);
|
||||
System.out.println("map = " + map);
|
||||
// 调用微信通知服务发送模板消息
|
||||
wxNotificationService.sendTemplateMessage(tenantId, templateMessageRequest);
|
||||
return success("发送成功");
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("发送模板消息异常: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
return fail("发送失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Operation(summary = "提现审核提醒")
|
||||
@PostMapping("/pushWithdrawalReviewReminder")
|
||||
public ApiResult<?> pushWithdrawalReviewReminder(@RequestBody ShopDealerWithdraw shopDealerWithdraw) {
|
||||
try {
|
||||
// 发送模板消息
|
||||
final TemplateMessageRequest templateMessageRequest = new TemplateMessageRequest();
|
||||
templateMessageRequest.setToUser(toUser);
|
||||
templateMessageRequest.setTemplateId("fJOb0ZPs_HCQO6tdqPRTfaELGgjH5s8a6Vm9X9Hxgrk");
|
||||
final TemplateMessageRequest.MiniProgram miniProgram = new TemplateMessageRequest.MiniProgram();
|
||||
miniProgram.setAppid(appId);
|
||||
miniProgram.setPagepath("dealer/withdraw/admin");
|
||||
// miniProgram.setPagepath("pages/index/index");
|
||||
templateMessageRequest.setMiniprogram(miniProgram);
|
||||
HashMap<String, TemplateMessageRequest.TemplateDataItem> map = new HashMap<>();
|
||||
map.put("amount1", new TemplateMessageRequest.TemplateDataItem(shopDealerWithdraw.getMoney().toString()));
|
||||
map.put("thing7", new TemplateMessageRequest.TemplateDataItem(shopDealerWithdraw.getBankAccount()));
|
||||
templateMessageRequest.setData(map);
|
||||
System.out.println("map = " + map);
|
||||
// 调用微信通知服务发送模板消息
|
||||
wxNotificationService.sendTemplateMessage(tenantId, templateMessageRequest);
|
||||
return success("发送成功");
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("发送模板消息异常: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
return fail("发送失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "提现到账通知提醒")
|
||||
@PostMapping("/pushNoticeOfWithdrawalToAccount")
|
||||
public ApiResult<?> pushNoticeOfWithdrawalToAccount(@RequestBody ShopDealerWithdraw shopDealerWithdraw) {
|
||||
if (StrUtil.isBlank(shopDealerWithdraw.getOfficeOpenid())) {
|
||||
return fail("请传入公众号openid");
|
||||
}
|
||||
try {
|
||||
// 发送模板消息
|
||||
final TemplateMessageRequest templateMessageRequest = new TemplateMessageRequest();
|
||||
templateMessageRequest.setToUser(shopDealerWithdraw.getOfficeOpenid());
|
||||
templateMessageRequest.setTemplateId("QnmEjyEBmodtfnDsflDwVS1mmh4v_hql-TCDxi2ADs8");
|
||||
final TemplateMessageRequest.MiniProgram miniProgram = new TemplateMessageRequest.MiniProgram();
|
||||
miniProgram.setAppid(appId);
|
||||
miniProgram.setPagepath("dealer/withdraw/admin");
|
||||
templateMessageRequest.setMiniprogram(miniProgram);
|
||||
HashMap<String, TemplateMessageRequest.TemplateDataItem> map = new HashMap<>();
|
||||
map.put("thing13", new TemplateMessageRequest.TemplateDataItem(shopDealerWithdraw.getBankAccount()));
|
||||
map.put("amount4", new TemplateMessageRequest.TemplateDataItem(shopDealerWithdraw.getMoney().toString()));
|
||||
map.put("amount5", new TemplateMessageRequest.TemplateDataItem(shopDealerWithdraw.getMoney().subtract(new BigDecimal(3)).toString()));
|
||||
map.put("amount9", new TemplateMessageRequest.TemplateDataItem(new BigDecimal(3).toString()));
|
||||
|
||||
templateMessageRequest.setData(map);
|
||||
System.out.println("map = " + map);
|
||||
// 调用微信通知服务发送模板消息
|
||||
wxNotificationService.sendTemplateMessage(tenantId, templateMessageRequest);
|
||||
return success("发送成功");
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("发送模板消息异常: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
return fail("发送失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -86,6 +86,14 @@ public class ShopDealerWithdraw implements Serializable {
|
||||
@Schema(description = "来源客户端(APP、H5、小程序等)")
|
||||
private String platform;
|
||||
|
||||
@Schema(description = "微信openId")
|
||||
@TableField(exist = false)
|
||||
private String openId;
|
||||
|
||||
@Schema(description = "公众号openId")
|
||||
@TableField(exist = false)
|
||||
private String officeOpenid;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*, b.nickname, b.phone AS phone, b.avatar, c.real_name as realName
|
||||
SELECT a.*, b.nickname, b.phone AS phone, b.avatar,b.openid,b.office_openid, c.real_name as realName
|
||||
FROM shop_dealer_withdraw a
|
||||
LEFT JOIN gxwebsoft_core.sys_user b ON a.user_id = b.user_id
|
||||
LEFT JOIN gxwebsoft_core.sys_user_verify c ON a.user_id = c.user_id AND c.status = 1
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.gxwebsoft.shop.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
@@ -73,4 +75,12 @@ public class ShopDealerWithdrawParam extends BaseParam {
|
||||
@Schema(description = "上传支付凭证")
|
||||
private String image;
|
||||
|
||||
@Schema(description = "微信openId")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private String openId;
|
||||
|
||||
@Schema(description = "公众号openId")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private String officeOpenid;
|
||||
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ server:
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://47.121.133.163:3308/mp?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: mp
|
||||
password: BzDa2dzMACYjnsRD
|
||||
url: jdbc:mysql://1Panel-mysql-Bqdt:3306/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: modules
|
||||
password: P7KsAyDXG8YdLnkA
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
@@ -18,8 +18,8 @@ spring:
|
||||
# redis
|
||||
redis:
|
||||
database: 0
|
||||
host: 8.134.169.209
|
||||
port: 16379
|
||||
host: 1Panel-redis-Q1LE
|
||||
port: 6379
|
||||
password: redis_WSDb88
|
||||
|
||||
# 日志配置
|
||||
|
||||
Reference in New Issue
Block a user