|  |  |  | 
|---|
|  |  |  | package com.doumee.api.web; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.doumee.biz.system.SystemDictDataBiz; | 
|---|
|  |  |  | import com.doumee.biz.zbom.ZbomCRMService; | 
|---|
|  |  |  | import com.doumee.biz.zbom.model.crm.CrmCustomerListRequest; | 
|---|
|  |  |  | import com.doumee.biz.zbom.model.crm.response.CRMBaseResponse; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.doumee.dao.business.model.Shop; | 
|---|
|  |  |  | import com.doumee.dao.business.model.SmsEmail; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Users; | 
|---|
|  |  |  | import com.doumee.dao.system.model.SystemDictData; | 
|---|
|  |  |  | import com.doumee.dao.web.reqeust.*; | 
|---|
|  |  |  | import com.doumee.dao.web.response.AccountResponse; | 
|---|
|  |  |  | import com.doumee.service.business.*; | 
|---|
|  |  |  | import com.doumee.service.system.SystemDictDataService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParam; | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParams; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private GetZhongTaiDataService getZhongTaiDataService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "小程序登陆", notes = "员工端小程序") | 
|---|
|  |  |  | @GetMapping("/loginByWx") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "String", name = "phone", value = "手机号", required = true), | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "短信验证码", required = true), | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "String", name = "openid", value = "openid", required = false), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse<AccountResponse> loginByPhone(@RequestParam String phone,@RequestParam String code) { | 
|---|
|  |  |  | return  ApiResponse.success(usersService.phoneLogin(phone,code)); | 
|---|
|  |  |  | public ApiResponse<AccountResponse> loginByPhone(@RequestParam String phone,@RequestParam String code,String openid) { | 
|---|
|  |  |  | return  ApiResponse.success(usersService.phoneLogin(phone,code,openid)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @GetMapping("/bindingOpenid") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "微信code", required = true), | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "String", name = "openid", value = "openid", required = true), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse bindingOpenid(@RequestParam String code) { | 
|---|
|  |  |  | usersService.bindingOpenid(code,getUserId()); | 
|---|
|  |  |  | public ApiResponse bindingOpenid(@RequestParam String openid) { | 
|---|
|  |  |  | usersService.bindingOpenid(openid,getUserId()); | 
|---|
|  |  |  | return  ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @UserLoginRequired | 
|---|
|  |  |  | @ApiOperation(value = "获取员工管理门店列表", notes = "员工端小程序") | 
|---|
|  |  |  | @GetMapping("/userShopList") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse<List<Shop>> userShopList () { | 
|---|
|  |  |  | return ApiResponse.success(shopService.getUserShopList(getMemberId())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @UserLoginRequired | 
|---|
|  |  |  | @ApiOperation(value = "门店详情", notes = "员工端小程序") | 
|---|
|  |  |  | @GetMapping("/shopDetail") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private SystemDictDataBiz systemDictDataBiz; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @UserLoginRequired | 
|---|
|  |  |  | @LoginRequired | 
|---|
|  |  |  | @ApiOperation(value = "更新token", notes = "员工端小程序") | 
|---|
|  |  |  | @GetMapping("/updateToken") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse updateToken () { | 
|---|
|  |  |  | systemDictDataBiz.updWxMiniToken(); | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @UserLoginRequired | 
|---|
|  |  |  | @ApiOperation(value = "获取内容分享海报", notes = "获取内容分享海报,加小程序码") | 
|---|
|  |  |  | @PostMapping("/getContentShareImg") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse<String> getContentShareImg(@RequestBody ContentShareImgDto param) { | 
|---|
|  |  |  | return  ApiResponse.success(usersService.getContentShareImg(this.getLoginUserInfo(),param)); | 
|---|
|  |  |  | } | 
|---|