用户是否已读文章、系统配置
This commit is contained in:
parent
c9859e4b78
commit
87b2bd73e7
|
@ -186,4 +186,10 @@ public class SmUser extends BaseEntity
|
|||
@Excel(name = "限制退款原因")
|
||||
@ApiModelProperty("限制退款原因")
|
||||
private String limitRefundReason;
|
||||
|
||||
@Excel(name = "是否已阅读过商户协议")
|
||||
@ApiModelProperty("是否已阅读过商户协议")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private Boolean readMchLicence;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
package com.ruoyi.ss.article.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wjh
|
||||
* 2024/4/3
|
||||
*/
|
||||
@Data
|
||||
public class SmArticleQuery extends SmArticle {
|
||||
|
||||
@ApiModelProperty("文章ID列表")
|
||||
private List<Long> articleIds;
|
||||
|
||||
}
|
||||
|
|
|
@ -17,7 +17,8 @@ public enum LicenceType {
|
|||
USER("user", "ss.licence.user.id"), // 用户协议
|
||||
PRIVACY("privacy", "ss.licence.privacy.id"), // 隐私协议
|
||||
COLLECT("collection", "ss.licence.collection.id"), // 个人信息收集清单
|
||||
ABOUT("about", "ss.licence.about.id"); // 关于我们
|
||||
ABOUT("about", "ss.licence.about.id"), // 关于我们
|
||||
MCH("mch", "ss.licence.mch.id"); // 商户协议
|
||||
|
||||
private final String type; // 类型
|
||||
private final String key; // 配置键值
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.ss.article.mapper.SmArticleMapper">
|
||||
|
||||
<resultMap type="SmArticle" id="SmArticleResult">
|
||||
<resultMap type="SmArticle" id="SmArticleResult" autoMapping="true">
|
||||
<result property="articleId" column="article_id" />
|
||||
<result property="classifyId" column="classify_id" />
|
||||
<result property="title" column="title" />
|
||||
|
@ -74,6 +74,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="classifyId != null and classifyId != ''"> and a.classify_id = #{classifyId}</if>
|
||||
<if test="title != null and title != ''"> and a.title like concat('%', #{title}, '%')</if>
|
||||
<if test="isHot != null and isHot != ''"> and a.is_hot = #{isHot}</if>
|
||||
<if test="articleIds != null and articleIds.size() > 0">
|
||||
and a.article_id in
|
||||
<foreach collection="articleIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
|
|
@ -49,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
su.limit_withdraw_reason,
|
||||
su.limit_refund,
|
||||
su.limit_refund_reason,
|
||||
su.read_mch_licence,
|
||||
(select sum(stb.money) from sm_transaction_bill stb where stb.user_id = su.user_id and stb.type = '1' and stb.status = '2') as recharge_amount,
|
||||
(select sum(stb.arrival_amount) from sm_transaction_bill stb where stb.user_id = su.user_id and stb.type = '2' and stb.status = '14') as with_drawl_amount,
|
||||
(select sum(stb.arrival_amount) from sm_transaction_bill stb where stb.mch_id = su.user_id and stb.type = '1' and stb.status = '2') as total_income
|
||||
|
@ -72,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="serviceType != null and serviceType != ''"> and service_type = #{serviceType}</if>
|
||||
<if test="limitWithdraw != null "> and limit_withdraw = #{limitWithdraw}</if>
|
||||
<if test="limitRefund != null "> and limit_refund = #{limitRefund}</if>
|
||||
<if test="readMchLicence != null "> and read_mch_licence = #{readMchLicence}</if>
|
||||
<if test="tenantDeviceId != null">
|
||||
and su.user_id in (
|
||||
select sdt.tenant_id
|
||||
|
@ -169,6 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="limitWithdrawReason != null">limit_withdraw_reason,</if>
|
||||
<if test="limitRefund != null">limit_refund,</if>
|
||||
<if test="limitRefundReason != null">limit_refund_reason,</if>
|
||||
<if test="readMchLicence != null">read_mch_licence,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
|
@ -206,6 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="limitWithdrawReason != null">#{limitWithdrawReason},</if>
|
||||
<if test="limitRefund != null">#{limitRefund},</if>
|
||||
<if test="limitRefundReason != null">#{limitRefundReason},</if>
|
||||
<if test="readMchLicence != null">#{readMchLicence},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
@ -253,6 +257,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="limitWithdrawReason != null">limit_withdraw_reason = #{limitWithdrawReason},</if>
|
||||
<if test="limitRefund != null">limit_refund = #{limitRefund},</if>
|
||||
<if test="limitRefundReason != null">limit_refund_reason = #{limitRefundReason},</if>
|
||||
<if test="readMchLicence != null">read_mch_licence = #{readMchLicence},</if>
|
||||
</trim>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
|
|
@ -209,4 +209,9 @@ public interface ISmUserService
|
|||
* 实名认证
|
||||
*/
|
||||
int realName(UserRealNameDTO dto);
|
||||
|
||||
/**
|
||||
* 标记已读商户协议
|
||||
*/
|
||||
int readMchLicence(Long userId);
|
||||
}
|
||||
|
|
|
@ -297,6 +297,14 @@ public class SmUserServiceImpl implements ISmUserService
|
|||
return smUserMapper.updateSmUser(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readMchLicence(Long userId) {
|
||||
SmUser data = new SmUser();
|
||||
data.setUserId(userId);
|
||||
data.setReadMchLicence(true);
|
||||
return smUserMapper.updateSmUser(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 逻辑删除前校验
|
||||
* @param userIds
|
||||
|
|
|
@ -75,4 +75,10 @@ public class AppUserController extends BaseController {
|
|||
return toAjax(userService.realName(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("标记用户已读商户协议")
|
||||
@PutMapping("/readMchLicence")
|
||||
public AjaxResult readMchLicence() {
|
||||
return toAjax(userService.readMchLicence(getUserId()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -48,6 +48,19 @@ public class SmArticleController extends BaseController
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文章列表ByIds
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:article:list')")
|
||||
@GetMapping("/listByIds/{ids}")
|
||||
public AjaxResult listByIds(@PathVariable List<Long> ids)
|
||||
{
|
||||
SmArticleQuery query = new SmArticleQuery();
|
||||
query.setArticleIds(ids);
|
||||
List<SmArticle> list = asArticleService.selectSmArticleList(query);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出文章列表
|
||||
*/
|
||||
|
|
|
@ -145,8 +145,8 @@ public class SysConfigController extends BaseController
|
|||
/**
|
||||
* 根据参数键名列表查询参数值
|
||||
*/
|
||||
@GetMapping(value = "/configKeys/{configKeys}")
|
||||
public AjaxResult getConfigKeys(@PathVariable List<String> configKeys)
|
||||
@PostMapping(value = "/configKeys")
|
||||
public AjaxResult getConfigKeys(@RequestBody List<String> configKeys)
|
||||
{
|
||||
SysConfigQuery query = new SysConfigQuery();
|
||||
query.setConfigKeys(configKeys);
|
||||
|
|
Loading…
Reference in New Issue
Block a user