| | |
| | | import com.panzhihua.common.model.dtos.partybuilding.NewFightIntegral; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.building.IntegratingTaskVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightConvenientMerchantVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_dangjian.dao.ComActIntegralUsersMapper; |
| | | import com.panzhihua.service_dangjian.entity.ComActIntegralUser; |
| | | import com.panzhihua.service_dangjian.entity.ComActIntegralUserTrade; |
| | | import com.panzhihua.service_dangjian.entity.IntegratingTask; |
| | | import com.panzhihua.service_dangjian.service.ComActIntegralUserChangeDAOService; |
| | | import com.panzhihua.service_dangjian.service.ComActIntegralUserTradeDaoService; |
| | | import com.panzhihua.service_dangjian.service.ComActIntegralUsersService; |
| | | import com.panzhihua.service_dangjian.service.NewFightIntegratingTaskService; |
| | | import com.panzhihua.service_dangjian.entity.NewFightConvenientMerchant; |
| | | import com.panzhihua.service_dangjian.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private NewFightIntegratingTaskService taskService; |
| | | |
| | | @Resource |
| | | private NewFightConvenientMerchantService merchantService; |
| | | |
| | | |
| | | @Override |
| | |
| | | { |
| | | case "9": |
| | | //商城积分兑换 |
| | | item.setAddOrReduce(2); |
| | | //积分总数加减 |
| | | break; |
| | | case "10": |
| | | //商家线下积分兑换 |
| | | item.setAddOrReduce(2); |
| | | //商家线下积分兑换 增加 |
| | | //商家积分增加 |
| | | NewFightConvenientMerchant merchant=merchantService.selectMerchantById(item.getMerchantId()); |
| | | int allMoney=0; |
| | | if(!StringUtils.isEmpty(merchant.getBusinessCredit())) |
| | | { |
| | | allMoney=Integer.valueOf(merchant.getBusinessCredit()); |
| | | } |
| | | if (item.getAddOrReduce() == ComActIntegralUserTrade.changeType.add) |
| | | { |
| | | allMoney=allMoney+Integer.valueOf(item.getIntegralNum()); |
| | | |
| | | } |
| | | else |
| | | { |
| | | //商家积分减少 |
| | | allMoney=allMoney-Integer.valueOf(item.getIntegralNum()); |
| | | } |
| | | NewFightConvenientMerchantVO merchantVO=new NewFightConvenientMerchantVO(); |
| | | merchantVO.setId(merchant.getId()); |
| | | merchantVO.setBusinessCredit(allMoney+""); |
| | | merchantService.editData(merchantVO); |
| | | break; |
| | | case "11": |
| | | //花城登录 |