diff --git a/hope-winery/src/main/java/com/ruoyi/winery/controller/AppMerchantController.java b/hope-winery/src/main/java/com/ruoyi/winery/controller/AppMerchantController.java index d97818ce5..3848d4465 100644 --- a/hope-winery/src/main/java/com/ruoyi/winery/controller/AppMerchantController.java +++ b/hope-winery/src/main/java/com/ruoyi/winery/controller/AppMerchantController.java @@ -32,13 +32,13 @@ import com.ruoyi.common.core.page.TableDataInfo; /** * 商户Controller - * + * * @author ruoyi * @date 2021-01-19 */ @RequiredArgsConstructor(onConstructor_ = @Autowired) @RestController -@RequestMapping("/winery/merchant" ) +@RequestMapping("/winery/merchant") public class AppMerchantController extends BaseController { private final IAppMerchantService iAppMerchantService; @@ -48,21 +48,20 @@ public class AppMerchantController extends BaseController { */ @PreAuthorize("@ss.hasPermi('winery:merchant:list')") @GetMapping("/list") - public TableDataInfo list(AppMerchant appMerchant) - { + public TableDataInfo list(AppMerchant appMerchant) { startPage(); LambdaQueryWrapper lqw = Wrappers.lambdaQuery(appMerchant); - if (StringUtils.isNotBlank(appMerchant.getMchName())){ - lqw.like(AppMerchant::getMchName ,appMerchant.getMchName()); + if (StringUtils.isNotBlank(appMerchant.getMchName())) { + lqw.like(AppMerchant::getMchName, appMerchant.getMchName()); } - if (StringUtils.isNotBlank(appMerchant.getSubtitle())){ - lqw.eq(AppMerchant::getSubtitle ,appMerchant.getSubtitle()); + if (StringUtils.isNotBlank(appMerchant.getSubtitle())) { + lqw.eq(AppMerchant::getSubtitle, appMerchant.getSubtitle()); } - if (StringUtils.isNotBlank(appMerchant.getAvatar())){ - lqw.eq(AppMerchant::getAvatar ,appMerchant.getAvatar()); + if (StringUtils.isNotBlank(appMerchant.getAvatar())) { + lqw.eq(AppMerchant::getAvatar, appMerchant.getAvatar()); } - if (StringUtils.isNotBlank(appMerchant.getMchDesc())){ - lqw.eq(AppMerchant::getMchDesc ,appMerchant.getMchDesc()); + if (StringUtils.isNotBlank(appMerchant.getMchDesc())) { + lqw.eq(AppMerchant::getMchDesc, appMerchant.getMchDesc()); } lqw.orderByAsc(AppMerchant::getSort); List list = iAppMerchantService.list(lqw); @@ -72,30 +71,41 @@ public class AppMerchantController extends BaseController { /** * 导出商户列表 */ - @PreAuthorize("@ss.hasPermi('winery:merchant:export')" ) - @Log(title = "商户" , businessType = BusinessType.EXPORT) - @GetMapping("/export" ) + @PreAuthorize("@ss.hasPermi('winery:merchant:export')") + @Log(title = "商户", businessType = BusinessType.EXPORT) + @GetMapping("/export") public AjaxResult export(AppMerchant appMerchant) { LambdaQueryWrapper lqw = new LambdaQueryWrapper(appMerchant); List list = iAppMerchantService.list(lqw); - ExcelUtil util = new ExcelUtil(AppMerchant. class); - return util.exportExcel(list, "merchant" ); + ExcelUtil util = new ExcelUtil(AppMerchant.class); + return util.exportExcel(list, "merchant"); } /** * 获取商户详细信息 */ - @PreAuthorize("@ss.hasPermi('winery:merchant:query')" ) - @GetMapping(value = "/{id}" ) - public AjaxResult getInfo(@PathVariable("id" ) String id) { + @PreAuthorize("@ss.hasPermi('winery:merchant:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) { return AjaxResult.success(iAppMerchantService.getById(id)); } + + /** + * 获取商户详细信息 + */ + @PreAuthorize("@ss.hasPermi('winery:merchant:query')") + @GetMapping(value = "dept/{id}") + public AjaxResult getInfoByDeptId(@PathVariable("deptId") String deptId) { + + return AjaxResult.success(iAppMerchantService.getOne(new LambdaQueryWrapper().eq(AppMerchant::getDeptId, deptId))); + } + /** * 新增商户 */ - @PreAuthorize("@ss.hasPermi('winery:merchant:add')" ) - @Log(title = "商户" , businessType = BusinessType.INSERT) + @PreAuthorize("@ss.hasPermi('winery:merchant:add')") + @Log(title = "商户", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody AppMerchant appMerchant) { String richText = appMerchant.getMchDesc(); @@ -109,8 +119,8 @@ public class AppMerchantController extends BaseController { /** * 修改商户 */ - @PreAuthorize("@ss.hasPermi('winery:merchant:edit')" ) - @Log(title = "商户" , businessType = BusinessType.UPDATE) + @PreAuthorize("@ss.hasPermi('winery:merchant:edit')") + @Log(title = "商户", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody AppMerchant appMerchant) { String richText = appMerchant.getMchDesc(); @@ -124,9 +134,9 @@ public class AppMerchantController extends BaseController { /** * 删除商户 */ - @PreAuthorize("@ss.hasPermi('winery:merchant:remove')" ) - @Log(title = "商户" , businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}" ) + @PreAuthorize("@ss.hasPermi('winery:merchant:remove')") + @Log(title = "商户", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { return toAjax(iAppMerchantService.removeByIds(Arrays.asList(ids)) ? 1 : 0); } diff --git a/hope-winery/src/main/java/com/ruoyi/winery/domain/AppMerchant.java b/hope-winery/src/main/java/com/ruoyi/winery/domain/AppMerchant.java index 6facb9728..16ef21b87 100644 --- a/hope-winery/src/main/java/com/ruoyi/winery/domain/AppMerchant.java +++ b/hope-winery/src/main/java/com/ruoyi/winery/domain/AppMerchant.java @@ -36,6 +36,11 @@ private static final long serialVersionUID=1L; @TableId(value = "id", type = IdType.ASSIGN_UUID) private String id; + /** + * 部门id + */ + private Long deptId; + /** 商户名称 */ @Excel(name = "商户名称") private String mchName; diff --git a/mini-app/TodoList.md b/mini-app/TodoList.md index 3e1ba670e..fe0c381e4 100644 --- a/mini-app/TodoList.md +++ b/mini-app/TodoList.md @@ -1,17 +1,12 @@ 注X:完成 -域名[] +域名[x] 注册[X] 登录[X] 首页装修[x] 资讯/酒庄信息管理[x] -采集酒庄介绍(图标/图片)[0/12] -采集产品介绍(图标/图片)[0/12] - -产品追溯[] -新品推荐(就产品列表)[x] -视频直播[] - +采集酒庄介绍(图标/图片)[6/12] +采集产品介绍(图标/图片)[6/12] 商品列表[x] 商品管理[x] 商品详情[x] @@ -20,18 +15,20 @@ 订单管理[x] 生成支付[x] 支付回调[x] +紫环会[x] +发货单excel输出[x] +我的[x] +******---------------****** -紫环会[] ----这是啥 - - +公众号专题链接列表[] +产品追溯[] +视频直播[] +新品推荐[] +用户协议/隐私政策[] +小程序图标[] 退款申请[] 物流追踪[] -发货单excel输出[x] -发货单excel倒入[x] - -小程序图标[] -我的页面图标/图片[] - +发货单excel导入[] diff --git a/mini-app/project.config.json b/mini-app/project.config.json index 3517b1361..373e59553 100644 --- a/mini-app/project.config.json +++ b/mini-app/project.config.json @@ -139,6 +139,13 @@ "id": -1, "name": "订单列表", "pathName": "pages/mall/order/order-list", + "query": "", + "scene": null + }, + { + "id": -1, + "name": "\bwebview", + "pathName": "pages/webView/web", "scene": null } ] diff --git a/mini-app/src/apis/merchanApis.js b/mini-app/src/apis/merchanApis.js index 4852382c8..1cb0471f0 100644 --- a/mini-app/src/apis/merchanApis.js +++ b/mini-app/src/apis/merchanApis.js @@ -19,6 +19,12 @@ class MerchanApis { url: baseUrl + 'winery/merchant/' + id }) } + + getMerchantInfoByDeptId(deptId) { + return request.get({ + url: baseUrl + 'winery/merchant/dept/' + deptId + }) + } } export default new MerchanApis() diff --git a/mini-app/src/app.wpy b/mini-app/src/app.wpy index e0aedab91..b67dc68cf 100644 --- a/mini-app/src/app.wpy +++ b/mini-app/src/app.wpy @@ -110,7 +110,8 @@ pages: [ 'pages/mall/order/order-check', 'pages/mall/shopping-car/shopping-car-list', 'pages/winery/winery-detail', -'pages/winery/winery-list' +'pages/winery/winery-list', +'pages/webView/web' ], navigateToMiniProgramAppIdList: [ diff --git a/mini-app/src/appManager.js b/mini-app/src/appManager.js index a7922e85a..55ceb3089 100644 --- a/mini-app/src/appManager.js +++ b/mini-app/src/appManager.js @@ -1,6 +1,7 @@ import store from '@/store' import eventHub from './common/eventHub' import userApis from './apis/userApis' +import { webViewPage } from './store/constant/nav/pages' class AppManager { login(callBack) { @@ -29,8 +30,6 @@ class AppManager { self.setRemoteUserInfo(req2.userInfo) } - - wx.hideLoading() if (callBack) { @@ -95,7 +94,7 @@ class AppManager { } if (!path) { - this.showToast('建设中') + this.showToast('建设中,敬请期待.') return } @@ -107,6 +106,12 @@ class AppManager { showToast(msg) { wx.showToast({ title: msg, icon: 'none' }) } + + navWeb(url) { + store.state.currWebUrl = url + + this.navigateTo(webViewPage) + } } export default new AppManager() diff --git a/mini-app/src/components/mall/order/order-detail-list-body.wpy b/mini-app/src/components/mall/order/order-detail-list-body.wpy index 20d57a30d..4463b8b23 100644 --- a/mini-app/src/components/mall/order/order-detail-list-body.wpy +++ b/mini-app/src/components/mall/order/order-detail-list-body.wpy @@ -64,7 +64,7 @@ module.exports.parseOrderStatus = parseOrderStatus;
- +
diff --git a/mini-app/src/components/mall/order/order-list-body.wpy b/mini-app/src/components/mall/order/order-list-body.wpy index 156e0f64b..91322f456 100644 --- a/mini-app/src/components/mall/order/order-list-body.wpy +++ b/mini-app/src/components/mall/order/order-list-body.wpy @@ -63,7 +63,7 @@ module.exports.parseOrderStatus = parseOrderStatus; - +
diff --git a/mini-app/src/components/mall/tab/mall-bbs.wpy b/mini-app/src/components/mall/tab/mall-bbs.wpy index bfd132ec9..f8a7cee41 100644 --- a/mini-app/src/components/mall/tab/mall-bbs.wpy +++ b/mini-app/src/components/mall/tab/mall-bbs.wpy @@ -4,63 +4,68 @@ width: 100%; height: 536rpx; z-index: -10; - } + + +{ +navigationBarText: '详情', +navigationBarTextStyle: 'black', + +} + diff --git a/mini-app/src/pages/winery/winery-detail.wpy b/mini-app/src/pages/winery/winery-detail.wpy index 666186b31..fef7da5d1 100644 --- a/mini-app/src/pages/winery/winery-detail.wpy +++ b/mini-app/src/pages/winery/winery-detail.wpy @@ -116,12 +116,25 @@ wepy.page({ merchanApis.getMerchantInfo(id).then(r => { this.wineryItem = r.data }) + }, + + async initByDept(deptId) { + merchanApis.getMerchantInfoByDeptId(deptId).then(r => { + this.wineryItem = r.data + }) } }, onLoad(options) { - this.init(options.id) + + if (options.id) { + this.init(options.id) + } else if (options.deptId) { + this.initByDept(options.deptId) + } + } +} }) diff --git a/mini-app/src/pages/winery/winery-list.wpy b/mini-app/src/pages/winery/winery-list.wpy index 889fb0766..cdc3ae2fb 100644 --- a/mini-app/src/pages/winery/winery-list.wpy +++ b/mini-app/src/pages/winery/winery-list.wpy @@ -85,7 +85,16 @@ page { const parseImage = (imageKey) => { return 'https://winery-1257413599.cos.ap-beijing.myqcloud.com/' + imageKey } +const parseAwards = (value) => { +if (!value) { +return [] +} + +return value.split(',') +} + module.exports.parseImage = parseImage; +module.exports.parseAwards = parseAwards;