diff --git a/suimangAdmin/src/main/resources/db/migration/V2023071300003wx_c_user_live_basic_info.sql b/suimangAdmin/src/main/resources/db/migration/V2023071300003wx_c_user_live_basic_info.sql new file mode 100644 index 0000000..5e46f10 --- /dev/null +++ b/suimangAdmin/src/main/resources/db/migration/V2023071300003wx_c_user_live_basic_info.sql @@ -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; diff --git a/suimangService/src/main/java/com/iformall/mapper/WxCLiveUserBasicInfoMapper.java b/suimangService/src/main/java/com/iformall/mapper/WxCLiveUserBasicInfoMapper.java new file mode 100644 index 0000000..ffa1833 --- /dev/null +++ b/suimangService/src/main/java/com/iformall/mapper/WxCLiveUserBasicInfoMapper.java @@ -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 selectById(Long id); + + void updateCode(Long id, String mcode); +} diff --git a/suimangService/src/main/java/com/iformall/service/WxCLiveUserBasicInfoService.java b/suimangService/src/main/java/com/iformall/service/WxCLiveUserBasicInfoService.java new file mode 100644 index 0000000..99de2c1 --- /dev/null +++ b/suimangService/src/main/java/com/iformall/service/WxCLiveUserBasicInfoService.java @@ -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); +} diff --git a/suimangService/src/main/java/com/iformall/service/impl/WxCLiveUserBasicInfoServiceImpl.java b/suimangService/src/main/java/com/iformall/service/impl/WxCLiveUserBasicInfoServiceImpl.java new file mode 100644 index 0000000..dd9b754 --- /dev/null +++ b/suimangService/src/main/java/com/iformall/service/impl/WxCLiveUserBasicInfoServiceImpl.java @@ -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); + } +} diff --git a/suimangService/src/main/resources/mapper/WxCLiveUserBasicInfoMapper.xml b/suimangService/src/main/resources/mapper/WxCLiveUserBasicInfoMapper.xml new file mode 100644 index 0000000..3874962 --- /dev/null +++ b/suimangService/src/main/resources/mapper/WxCLiveUserBasicInfoMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + where 1=1 + + + and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') + + + and wcubi.`id` = #{id} + + + + and wcubi.`phone` like concat('%', #{phone},'%') + + + + and wcubi.`birthdate` = #{birthdate} + + + + and wcubi.`education` like concat('%', #{education},'%') + + + + and wcubi.`sex` = #{sex} + + + + and wcubi.`email` like concat('%', #{email},'%') + + + + and wcubi.`address` like concat('%', #{address},'%') + + + + and wcubi.poins >= #{levelStartScore} + + + + and wcubi.poins < #{levelEndScore} + + + + and wcubi.`tag_id` = #{tagId} + + + + and wcubi.`create_date` = #{createDate} + + + + and wcubi.`update_date` = #{updateDate} + + + + and wcubi.`act_record` = #{actRecord} + + + + and wcubi.`name` like concat('%', #{name},'%') + + + and wcubi.`create_date` between #{startTime} and #{endTime} + + + + and wcubi.`active_time` between #{activeStartTime} and #{activeEndTime} + + + + and wcubi.`status` = #{status} + + + + and wcubi.id in + + #{idItem} + + + + order by ${sortColumns} + + + + + + + + + update wx_c_user_live_basic_info set code = #{mcode} where id = #{id} + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + where 1=1 + + + and wcubi.`id` = #{id} + + + + and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') + + + + and wcubi.`phone` like concat('%', #{phone},'%') + + + + and wcubi.`birthdate` = #{birthdate} + + + + and wcubi.`education` like concat('%', #{education},'%') + + + + and wcubi.`sex` = #{sex} + + + + and wcubi.`email` like concat('%', #{email},'%') + + + + and wcubi.`address` like concat('%', #{address},'%') + + + + and wcubi.`poins` = #{poins} + + + + and wcubi.`tag_id` = #{tagId} + + + + and wcubi.`create_date` = #{createDate} + + + + and wcubi.`update_date` = #{updateDate} + + + + and wcubi.`act_record` = #{actRecord} + + + + and wcubi.`name` like concat('%', #{name},'%') + + + and wcubi.`create_date` between #{startTime} and #{endTime} + + + + and wcubi.`active_time` between #{activeStartTime} and #{activeEndTime} + + + + and wcubi.id in + + #{idItem} + + + order by wcubi.`active_time` DESC + + + + + where 1=1 + + and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') + + + and wcubi.create_date >= #{startTime} + + + + and wcubi.create_date <= #{endTime} + + + + and wcubi.birthdate >= #{birthStartTime} + + + + and wcubi.birthdate < #{birthEndTime} + + + + and wcubi.active_time >= #{loginStartTime} + + + + and wcubi.active_time <= #{loginEndTime} + + + + and wcubi.phone in (${phones}) + + + + and wcubi.poins >= #{levelStartScore} + + and wcubi.poins < #{levelEndScore} + + + + + and (wcubi.poins is null or + (wcubi.poins >= #{levelStartScore} + + and wcubi.poins < #{levelEndScore} + + )) + + + + and wcubi.id in + + #{idItem} + + + + + and wcubi.`tag_id` in + + #{tagIdItem} + + + order by ${sortColumns} + + + + + + + + + + + \ No newline at end of file