Althars123 3 年 前
コミット
b3f90e838c

+ 64 - 70
twzd-admin/src/main/java/com/miaxis/pc/controller/wx/WxMenuController.java

@@ -1,20 +1,14 @@
 package com.miaxis.pc.controller.wx;
 
-import com.miaxis.common.annotation.Log;
-import com.miaxis.common.constant.Constants;
 import com.miaxis.common.core.controller.BaseController;
 import com.miaxis.common.core.domain.Response;
-import com.miaxis.common.core.page.ResponsePageInfo;
-import com.miaxis.common.enums.BusinessTypeEnum;
-import com.miaxis.wx.domain.WxMenu;
 import com.miaxis.wx.service.IWxMenuService;
-import com.miaxis.wx.vo.WxMenuVo;
-import io.swagger.annotations.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * @author wwl
@@ -30,65 +24,65 @@ public class WxMenuController extends BaseController {
     private final IWxMenuService wxMenuService;
 
 
-    /**
-     * 查询微信公众号菜单列表
-     */
-    @PreAuthorize("@ss.hasPermi('menu:info:list')")
-    @GetMapping("/list")
-    @ApiOperation("查询微信公众号菜单列表")
-    public Response<List<WxMenuVo>> list(){
-        return wxMenuService.selectWxMenuTreeList();
-    }
-
-
-    /**
-     * 获取微信公众号菜单详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('menu:info:query')")
-    @GetMapping(value = "/{id}")
-    @ApiOperation("获取微信公众号菜单详细信息")
-    public Response<WxMenu> getInfo(
-            @ApiParam(name = "id", value = "微信公众号菜单参数", required = true)
-            @PathVariable("id") Long id
-    ){
-        return Response.success(wxMenuService.getById(id));
-    }
-
-    /**
-     * 新增微信公众号菜单
-     */
-    @PreAuthorize("@ss.hasPermi('menu:info:add')")
-    @Log(title = "微信公众号菜单", businessType = BusinessTypeEnum.INSERT)
-    @PostMapping
-    @ApiOperation("新增微信公众号菜单")
-    public Response add(@RequestBody WxMenu wxMenu){
-        return wxMenuService.saveMenu(wxMenu);
-    }
-
-    /**
-     * 修改微信公众号菜单
-     */
-    @PreAuthorize("@ss.hasPermi('menu:info:edit')")
-    @Log(title = "微信公众号菜单", businessType = BusinessTypeEnum.UPDATE)
-    @PutMapping
-    @ApiOperation("修改微信公众号菜单")
-    public Response edit(@RequestBody WxMenu wxMenu){
-        return wxMenuService.updateMenuById(wxMenu);
-    }
-
-    /**
-     * 删除微信公众号菜单
-     */
-    @PreAuthorize("@ss.hasPermi('menu:info:remove')")
-    @Log(title = "微信公众号菜单", businessType = BusinessTypeEnum.DELETE)
-    @DeleteMapping("/{ids}")
-    @ApiOperation("删除微信公众号菜单")
-    public  Response remove(
-            @ApiParam(name = "ids", value = "微信公众号菜单ids参数", required = true)
-            @PathVariable Long[] ids
-    ){
-        return wxMenuService.removeMenuByIds(ids);
-    }
+//    /**
+//     * 查询微信公众号菜单列表
+//     */
+//    @PreAuthorize("@ss.hasPermi('menu:info:list')")
+//    @GetMapping("/list")
+//    @ApiOperation("查询微信公众号菜单列表")
+//    public Response<List<WxMenuVo>> list(){
+//        return wxMenuService.selectWxMenuTreeList();
+//    }
+//
+//
+//    /**
+//     * 获取微信公众号菜单详细信息
+//     */
+//    @PreAuthorize("@ss.hasPermi('menu:info:query')")
+//    @GetMapping(value = "/{id}")
+//    @ApiOperation("获取微信公众号菜单详细信息")
+//    public Response<WxMenu> getInfo(
+//            @ApiParam(name = "id", value = "微信公众号菜单参数", required = true)
+//            @PathVariable("id") Long id
+//    ){
+//        return Response.success(wxMenuService.getById(id));
+//    }
+//
+//    /**
+//     * 新增微信公众号菜单
+//     */
+//    @PreAuthorize("@ss.hasPermi('menu:info:add')")
+//    @Log(title = "微信公众号菜单", businessType = BusinessTypeEnum.INSERT)
+//    @PostMapping
+//    @ApiOperation("新增微信公众号菜单")
+//    public Response add(@RequestBody WxMenu wxMenu){
+//        return wxMenuService.saveMenu(wxMenu);
+//    }
+//
+//    /**
+//     * 修改微信公众号菜单
+//     */
+//    @PreAuthorize("@ss.hasPermi('menu:info:edit')")
+//    @Log(title = "微信公众号菜单", businessType = BusinessTypeEnum.UPDATE)
+//    @PutMapping
+//    @ApiOperation("修改微信公众号菜单")
+//    public Response edit(@RequestBody WxMenu wxMenu){
+//        return wxMenuService.updateMenuById(wxMenu);
+//    }
+//
+//    /**
+//     * 删除微信公众号菜单
+//     */
+//    @PreAuthorize("@ss.hasPermi('menu:info:remove')")
+//    @Log(title = "微信公众号菜单", businessType = BusinessTypeEnum.DELETE)
+//    @DeleteMapping("/{ids}")
+//    @ApiOperation("删除微信公众号菜单")
+//    public  Response remove(
+//            @ApiParam(name = "ids", value = "微信公众号菜单ids参数", required = true)
+//            @PathVariable Long[] ids
+//    ){
+//        return wxMenuService.removeMenuByIds(ids);
+//    }
 
     /**
      * 一键更新公众号菜单

+ 1 - 1
twzd-service/src/main/java/com/miaxis/extension/service/impl/WxExtensionIncomeServiceImpl.java

@@ -105,7 +105,7 @@ public class WxExtensionIncomeServiceImpl extends ServiceImpl<WxExtensionIncomeM
                     List<WxSpreadRelation> wxSpreadRelationList = wxSpreadRelationService.getWxSpreadRelationList(twoRelation.getParentOpenid());
                     if (!wxSpreadRelationList.isEmpty()){
                         wxSpreadRelationList.stream().forEach(o->{
-                            if (o.getSaleType() > 0){
+                            if (o.getSaleType()!=null && o.getSaleType() > 0){
                                 WxExtensionIncome income = new WxExtensionIncome();
                                 income.setOutTradeNo(outTradeNo);
                                 income.setBeneficiaryOpenid(twoRelation.getParentOpenid());

+ 3 - 3
twzd-service/src/main/resources/mapper/spread/WxSpreadRelationMapper.xml

@@ -4,9 +4,9 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.miaxis.spread.mapper.WxSpreadRelationMapper">
 <select id="getWxSpreadRelationList" resultType="com.miaxis.spread.domain.WxSpreadRelation">
-select * from wx_spread_relation
-where
-FIND_IN_SET(openid,getParents(#{openid})) and openid != #{openid}
+select t1.*,t2.sale_type
+ FROM wx_spread_relation  t1 left join user_info  t2 on (t1.parent_openid = t2.openid) where
+FIND_IN_SET(t1.openid,getParents(#{openid}))
 </select>