2 files added
4 files modified
| | |
| | | import com.xzx.gc.user.dto.*; |
| | | import com.xzx.gc.user.mapper.*; |
| | | import com.xzx.gc.user.service.*; |
| | | import com.xzx.gc.user.vo.JhyInfoListVo; |
| | | import com.xzx.gc.user.vo.TgmxInfoListVo; |
| | | import com.xzx.gc.user.vo.UserIdentityVo; |
| | | import com.xzx.gc.util.DoubleUtil; |
| | | import com.xzx.gc.util.SessionUtil; |
| | |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "推广明细列表") |
| | | @ApiResponses( |
| | | @ApiResponse(code = 200, message = "success", response = TgmxInfoListVo.class) |
| | | ) |
| | | @PostMapping(value = Constants.ADMIN_VIEW_PREFIX + "/user/tgmxInfo.json") |
| | | public JsonResult<Map<String, Object>> tgmxInfo(@RequestBody TgmxInfoListDto tgmxInfoListDto) { |
| | | return JsonResult.success(userService.tgmxInfo(tgmxInfoListDto)); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.xzx.gc.user.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class TgmxInfoListDto { |
| | | |
| | | @ApiModelProperty("邀请用户名称") |
| | | private String yqrName; |
| | | |
| | | @ApiModelProperty("注册用户名称") |
| | | private String zcName; |
| | | |
| | | @ApiModelProperty("邀请用户/注册用户手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value="第几页",required=true) |
| | | private int page; |
| | | |
| | | @ApiModelProperty(value="每一页数量",required=true) |
| | | private int limit; |
| | | |
| | | } |
| | |
| | | import com.xzx.gc.entity.UserInfo; |
| | | import com.xzx.gc.model.admin.UserModel; |
| | | import com.xzx.gc.model.user.*; |
| | | import com.xzx.gc.user.dto.TgmxInfoListDto; |
| | | import com.xzx.gc.user.vo.TgmxInfoListVo; |
| | | import com.xzx.gc.util.GcMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | List<UserModel> queryAllUserByPid(@Param("userName") String userName, @Param("roleType") String roleType, @Param("partnerId") String partnerId); |
| | | |
| | | UserModel queryUserById(@Param("userId") String userId); |
| | | |
| | | List<TgmxInfoListVo> tgmxInfo(@Param("record")TgmxInfoListDto model); |
| | | } |
| | |
| | | import com.xzx.gc.model.user.*; |
| | | import com.xzx.gc.user.dto.AddressDto; |
| | | import com.xzx.gc.user.dto.RayaltyDto; |
| | | import com.xzx.gc.user.dto.TgmxInfoListDto; |
| | | import com.xzx.gc.user.mapper.*; |
| | | import com.xzx.gc.user.vo.CategaryVo; |
| | | import com.xzx.gc.user.vo.TgmxInfoListVo; |
| | | import com.xzx.gc.user.vo.UserIdentityVo; |
| | | import com.xzx.gc.util.DoubleUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | userMapper.insertSelective(userInfo); |
| | | } |
| | | |
| | | public Map<String, Object> tgmxInfo(TgmxInfoListDto model) { |
| | | PageHelper.startPage(model.getPage(), model.getLimit()); |
| | | List<TgmxInfoListVo> maps = userMapper.tgmxInfo(model); |
| | | PageInfo pageInfo = new PageInfo(maps); |
| | | int count = Convert.toInt(pageInfo.getTotal()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", maps); |
| | | map.put("count", count); |
| | | map.put("code", 0); |
| | | return map; |
| | | } |
| | | } |
New file |
| | |
| | | package com.xzx.gc.user.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "TgmxInfoListVo", description = "返回参数类") |
| | | public class TgmxInfoListVo { |
| | | |
| | | @ApiModelProperty(value = "邀请人名称") |
| | | private String yqrName; |
| | | |
| | | @ApiModelProperty(value = "邀请人手机号") |
| | | private String yqrPhone; |
| | | |
| | | @ApiModelProperty(value = "注册用户名称") |
| | | private String zcName; |
| | | |
| | | @ApiModelProperty(value = "注册用户手机号") |
| | | private String zcPhone; |
| | | |
| | | @ApiModelProperty(value = "注册日期") |
| | | private String zcDate; |
| | | |
| | | } |
| | |
| | | and user_id=#{userId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="tgmxInfo" resultType="com.xzx.gc.user.vo.TgmxInfoListVo"> |
| | | SELECT |
| | | a.mobile_phone yqrPhone, |
| | | from_base64(b.nick_name) yqrName, |
| | | from_base64(c.nick_name) zcName, |
| | | a.register_mobile_phone zcPhone, |
| | | a.register_time zcDate |
| | | FROM xzx_user_share_info a |
| | | LEFT JOIN xzx_user_info b ON a.mobile_phone=b.mobile_phone |
| | | LEFT JOIN xzx_user_info c ON a.register_mobile_phone=c.mobile_phone |
| | | <where> |
| | | 1=1 |
| | | <if test="record.yqrName != null and record.yqrName != ''"> |
| | | and from_base64(b.nick_name) like concat('%',#{record.yqrName},'%') |
| | | </if> |
| | | <if test="record.zcName != null and record.zcName != ''"> |
| | | and from_base64(c.nick_name) like concat('%',#{record.zcName},'%') |
| | | </if> |
| | | <if test="record.phone != null and record.phone != ''"> |
| | | and (a.register_mobile_phone like concat('%',#{record.phone},'%') |
| | | or a.mobile_phone like concat('%',#{record.phone},'%')) |
| | | </if> |
| | | </where> |
| | | order by a.register_time desc |
| | | </select> |
| | | </mapper> |