Explorar o código

integralTypeName

姜永辉 hai 1 ano
pai
achega
a1eb582206

+ 7 - 1
src/main/java/com/dk/oauth/mapper/integral/IntegralItemMapper.xml

@@ -34,6 +34,7 @@
         <result column="cp_name" property="cpName"/>
         <result column="cp_id_from" property="cpIdFrom" />
         <result column="cp_name_from" property="cpNameFrom"/>
+        <result column="integral_type_name" property="integralTypeName"/>
         <result column="acc_date" property="accDate" typeHandler="TimestampTypeHandler"/>
         <result column="flg_valid" property="flgValid"/>
         <result column="user_id" property="userId" typeHandler="UuidTypeHandler"/>
@@ -46,6 +47,9 @@
             <if test="integralType != null and integralType != ''">
                 AND tmii.integral_type = #{integralType}
             </if>
+            <if test="integralTypes != null and integralTypes.size()>0">
+                AND tmii.integral_type =any(#{integralTypes,typeHandler=StringListTypeHandler})
+            </if>
             <if test="integral != null">
                 AND tmii.integral = #{integral}
             </if>
@@ -122,8 +126,10 @@
         SELECT
         <include refid="Base_Column_List_Response"/>
         ,tac.cp_name
-        ,tacf.cp_name as cp_name_from
+        ,tacf.cp_name as cp_name_from,
+        sys.f_get_name_i18n(tdk.kind_name_i18n,#{i18n}) as integral_type_name,
         FROM dkic_a.t_mst_integral_item tmii
+        LEFT JOIN sys.t_data_kind tdk ON tmii.integral_type = tdk.kind_code
         left join dkic_a.t_a_company tac on tac.cp_id = tmii.cp_id
         left join dkic_a.t_a_company tacf on tacf.cp_id = tmii.cp_id
         WHERE item_id = #{id}::uuid

+ 7 - 0
src/main/java/com/dk/oauth/model/query/integral/IntegralItemQuery.java

@@ -12,6 +12,7 @@ import lombok.experimental.Accessors;
 
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  *  积分明细
@@ -39,6 +40,12 @@ public class IntegralItemQuery extends PageInfo<IntegralItemQuery>  {
     @ApiModelProperty(value = "积分类型 (【系统字典】注册;签到;分享;使用)")
     private String integralType;
 
+    /**
+     * 积分类型 (【系统字典】注册;签到;分享;使用)
+     */
+    @ApiModelProperty(value = "积分类型 (【系统字典】注册;签到;分享;使用)")
+    private List<String> integralTypes;
+
 
     /**
      * 积分 (使用存负数)

+ 3 - 0
src/main/java/com/dk/oauth/model/response/integral/IntegralItemResponse.java

@@ -126,6 +126,9 @@ public class IntegralItemResponse{
     @ApiModelProperty(value = "来源商户名称")
     private String cpNameFrom;
 
+    @ApiModelProperty(value = "积分类型名称")
+    private String integralTypeName;
+
     private static final long serialVersionUID = 1L;
 
 }