Commit eca46c743b52848659716f9f14bf0457869986ea
1 parent
f6080e74
Exists in
master
1
Showing
4 changed files
with
55 additions
and
7 deletions
Show diff stats
src/main/java/com/sincere/wechatbusiness/controller/ChannelController.java
| ... | ... | @@ -525,7 +525,15 @@ public class ChannelController { |
| 525 | 525 | order.setUsersList(orderList); |
| 526 | 526 | list.add(order); |
| 527 | 527 | Statistics statistics=new Statistics(); |
| 528 | - statistics.setDiscountPackageList(channelService.getOrderList(channelId,agentId,type)); | |
| 528 | + List<DiscountPackage> packageList = new ArrayList<>(); | |
| 529 | + packageList.addAll(channelService.getOrderList(channelId,agentId,type)); | |
| 530 | + if(agentId == 0){ | |
| 531 | + List<Agent> agents = agentService.getList(channelId); | |
| 532 | + for(Agent agent : agents){ | |
| 533 | + packageList.addAll(channelService.getOrderList(channelId,agent.getId(),type)); | |
| 534 | + } | |
| 535 | + } | |
| 536 | + statistics.setDiscountPackageList(packageList); | |
| 529 | 537 | list.add(statistics); |
| 530 | 538 | result.setData(list); |
| 531 | 539 | return result; | ... | ... |
src/main/java/com/sincere/wechatbusiness/model/ChannelProduct.java
| ... | ... | @@ -23,6 +23,34 @@ public class ChannelProduct { |
| 23 | 23 | |
| 24 | 24 | private Date createTime; |
| 25 | 25 | |
| 26 | + private String promotionPrice ; | |
| 27 | + private Date endTime ; | |
| 28 | + private String title ; | |
| 29 | + | |
| 30 | + public String getPromotionPrice() { | |
| 31 | + return promotionPrice; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void setPromotionPrice(String promotionPrice) { | |
| 35 | + this.promotionPrice = promotionPrice; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public Date getEndTime() { | |
| 39 | + return endTime; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public void setEndTime(Date endTime) { | |
| 43 | + this.endTime = endTime; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public String getTitle() { | |
| 47 | + return title; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public void setTitle(String title) { | |
| 51 | + this.title = title; | |
| 52 | + } | |
| 53 | + | |
| 26 | 54 | public Integer getId() { |
| 27 | 55 | return id; |
| 28 | 56 | } | ... | ... |
src/main/resources/application.yaml
| ... | ... | @@ -4,12 +4,12 @@ spring: |
| 4 | 4 | application: |
| 5 | 5 | name: wechatBusiness |
| 6 | 6 | datasource: |
| 7 | -# username: SZJXTUSER | |
| 8 | -# password: xst200919 | |
| 9 | -# url: jdbc:sqlserver://60.190.202.57:14333;database=wechatbusiness | |
| 10 | - username: report | |
| 11 | - password: QWer123$%^ | |
| 12 | - url: jdbc:sqlserver://116.62.241.27:33419;database=wechatbusiness | |
| 7 | + username: SZJXTUSER | |
| 8 | + password: xst200919 | |
| 9 | + url: jdbc:sqlserver://60.190.202.57:14333;database=wechatbusiness | |
| 10 | +# username: report | |
| 11 | +# password: QWer123$%^ | |
| 12 | +# url: jdbc:sqlserver://116.62.241.27:33419;database=wechatbusiness | |
| 13 | 13 | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| 14 | 14 | |
| 15 | 15 | jackson: | ... | ... |
src/main/resources/mapper/ChannelProductMapper.xml
| ... | ... | @@ -12,6 +12,9 @@ |
| 12 | 12 | <result column="caption" jdbcType="VARCHAR" property="caption" /> |
| 13 | 13 | <result column="state" jdbcType="INTEGER" property="state"/> |
| 14 | 14 | <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
| 15 | + <result column="promotion_price" jdbcType="VARCHAR" property="promotionPrice" /> | |
| 16 | + <result column="end_time" jdbcType="TIMESTAMP" property="endTime" /> | |
| 17 | + <result column="title" jdbcType="VARCHAR" property="title" /> | |
| 15 | 18 | </resultMap> |
| 16 | 19 | |
| 17 | 20 | <select id="getList" parameterType="java.lang.Integer" resultMap="ChannelProductMap"> |
| ... | ... | @@ -33,6 +36,15 @@ |
| 33 | 36 | <if test="caption!=null and caption!=''"> |
| 34 | 37 | caption=#{caption}, |
| 35 | 38 | </if> |
| 39 | + <if test="promotionPrice!=null and promotionPrice!=''"> | |
| 40 | + promotion_price=#{promotionPrice}, | |
| 41 | + </if> | |
| 42 | + <if test="endTime!=null and endTime!=''"> | |
| 43 | + end_time=#{endTime}, | |
| 44 | + </if> | |
| 45 | + <if test="title!=null and title!=''"> | |
| 46 | + title=#{title}, | |
| 47 | + </if> | |
| 36 | 48 | </trim> |
| 37 | 49 | where id = #{id} |
| 38 | 50 | </update> | ... | ... |