Commit 77c7afbc by 裴大威

Merge branch 'fix-1002761' into 'master'

fix1002761

See merge request rays/pcloud-book!670
parents 73e1f901 bb1f8f96
...@@ -684,6 +684,10 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -684,6 +684,10 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
public RightsSetting getRightsSettingGiftCoupons(Long rightsSettingId, Long wechatUserId) { public RightsSetting getRightsSettingGiftCoupons(Long rightsSettingId, Long wechatUserId) {
RightsSetting rightsSetting=new RightsSetting(); RightsSetting rightsSetting=new RightsSetting();
rightsSetting.setId(rightsSettingId); rightsSetting.setId(rightsSettingId);
RightsSettingTitle rightsSettingTitle4Gift = rightsSettingTitleMapper.getByRightSettingIdAndType(rightsSettingId,RightsNowItemType.GIFT_COUPON_PACKAGE.value);
if (null != rightsSettingTitle4Gift){
rightsSetting.setGiftCouponPackageTitle(rightsSettingTitle4Gift);
}
fillGiftCouponPack(rightsSetting); fillGiftCouponPack(rightsSetting);
fillUserGiftReceiveStatus(rightsSetting,wechatUserId); fillUserGiftReceiveStatus(rightsSetting,wechatUserId);
return rightsSetting; return rightsSetting;
......
...@@ -2,6 +2,7 @@ package com.pcloud.book.rightsSetting.mapper; ...@@ -2,6 +2,7 @@ package com.pcloud.book.rightsSetting.mapper;
import com.pcloud.book.rightsSetting.entity.RightsSettingTitle; import com.pcloud.book.rightsSetting.entity.RightsSettingTitle;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -18,4 +19,6 @@ public interface RightsSettingTitleMapper { ...@@ -18,4 +19,6 @@ public interface RightsSettingTitleMapper {
void batchUpdate(List<RightsSettingTitle> rightsSettingTitles); void batchUpdate(List<RightsSettingTitle> rightsSettingTitles);
List<RightsSettingTitle> getByRightSettingId(Long rightsSettingId); List<RightsSettingTitle> getByRightSettingId(Long rightsSettingId);
RightsSettingTitle getByRightSettingIdAndType(@Param("rightsSettingId") Long rightsSettingId, @Param("type") Integer type);
} }
\ No newline at end of file
...@@ -129,4 +129,15 @@ ...@@ -129,4 +129,15 @@
rights_setting_id = #{rightsSettingId} rights_setting_id = #{rightsSettingId}
</select> </select>
<select id="getByRightSettingIdAndType" resultMap="BaseResultMap" parameterType="map">
select
<include refid="baseSql"/>
from
rights_setting_title
where
rights_setting_id = #{rightsSettingId}
and
rights_setting_now_type = #{type}
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment