refactor: 用户详情接口 请求字段 表名修改
This commit is contained in:
parent
c9340a8156
commit
1c2e7806be
@ -1,66 +0,0 @@
|
|||||||
package com.yzt.admin.controller;
|
|
||||||
|
|
||||||
import com.yzt.common.page.CommonPage;
|
|
||||||
import com.yzt.common.request.ActivityEnrollSearchRequest;
|
|
||||||
import com.yzt.common.request.EnrollSearchRequest;
|
|
||||||
import com.yzt.common.request.PageParamRequest;
|
|
||||||
import com.yzt.common.response.ActivityEnrollResponse;
|
|
||||||
import com.yzt.common.result.CommonResult;
|
|
||||||
import com.yzt.common.vo.VirtualRemarkVo;
|
|
||||||
import com.yzt.service.service.StoreOrderInfoService;
|
|
||||||
import com.yzt.service.service.StoreProductService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.validation.constraints.Min;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: pengsz
|
|
||||||
* @Date: 2025/12/02
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/api/admin/activityenroll")
|
|
||||||
@Api(tags = "活动报名") //配合swagger使用
|
|
||||||
@Slf4j
|
|
||||||
public class ActivityEnrollController {
|
|
||||||
@Autowired
|
|
||||||
StoreProductService storeProductService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
StoreOrderInfoService storeOrderInfoService;
|
|
||||||
/**
|
|
||||||
* 分页显示
|
|
||||||
*
|
|
||||||
* @param request 搜索条件
|
|
||||||
* @param pageParamRequest 分页参数
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "活动报名分页列表") //配合swagger使用
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
public CommonResult<CommonPage<ActivityEnrollResponse>> getList(@Validated ActivityEnrollSearchRequest request,
|
|
||||||
@ModelAttribute PageParamRequest pageParamRequest) {
|
|
||||||
CommonPage<ActivityEnrollResponse> activityEnrollCommonPage = CommonPage.restPage(storeProductService.getActivityList(request, pageParamRequest));
|
|
||||||
return CommonResult.success(activityEnrollCommonPage);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页显示
|
|
||||||
*
|
|
||||||
* @param request 搜索条件
|
|
||||||
* @param pageParamRequest 分页参数
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "客户报名分页列表") //配合swagger使用
|
|
||||||
@RequestMapping(value = "/customers", method = RequestMethod.GET)
|
|
||||||
public CommonResult<CommonPage<VirtualRemarkVo>> getEnrollmentListByActivity(@Validated EnrollSearchRequest request,
|
|
||||||
@ModelAttribute PageParamRequest pageParamRequest) {
|
|
||||||
CommonPage<VirtualRemarkVo> enrollCommonPage = CommonPage.restPage(storeOrderInfoService.getEnrollmentListByActivity(request.getId(), pageParamRequest));
|
|
||||||
return CommonResult.success(enrollCommonPage);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
package com.yzt.admin.controller;
|
|
||||||
|
|
||||||
|
|
||||||
import com.yzt.common.result.CommonResult;
|
|
||||||
import com.yzt.service.service.TemplateMessageService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 微信模板 前端控制器
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("api/admin/wechat/template")
|
|
||||||
@Api(tags = "微信 -- 消息模版") //配合swagger使用
|
|
||||||
public class TemplateMessageController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private TemplateMessageService templateMessageService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 公众号模板消息同步
|
|
||||||
*/
|
|
||||||
@PreAuthorize("hasAuthority('admin:wechat:whcbqhn:sync')")
|
|
||||||
@ApiOperation(value = "公众号模板消息同步")
|
|
||||||
@RequestMapping(value = "/whcbqhn/sync", method = RequestMethod.POST)
|
|
||||||
public CommonResult<String> whcbqhnSync() {
|
|
||||||
if (templateMessageService.whcbqhnSync()) {
|
|
||||||
return CommonResult.success("公众号模板消息同步成功");
|
|
||||||
}
|
|
||||||
return CommonResult.failed("公众号模板消息同步失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 小程序订阅消息同步
|
|
||||||
*/
|
|
||||||
@PreAuthorize("hasAuthority('admin:wechat:routine:sync')")
|
|
||||||
@ApiOperation(value = "小程序订阅消息同步")
|
|
||||||
@RequestMapping(value = "/routine/sync", method = RequestMethod.POST)
|
|
||||||
public CommonResult<String> routineSync() {
|
|
||||||
if (templateMessageService.routineSync()) {
|
|
||||||
return CommonResult.success("小程序订阅消息同步成功");
|
|
||||||
}
|
|
||||||
return CommonResult.failed("小程序订阅消息同步失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -123,8 +123,8 @@ public class UserController {
|
|||||||
@PreAuthorize("hasAuthority('admin:user:info')")
|
@PreAuthorize("hasAuthority('admin:user:info')")
|
||||||
@ApiOperation(value = "详情")
|
@ApiOperation(value = "详情")
|
||||||
@RequestMapping(value = "/info", method = RequestMethod.GET)
|
@RequestMapping(value = "/info", method = RequestMethod.GET)
|
||||||
public CommonResult<User> info(@RequestParam(value = "id") Integer id) {
|
public CommonResult<UserCenterResponse> info(@RequestParam(value = "id") Integer id) {
|
||||||
return CommonResult.success(userService.getInfoByUid(id));
|
return CommonResult.success(userService.getByUid(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -22,4 +22,8 @@ public class StoreProductHeaderRequest {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "关键字搜索, 支持(商品名称, 关键字, 商品条码)")
|
@ApiModelProperty(value = "关键字搜索, 支持(商品名称, 关键字, 商品条码)")
|
||||||
private String keywords;
|
private String keywords;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否上架")
|
||||||
|
private Integer isShow;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,8 +25,8 @@ public class StoreProductSearchRequest implements Serializable {
|
|||||||
private static final long serialVersionUID=1L;
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "类型(1:出售中(已上架),2:仓库中(未上架),3:已售罄,4:警戒库存,5:回收站)")
|
@ApiModelProperty(value = "类型(1:出售中(已上架),2:仓库中(未上架),3:已售罄,4:警戒库存,5:回收站)")
|
||||||
@NotNull(message = "商品类型不能为空")
|
// @NotNull(message = "商品类型不能为空")
|
||||||
@Range(min = 1, max = 5, message = "未知的商品类型")
|
// @Range(min = 1, max = 5, message = "未知的商品类型")
|
||||||
private int type;
|
private int type;
|
||||||
|
|
||||||
@ApiModelProperty(value = "分类ID, 多个逗号分隔")
|
@ApiModelProperty(value = "分类ID, 多个逗号分隔")
|
||||||
@ -44,4 +44,7 @@ public class StoreProductSearchRequest implements Serializable {
|
|||||||
@ApiModelProperty(value = "销量排序", allowableValues = "range[asc,desc]")
|
@ApiModelProperty(value = "销量排序", allowableValues = "range[asc,desc]")
|
||||||
private String salesOrder;
|
private String salesOrder;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(0:未上架,1:上架)")
|
||||||
|
private Boolean isShow;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,9 +73,9 @@ public class UserCreateRequest implements Serializable {
|
|||||||
@ApiModelProperty(value = "用户备注")
|
@ApiModelProperty(value = "用户备注")
|
||||||
private String mark;
|
private String mark;
|
||||||
|
|
||||||
@ApiModelProperty(value = "状态是否正常, 0 = 禁止, 1 = 正常")
|
// @ApiModelProperty(value = "状态是否正常, 0 = 禁止, 1 = 正常")
|
||||||
@NotNull(message = "状态不能为空")
|
// @NotNull(message = "状态不能为空")
|
||||||
private Boolean status;
|
// private Boolean status;
|
||||||
|
|
||||||
@ApiModelProperty(value = "详细地址")
|
@ApiModelProperty(value = "详细地址")
|
||||||
private String addres;
|
private String addres;
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import java.io.Serializable;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("fw_user_extract")
|
@TableName("zp_user_extract")
|
||||||
@ApiModel(value="UserExtract对象", description="用户提现表")
|
@ApiModel(value="UserExtract对象", description="用户提现表")
|
||||||
public class UserExtractSearchRequest implements Serializable {
|
public class UserExtractSearchRequest implements Serializable {
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import java.io.Serializable;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("fw_user_group")
|
@TableName("zp_user_group")
|
||||||
@ApiModel(value="UserGroup对象", description="用户分组表")
|
@ApiModel(value="UserGroup对象", description="用户分组表")
|
||||||
public class UserGroupRequest implements Serializable {
|
public class UserGroupRequest implements Serializable {
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,6 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("fw_user")
|
|
||||||
@ApiModel(value="User对象", description="用户表")
|
@ApiModel(value="User对象", description="用户表")
|
||||||
public class UserSearchRequest implements Serializable {
|
public class UserSearchRequest implements Serializable {
|
||||||
|
|
||||||
@ -55,9 +54,9 @@ public class UserSearchRequest implements Serializable {
|
|||||||
private String level;
|
private String level;
|
||||||
|
|
||||||
//时间类型
|
//时间类型
|
||||||
@ApiModelProperty(value = "访问情况, 0 = 全部, 1 = 首次, 2 = 访问过, 3 = 未访问", allowableValues = "range[0,1,2,3]")
|
// @ApiModelProperty(value = "访问情况, 0 = 全部, 1 = 首次, 2 = 访问过, 3 = 未访问", allowableValues = "range[0,1,2,3]")
|
||||||
@NotNull(message = "访问情况不能为空")
|
// @NotNull(message = "访问情况不能为空")
|
||||||
private Integer accessType = 0;
|
// private Integer accessType = 0;
|
||||||
|
|
||||||
@ApiModelProperty(value = "国家,中国CN,其他OTHER")
|
@ApiModelProperty(value = "国家,中国CN,其他OTHER")
|
||||||
private String country;
|
private String country;
|
||||||
|
|||||||
@ -37,19 +37,19 @@ public class UserUpdateRequest implements Serializable {
|
|||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
// @Size(min = 6, message = "交易密码至少6位"
|
// @Size(min = 6, message = "交易密码至少6位"
|
||||||
@Pattern(regexp = "^(.{6,})?$", message = "交易密码至少6位")
|
// @Pattern(regexp = "^(.{6,})?$", message = "交易密码至少6位")
|
||||||
@ApiModelProperty(value = "交易密码")
|
// @ApiModelProperty(value = "交易密码")
|
||||||
private String tradePassword;
|
// private String tradePassword;
|
||||||
|
|
||||||
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
|
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
|
||||||
@ApiModelProperty(value = "手机号")
|
@ApiModelProperty(value = "手机号")
|
||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
@ApiModelProperty(value = "推广人id")
|
// @ApiModelProperty(value = "推广人id")
|
||||||
private Integer spreadUid;
|
// private Integer spreadUid;
|
||||||
|
|
||||||
@ApiModelProperty(value = "机构名称")
|
// @ApiModelProperty(value = "机构名称")
|
||||||
private String orgName;
|
// private String orgName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "uid")
|
@ApiModelProperty(value = "uid")
|
||||||
private Integer uid;
|
private Integer uid;
|
||||||
@ -66,9 +66,9 @@ public class UserUpdateRequest implements Serializable {
|
|||||||
@ApiModelProperty(value = "用户备注")
|
@ApiModelProperty(value = "用户备注")
|
||||||
private String mark;
|
private String mark;
|
||||||
|
|
||||||
@ApiModelProperty(value = "状态是否正常, 0 = 禁止, 1 = 正常")
|
// @ApiModelProperty(value = "状态是否正常, 0 = 禁止, 1 = 正常")
|
||||||
@NotNull(message = "状态不能为空")
|
// @NotNull(message = "状态不能为空")
|
||||||
private Boolean status;
|
// private Boolean status;
|
||||||
|
|
||||||
@ApiModelProperty(value = "详细地址")
|
@ApiModelProperty(value = "详细地址")
|
||||||
private String addres;
|
private String addres;
|
||||||
@ -82,8 +82,8 @@ public class UserUpdateRequest implements Serializable {
|
|||||||
@ApiModelProperty(value = "用户标签id")
|
@ApiModelProperty(value = "用户标签id")
|
||||||
private String tagId;
|
private String tagId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否为推广员")
|
// @ApiModelProperty(value = "是否为推广员")
|
||||||
@NotNull(message = "是否为推广员不能为空")
|
// @NotNull(message = "是否为推广员不能为空")
|
||||||
private Boolean isPromoter;
|
// private Boolean isPromoter;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import java.util.Date;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("fw_user_bill")
|
@TableName("zp_user_bill")
|
||||||
@ApiModel(value="UserBill对象", description="用户账单表")
|
@ApiModel(value="UserBill对象", description="用户账单表")
|
||||||
public class UserBillResponse implements Serializable {
|
public class UserBillResponse implements Serializable {
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.yzt.common.response;
|
package com.yzt.common.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -92,6 +93,9 @@ public class UserCenterResponse implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "公司名称")
|
@ApiModelProperty(value = "公司名称")
|
||||||
private String tenantName;
|
private String tenantName;
|
||||||
|
@ApiModelProperty(value = "租户名称")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "机构名称")
|
@ApiModelProperty(value = "机构名称")
|
||||||
private String orgName;
|
private String orgName;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.yzt.common.vo;
|
package com.yzt.common.vo;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
@ -16,6 +17,7 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
public class TenantVo {
|
public class TenantVo {
|
||||||
@ApiModelProperty("租户")
|
@ApiModelProperty("租户")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
|
|
||||||
@ApiModelProperty("租户名称")
|
@ApiModelProperty("租户名称")
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("fw_user_sign")
|
@TableName("zp_user_sign")
|
||||||
@ApiModel(value="UserSign对象", description="签到记录表")
|
@ApiModel(value="UserSign对象", description="签到记录表")
|
||||||
public class UserSignMonthVo implements Serializable {
|
public class UserSignMonthVo implements Serializable {
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import org.apache.ibatis.annotations.Select;
|
|||||||
*/
|
*/
|
||||||
public interface StoreCartMapper extends BaseMapper<StoreCart> {
|
public interface StoreCartMapper extends BaseMapper<StoreCart> {
|
||||||
|
|
||||||
@Select("SELECT COUNT(id) FROM fw_store_cart WHERE uid = #{uid} AND status = 1")
|
@Select("SELECT COUNT(id) FROM zp_store_cart WHERE uid = #{uid} AND status = 1")
|
||||||
Integer getCartItemCount(@Param("uid") Integer uid);
|
Integer getCartItemCount(@Param("uid") Integer uid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -267,6 +267,12 @@ public interface UserService extends IService<User> {
|
|||||||
* @return 用户信息
|
* @return 用户信息
|
||||||
*/
|
*/
|
||||||
User getByPhone(String phone);
|
User getByPhone(String phone);
|
||||||
|
/**
|
||||||
|
* 根据手机号查询用户
|
||||||
|
* @param uid id
|
||||||
|
* @return 用户信息
|
||||||
|
*/
|
||||||
|
UserCenterResponse getByUid(Integer uid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据手机号查询用户
|
* 根据手机号查询用户
|
||||||
|
|||||||
@ -162,6 +162,9 @@ public class StoreProductServiceImpl extends ServiceImpl<StoreProductMapper, Sto
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if(ObjectUtil.isNotEmpty(request.getIsShow())){
|
||||||
|
lambdaQueryWrapper.eq(StoreProduct::getIsShow, request.getIsShow());
|
||||||
|
}
|
||||||
//关键字搜索
|
//关键字搜索
|
||||||
if (StrUtil.isNotBlank(request.getKeywords())) {
|
if (StrUtil.isNotBlank(request.getKeywords())) {
|
||||||
lambdaQueryWrapper.and(i -> i
|
lambdaQueryWrapper.and(i -> i
|
||||||
@ -845,6 +848,9 @@ public class StoreProductServiceImpl extends ServiceImpl<StoreProductMapper, Sto
|
|||||||
.or().like(StoreProduct::getStoreName, request.getKeywords())
|
.or().like(StoreProduct::getStoreName, request.getKeywords())
|
||||||
.or().like(StoreProduct::getKeyword, request.getKeywords()));
|
.or().like(StoreProduct::getKeyword, request.getKeywords()));
|
||||||
}
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(request.getIsShow())){
|
||||||
|
lambdaQueryWrapper.eq(StoreProduct::getIsShow,request.getIsShow());
|
||||||
|
}
|
||||||
//分类搜索
|
//分类搜索
|
||||||
if(StringUtils.isNotBlank(request.getCateId())){
|
if(StringUtils.isNotBlank(request.getCateId())){
|
||||||
List<Integer> cateIds = Arrays.stream(request.getCateId().split(",")).map(Integer::valueOf).distinct().collect(Collectors.toList());
|
List<Integer> cateIds = Arrays.stream(request.getCateId().split(",")).map(Integer::valueOf).distinct().collect(Collectors.toList());
|
||||||
|
|||||||
@ -746,7 +746,7 @@ public class UserExtractServiceImpl extends ServiceImpl<UserExtractMapper, UserE
|
|||||||
resp.setActualAmount(extract.getActualAmount());
|
resp.setActualAmount(extract.getActualAmount());
|
||||||
resp.setFeeIntegral(extract.getIntegralAmount());
|
resp.setFeeIntegral(extract.getIntegralAmount());
|
||||||
|
|
||||||
// 收款信息:从提现记录表 fw_user_extract 取
|
// 收款信息:从提现记录表 zp_user_extract 取
|
||||||
resp.setPayeeName(extract.getRealName());
|
resp.setPayeeName(extract.getRealName());
|
||||||
resp.setPayBankName(extract.getBankName());
|
resp.setPayBankName(extract.getBankName());
|
||||||
resp.setPayAccount(extract.getBankCode());
|
resp.setPayAccount(extract.getBankCode());
|
||||||
|
|||||||
@ -31,6 +31,7 @@ import com.yzt.common.utils.*;
|
|||||||
import com.yzt.common.vo.DateLimitUtilVo;
|
import com.yzt.common.vo.DateLimitUtilVo;
|
||||||
import com.yzt.service.mapper.UserMapper;
|
import com.yzt.service.mapper.UserMapper;
|
||||||
import com.yzt.service.service.*;
|
import com.yzt.service.service.*;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
import org.apache.commons.codec.digest.DigestUtils;
|
import org.apache.commons.codec.digest.DigestUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -171,10 +172,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||||||
map.put("uids", request.getUids());
|
map.put("uids", request.getUids());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.getIsPromoter() != null) {
|
|
||||||
map.put("isPromoter", request.getIsPromoter() ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(request.getGroupId())) {
|
if (StrUtil.isNotBlank(request.getGroupId())) {
|
||||||
List<Integer> groupIdList = YztUtil.stringToArray(request.getGroupId());
|
List<Integer> groupIdList = YztUtil.stringToArray(request.getGroupId());
|
||||||
map.put("groupIdList", groupIdList);
|
map.put("groupIdList", groupIdList);
|
||||||
@ -222,7 +219,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||||||
if (!StringUtils.isBlank(dateLimit.getStartTime())) {
|
if (!StringUtils.isBlank(dateLimit.getStartTime())) {
|
||||||
map.put("startTime", dateLimit.getStartTime());
|
map.put("startTime", dateLimit.getStartTime());
|
||||||
map.put("endTime", dateLimit.getEndTime());
|
map.put("endTime", dateLimit.getEndTime());
|
||||||
map.put("accessType", request.getAccessType());
|
// map.put("accessType", request.getAccessType());
|
||||||
}
|
}
|
||||||
if (request.getKeywords() != null) {
|
if (request.getKeywords() != null) {
|
||||||
map.put("keywords", request.getKeywords());
|
map.put("keywords", request.getKeywords());
|
||||||
@ -1593,12 +1590,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||||||
if(userRequest.getPassword().isBlank()){
|
if(userRequest.getPassword().isBlank()){
|
||||||
user.setPwd(tempUser.getPwd());
|
user.setPwd(tempUser.getPwd());
|
||||||
}
|
}
|
||||||
if (userRequest.getTradePassword().isBlank()){
|
// if (userRequest.getTradePassword().isBlank()){
|
||||||
user.setTradePassword(tempUser.getTradePassword());
|
// user.setTradePassword(tempUser.getTradePassword());
|
||||||
}
|
// }
|
||||||
if (!tempUser.getIsPromoter() && user.getIsPromoter()) {
|
// if (!tempUser.getIsPromoter() && user.getIsPromoter()) {
|
||||||
user.setPromoterTime(DateUtil.date());
|
// user.setPromoterTime(DateUtil.date());
|
||||||
}
|
// }
|
||||||
user.setUpdateTime(DateUtil.date());
|
user.setUpdateTime(DateUtil.date());
|
||||||
return updateById(user);
|
return updateById(user);
|
||||||
}
|
}
|
||||||
@ -1647,6 +1644,22 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||||||
return userMapper.selectOne(lqw);
|
return userMapper.selectOne(lqw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询用户
|
||||||
|
* @param uid 用户手机号
|
||||||
|
* @return 用户信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserCenterResponse getByUid(Integer uid) {
|
||||||
|
LambdaQueryWrapper<User> lqw = new LambdaQueryWrapper<>();
|
||||||
|
lqw.eq(User::getUid, uid);
|
||||||
|
User user = userMapper.selectOne(lqw);
|
||||||
|
UserCenterResponse userCenterResponse = new UserCenterResponse();
|
||||||
|
BeanUtils.copyProperties(user,userCenterResponse);
|
||||||
|
userCenterResponse.setTenantName(tenantService.getInfo(user.getTenantId()).getTenantName());
|
||||||
|
return userCenterResponse;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserCenterResponse getUserCenterResponseByPhone(String phone) {
|
public UserCenterResponse getUserCenterResponseByPhone(String phone) {
|
||||||
User user = getByPhone(phone);
|
User user = getByPhone(phone);
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
<!-- 获取活跃用户数 -->
|
<!-- 获取活跃用户数 -->
|
||||||
<select id="getActiveUserNumByDate" resultType="java.lang.Integer">
|
<select id="getActiveUserNumByDate" resultType="java.lang.Integer">
|
||||||
select count(*) from
|
select count(*) from
|
||||||
(SELECT uid,count(id) as visits FROM `fw_user_visit_record` where uid > 0 and date = #{date} group by uid) as a
|
(SELECT uid,count(id) as visits FROM `zp_user_visit_record` where uid > 0 and date = #{date} group by uid) as a
|
||||||
where a.visits > 1
|
where a.visits > 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getActiveUserNumByPeriod" resultType="java.lang.Integer">
|
<select id="getActiveUserNumByPeriod" resultType="java.lang.Integer">
|
||||||
select count(*) from
|
select count(*) from
|
||||||
(SELECT uid,count(id) as visits FROM `fw_user_visit_record` where uid > 0 and date between #{startDate} and #{endDate} group by uid) as a
|
(SELECT uid,count(id) as visits FROM `zp_user_visit_record` where uid > 0 and date between #{startDate} and #{endDate} group by uid) as a
|
||||||
where a.visits > 1
|
where a.visits > 1
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
<select id="getSpreadPeopleList" resultType="com.yzt.common.response.UserSpreadPeopleItemResponse" parameterType="map">
|
<select id="getSpreadPeopleList" resultType="com.yzt.common.response.UserSpreadPeopleItemResponse" parameterType="map">
|
||||||
SELECT u.uid,u.nickname,u.level,DATE_FORMAT(u.create_time, '%Y-%m-%d') AS createTime,u.phone, u.avatar, DATE_FORMAT(u.spread_time, '%Y-%m-%d %H:%i:%s') AS `time`, u.spread_count AS childCount,
|
SELECT u.uid,u.nickname,u.level,DATE_FORMAT(u.create_time, '%Y-%m-%d') AS createTime,u.phone, u.avatar, DATE_FORMAT(u.spread_time, '%Y-%m-%d %H:%i:%s') AS `time`, u.spread_count AS childCount,
|
||||||
(SELECT count( * ) AS num FROM fw_store_order AS o RIGHT JOIN fw_user_brokerage_record AS br ON br.link_id = o.order_id AND br.STATUS = 3
|
(SELECT count( * ) AS num FROM zp_store_order AS o RIGHT JOIN zp_user_brokerage_record AS br ON br.link_id = o.order_id AND br.STATUS = 3
|
||||||
WHERE o.uid = u.uid AND br.uid = u.spread_uid AND o.STATUS > 1) AS orderCount,
|
WHERE o.uid = u.uid AND br.uid = u.spread_uid AND o.STATUS > 1) AS orderCount,
|
||||||
(SELECT IFNULL( sum( o.pay_price ), 0 ) AS price FROM fw_store_order AS o RIGHT JOIN fw_user_brokerage_record AS br ON br.link_id = o.order_id AND br.STATUS = 3
|
(SELECT IFNULL( sum( o.pay_price ), 0 ) AS price FROM zp_store_order AS o RIGHT JOIN zp_user_brokerage_record AS br ON br.link_id = o.order_id AND br.STATUS = 3
|
||||||
WHERE o.uid = u.uid AND br.uid = u.spread_uid AND o.STATUS > 1) AS numberCount
|
WHERE o.uid = u.uid AND br.uid = u.spread_uid AND o.STATUS > 1) AS numberCount
|
||||||
FROM fw_user AS u
|
FROM zp_user AS u
|
||||||
where
|
where
|
||||||
u.uid in
|
u.uid in
|
||||||
<foreach item="uid" collection="userIdList" open="(" separator="," close=")">
|
<foreach item="uid" collection="userIdList" open="(" separator="," close=")">
|
||||||
@ -21,12 +21,12 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findAdminList" resultType="com.yzt.common.model.user.User" parameterType="Map">
|
<select id="findAdminList" resultType="com.yzt.common.model.user.User" parameterType="Map">
|
||||||
SELECT u.* FROM fw_user AS u
|
SELECT u.* FROM zp_user AS u
|
||||||
<if test='userType != null and userType != "" and userType == "wechat"'>
|
<if test='userType != null and userType != "" and userType == "wechat"'>
|
||||||
INNER JOIN fw_user_token AS ut on u.uid = ut.uid and ut.type = 1
|
INNER JOIN zp_user_token AS ut on u.uid = ut.uid and ut.type = 1
|
||||||
</if>
|
</if>
|
||||||
<if test='userType != null and userType != "" and userType == "routine"'>
|
<if test='userType != null and userType != "" and userType == "routine"'>
|
||||||
INNER JOIN fw_user_token AS ut on u.uid = ut.uid and ut.type = 2
|
INNER JOIN zp_user_token AS ut on u.uid = ut.uid and ut.type = 2
|
||||||
</if>
|
</if>
|
||||||
where 1 = 1
|
where 1 = 1
|
||||||
<if test="isPromoter != null and isPromoter !='' or isPromoter == 0 ">
|
<if test="isPromoter != null and isPromoter !='' or isPromoter == 0 ">
|
||||||
@ -103,8 +103,8 @@
|
|||||||
u.nickname,
|
u.nickname,
|
||||||
u.phone,
|
u.phone,
|
||||||
t.tenant_name AS tenantName
|
t.tenant_name AS tenantName
|
||||||
FROM fw_user AS u
|
FROM zp_user AS u
|
||||||
LEFT JOIN fw_tenant AS t ON u.tenant_id = t.tenant_id
|
LEFT JOIN zp_tenant AS t ON u.tenant_id = t.tenant_id
|
||||||
WHERE 1 = 1
|
WHERE 1 = 1
|
||||||
<if test="keyword != null and keyword != ''">
|
<if test="keyword != null and keyword != ''">
|
||||||
AND (
|
AND (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user