| | |
| | | |
| | | |
| | | |
| | | <select id="getUserIntegral" resultType="com.panzhihua.service_dangjian.entity.UserIntegral"> |
| | | select |
| | | id, |
| | | user_id, |
| | | update_at, |
| | | status, |
| | | integral_volunteer, |
| | | integral_sum, |
| | | integral_resident, |
| | | integral_party_time, |
| | | integral_party, |
| | | integral_frozen_volunteer, |
| | | integral_frozen_sum, |
| | | integral_frozen_resident, |
| | | integral_frozen_party, |
| | | integral_available_volunteer, |
| | | integral_available_sum, |
| | | integral_available_resident, |
| | | integral_available_party, |
| | | create_at, |
| | | community_id |
| | | from com_act_integral_user |
| | | where user_id =#{userId} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <insert id="addUserIntegral" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into com_act_integral_user |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id, |
| | | </if> |
| | | <if test="item.communityId !=null and item.communityId !='' "> |
| | | community_id, |
| | | </if> |
| | | <if test="item.userId !=null and item.userId !='' "> |
| | | user_id, |
| | | </if> |
| | | <if test="item.status !=null and item.status !='' "> |
| | | status, |
| | | </if> |
| | | <if test="item.integralVolunteer !=null and item.integralVolunteer !='' "> |
| | | integral_volunteer, |
| | | </if> |
| | | <if test="item.integralSum !=null and item.integralSum !='' "> |
| | | integral_sum, |
| | | </if> |
| | | <if test="item.integralResident !=null and item.integralResident !='' "> |
| | | integral_resident, |
| | | </if> |
| | | <if test="item.integralPartyTime !=null and item.integralPartyTime !='' "> |
| | | integral_party_time, |
| | | </if> |
| | | <if test="item.integralParty !=null and item.integralParty !='' "> |
| | | integral_party, |
| | | </if> |
| | | <if test="item.integralFrozenVolunteer !=null and item.integralFrozenVolunteer !='' "> |
| | | integral_frozen_volunteer, |
| | | </if> |
| | | <if test="item.integralFrozenSum !=null and item.integralFrozenSum !='' "> |
| | | integral_frozen_sum, |
| | | </if> |
| | | <if test="item.integralFrozenResident !=null and item.integralFrozenResident !='' "> |
| | | integral_frozen_resident, |
| | | </if> |
| | | <if test="item.integralFrozenParty !=null and item.integralFrozenParty !='' "> |
| | | integral_frozen_party, |
| | | </if> |
| | | <if test="item.integralAvailableVolunteer !=null and item.integralAvailableVolunteer !='' "> |
| | | integral_available_volunteer, |
| | | </if> |
| | | <if test="item.integralAvailableSum !=null and item.integralAvailableSum !='' "> |
| | | integral_available_sum, |
| | | </if> |
| | | <if test="item.integralAvailableResident !=null and item.integralAvailableResident !='' "> |
| | | integral_available_resident, |
| | | </if> |
| | | <if test="item.integralAvailableParty !=null and item.integralAvailableParty !='' "> |
| | | integral_available_party, |
| | | </if> |
| | | create_at |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.communityId !=null and item.communityId !='' "> |
| | | #{item.communityId}, |
| | | </if> |
| | | <if test="item.userId !=null and item.userId !='' "> |
| | | #{item.}, |
| | | </if> |
| | | <if test="item.status !=null and item.status !='' "> |
| | | #{item.status}, |
| | | </if> |
| | | <if test="item.integralVolunteer !=null and item.integralVolunteer !='' "> |
| | | #{item.integralVolunteer}, |
| | | </if> |
| | | <if test="item.integralSum !=null and item.integralSum !='' "> |
| | | #{item.integralSum}, |
| | | </if> |
| | | <if test="item.integralResident !=null and item.integralResident !='' "> |
| | | #{item.integralResident}, |
| | | </if> |
| | | <if test="item.integralPartyTime !=null and item.integralPartyTime !='' "> |
| | | #{item.integralPartyTime}, |
| | | </if> |
| | | <if test="item.integralParty !=null and item.integralParty !='' "> |
| | | #{item.integralParty}, |
| | | </if> |
| | | <if test="item.integralFrozenVolunteer !=null and item.integralFrozenVolunteer !='' "> |
| | | #{item.integralFrozenVolunteer}, |
| | | </if> |
| | | <if test="item.integralFrozenSum !=null and item.integralFrozenSum !='' "> |
| | | #{item.integralFrozenSum}, |
| | | </if> |
| | | <if test="item.integralFrozenResident !=null and item.integralFrozenResident !='' "> |
| | | #{item.integralFrozenResident}, |
| | | </if> |
| | | <if test="item.integralFrozenParty !=null and item.integralFrozenParty !='' "> |
| | | #{item.integralFrozenParty}, |
| | | </if> |
| | | <if test="item.integralAvailableVolunteer !=null and item.integralAvailableVolunteer !='' "> |
| | | #{item.integralAvailableVolunteer}, |
| | | </if> |
| | | <if test="item.integralAvailableSum !=null and item.integralAvailableSum !='' "> |
| | | #{item.integralAvailableSum}, |
| | | </if> |
| | | <if test="item.integralAvailableResident !=null and item.integralAvailableResident !='' "> |
| | | #{item.integralAvailableResident}, |
| | | </if> |
| | | <if test="item.integralAvailableParty !=null and item.integralAvailableParty !='' "> |
| | | #{item.integralAvailableParty}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editUserIntegral"> |
| | | update new_fight_shopping_order |
| | | <set> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.communityId !=null and item.communityId !='' "> |
| | | community_Id=#{item.communityId}, |
| | | </if> |
| | | <if test="item.userId !=null and item.userId !='' "> |
| | | user_id=#{item.}, |
| | | </if> |
| | | <if test="item.status !=null and item.status !='' "> |
| | | status=#{item.status}, |
| | | </if> |
| | | <if test="item.integralVolunteer !=null and item.integralVolunteer !='' "> |
| | | integral_volunteer=#{item.integralVolunteer}, |
| | | </if> |
| | | <if test="item.integralSum !=null and item.integralSum !='' "> |
| | | integral_sum=#{item.integralSum}, |
| | | </if> |
| | | <if test="item.integralResident !=null and item.integralResident !='' "> |
| | | integral_resident=#{item.integralResident}, |
| | | </if> |
| | | <if test="item.integralPartyTime !=null and item.integralPartyTime !='' "> |
| | | integral_party_time=#{item.integralPartyTime}, |
| | | </if> |
| | | <if test="item.integralParty !=null and item.integralParty !='' "> |
| | | integral_party=#{item.integralParty}, |
| | | </if> |
| | | <if test="item.integralFrozenVolunteer !=null and item.integralFrozenVolunteer !='' "> |
| | | integral_frozen_volunteer=#{item.integralFrozenVolunteer}, |
| | | </if> |
| | | <if test="item.integralFrozenSum !=null and item.integralFrozenSum !='' "> |
| | | integral_frozen_sum=#{item.integralFrozenSum}, |
| | | </if> |
| | | <if test="item.integralFrozenResident !=null and item.integralFrozenResident !='' "> |
| | | integral_frozen_resident=#{item.integralFrozenResident}, |
| | | </if> |
| | | <if test="item.integralFrozenParty !=null and item.integralFrozenParty !='' "> |
| | | integral_frozen_party=#{item.integralFrozenParty}, |
| | | </if> |
| | | <if test="item.integralAvailableVolunteer !=null and item.integralAvailableVolunteer !='' "> |
| | | integral_available_volunteer=#{item.integralAvailableVolunteer}, |
| | | </if> |
| | | <if test="item.integralAvailableSum !=null and item.integralAvailableSum !='' "> |
| | | integral_available_sum=#{item.integralAvailableSum}, |
| | | </if> |
| | | <if test="item.integralAvailableResident !=null and item.integralAvailableResident !='' "> |
| | | integral_available_resident=#{item.integralAvailableResident}, |
| | | </if> |
| | | <if test="item.integralAvailableParty !=null and item.integralAvailableParty !='' "> |
| | | integral_available_party=#{item.integralAvailableParty}, |
| | | </if> |
| | | update_at=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | |
| | | |
| | | <insert id="addUserIntegralTrade" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into com_act_integral_user_trade |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id, |
| | | </if> |
| | | <if test="item.integralId != null and item.integralId != '' "> |
| | | integral_id, |
| | | </if> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | community_id, |
| | | </if> |
| | | <if test="item.serviceId != null and item.serviceId != '' "> |
| | | service_id, |
| | | </if> |
| | | <if test="item.serviceType != null and item.serviceType != '' "> |
| | | service_type, |
| | | </if> |
| | | <if test="item.amount != null and item.amount != '' "> |
| | | amount, |
| | | </if> |
| | | <if test="item.changeType != null and item.changeType != '' "> |
| | | change_type, |
| | | </if> |
| | | <if test="item.remark != null and item.remark != '' "> |
| | | remark, |
| | | </if> |
| | | <if test="item.identityType != null and item.identityType != '' "> |
| | | identity_type, |
| | | </if> |
| | | <if test="item.createBy != null and item.createBy != '' "> |
| | | create_by, |
| | | </if> |
| | | create_at |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.integralId != null and item.integralId != '' "> |
| | | #{item.integralId}, |
| | | </if> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | #{item.communityId}, |
| | | </if> |
| | | <if test="item.serviceId != null and item.serviceId != '' "> |
| | | #{item.serviceType}, |
| | | </if> |
| | | <if test="item.serviceType != null and item.serviceType != '' "> |
| | | #{item.serviceType}, |
| | | </if> |
| | | <if test="item.amount != null and item.amount != '' "> |
| | | #{item.amount}, |
| | | </if> |
| | | <if test="item.changeType != null and item.changeType != '' "> |
| | | #{item.changeType}, |
| | | </if> |
| | | <if test="item.remark != null and item.remark != '' "> |
| | | #{item.remark}, |
| | | </if> |
| | | <if test="item.identityType != null and item.identityType != '' "> |
| | | #{item.identityType}, |
| | | </if> |
| | | <if test="item.createBy != null and item.createBy != '' "> |
| | | #{item.createBy}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | |
| | | |
| | | </mapper> |