# Conflicts: # mallinkAdmin/src/main/java/com/iformall/controller/sys/WxBusinessController.javarelease_toaliyun_real
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.controller.sys; | package com.iformall.controller.sys; | ||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| @@ -13,6 +14,8 @@ import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import java.util.ArrayList; | |||||
| import java.util.HashMap; | |||||
| import java.util.List; | import java.util.List; | ||||
| @@ -46,4 +49,67 @@ public class WxBusinessController extends BaseController { | |||||
| return new ResultData(busList); | return new ResultData(busList); | ||||
| } | } | ||||
| @ApiOperation("业态分析接口") | |||||
| @GetMapping("businessDataList") | |||||
| @SystemControllerLog(description = "业态分析接口") | |||||
| public ResultData businessDataList(@ModelAttribute WxBusiness wxBusiness) { | |||||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::businessDataList"); | |||||
| List<Map<String,String>> result = new ArrayList<>(); | |||||
| Map<String,String> map = new HashMap<>(); | |||||
| map.put("title","餐饮");//业态 | |||||
| map.put("volume","2323.23");//营业额 | |||||
| map.put("sale","32323.23");//销售坪效 | |||||
| map.put("rent","32323.23");//租赁坪效 | |||||
| map.put("rentSaleRate","0.23");//租售比 | |||||
| map.put("comPrice","香奈儿");//客单价 | |||||
| map.put("maxCom","32323.23");//贡献率最高商户 | |||||
| result.add(map); | |||||
| map = new HashMap<>(); | |||||
| map.put("title","娱乐");//业态 | |||||
| map.put("volume","2323.23");//营业额 | |||||
| map.put("sale","32323.23");//销售坪效 | |||||
| map.put("rent","32323.23");//租赁坪效 | |||||
| map.put("rentSaleRate","0.23");//租售比 | |||||
| map.put("comPrice","香奈儿");//客单价 | |||||
| map.put("maxCom","32323.23");//贡献率最高商户 | |||||
| result.add(map); | |||||
| map = new HashMap<>(); | |||||
| map.put("title","影视");//业态 | |||||
| map.put("volume","2323.23");//营业额 | |||||
| map.put("sale","32323.23");//销售坪效 | |||||
| map.put("rent","32323.23");//租赁坪效 | |||||
| map.put("rentSaleRate","0.23");//租售比 | |||||
| map.put("comPrice","香奈儿");//客单价 | |||||
| map.put("maxCom","32323.23");//贡献率最高商户 | |||||
| result.add(map); | |||||
| return new ResultData(result); | |||||
| } | |||||
| @ApiOperation("贡献率排行") | |||||
| @GetMapping("devoteList") | |||||
| @SystemControllerLog(description = "业态分析接口") | |||||
| public ResultData devoteList(@ModelAttribute WxBusiness wxBusiness,Integer pageNum, Integer pageSize) { | |||||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::devoteList"); | |||||
| List<Map<String,String>> result = new ArrayList<>(); | |||||
| Map<String,String> map = new HashMap<>(); | |||||
| map.put("merchantName","西贝筱面"); | |||||
| map.put("sale","2323.23");//营业额 | |||||
| map.put("sale","32323.23");//商户销售坪效 | |||||
| map.put("devoteRate","1.23");//贡献率 | |||||
| result.add(map); | |||||
| map = new HashMap<>(); | |||||
| map.put("merchantName","肯德基"); | |||||
| map.put("sale","2323.23");//营业额 | |||||
| map.put("sale","32323.23");//商户销售坪效 | |||||
| map.put("devoteRate","1.23");//贡献率 | |||||
| result.add(map); | |||||
| PageInfo<Map<String,String>> page = new PageInfo<>(); | |||||
| page.setList(result); | |||||
| page.setTotal(2); | |||||
| page.setPageNum(1); | |||||
| page.setPageSize(20); | |||||
| return new ResultData(page); | |||||
| } | |||||
| } | } | ||||
| @@ -13,7 +13,6 @@ import org.springframework.amqp.core.AmqpTemplate; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.context.annotation.Profile; | import org.springframework.context.annotation.Profile; | ||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import java.util.UUID; | import java.util.UUID; | ||||
| /** | /** | ||||
| @@ -32,7 +31,6 @@ public class RabbitMqMessageProducer implements MqBaseProducer { | |||||
| @Autowired | @Autowired | ||||
| private WxMsgRecordService wxMsgRecordService; | private WxMsgRecordService wxMsgRecordService; | ||||
| @Override | @Override | ||||
| public void sendMessage(BaseMsg data, String topic, String tags, String keys) { | public void sendMessage(BaseMsg data, String topic, String tags, String keys) { | ||||
| try { | try { | ||||
| @@ -134,7 +134,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| if(supplement!=null && supplement && EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { | if(supplement!=null && supplement && EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { | ||||
| wxRentContractService.updateRentContractStatus(businessId); | wxRentContractService.updateRentContractStatus(businessId); | ||||
| } | } | ||||
| }else if(EnumFlowContractType.PROPERTY.getCode().equals(contractType) || EnumFlowContractType.PROPERTY_POINT.getCode().equals(contractType)){ | |||||
| }else if(EnumFlowContractType.PROPERTY.getCode().equals(contractType) || EnumFlowContractType.PROPERTY_POINT.getCode().equals(contractType)){ | |||||
| WxPropertyContract wxPropertyContract = new WxPropertyContract(); | WxPropertyContract wxPropertyContract = new WxPropertyContract(); | ||||
| wxPropertyContract.setId(businessId); | wxPropertyContract.setId(businessId); | ||||
| wxPropertyContract.setApplyStatus(applyStatus); | wxPropertyContract.setApplyStatus(applyStatus); | ||||
| @@ -63,9 +63,11 @@ | |||||
| update wx_msg_record set updatetime = now() | update wx_msg_record set updatetime = now() | ||||
| <if test=" null != msgStatus ">,msg_status = #{msgStatus}</if> | <if test=" null != msgStatus ">,msg_status = #{msgStatus}</if> | ||||
| <if test=" null != statusMessage ">,status_message = #{statusMessage}</if> | <if test=" null != statusMessage ">,status_message = #{statusMessage}</if> | ||||
| <where> | |||||
| <if test=" null != uuid ">and uuid = #{uuid}</if> | |||||
| </where> | |||||
| where id in( | |||||
| select t.id from ( | |||||
| select id from wx_msg_record where uuid = #{uuid} | |||||
| ) t | |||||
| ) | |||||
| </update> | </update> | ||||
| <select id="findList" parameterType="com.iformall.domain.po.msg.WxMsgRecord" resultMap="BaseResultMap"> | <select id="findList" parameterType="com.iformall.domain.po.msg.WxMsgRecord" resultMap="BaseResultMap"> | ||||
| @@ -87,15 +87,17 @@ | |||||
| </select> | </select> | ||||
| <update id="updateStatus" parameterType="com.iformall.domain.po.WxTopic"> | <update id="updateStatus" parameterType="com.iformall.domain.po.WxTopic"> | ||||
| update wx_topic set status = 3 where now() >= end_time and tenant_id = #{tenantId} | |||||
| update wx_topic set status = 3 where id in( | |||||
| select t.id from ( | |||||
| select id from wx_topic where status !=3 and now() >= end_time and tenant_id = #{tenantId} | |||||
| ) t | |||||
| ) | |||||
| </update> | </update> | ||||
| <update id="couponDownLine" parameterType="com.iformall.domain.po.WxTopic"> | <update id="couponDownLine" parameterType="com.iformall.domain.po.WxTopic"> | ||||
| update wx_coupon_channel set status = 1 where target_ad = 8 and sub_target_id in( | |||||
| update wx_coupon_channel set status = 1 where status = 0 and target_ad = 8 and sub_target_id in( | |||||
| select id from wx_topic where status in(2,3) and tenant_id = #{tenantId} | select id from wx_topic where status in(2,3) and tenant_id = #{tenantId} | ||||
| ) | ) | ||||
| </update> | </update> | ||||
| </mapper> | </mapper> | ||||