新增微信二维码代码

This commit is contained in:
wuyibo
2022-10-19 17:47:41 +08:00
parent 2f53a85bf6
commit fbefdd0d53
4 changed files with 99 additions and 93 deletions

View File

@@ -1,4 +1,5 @@
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -45,10 +46,6 @@ public class UserWxAqrCode extends BaseEntity
@Excel(name = "参数")
private String scene;
/** 微信二维码的base64编码 */
@Excel(name = "微信二维码的base64编码")
private String base64;
/** 二维码地址 */
@Excel(name = "二维码地址")
private String codeImgUrl;
@@ -69,6 +66,10 @@ public class UserWxAqrCode extends BaseEntity
@Excel(name = "宽度")
private Integer width;
/** 用途说明 */
@Excel(name = "用途说明")
private String useDesc;
public void setId(Long id)
{
this.id = id;
@@ -132,15 +133,6 @@ public class UserWxAqrCode extends BaseEntity
{
return scene;
}
public void setBase64(String base64)
{
this.base64 = base64;
}
public String getBase64()
{
return base64;
}
public void setCodeImgUrl(String codeImgUrl)
{
this.codeImgUrl = codeImgUrl;
@@ -186,6 +178,15 @@ public class UserWxAqrCode extends BaseEntity
{
return width;
}
public void setUseDesc(String useDesc)
{
this.useDesc = useDesc;
}
public String getUseDesc()
{
return useDesc;
}
@Override
public String toString() {
@@ -197,12 +198,12 @@ public class UserWxAqrCode extends BaseEntity
.append("modifiedBy", getModifiedBy())
.append("lastUpdatedTime", getLastUpdatedTime())
.append("scene", getScene())
.append("base64", getBase64())
.append("codeImgUrl", getCodeImgUrl())
.append("userId", getUserId())
.append("busType", getBusType())
.append("page", getPage())
.append("width", getWidth())
.append("useDesc", getUseDesc())
.toString();
}
}

View File

@@ -110,12 +110,10 @@ public class UserWxAqrCodeServiceImpl implements IUserWxAqrCodeService
System.out.println("id = "+userWxAqrCode.getId()+" accessToken = "+ accessToken);
WxAppletsCodeVo wxAppletsCodeVo = new WxAppletsCodeVo();
wxAppletsCodeVo.setScene(String.valueOf(userWxAqrCode.getId()));
wxAppletsCodeVo.setPage("pages/index2/index2");
wxAppletsCodeVo.setPage(userWxAqrCode.getPage());
wxAppletsCodeVo = wxAppletsFeign.getWxacodeunlimit(wxAppletsCodeVo,accessToken);
//更新二维码表
userWxAqrCode.setCodeImgUrl(wxAppletsCodeVo.getCodeImgUrl());
userWxAqrCode.setBase64(wxAppletsCodeVo.getBase64());
userWxAqrCode.setPage(wxAppletsCodeVo.getPage());
userWxAqrCode.setScene(wxAppletsCodeVo.getScene());
userWxAqrCode.setWidth(wxAppletsCodeVo.getWidth());
userWxAqrCodeMapper.updateUserWxAqrCode(userWxAqrCode);

View File

@@ -12,16 +12,16 @@
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="scene" column="scene" />
<result property="base64" column="base64" />
<result property="codeImgUrl" column="code_img_url" />
<result property="userId" column="user_id" />
<result property="busType" column="bus_type" />
<result property="page" column="page" />
<result property="width" column="width" />
<result property="useDesc" column="use_desc" />
</resultMap>
<sql id="selectUserWxAqrCodeVo">
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, scene, base64, code_img_url, user_id, bus_type, page, width from user_wx_aqr_code
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, scene, code_img_url, user_id, bus_type, page, width, use_desc from user_wx_aqr_code
</sql>
<select id="selectUserWxAqrCodeList" parameterType="UserWxAqrCode" resultMap="UserWxAqrCodeResult">
@@ -33,12 +33,12 @@
<if test="modifiedBy != null and modifiedBy != ''"> and MODIFIED_BY = #{modifiedBy}</if>
<if test="lastUpdatedTime != null "> and LAST_UPDATED_TIME = #{lastUpdatedTime}</if>
<if test="scene != null and scene != ''"> and scene = #{scene}</if>
<if test="base64 != null and base64 != ''"> and base64 = #{base64}</if>
<if test="codeImgUrl != null and codeImgUrl != ''"> and code_img_url = #{codeImgUrl}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="busType != null and busType != ''"> and bus_type = #{busType}</if>
<if test="page != null and page != ''"> and page = #{page}</if>
<if test="width != null "> and width = #{width}</if>
<if test="useDesc != null and useDesc != ''"> and use_desc = #{useDesc}</if>
</where>
</select>
@@ -56,12 +56,12 @@
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="scene != null">scene,</if>
<if test="base64 != null">base64,</if>
<if test="codeImgUrl != null">code_img_url,</if>
<if test="userId != null">user_id,</if>
<if test="busType != null">bus_type,</if>
<if test="page != null">page,</if>
<if test="width != null">width,</if>
<if test="useDesc != null">use_desc,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">#{isDeleted},</if>
@@ -70,12 +70,12 @@
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="scene != null">#{scene},</if>
<if test="base64 != null">#{base64},</if>
<if test="codeImgUrl != null">#{codeImgUrl},</if>
<if test="userId != null">#{userId},</if>
<if test="busType != null">#{busType},</if>
<if test="page != null">#{page},</if>
<if test="width != null">#{width},</if>
<if test="useDesc != null">#{useDesc},</if>
</trim>
</insert>
@@ -88,12 +88,12 @@
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="scene != null">scene = #{scene},</if>
<if test="base64 != null">base64 = #{base64},</if>
<if test="codeImgUrl != null">code_img_url = #{codeImgUrl},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="busType != null">bus_type = #{busType},</if>
<if test="page != null">page = #{page},</if>
<if test="width != null">width = #{width},</if>
<if test="useDesc != null">use_desc = #{useDesc},</if>
</trim>
where ID = #{id}
</update>