浏览代码

资料审核

change 4 年之前
父节点
当前提交
4128c07efd

+ 33 - 0
zhongzheng-api/pom.xml

@@ -49,6 +49,39 @@
             <artifactId>knife4j-spring-boot-starter</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.freemarker</groupId>
+            <artifactId>freemarker</artifactId>
+            <version>2.3.28</version>
+        </dependency>
+
+        <dependency>
+            <groupId>ognl</groupId>
+            <artifactId>ognl</artifactId>
+            <version>3.1.12</version>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>2.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+            <version>2.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-core</artifactId>
+            <version>2.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>activation</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+
         <!-- Mysql驱动包 -->
         <dependency>
             <groupId>mysql</groupId>

+ 9 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/base/ProfileTpController.java

@@ -69,4 +69,13 @@ public class ProfileTpController extends BaseController {
         bo.setUserId(loginUser.getUser().getUserId());
         return toAjax(iUserProfileService.insertByAddBo(bo) ? 1 : 0);
     }
+
+    @ApiOperation("新增填写资料审核")
+    @PostMapping("/addWord")
+    public AjaxResult<Void> addWord(@RequestBody UserProfileAddBo bo) {
+        ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
+        bo.setUserId(loginUser.getUser().getUserId());
+        String s = iUserProfileService.addWord(bo);
+        return AjaxResult.success(s);
+    }
 }

+ 3 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/UserProfileQueryBo.java

@@ -6,6 +6,7 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 
 import java.util.Date;
+import java.util.List;
 import java.util.Map;
 import java.util.HashMap;
 
@@ -47,8 +48,8 @@ public class UserProfileQueryBo extends BaseEntity {
 	@ApiModelProperty("商品ID")
 	private Long goodsId;
 	/** 审核状态  1通过 0不通过 2待审 */
-	@ApiModelProperty("审核状态  1通过 0不通过 2待审")
-	private Integer status;
+	@ApiModelProperty("审核状态  1通过 3不通过 2待审")
+	private List<Integer> status;
 	/** 第一次提交时间 */
 	@ApiModelProperty("第一次提交时间")
 	private Long oneTime;

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IUserProfileService.java

@@ -49,4 +49,6 @@ public interface IUserProfileService extends IService<UserProfile> {
 	 * @return
 	 */
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+	String addWord(UserProfileAddBo bo);
 }

+ 5 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

@@ -112,8 +112,8 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         return this.removeByIds(ids);
     }
 
-    public static void main(String[] args) {
-
+    @Override
+    public String addWord(UserProfileAddBo bo) {
         //默认配置就够用了
         TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig());
         //资源,根据实现不同,此资源可以是模板本身,也可以是模板的相对路径
@@ -123,7 +123,9 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         bindingMap.put("name", "zhou");
         bindingMap.put("s", "niu");
         //最终渲染出来的样子
-        template.render(bindingMap,new File("D:\\Download/20211214.docx"));
+        String render = template.render(bindingMap);
+        System.out.println(render);
+        return "11";
     }
 
 }

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/base/UserProfileMapper.xml

@@ -61,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 #{item}
             </foreach>
         </if>
-        <if test="id != null and id!='' ">
+        <if test="id != null and id !='' ">
             AND up.id =#{id}
         </if>
         order by up.create_time desc