新增页面收集信息页保存

This commit is contained in:
xu0625 2021-04-21 14:33:07 +08:00
parent 45bdc57987
commit 59e68e4eb7
7 changed files with 751 additions and 0 deletions

View File

@ -0,0 +1,152 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta charset="UTF-8">
<meta name="format-detection" content="telephone=no" />
<title>活动</title>
<link rel="stylesheet" href="../draw/css/reset.css">
<link rel="stylesheet" href="../draw/css/style.css">
<link rel="stylesheet" type="text/css" href="../draw/css/popup.css"/>
<link rel="stylesheet" type="text/css" href="../draw/css/myPrize.css"/>
<link rel="stylesheet" type="text/css" href="../draw/css/register.css"/>
<link rel="stylesheet" type="text/css" href="../draw/css/winPrize.css"/>
<link rel="stylesheet" type="text/css" href="../draw/css/goods.css"/>
<link rel="stylesheet" type="text/css" href="../draw/css/rule.css"/>
<link rel="stylesheet" type="text/css" href="css/address.css">
<script src="/js/config.js"></script>
<link rel="stylesheet" href="../draw/css/main.css">
<script src="../draw/js/jquery-1.9.1.min.js"></script>
<script src="../draw/js/awardRotate.js"></script>
<script src="../draw/js/util.js"></script>
<script src="../draw/js/draw.js"></script>
<script>
$(document).ready(function () {
$.ajax({
type: "POST",
async: false,
url: contextRootPath + "/draw/info.action",
data: {actCode: drawCode},
dataType: "json",
success: function (data) {
//todo 根据风格改变css样式
$(".act_guide").attr("background",data.actPageConfigUserinfo[0].bgImg);
$("#titlePri").text(data.actPageConfigUserinfo[0].title);
$("#describePri").text(data.actPageConfigUserinfo[0].description);
$("#agreementPri").val(data.actPageConfigUserinfo[0].agreement);
$("#btnPri").text(data.actPageConfigUserinfo[0].btnText);
if (data.actPageConfigUserinfo[0].mobile=='on'){
$("#phonePri").attr('type','text')
}
if (data.actPageConfigUserinfo[0].mobile=='on'){
$("#phone").attr('type','text')
}
if (data.actPageConfigUserinfo[0].userName=='on'){
$("#name").attr('type','text')
}
if (data.actPageConfigUserinfo[0].gender=='on'){
$("#gender").attr('type','text')
}
if (data.actPageConfigUserinfo[0].address=='on'){
document.getElementById("address").style.display="block";
}
if (data.actPageConfigUserinfo[0].agentName=='on'){
$("#agentName").attr('type','text')
}
if (data.actPageConfigUserinfo[0].agentMobile=='on'){
$("#agentMobile").attr('type','text')
}
if (data.actPageConfigUserinfo[0].agentGender=='on'){
$("#agentGender").attr('type','text')
}
if (data.actPageConfigUserinfo[0].agentNo=='on'){
document.getElementById("agentNo").style.display="block";
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
console.log('网络异常', textStatus, errorThrown);
}
});
});
</script>
</head>
<body class="template_bg popupBox act_guide" style="background-color: #fbdaaf;
background-repeat:no-repeat;
background-attachment:fixed;
background-size:100% 100%;">
<form id="addressId" >
<div class='popup address'>
<div class='popupMin'>
<div class='cont'>
<div id="titlePri"></div>
<div id="describePri"></div>
<div >请填写您的基本信息</div>
<input placeholder="姓名" name="userName" class="uname" type="hidden" id="name">
<input placeholder="手机号" class="phone" name="mobile" type="hidden" id="phone" maxlength="11">
<input placeholder="性别" class="gender" name="gender" height="10px" type="hidden" id="gender">
<textarea placeholder="地址" class="address" name="address" style="display:none;" id="address"></textarea>
<input placeholder="代理人姓名" class="agentName" name="agentName" type="hidden" id="agentName">
<input placeholder="代理人手机号" class="agentMobile" name="agentMobile" type="hidden" id="agentMobile" maxlength="11">
<input placeholder="代理人性别" class="agentGender" name="agentGender" type="hidden" id="agentGender">
<input placeholder="代理人工号" class="agentNo" name="agentNo" style="display:none;" id="agentNo">
<div>
<input type="checkbox" id="protocol"checked="checked" >
<a onclick="protocol(this)" >点击查看协议</a>
<input id="agreementPri" type="hidden">
</div>
<button type="button" id="btnPri" class='button' onclick="saveAddr()"></button>
</div>
</div>
</div>
</form>
<!--登记 弹窗-->
<div class='popup register' style="display: none;">
<div class='popupMin'>
<img src="../draw/images/top01.png" class='top'>
<div class='popCont'>
<div class='left'></div>
<div class='cont'>
<img src="../draw/images/success.png" >
<div>信息登记成功</div>
<div>奖品将在活动结束后四十个工作日寄送</div>
<div type="button" class='button1' onclick="qrCode()">关注微信</div>
</div>
<div class='right'></div>
</div>
<img src="../draw/images/popupList04.png" class='bottom'>
</div>
<img src="../draw/images/delect.png" class='popDelect regDelect'>
</div>
<div class="tip_copy" style="display: none;">
<p></p>
</div>
<script src="../draw/js/main.js"></script>
<script src="../draw/js/scroll.js"></script>
<script src="../draw/js/common.js"></script>
</body>
<script>
function qrCode(){
window.location.href='subscribe.html?drawCode='+drawCode;
}
function protocol() {
var e = $("#agreementPri").val();
alert(e)
}
</script>
</html>

View File

@ -0,0 +1,124 @@
.address{
/* opacity:0;
height:0; */
}
.popupMin{
width:100%;
margin-left:0%;
height:auto !important;
box-sizing: border-box;
position:relative;
display:flex;
flex-direction: column;
/* max-height:1200px; */
margin-bottom:56px;
}
.address .cont{
min-height:400px;
margin-top:-0px;
}
.address .popCont{
z-index: 1000;
}
.address .cont{
background-size: 100% auto;
display:flex;
flex-direction: column;
align-items: center;
}
.address .cont>div:nth-child(1){
font-size:23px;
color:#ffe2ab;
text-align:center;
margin-top:20px;
}
.address .cont>div:nth-child(2){
font-size:17px;
color:#ffe2ab;
text-align:center;
margin-top:9px;
font-weight:bold;
}
.address .cont>div:nth-child(3){
font-size:17px;
color:#ffe2ab;
text-align:center;
margin-top:20px;
font-weight:bold;
}
.address .cont>div:nth-child(12){
font-size:17px;
color:#ffe2ab;
margin-top:15px;
margin-right:35%;
}
.address .cont>div:nth-child(13){
font-size:17px;
color:#ffe2ab;
text-align:center;
margin-top:20px;
font-weight:bold;
}
.address .cont>img:last-child{
width:83%;
height:auto;
object-fit:contain;
margin-top:20px;
margin-bottom:15px;
}
.address .cont>input{
width:90%;
height:30px;
box-sizing: border-box;
margin:0;
padding:0 15px;
border:1px solid #f2ca77;
border-radius:15px;
background: #fff;
margin-top:12px;
}
.address .cont>textarea{
width:90% !important;
max-width:90% !important;
min-height:60px;
box-sizing: border-box;
margin:0;
padding:8px 15px;
border:1px solid #f2ca77;
border-radius:15px;
background: #fff;
margin-top:10px;
outline: none;
line-height:20px;
}
.button { /* 按钮美化 */
width: 40px; /* 宽度 */
height: 30px; /* 高度 */
border-width: 0px; /* 边框宽度 */
border-radius: 3px; /* 边框半径 */
background: #f43c24; /* 背景颜色 */
cursor: pointer; /* 鼠标移入按钮范围时出现手势 */
outline: none; /* 不显示轮廓线 */
font-family: Microsoft YaHei; /* 设置字体 */
color: white; /* 字体颜色 */
font-size: 17px; /* 字体大小 */
}
.button:hover { /* 鼠标移入按钮范围时改变颜色 */
background: #5599FF;
}
.button1 { /* 按钮美化 */
width: 80px; /* 宽度 */
height: 30px; /* 高度 */
border-width: 0px; /* 边框宽度 */
border-radius: 3px; /* 边框半径 */
background: #fff150; /* 背景颜色 */
cursor: pointer; /* 鼠标移入按钮范围时出现手势 */
outline: none; /* 不显示轮廓线 */
font-family: Microsoft YaHei; /* 设置字体 */
color: white; /* 字体颜色 */
font-size: 17px; /* 字体大小 */
}

View File

@ -0,0 +1,151 @@
package com.sinosoft.activity.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 用户信息收集页面对象 draw_user_info
*
* @author xlh
* @date 2021-04-20
*
*/
public class DrawUserInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long awarDrecordId;
/** 姓名 */
@Excel(name = "姓名")
private String userName;
/** 手机号 */
@Excel(name = "手机号")
private String mobile;
/** 性别 */
@Excel(name = "性别")
private String gender;
/** 地址 */
@Excel(name = "地址")
private String address;
/** 代理人姓名 */
@Excel(name = "代理人姓名")
private String agentName;
/** 代理人手机号 */
@Excel(name = "代理人手机号")
private String agentMobile;
/** 代理人性别 */
@Excel(name = "代理人性别")
private String agentGender;
/** 代理人工号 */
@Excel(name = "代理人工号")
private String agentNo;
public void setAwarDrecordId(Long awarDrecordId)
{
this.awarDrecordId = awarDrecordId;
}
public Long getAwarDrecordId()
{
return awarDrecordId;
}
public void setUserName(String userName)
{
this.userName = userName;
}
public String getUserName()
{
return userName;
}
public void setMobile(String mobile)
{
this.mobile = mobile;
}
public String getMobile()
{
return mobile;
}
public void setGender(String gender)
{
this.gender = gender;
}
public String getGender()
{
return gender;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setAgentName(String agentName)
{
this.agentName = agentName;
}
public String getAgentName()
{
return agentName;
}
public void setAgentMobile(String agentMobile)
{
this.agentMobile = agentMobile;
}
public String getAgentMobile()
{
return agentMobile;
}
public void setAgentGender(String agentGender)
{
this.agentGender = agentGender;
}
public String getAgentGender()
{
return agentGender;
}
public void setAgentNo(String agentNo)
{
this.agentNo = agentNo;
}
public String getAgentNo()
{
return agentNo;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("awarDrecordId", getAwarDrecordId())
.append("userName", getUserName())
.append("mobile", getMobile())
.append("gender", getGender())
.append("address", getAddress())
.append("agentName", getAgentName())
.append("agentMobile", getAgentMobile())
.append("agentGender", getAgentGender())
.append("agentNo", getAgentNo())
.toString();
}
}

View File

@ -0,0 +1,62 @@
package com.sinosoft.activity.mapper;
import com.sinosoft.activity.domain.DrawUserInfo;
import java.util.List;
/**
* 用户信息收集页面Mapper接口
*
* @author ruoyi
* @date 2021-04-20
*/
public interface DrawUserInfoMapper
{
/**
* 查询用户信息收集页面
*
* @param awarDrecordId 用户信息收集页面ID
* @return 用户信息收集页面
*/
public DrawUserInfo selectDrawUserInfoById(Long awarDrecordId);
/**
* 查询用户信息收集页面列表
*
* @param drawUserInfo 用户信息收集页面
* @return 用户信息收集页面集合
*/
public List<DrawUserInfo> selectDrawUserInfoList(DrawUserInfo drawUserInfo);
/**
* 新增用户信息收集页面
*
* @param drawUserInfo 用户信息收集页面
* @return 结果
*/
public int insertDrawUserInfo(DrawUserInfo drawUserInfo);
/**
* 修改用户信息收集页面
*
* @param drawUserInfo 用户信息收集页面
* @return 结果
*/
public int updateDrawUserInfo(DrawUserInfo drawUserInfo);
/**
* 删除用户信息收集页面
*
* @param awarDrecordId 用户信息收集页面ID
* @return 结果
*/
public int deleteDrawUserInfoById(Long awarDrecordId);
/**
* 批量删除用户信息收集页面
*
* @param awarDrecordIds 需要删除的数据ID
* @return 结果
*/
public int deleteDrawUserInfoByIds(String[] awarDrecordIds);
}

View File

@ -0,0 +1,62 @@
package com.sinosoft.activity.service;
import com.sinosoft.activity.domain.DrawUserInfo;
import java.util.List;
/**
* 用户信息收集页面Service接口
*
* @author ruoyi
* @date 2021-04-20
*/
public interface IDrawUserInfoService
{
/**
* 查询用户信息收集页面
*
* @param awarDrecordId 用户信息收集页面ID
* @return 用户信息收集页面
*/
public DrawUserInfo selectDrawUserInfoById(Long awarDrecordId);
/**
* 查询用户信息收集页面列表
*
* @param drawUserInfo 用户信息收集页面
* @return 用户信息收集页面集合
*/
public List<DrawUserInfo> selectDrawUserInfoList(DrawUserInfo drawUserInfo);
/**
* 新增用户信息收集页面
*
* @param drawUserInfo 用户信息收集页面
* @return 结果
*/
public int insertDrawUserInfo(DrawUserInfo drawUserInfo);
/**
* 修改用户信息收集页面
*
* @param drawUserInfo 用户信息收集页面
* @return 结果
*/
public int updateDrawUserInfo(DrawUserInfo drawUserInfo);
/**
* 批量删除用户信息收集页面
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteDrawUserInfoByIds(String ids);
/**
* 删除用户信息收集页面信息
*
* @param awarDrecordId 用户信息收集页面ID
* @return 结果
*/
public int deleteDrawUserInfoById(Long awarDrecordId);
}

View File

@ -0,0 +1,98 @@
package com.sinosoft.activity.service.impl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.sinosoft.activity.domain.DrawUserInfo;
import com.sinosoft.activity.mapper.DrawUserInfoMapper;
import com.sinosoft.activity.service.IDrawUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 用户信息收集页面Service业务层处理
*
* @author ruoyi
* @date 2021-04-20
*/
@Service
public class DrawUserInfoServiceImpl implements IDrawUserInfoService
{
@Autowired
private DrawUserInfoMapper drawUserInfoMapper;
/**
* 查询用户信息收集页面
*
* @param awarDrecordId 用户信息收集页面ID
* @return 用户信息收集页面
*/
@Override
public DrawUserInfo selectDrawUserInfoById(Long awarDrecordId)
{
return drawUserInfoMapper.selectDrawUserInfoById(awarDrecordId);
}
/**
* 查询用户信息收集页面列表
*
* @param drawUserInfo 用户信息收集页面
* @return 用户信息收集页面
*/
@Override
public List<DrawUserInfo> selectDrawUserInfoList(DrawUserInfo drawUserInfo)
{
return drawUserInfoMapper.selectDrawUserInfoList(drawUserInfo);
}
/**
* 新增用户信息收集页面
*
* @param drawUserInfo 用户信息收集页面
* @return 结果
*/
@Override
public int insertDrawUserInfo(DrawUserInfo drawUserInfo)
{
drawUserInfo.setCreateTime(DateUtils.getNowDate());
return drawUserInfoMapper.insertDrawUserInfo(drawUserInfo);
}
/**
* 修改用户信息收集页面
*
* @param drawUserInfo 用户信息收集页面
* @return 结果
*/
@Override
public int updateDrawUserInfo(DrawUserInfo drawUserInfo)
{
drawUserInfo.setUpdateTime(DateUtils.getNowDate());
return drawUserInfoMapper.updateDrawUserInfo(drawUserInfo);
}
/**
* 删除用户信息收集页面对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteDrawUserInfoByIds(String ids)
{
return drawUserInfoMapper.deleteDrawUserInfoByIds(Convert.toStrArray(ids));
}
/**
* 删除用户信息收集页面信息
*
* @param awarDrecordId 用户信息收集页面ID
* @return 结果
*/
@Override
public int deleteDrawUserInfoById(Long awarDrecordId)
{
return drawUserInfoMapper.deleteDrawUserInfoById(awarDrecordId);
}
}

View File

@ -0,0 +1,102 @@
<?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.sinosoft.activity.mapper.DrawUserInfoMapper">
<resultMap type="DrawUserInfo" id="DrawUserInfoResult">
<result property="awarDrecordId" column="awarDrecordId" />
<result property="userName" column="userName" />
<result property="mobile" column="mobile" />
<result property="gender" column="gender" />
<result property="address" column="address" />
<result property="agentName" column="agentName" />
<result property="agentMobile" column="agentMobile" />
<result property="agentGender" column="agentGender" />
<result property="agentNo" column="agentNo" />
<result property="createTime" column="createTime" />
<result property="updateTime" column="updateTime" />
</resultMap>
<sql id="selectDrawUserInfoVo">
select awarDrecordId, userName, mobile, gender, address, agentName, agentMobile, agentGender, agentNo, createTime, updateTime from draw_user_info
</sql>
<select id="selectDrawUserInfoList" parameterType="DrawUserInfo" resultMap="DrawUserInfoResult">
<include refid="selectDrawUserInfoVo"/>
<where>
<if test="userName != null and userName != ''"> and userName like concat('%', #{userName}, '%')</if>
<if test="mobile != null and mobile != ''"> and mobile = #{mobile}</if>
<if test="gender != null and gender != ''"> and gender = #{gender}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="agentName != null and agentName != ''"> and agentName like concat('%', #{agentName}, '%')</if>
<if test="agentMobile != null and agentMobile != ''"> and agentMobile = #{agentMobile}</if>
<if test="agentGender != null and agentGender != ''"> and agentGender = #{agentGender}</if>
<if test="agentNo != null "> and agentNo = #{agentNo}</if>
<if test="createTime != null "> and createTime = #{createTime}</if>
<if test="updateTime != null "> and updateTime = #{updateTime}</if>
</where>
</select>
<select id="selectDrawUserInfoById" parameterType="Long" resultMap="DrawUserInfoResult">
<include refid="selectDrawUserInfoVo"/>
where awarDrecordId = #{awarDrecordId}
</select>
<insert id="insertDrawUserInfo" parameterType="DrawUserInfo">
insert into draw_user_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userName != null">userName,</if>
<if test="mobile != null">mobile,</if>
<if test="gender != null">gender,</if>
<if test="address != null">address,</if>
<if test="agentName != null">agentName,</if>
<if test="agentMobile != null">agentMobile,</if>
<if test="agentGender != null">agentGender,</if>
<if test="agentNo != null">agentNo,</if>
<if test="createTime != null">createTime,</if>
<if test="updateTime != null">updateTime,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userName != null">#{userName},</if>
<if test="mobile != null">#{mobile},</if>
<if test="gender != null">#{gender},</if>
<if test="address != null">#{address},</if>
<if test="agentName != null">#{agentName},</if>
<if test="agentMobile != null">#{agentMobile},</if>
<if test="agentGender != null">#{agentGender},</if>
<if test="agentNo != null">#{agentNo},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateDrawUserInfo" parameterType="DrawUserInfo">
update draw_user_info
<trim prefix="SET" suffixOverrides=",">
<if test="userName != null">userName = #{userName},</if>
<if test="mobile != null">mobile = #{mobile},</if>
<if test="gender != null">gender = #{gender},</if>
<if test="address != null">address = #{address},</if>
<if test="agentName != null">agentName = #{agentName},</if>
<if test="agentMobile != null">agentMobile = #{agentMobile},</if>
<if test="agentGender != null">agentGender = #{agentGender},</if>
<if test="agentNo != null">agentNo = #{agentNo},</if>
<if test="createTime != null">createTime = #{createTime},</if>
<if test="updateTime != null">updateTime = #{updateTime},</if>
</trim>
where awarDrecordId = #{awarDrecordId}
</update>
<delete id="deleteDrawUserInfoById" parameterType="Long">
delete from draw_user_info where awarDrecordId = #{awarDrecordId}
</delete>
<delete id="deleteDrawUserInfoByIds" parameterType="String">
delete from draw_user_info where awarDrecordId in
<foreach item="awarDrecordId" collection="array" open="(" separator="," close=")">
#{awarDrecordId}
</foreach>
</delete>
</mapper>