公众号需求开发

This commit is contained in:
kuang.yife 2024-06-21 21:35:08 +08:00
parent aa2eff476f
commit 558b6eac57
10 changed files with 56 additions and 17 deletions

View File

@ -1,7 +1,9 @@
package com.playlet.web.service.app.impl; package com.playlet.web.service.app.impl;
import com.playlet.system.domain.PlayletPublicDetail;
import com.playlet.system.domain.PlayletPublicUser; import com.playlet.system.domain.PlayletPublicUser;
import com.playlet.system.domain.PublicDetailShare; import com.playlet.system.domain.PublicDetailShare;
import com.playlet.system.service.IPlayletPublicDetailService;
import com.playlet.system.service.IPlayletPublicUserService; import com.playlet.system.service.IPlayletPublicUserService;
import com.playlet.system.service.IPublicDetailShareService; import com.playlet.system.service.IPublicDetailShareService;
import com.playlet.web.service.app.PublicDetailShareAppService; import com.playlet.web.service.app.PublicDetailShareAppService;
@ -19,6 +21,8 @@ public class PublicDetailShareAppServiceImpl implements PublicDetailShareAppServ
private final IPlayletPublicUserService iPlayletPublicUserService; private final IPlayletPublicUserService iPlayletPublicUserService;
private final IPlayletPublicDetailService iPlayletPublicDetailService;
@Override @Override
public void addRecord(PublicDetailShare publicDetailShare) { public void addRecord(PublicDetailShare publicDetailShare) {
// 翻译 // 翻译
@ -32,5 +36,11 @@ public class PublicDetailShareAppServiceImpl implements PublicDetailShareAppServ
publicDetailShare.setReaderTwoName(userTwo.getName()); publicDetailShare.setReaderTwoName(userTwo.getName());
} }
iPublicDetailShareService.insertPublicDetailShare(publicDetailShare); iPublicDetailShareService.insertPublicDetailShare(publicDetailShare);
// 添加浏览记录时,同时需要增加一下文章表上面的阅读次数
PlayletPublicDetail playletPublicDetail = iPlayletPublicDetailService.getById(publicDetailShare.getDetailId());
if(playletPublicDetail != null){
playletPublicDetail.setReadCount(playletPublicDetail.getReadCount() + 1);
iPlayletPublicDetailService.updateById(playletPublicDetail);
}
} }
} }

View File

@ -1,6 +1,7 @@
package com.playlet.web.service.app.impl; package com.playlet.web.service.app.impl;
import com.playlet.system.domain.PublicUserRecord; import com.playlet.system.domain.PublicUserRecord;
import com.playlet.system.service.IPlayletPublicDetailService;
import com.playlet.system.service.IPublicUserRecordService; import com.playlet.system.service.IPublicUserRecordService;
import com.playlet.web.service.app.PublicUserRecordAppService; import com.playlet.web.service.app.PublicUserRecordAppService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -15,6 +16,8 @@ public class PublicUserRecordAppServiceImpl implements PublicUserRecordAppServic
private final IPublicUserRecordService iPublicUserRecordService; private final IPublicUserRecordService iPublicUserRecordService;
private final IPlayletPublicDetailService iPlayletPublicDetailService;
@Override @Override
public void addRecord(PublicUserRecord userRecord) { public void addRecord(PublicUserRecord userRecord) {
iPublicUserRecordService.insertPublicUserRecord(userRecord); iPublicUserRecordService.insertPublicUserRecord(userRecord);

View File

@ -22,6 +22,15 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">认证标识:</label>
<div class="col-sm-8">
<label class="radio-box">
<input type="radio" checked="" value="01" name="detailType">个人</label>
<label class="radio-box">
<input type="radio" value="02" name="detailType">企业</label>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">简介:</label> <label class="col-sm-3 control-label">简介:</label>
<div class="col-sm-8"> <div class="col-sm-8">

View File

@ -23,6 +23,15 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">认证标识:</label>
<div class="col-sm-8">
<label class="radio-box">
<input type="radio" th:checked="${playletPublicAccount.detailType == '01' ? true : false}" value="01" name="detailType">个人</label>
<label class="radio-box">
<input type="radio" th:checked="${playletPublicAccount.detailType == '02' ? true : false}" value="02" name="detailType">企业</label>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">简介:</label> <label class="col-sm-3 control-label">简介:</label>
<div class="col-sm-8"> <div class="col-sm-8">

View File

@ -43,7 +43,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">片附件</label> <label class="col-sm-3 control-label">缩略图:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="imgUrl" type="text" hidden> <input name="imgUrl" type="text" hidden>
<div class="file-loading"> <div class="file-loading">
@ -69,6 +69,12 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">简介:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">详情(富文本)</label> <label class="col-sm-3 control-label">详情(富文本)</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -142,12 +148,6 @@
<input name="detailTag" class="form-control" type="text"> <input name="detailTag" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />

View File

@ -95,9 +95,9 @@
}, },
{ {
field: 'imgUrl', field: 'imgUrl',
title: '图', title: '缩略图',
formatter: function(value) { formatter: function(value) {
if (value != null && value !== ''){return '<a target="_blank" href="' + value+ '" download="false"><a/>';} if (value != null && value !== ''){return '<a target="_blank" href="' + value+ '" download="false">缩略<a/>';}
else {return '<a><a/>'} else {return '<a><a/>'}
} }
}, },

