Commit c44673b2 by huluobin

update

parent 88e7ac67
......@@ -5,8 +5,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gogirl.application.product.serve.BaseServeService;
import com.gogirl.domain.product.serve.BaseServe;
import com.gogirl.infrastructure.mapper.market.discount.LeisureDiscountConfigMapper;
import com.gogirl.infrastructure.mapper.product.serve.BaseProduceMapper;
import com.gogirl.infrastructure.mapper.product.serve.BaseServeMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
......@@ -19,8 +17,6 @@ import java.util.List;
public class BaseServeServiceImpl extends ServiceImpl<BaseServeMapper, BaseServe> implements BaseServeService {
private final BaseServeMapper baseServeMapper;
private final LeisureDiscountConfigMapper leisureDiscountConfigMapper;
private final BaseProduceMapper baseProduceMapper;
@Override
......
package com.gogirl.interfaces.user;
package com.gogirl.interfaces.common;
import com.gogirl.infrastructure.common.base.JsonResult;
import com.gogirl.infrastructure.common.exception.RRException;
......
......@@ -20,8 +20,6 @@ import java.util.List;
@RestController
@Slf4j
public class StoreTechnicianController {
@Resource
private StoreUserService storeUserService;
@Resource
......@@ -29,7 +27,7 @@ public class StoreTechnicianController {
@Resource
private FileService fileService;
@ApiOperation("/查询美甲师信息")
@ApiOperation("/用户查询美甲师信息")
@GetMapping("/customer/technician/getById")
public JsonResult<StoreTechnician> getById(@RequestParam Integer id) {
return JsonResult.success(storeTechnicianService.getById(id));
......
package com.gogirl.interfaces.user;
import com.gogirl.application.store.store.StoreTechnicianService;
import com.gogirl.application.xcx.GogirlTokenService;
import com.gogirl.domain.user.customer.Customer;
import com.gogirl.infrastructure.common.base.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
@RestController
@Slf4j
@Api(tags = {"手机号码相关接口"})
......@@ -24,47 +14,8 @@ public class PhoneLoginController {
private final GogirlTokenService gogirlTokenService;
private final StoreTechnicianService storeTechnicianService;
@ApiOperation(value = "获取验证码,用于绑定手机号码")
@PostMapping("/customer/phone/getBindCode")
public JsonResult<String> getBindCode(@RequestParam String phone,
@RequestHeader String token) {
String code = gogirlTokenService.getBindCode(phone);
return JsonResult.success(code);
}
@ApiOperation(value = "小程序用户根据验证码绑定手机号码和称呼 生日的格式是:yyyy-MM-dd")
@PostMapping("/customer/phone/bindPhoneAndName")
public JsonResult<Customer> bindPhoneAndCode(@RequestHeader String token,
@RequestParam(required = false) String phone,
@RequestParam(required = false) String code,
@RequestParam(required = false) String realName,
@RequestParam(required = false)
@DateTimeFormat(pattern = "yyyy-MM-dd") Date birthday,
@RequestParam(required = false) String sex) throws Exception {
Customer customer = gogirlTokenService.bindPhoneAndCode(phone, code, realName, birthday, sex);
return JsonResult.success(customer);
}
@ApiOperation(value = "获取验证码,用于绑定手机号码")
@PostMapping("/technician//phone/getBindCode")
public JsonResult<String> techGetBindCode(@RequestParam String phone) {
String code = gogirlTokenService.getBindCode(phone);
return JsonResult.success(code);
}
@ApiOperation(value = "美甲师根据验证码绑定手机号码")
@PostMapping("/technician/phone/bindPhone_t")
public JsonResult<Void> bindPhone_t(@RequestHeader String token,
@RequestParam String phone,
@RequestParam String code,
@RequestParam String messageCode) {
gogirlTokenService.bindTechnicianIdPhone(phone, code, messageCode);
return JsonResult.success();
}
}
package com.gogirl.interfaces.user;
package com.gogirl.interfaces.user.customer;
import com.gogirl.application.user.customer.CustomerService;
import com.gogirl.application.xcx.GogirlTokenService;
import com.gogirl.domain.user.customer.Customer;
import com.gogirl.infrastructure.common.base.JsonResult;
import com.gogirl.infrastructure.service.file.FileService;
import com.gogirl.shared.member.CustomerOrderDetail;
import com.gogirl.shared.user.CustomerQuery;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.security.InvalidAlgorithmParameterException;
import java.util.Date;
import java.util.List;
@Api(tags = {"用户相关接口"}, value = "用户相关接口")
@Api(tags = {"用户相关接口"})
@RestController
@Slf4j
public class CustomerController {
......@@ -23,20 +25,8 @@ public class CustomerController {
@Resource
private CustomerService customerService;
@Resource
FileService fileService;
/*cmd 接口开始*/
/**
* <p>提交or更新用户街道地址信息</p>
*
* @param customerId 用户id
* @param province 省份
* @param city 城市
* @param area 地区
* @param street 街道
* @return
*/
private GogirlTokenService gogirlTokenService;
@ApiOperation("用户授权接街道地址信息")
@GetMapping("/customer/xcx/bindAddressInfo")
public JsonResult<String> bindAddressInfo(@RequestParam Integer customerId,
......@@ -57,12 +47,9 @@ public class CustomerController {
@ApiOperation(value = "客户授权后绑定个人信息")
@RequestMapping(method = {RequestMethod.GET, RequestMethod.POST}, value = "/customer/xcx/authorized1")
public JsonResult<Customer> authorized1(
@RequestParam(name = "token", required = false) String token,
@RequestParam(name = "encryptedData", required = false) String encryptedData,
@RequestParam(name = "iv", required = false) String iv) throws InvalidAlgorithmParameterException {
log.info("调用authorized,授权用户信息到程序");
public JsonResult<Customer> authorized1(@RequestParam(name = "token", required = false) String token,
@RequestParam(name = "encryptedData", required = false) String encryptedData,
@RequestParam(name = "iv", required = false) String iv) throws InvalidAlgorithmParameterException {
Customer customer = customerService.authorized1(token, encryptedData, iv);
return JsonResult.success(customer);
}
......@@ -74,16 +61,6 @@ public class CustomerController {
return JsonResult.success(token);
}
@ApiOperation(value = "超时测试接口")
@RequestMapping("/customer/testTimeOut")
public JsonResult<Void> testTimeOut() throws InterruptedException {
Thread.sleep(36000L);
return JsonResult.success();
}
/*cmd接口结束*/
/*query接口开始*/
@ApiOperation("查询会员")
@PostMapping("/customer/xcx/query")
......@@ -94,11 +71,10 @@ public class CustomerController {
@ApiOperation(value = "客户授权手机号码")
@RequestMapping(method = {RequestMethod.POST}, value = "/customer/xcx/authorizedPhone")
@PostMapping("/customer/xcx/authorizedPhone")
public JsonResult<Customer> authorizedPhone(@RequestHeader String token,
@RequestParam String encryptedData,
@RequestParam String iv) throws InvalidAlgorithmParameterException {
log.info("手机号码授权,用户信息:");
Customer customer = customerService.authorizedPhone(token, encryptedData, iv);
return JsonResult.success(customer);
}
......@@ -106,11 +82,30 @@ public class CustomerController {
@ApiOperation(value = "客户根据token获取用户信息")
@GetMapping("/customer/xcx/getUserInfo")
public JsonResult<Customer> getUserInfo(@RequestParam String token) throws Exception {
log.info("根据token:" + token + ",查询用户信息.");
Customer customer = customerService.getUserInfo(token);
return JsonResult.success(customer);
}
@ApiOperation(value = "获取验证码,用于绑定手机号码")
@PostMapping("/customer/phone/getBindCode")
public JsonResult<String> getBindCode(@RequestParam String phone) {
String code = gogirlTokenService.getBindCode(phone);
return JsonResult.success(code);
}
@ApiOperation(value = "小程序用户根据验证码绑定手机号码和称呼 生日的格式是:yyyy-MM-dd")
@PostMapping("/customer/phone/bindPhoneAndName")
public JsonResult<Customer> bindPhoneAndCode(@RequestParam(required = false) String phone,
@RequestParam(required = false) String code,
@RequestParam(required = false) String realName,
@RequestParam(required = false)
@DateTimeFormat(pattern = "yyyy-MM-dd") Date birthday,
@RequestParam(required = false) String sex) throws Exception {
Customer customer = gogirlTokenService.bindPhoneAndCode(phone, code, realName, birthday, sex);
return JsonResult.success(customer);
}
@ApiOperation(value = "查询用户可选年龄段")
@PostMapping("/technician/getAgeGroups")
public JsonResult<List<String>> getAgeGroups() {
......@@ -126,10 +121,9 @@ public class CustomerController {
return JsonResult.success(customerOrderDetail);
}
@ApiOperation(value = "用户详情数据修改")
@ApiOperation(value = "美甲师修改用户详情")
@PostMapping("/technician/updateCustomerDetail")
public JsonResult<Void> updateCustomerDetail(@RequestHeader String token,
@RequestParam(required = false) Integer birthdayMonth,
public JsonResult<Void> updateCustomerDetail(@RequestParam(required = false) Integer birthdayMonth,
@RequestParam(required = false) Integer birthdayDay,
@RequestParam(required = false) String ageGroup,
@RequestParam Integer customerId,
......@@ -145,6 +139,22 @@ public class CustomerController {
customerService.updateCustomerDetail(birthdayMonth, birthdayDay, ageGroup, customerId, orderId, orderServeId, storeRecordRealName, sex, age, job, preference, character, customerSource);
return JsonResult.success();
}
/*query接口结束*/
@ApiOperation(value = "获取验证码,用于绑定手机号码")
@PostMapping("/technician//phone/getBindCode")
public JsonResult<String> techGetBindCode(@RequestParam String phone) {
String code = gogirlTokenService.getBindCode(phone);
return JsonResult.success(code);
}
@ApiOperation(value = "美甲师根据验证码绑定手机号码")
@PostMapping("/technician/phone/bindPhone_t")
public JsonResult<Void> bindPhone_t(@RequestParam String phone,
@RequestParam String code,
@RequestParam String messageCode) {
gogirlTokenService.bindTechnicianIdPhone(phone, code, messageCode);
return JsonResult.success();
}
}
package com.gogirl.interfaces.user.customer;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author robbendev
* @since 2020-07-07
*/
@RestController
@RequestMapping("/label")
public class LabelController {
}
package com.gogirl.interfaces.user;
package com.gogirl.interfaces.user.customer;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gogirl.domain.xcx.Zone;
......@@ -20,7 +20,7 @@ public class ZoneController {
private final ZoneMapper zoneMapper;
@ApiOperation("获取父目录下的地址信息")
@ApiOperation("获取父目录下的地址信息 pid=0:1级目录")
@GetMapping("customer/no_zone/listByPid/{pid}")
public JsonResult<List<Zone>> listByPid(@PathVariable Integer pid) {
List<Zone> zoneList = zoneMapper.selectList(new LambdaQueryWrapper<Zone>().eq(Zone::getPid, pid));
......
package com.gogirl.interfaces.user;
package com.gogirl.interfaces.user.message;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gogirl.application.xcx.CustomerMessageService;
......@@ -9,8 +9,8 @@ import com.gogirl.domain.xcx.GogirlToken;
import com.gogirl.domain.xcx.VisitsLog;
import com.gogirl.infrastructure.common.base.JsonResult;
import com.gogirl.infrastructure.util.SessionUtils;
import com.gogirl.shared.user.ReadMessageCommand;
import com.gogirl.shared.user.CustomerMessagePageQuery;
import com.gogirl.shared.user.ReadMessageCommand;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
......
package com.gogirl.interfaces.xcx;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author robbendev
* @since 2020-07-08
*/
@RestController
@RequestMapping("/schedule-log")
public class ScheduleLogController {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment