|
@@ -5,11 +5,16 @@ import com.zhongzheng.common.core.controller.BaseController;
|
|
import com.zhongzheng.common.core.domain.AjaxResult;
|
|
import com.zhongzheng.common.core.domain.AjaxResult;
|
|
import com.zhongzheng.common.core.page.TableDataInfo;
|
|
import com.zhongzheng.common.core.page.TableDataInfo;
|
|
import com.zhongzheng.common.enums.BusinessType;
|
|
import com.zhongzheng.common.enums.BusinessType;
|
|
|
|
+import com.zhongzheng.common.utils.ServletUtils;
|
|
|
|
+import com.zhongzheng.framework.web.service.WxTokenService;
|
|
import com.zhongzheng.modules.base.bo.ProfileTpAddBo;
|
|
import com.zhongzheng.modules.base.bo.ProfileTpAddBo;
|
|
import com.zhongzheng.modules.base.bo.ProfileTpEditBo;
|
|
import com.zhongzheng.modules.base.bo.ProfileTpEditBo;
|
|
import com.zhongzheng.modules.base.bo.ProfileTpQueryBo;
|
|
import com.zhongzheng.modules.base.bo.ProfileTpQueryBo;
|
|
|
|
+import com.zhongzheng.modules.base.bo.ProfileTpUserAddBo;
|
|
import com.zhongzheng.modules.base.service.IProfileTpService;
|
|
import com.zhongzheng.modules.base.service.IProfileTpService;
|
|
|
|
+import com.zhongzheng.modules.base.service.IProfileTpUserService;
|
|
import com.zhongzheng.modules.base.vo.ProfileTpVo;
|
|
import com.zhongzheng.modules.base.vo.ProfileTpVo;
|
|
|
|
+import com.zhongzheng.modules.user.entity.ClientLoginUser;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -32,6 +37,8 @@ import java.util.List;
|
|
public class ProfileTpController extends BaseController {
|
|
public class ProfileTpController extends BaseController {
|
|
|
|
|
|
private final IProfileTpService iProfileTpService;
|
|
private final IProfileTpService iProfileTpService;
|
|
|
|
+ private final IProfileTpUserService iProfileTpUserService;
|
|
|
|
+ private final WxTokenService wxTokenService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 查询资料模板列表
|
|
* 查询资料模板列表
|
|
@@ -44,28 +51,7 @@ public class ProfileTpController extends BaseController {
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * 获取所有使用商品ID
|
|
|
|
- */
|
|
|
|
- @ApiOperation("获取所有使用商品ID")
|
|
|
|
- @GetMapping("/goods_list")
|
|
|
|
- public AjaxResult<List<String>> goods_list(ProfileTpQueryBo bo) {
|
|
|
|
- List<String> list = iProfileTpService.selectAllUseGoods(bo);
|
|
|
|
- return AjaxResult.success(list);
|
|
|
|
- }
|
|
|
|
|
|
|
|
- /**
|
|
|
|
- * 导出资料模板列表
|
|
|
|
- */
|
|
|
|
- /* @ApiOperation("导出资料模板列表")
|
|
|
|
- @PreAuthorize("@ss.hasPermi('system:tp:export')")
|
|
|
|
- @Log(title = "资料模板", businessType = BusinessType.EXPORT)
|
|
|
|
- @GetMapping("/export")
|
|
|
|
- public AjaxResult<ProfileTpVo> export(ProfileTpQueryBo bo) {
|
|
|
|
- List<ProfileTpVo> list = iProfileTpService.queryList(bo);
|
|
|
|
- ExcelUtil<ProfileTpVo> util = new ExcelUtil<ProfileTpVo>(ProfileTpVo.class);
|
|
|
|
- return util.exportExcel(list, "资料模板");
|
|
|
|
- }*/
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取资料模板详细信息
|
|
* 获取资料模板详细信息
|
|
@@ -77,33 +63,14 @@ public class ProfileTpController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 新增资料模板
|
|
|
|
|
|
+ * 新增填写资料审核
|
|
*/
|
|
*/
|
|
- @ApiOperation("新增资料模板")
|
|
|
|
- @Log(title = "资料模板", businessType = BusinessType.INSERT)
|
|
|
|
|
|
+ @ApiOperation("新增填写资料审核")
|
|
|
|
+ @Log(title = "填写资料审核", businessType = BusinessType.INSERT)
|
|
@PostMapping()
|
|
@PostMapping()
|
|
- public AjaxResult<Void> add(@RequestBody ProfileTpAddBo bo) {
|
|
|
|
- return toAjax(iProfileTpService.insertByAddBo(bo) ? 1 : 0);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 修改资料模板
|
|
|
|
- */
|
|
|
|
- @ApiOperation("修改资料模板")
|
|
|
|
- @Log(title = "资料模板", businessType = BusinessType.UPDATE)
|
|
|
|
- @PostMapping("/edit")
|
|
|
|
- public AjaxResult<Void> edit(@RequestBody ProfileTpEditBo bo) {
|
|
|
|
- return toAjax(iProfileTpService.updateByEditBo(bo) ? 1 : 0);
|
|
|
|
|
|
+ public AjaxResult<Void> add(@RequestBody ProfileTpUserAddBo bo) {
|
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
|
+ return toAjax(iProfileTpUserService.insertByAddBo(bo) ? 1 : 0);
|
|
}
|
|
}
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 删除资料模板
|
|
|
|
- */
|
|
|
|
- /* @ApiOperation("删除资料模板")
|
|
|
|
- @PreAuthorize("@ss.hasPermi('system:tp:remove')")
|
|
|
|
- @Log(title = "资料模板" , businessType = BusinessType.DELETE)
|
|
|
|
- @DeleteMapping("/{profileTpIds}")
|
|
|
|
- public AjaxResult<Void> remove(@PathVariable Long[] profileTpIds) {
|
|
|
|
- return toAjax(iProfileTpService.deleteWithValidByIds(Arrays.asList(profileTpIds), true) ? 1 : 0);
|
|
|
|
- }*/
|
|
|
|
}
|
|
}
|