|
|
@@ -45,16 +45,28 @@ public class ShareMaterialController extends AppBaseController
|
|
|
*/
|
|
|
@PostMapping("/submitPhone")
|
|
|
public R submitPhone(@RequestBody CollectionUserPhoneDTO userPhoneDTO){
|
|
|
+ long userId;
|
|
|
+ try {
|
|
|
+ userId = Long.parseLong(getUserId());
|
|
|
+ }catch (Exception e){
|
|
|
+ return R.error("用户登录信息异常");
|
|
|
+ }
|
|
|
+ userPhoneDTO.setUserId(userId);
|
|
|
int result = companyQrcPhoneService.submitPhone(userPhoneDTO);
|
|
|
return result>0?R.ok():R.error("提交失败");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 根据用户id查询用户是领取分享二维码红包详情
|
|
|
- * 一个用户id只能领取一次红包
|
|
|
+ * 根据用户id查询用户领取分享二维码红包详情
|
|
|
* */
|
|
|
- @GetMapping("/getRedPackageRecord/{userId}")
|
|
|
- public R getRedPackageRecord(@PathVariable Long userId){
|
|
|
+ @GetMapping("/getRedPackageRecord")
|
|
|
+ public R getRedPackageRecord(){
|
|
|
+ long userId;
|
|
|
+ try {
|
|
|
+ userId = Long.parseLong(getUserId());
|
|
|
+ }catch (Exception e){
|
|
|
+ return R.error("用户登录信息异常");
|
|
|
+ }
|
|
|
return R.ok().put("data",companyQrcRedPackageRecordService.getRedPackageRecordByUserId(userId));
|
|
|
}
|
|
|
|