Selaa lähdekoodia

慧播登入接口修改

private_deployment
谈文友 1 vuosi sitten
vanhempi
commit
fee0789f19
5 muutettua tiedostoa jossa 402 lisäystä ja 0 poistoa
  1. +32
    -0
      suimangAdmin/src/main/resources/db/migration/V2023071300003wx_c_user_live_basic_info.sql
  2. +11
    -0
      suimangService/src/main/java/com/iformall/mapper/WxCLiveUserBasicInfoMapper.java
  3. +9
    -0
      suimangService/src/main/java/com/iformall/service/WxCLiveUserBasicInfoService.java
  4. +27
    -0
      suimangService/src/main/java/com/iformall/service/impl/WxCLiveUserBasicInfoServiceImpl.java
  5. +323
    -0
      suimangService/src/main/resources/mapper/WxCLiveUserBasicInfoMapper.xml

+ 32
- 0
suimangAdmin/src/main/resources/db/migration/V2023071300003wx_c_user_live_basic_info.sql Näytä tiedosto

@@ -0,0 +1,32 @@
/*
Navicat Premium Data Transfer

Source Server : photo
Source Server Type : MySQL
Source Server Version : 80026 (8.0.26)
Source Host : 182.92.151.30:3306
Source Schema : mallink_suimang_test

Target Server Type : MySQL
Target Server Version : 80026 (8.0.26)
File Encoding : 65001

Date: 18/07/2023 12:14:57
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for wx_c_user_live_basic_info
-- ----------------------------
DROP TABLE IF EXISTS `wx_c_user_live_basic_info`;
CREATE TABLE `wx_c_user_live_basic_info` (
`id` bigint NOT NULL,
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
`version` int NULL DEFAULT NULL,
`expire_time` datetime NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;

+ 11
- 0
suimangService/src/main/java/com/iformall/mapper/WxCLiveUserBasicInfoMapper.java Näytä tiedosto

@@ -0,0 +1,11 @@
package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxCUserBasicInfo;

public interface WxCLiveUserBasicInfoMapper extends CommonMapper<WxCUserBasicInfo, String> {

WxCUserBasicInfo selectById(Long id);

void updateCode(Long id, String mcode);
}

+ 9
- 0
suimangService/src/main/java/com/iformall/service/WxCLiveUserBasicInfoService.java Näytä tiedosto

@@ -0,0 +1,9 @@
package com.iformall.service;

import com.iformall.domain.po.WxCUserBasicInfo;

public interface WxCLiveUserBasicInfoService {
WxCUserBasicInfo getById(Long id);

void updateCode(Long id, String mcode);
}

+ 27
- 0
suimangService/src/main/java/com/iformall/service/impl/WxCLiveUserBasicInfoServiceImpl.java Näytä tiedosto

@@ -0,0 +1,27 @@
package com.iformall.service.impl;

import com.iformall.domain.po.WxCUserBasicInfo;
import com.iformall.mapper.WxCLiveUserBasicInfoMapper;
import com.iformall.service.WxCLiveUserBasicInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class WxCLiveUserBasicInfoServiceImpl implements WxCLiveUserBasicInfoService {

@Autowired
WxCLiveUserBasicInfoMapper wxCLiveUserBasicInfoMapper;


@Override
public WxCUserBasicInfo getById(Long id) {
return wxCLiveUserBasicInfoMapper.selectById(id);

}
@Override
public void updateCode(Long id, String mcode) {

wxCLiveUserBasicInfoMapper.updateCode(id,mcode);
}
}

+ 323
- 0
suimangService/src/main/resources/mapper/WxCLiveUserBasicInfoMapper.xml Näytä tiedosto

@@ -0,0 +1,323 @@
<?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="com.iformall.mapper.WxCLiveUserBasicInfoMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCUserBasicInfo">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/>
<result column="birthdate" jdbcType="TIMESTAMP" property="birthdate"/>
<result column="education" jdbcType="VARCHAR" property="education"/>
<result column="sex" jdbcType="INTEGER" property="sex"/>
<result column="height" jdbcType="VARCHAR" property="height"/>
<result column="weight" jdbcType="VARCHAR" property="weight"/>
<result column="id_card" jdbcType="VARCHAR" property="idCard"/>
<result column="email" jdbcType="VARCHAR" property="email"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
<result column="poins" jdbcType="INTEGER" property="poins"/>
<result column="tag_id" jdbcType="BIGINT" property="tagId"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="final_tenant_id" jdbcType="VARCHAR" property="finalTenantId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="level" jdbcType="VARCHAR" property="level"/>
<result column="nick_name" jdbcType="VARCHAR" property="nickName"/>
<result column="avatar_url" jdbcType="VARCHAR" property="avatarUrl"/>
<result column="credit" jdbcType="INTEGER" property="credit"/>
<result column="active_time" jdbcType="TIMESTAMP" property="activeTime"/>
<result column="login_count" jdbcType="INTEGER" property="loginCount"/>
<result column="act_record" jdbcType="INTEGER" property="actRecord"/>
<result column="score_date" jdbcType="TIMESTAMP" property="scoreDate"/>
<result column="code" jdbcType="VARCHAR" property="code"/>
<result column="version" jdbcType="INTEGER" property="version"/>
<result column="expire_time" jdbcType="VARCHAR" property="expireTime"/>
</resultMap>


<sql id="allColumns">
wcubi.`id`,wcubi.`phone`,wcubi.`birthdate`,wcubi.`education`,wcubi.`sex`,wcubi.`height`,wcubi.`weight`,wcubi.`id_card`,wcubi.`email`,
wcubi.`address`,wcubi.`poins`,wcubi.`tag_id`,wcubi.`create_date`,wcubi.`update_date`,
wcubi.`final_tenant_id`,wcubi.`tenant_id`,wcubi.`parent_tenant_id`,wcubi.`name`,wcubi.`nick_name`,
wcubi.`avatar_url`,wcubi.`credit`,wcubi.`active_time`,wcubi.`login_count`,wcubi.`act_record`,
wcubi.score_date,wcubi.status,wcubi1.code,wcubi1.version,wcubi1.expire_time
</sql>

<sql id="dynamicWhereConditions">
where 1=1

<if test=" null != tenantId and '' != tenantId">
and wcubi.`tenant_id` like concat('%,', #{tenantId},',%')
</if>
<if test=" null != id ">
and wcubi.`id` = #{id}
</if>

<if test=" null != phone ">
and wcubi.`phone` like concat('%', #{phone},'%')
</if>

<if test=" null != birthdate ">
and wcubi.`birthdate` = #{birthdate}
</if>

<if test=" null != education ">
and wcubi.`education` like concat('%', #{education},'%')
</if>

<if test=" null != sex ">
and wcubi.`sex` = #{sex}
</if>

<if test=" null != email ">
and wcubi.`email` like concat('%', #{email},'%')
</if>

<if test=" null != address ">
and wcubi.`address` like concat('%', #{address},'%')
</if>

<if test=" null != levelStartScore ">
and wcubi.poins &gt;= #{levelStartScore}
</if>

<if test=" null != levelEndScore">
and wcubi.poins &lt; #{levelEndScore}
</if>

<if test=" null != tagId ">
and wcubi.`tag_id` = #{tagId}
</if>

<if test=" null != createDate ">
and wcubi.`create_date` = #{createDate}
</if>

<if test=" null != updateDate ">
and wcubi.`update_date` = #{updateDate}
</if>

<if test=" null != actRecord ">
and wcubi.`act_record` = #{actRecord}
</if>

<if test=" null != name ">
and wcubi.`name` like concat('%', #{name},'%')
</if>
<if test=" null != startTime and null != endTime">
and wcubi.`create_date` between #{startTime} and #{endTime}
</if>

<if test=" null != activeStartTime and null != activeEndTime">
and wcubi.`active_time` between #{activeStartTime} and #{activeEndTime}
</if>

<if test=" null != status ">
and wcubi.`status` = #{status}
</if>

<if test=" null != ids ">
and wcubi.id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>

<if test=" null != sortColumns">order by ${sortColumns}</if>

</sql>



<select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
select *
from wx_c_user_live_basic_info wcubi1
where wcubi1.id =#{id}
</select>

<update id="updateCode">
update wx_c_user_live_basic_info set code = #{mcode} where id = #{id}
</update>


<sql id="allColumnsOfScoreList">
wcubi.id,wcubi.phone,wcubi.birthdate,wcubi.education,wcubi.sex,wcubi.`height`,wcubi.`weight`,wcubi.`id_card`,wcubi.email,wcubi.address,wcubi.poins,wcubi.tag_id,
wcubi.create_date,wcubi.update_date,wcubi.name,wcubi.level,wcubi.nick_name,wcubi.score_date,wcubi.final_tenant_id
</sql>


<resultMap id="VoBaseResultMap" type="com.iformall.domain.vo.WxCUserBasicInfoVo">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/>
<result column="birthdate" jdbcType="TIMESTAMP" property="birthdate"/>
<result column="education" jdbcType="VARCHAR" property="education"/>
<result column="sex" jdbcType="INTEGER" property="sex"/>
<result column="height" jdbcType="VARCHAR" property="height"/>
<result column="weight" jdbcType="VARCHAR" property="weight"/>
<result column="id_card" jdbcType="VARCHAR" property="idCard"/>
<result column="email" jdbcType="VARCHAR" property="email"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
<result column="poins" jdbcType="INTEGER" property="poins"/>
<result column="tag_id" jdbcType="BIGINT" property="tagId"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="final_tenant_id" jdbcType="VARCHAR" property="finalTenantId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="level" jdbcType="VARCHAR" property="level"/>
<result column="nick_name" jdbcType="VARCHAR" property="nickName"/>
<result column="credit" jdbcType="INTEGER" property="credit"/>
<result column="tags" jdbcType="VARCHAR" property="tags"/>
<result column="active_time" jdbcType="TIMESTAMP" property="activeTime"/>
</resultMap>

<sql id="dynamicVoWhereConditions">
where 1=1

<if test=" null != id ">
and wcubi.`id` = #{id}
</if>

<if test=" null != tenantId and '' != tenantId">
and wcubi.`tenant_id` like concat('%,', #{tenantId},',%')
</if>

<if test=" null != phone and '' != phone">
and wcubi.`phone` like concat('%', #{phone},'%')
</if>

<if test=" null != birthdate ">
and wcubi.`birthdate` = #{birthdate}
</if>

<if test=" null != education and '' != education">
and wcubi.`education` like concat('%', #{education},'%')
</if>

<if test=" null != sex ">
and wcubi.`sex` = #{sex}
</if>

<if test=" null != email and '' != email">
and wcubi.`email` like concat('%', #{email},'%')
</if>

<if test=" null != address and '' != address">
and wcubi.`address` like concat('%', #{address},'%')
</if>

<if test=" null != poins ">
and wcubi.`poins` = #{poins}
</if>

<if test=" null != tagId ">
and wcubi.`tag_id` = #{tagId}
</if>

<if test=" null != createDate ">
and wcubi.`create_date` = #{createDate}
</if>

<if test=" null != updateDate ">
and wcubi.`update_date` = #{updateDate}
</if>

<if test=" null != actRecord ">
and wcubi.`act_record` = #{actRecord}
</if>

<if test=" null != name and '' != name">
and wcubi.`name` like concat('%', #{name},'%')
</if>
<if test=" null != startTime and null!=endTime">
and wcubi.`create_date` between #{startTime} and #{endTime}
</if>

<if test=" null != activeStartTime and null!=activeEndTime">
and wcubi.`active_time` between #{activeStartTime} and #{activeEndTime}
</if>

<if test=" null != ids ">
and wcubi.id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
order by wcubi.`active_time` DESC
<!--<if test=" null != sortColumns">order by ${sortColumns}</if>-->
</sql>

<sql id="filterWhereConditions">
where 1=1
<if test=" null != tenantId and '' != tenantId">
and wcubi.`tenant_id` like concat('%,', #{tenantId},',%')
</if>
<if test=" null != startTime ">
and wcubi.create_date &gt;= #{startTime}
</if>

<if test=" null != endTime">
and wcubi.create_date &lt;= #{endTime}
</if>

<if test=" null != birthStartTime ">
and wcubi.birthdate &gt;= #{birthStartTime}
</if>

<if test=" null != birthEndTime">
and wcubi.birthdate &lt; #{birthEndTime}
</if>

<if test=" null != loginStartTime ">
and wcubi.active_time &gt;= #{loginStartTime}
</if>

<if test=" null != loginEndTime">
and wcubi.active_time &lt;= #{loginEndTime}
</if>

<if test=" null != phones">
and wcubi.phone in (${phones})
</if>

<if test=" null != levelStartScore and (0 != levelStartScore and '' != levelStartScore)">
and wcubi.poins &gt;= #{levelStartScore}
<if test=" null != levelEndScore">
and wcubi.poins &lt; #{levelEndScore}
</if>
</if>

<if test=" null != levelStartScore and (0 == levelStartScore or '' == levelStartScore)">
and (wcubi.poins is null or
(wcubi.poins &gt;= #{levelStartScore}
<if test=" null != levelEndScore">
and wcubi.poins &lt; #{levelEndScore}
</if>
))
</if>

<if test=" null != ids ">
and wcubi.id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>

<if test=" null != tagIds ">
and wcubi.`tag_id` in
<foreach collection="tagIds" index="index" item="tagIdItem" open="(" separator="," close=")">
#{tagIdItem}
</foreach>
</if>
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>









</mapper>

Ladataan…
Peruuta
Tallenna