公众号需求开发
This commit is contained in:
parent
aa2eff476f
commit
558b6eac57
|
|
@ -1,7 +1,9 @@
|
|||
package com.playlet.web.service.app.impl;
|
||||
|
||||
import com.playlet.system.domain.PlayletPublicDetail;
|
||||
import com.playlet.system.domain.PlayletPublicUser;
|
||||
import com.playlet.system.domain.PublicDetailShare;
|
||||
import com.playlet.system.service.IPlayletPublicDetailService;
|
||||
import com.playlet.system.service.IPlayletPublicUserService;
|
||||
import com.playlet.system.service.IPublicDetailShareService;
|
||||
import com.playlet.web.service.app.PublicDetailShareAppService;
|
||||
|
|
@ -19,6 +21,8 @@ public class PublicDetailShareAppServiceImpl implements PublicDetailShareAppServ
|
|||
|
||||
private final IPlayletPublicUserService iPlayletPublicUserService;
|
||||
|
||||
private final IPlayletPublicDetailService iPlayletPublicDetailService;
|
||||
|
||||
@Override
|
||||
public void addRecord(PublicDetailShare publicDetailShare) {
|
||||
// 翻译
|
||||
|
|
@ -32,5 +36,11 @@ public class PublicDetailShareAppServiceImpl implements PublicDetailShareAppServ
|
|||
publicDetailShare.setReaderTwoName(userTwo.getName());
|
||||
}
|
||||
iPublicDetailShareService.insertPublicDetailShare(publicDetailShare);
|
||||
// 添加浏览记录时,同时需要增加一下文章表上面的阅读次数
|
||||
PlayletPublicDetail playletPublicDetail = iPlayletPublicDetailService.getById(publicDetailShare.getDetailId());
|
||||
if(playletPublicDetail != null){
|
||||
playletPublicDetail.setReadCount(playletPublicDetail.getReadCount() + 1);
|
||||
iPlayletPublicDetailService.updateById(playletPublicDetail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.playlet.web.service.app.impl;
|
||||
|
||||
import com.playlet.system.domain.PublicUserRecord;
|
||||
import com.playlet.system.service.IPlayletPublicDetailService;
|
||||
import com.playlet.system.service.IPublicUserRecordService;
|
||||
import com.playlet.web.service.app.PublicUserRecordAppService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
|
@ -15,6 +16,8 @@ public class PublicUserRecordAppServiceImpl implements PublicUserRecordAppServic
|
|||
|
||||
private final IPublicUserRecordService iPublicUserRecordService;
|
||||
|
||||
private final IPlayletPublicDetailService iPlayletPublicDetailService;
|
||||
|
||||
@Override
|
||||
public void addRecord(PublicUserRecord userRecord) {
|
||||
iPublicUserRecordService.insertPublicUserRecord(userRecord);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,15 @@
|
|||
</select>
|
||||
</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">
|
||||
<label class="col-sm-3 control-label">简介:</label>
|
||||
<div class="col-sm-8">
|
||||
|
|
|
|||
|
|
@ -23,6 +23,15 @@
|
|||
</select>
|
||||
</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">
|
||||
<label class="col-sm-3 control-label">简介:</label>
|
||||
<div class="col-sm-8">
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<input name="imgUrl" type="text" hidden>
|
||||
<div class="file-loading">
|
||||
|
|
@ -69,6 +69,12 @@
|
|||
</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">
|
||||
<label class="col-sm-3 control-label">详情(富文本):</label>
|
||||
<div class="col-sm-8">
|
||||
|
|
@ -142,12 +148,6 @@
|
|||
<input name="detailTag" class="form-control" type="text">
|
||||
</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>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
|
|
|
|||
|
|
@ -95,9 +95,9 @@
|
|||
},
|
||||
{
|
||||
field: 'imgUrl',
|
||||
title: '图片',
|
||||
title: '缩略图',
|
||||
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/>'}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<input name="imgUrl" th:field="*{imgUrl}" type="text" hidden="hidden">
|
||||
<div class="file-loading">
|
||||
|
|
@ -56,6 +56,12 @@
|
|||
</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">
|
||||
<label class="col-sm-3 control-label">详情(富文本):</label>
|
||||
<div class="col-sm-8">
|
||||
|
|
@ -69,12 +75,6 @@
|
|||
<input name="detailTag" th:field="*{detailTag}" class="form-control" type="text">
|
||||
</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>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ public class PlayletPublicAccount extends BaseEntity
|
|||
@ApiModelProperty(value = "类型 例如: 01.男频, 02.女频")
|
||||
private String publicType;
|
||||
|
||||
@ApiModelProperty(value = "认证标识 01.个人,02.企业")
|
||||
private String detailType;
|
||||
|
||||
/** 简介 */
|
||||
@Excel(name = "简介")
|
||||
@ApiModelProperty(value = "简介")
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="publicType" column="public_type" />
|
||||
<result property="detailType" column="detail_type" />
|
||||
<result property="introduction" column="introduction" />
|
||||
<result property="authorAlias" column="author_alias" />
|
||||
<result property="managerId" column="manager_id" />
|
||||
|
|
@ -23,7 +24,7 @@
|
|||
</resultMap>
|
||||
|
||||
<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>
|
||||
|
||||
<select id="selectPlayletPublicAccountList" parameterType="PlayletPublicAccount" resultMap="PlayletPublicAccountResult">
|
||||
|
|
@ -50,6 +51,7 @@
|
|||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="publicType != null">public_type,</if>
|
||||
<if test="detailType != null">detail_type,</if>
|
||||
<if test="introduction != null">introduction,</if>
|
||||
<if test="authorAlias != null">author_alias,</if>
|
||||
<if test="managerId != null">manager_id,</if>
|
||||
|
|
@ -66,6 +68,7 @@
|
|||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="publicType != null">#{publicType},</if>
|
||||
<if test="detailType != null">#{detailType},</if>
|
||||
<if test="introduction != null">#{introduction},</if>
|
||||
<if test="authorAlias != null">#{authorAlias},</if>
|
||||
<if test="managerId != null">#{managerId},</if>
|
||||
|
|
@ -86,6 +89,7 @@
|
|||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</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="authorAlias != null">author_alias = #{authorAlias},</if>
|
||||
<if test="managerId != null">manager_id = #{managerId},</if>
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
<if test="readCount != null "> and read_count = #{readCount}</if>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectPlayletPublicDetailById" parameterType="Long" resultMap="PlayletPublicDetailResult">
|
||||
|
|
|
|||
Loading…
Reference in New Issue