View File

@ -30,7 +30,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label"></label> <label class="col-sm-3 control-label">缩略图:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="imgUrl" th:field="*{imgUrl}" type="text" hidden="hidden"> <input name="imgUrl" th:field="*{imgUrl}" type="text" hidden="hidden">
<div class="file-loading"> <div class="file-loading">
@ -56,6 +56,12 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">简介:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">详情(富文本)</label> <label class="col-sm-3 control-label">详情(富文本)</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -69,12 +75,6 @@
<input name="detailTag" th:field="*{detailTag}" class="form-control" type="text"> <input name="detailTag" th:field="*{detailTag}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />

View File

@ -39,6 +39,9 @@ public class PlayletPublicAccount extends BaseEntity
@ApiModelProperty(value = "类型 例如: 01.男频, 02.女频") @ApiModelProperty(value = "类型 例如: 01.男频, 02.女频")
private String publicType; private String publicType;
@ApiModelProperty(value = "认证标识 01.个人02.企业")
private String detailType;
/** 简介 */ /** 简介 */
@Excel(name = "简介") @Excel(name = "简介")
@ApiModelProperty(value = "简介") @ApiModelProperty(value = "简介")

View File

@ -8,6 +8,7 @@
<result property="id" column="id" /> <result property="id" column="id" />
<result property="name" column="name" /> <result property="name" column="name" />
<result property="publicType" column="public_type" /> <result property="publicType" column="public_type" />
<result property="detailType" column="detail_type" />
<result property="introduction" column="introduction" /> <result property="introduction" column="introduction" />
<result property="authorAlias" column="author_alias" /> <result property="authorAlias" column="author_alias" />
<result property="managerId" column="manager_id" /> <result property="managerId" column="manager_id" />
@ -23,7 +24,7 @@
</resultMap> </resultMap>
<sql id="selectPlayletPublicAccountVo"> <sql id="selectPlayletPublicAccountVo">
select id, name, public_type, introduction, author_alias, manager_id, logo_url, address, original_content_count, followers_count, create_by, create_time, update_by, update_time, remark from playlet_public_account select id, name, public_type, detail_type, introduction, author_alias, manager_id, logo_url, address, original_content_count, followers_count, create_by, create_time, update_by, update_time, remark from playlet_public_account
</sql> </sql>
<select id="selectPlayletPublicAccountList" parameterType="PlayletPublicAccount" resultMap="PlayletPublicAccountResult"> <select id="selectPlayletPublicAccountList" parameterType="PlayletPublicAccount" resultMap="PlayletPublicAccountResult">
@ -50,6 +51,7 @@
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if> <if test="name != null">name,</if>
<if test="publicType != null">public_type,</if> <if test="publicType != null">public_type,</if>
<if test="detailType != null">detail_type,</if>
<if test="introduction != null">introduction,</if> <if test="introduction != null">introduction,</if>
<if test="authorAlias != null">author_alias,</if> <if test="authorAlias != null">author_alias,</if>
<if test="managerId != null">manager_id,</if> <if test="managerId != null">manager_id,</if>
@ -66,6 +68,7 @@
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if> <if test="name != null">#{name},</if>
<if test="publicType != null">#{publicType},</if> <if test="publicType != null">#{publicType},</if>
<if test="detailType != null">#{detailType},</if>
<if test="introduction != null">#{introduction},</if> <if test="introduction != null">#{introduction},</if>
<if test="authorAlias != null">#{authorAlias},</if> <if test="authorAlias != null">#{authorAlias},</if>
<if test="managerId != null">#{managerId},</if> <if test="managerId != null">#{managerId},</if>
@ -86,6 +89,7 @@
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if> <if test="name != null">name = #{name},</if>
<if test="publicType != null">public_type = #{publicType},</if> <if test="publicType != null">public_type = #{publicType},</if>
<if test="detailType != null">detail_type = #{detailType},</if>
<if test="introduction != null">introduction = #{introduction},</if> <if test="introduction != null">introduction = #{introduction},</if>
<if test="authorAlias != null">author_alias = #{authorAlias},</if> <if test="authorAlias != null">author_alias = #{authorAlias},</if>
<if test="managerId != null">manager_id = #{managerId},</if> <if test="managerId != null">manager_id = #{managerId},</if>

View File

@ -48,6 +48,7 @@
<if test="readCount != null "> and read_count = #{readCount}</if> <if test="readCount != null "> and read_count = #{readCount}</if>
<if test="content != null and content != ''"> and content = #{content}</if> <if test="content != null and content != ''"> and content = #{content}</if>
</where> </where>
order by create_time desc
</select> </select>
<select id="selectPlayletPublicDetailById" parameterType="Long" resultMap="PlayletPublicDetailResult"> <select id="selectPlayletPublicDetailById" parameterType="Long" resultMap="PlayletPublicDetailResult">