Commit d0e1b86a authored by “yiyousong”'s avatar “yiyousong”
parents 0dc19ad4 2c31c66a
......@@ -9,6 +9,10 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.ParamDto;
import com.mortals.framework.model.Result;
import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.module.app.model.AppDatasetEntity;
import com.mortals.xhx.module.app.model.AppDatasetQuery;
import com.mortals.xhx.module.app.service.AppDatasetService;
import com.mortals.xhx.module.app.service.AppInfoFieldService;
import com.mortals.xhx.module.business.model.BusinessMatterEntity;
import com.mortals.xhx.module.business.model.BusinessMatterQuery;
import com.mortals.xhx.module.business.service.BusinessMatterService;
......@@ -41,10 +45,7 @@ import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StopWatch;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Arrays;
......@@ -77,8 +78,10 @@ public class DemoWebApiController {
private SiteThemeMatterService siteThemeMatterService;
@Autowired
private BusinessMatterService businessMatterService;
@Autowired
private AppDatasetService appDatasetService;
@Autowired
private AppInfoFieldService appInfoFieldService;
@PostMapping(value = "testGov")
......@@ -325,7 +328,7 @@ public class DemoWebApiController {
public Rest<String> limit() {
log.info("limit in");
try {
String tableName="mortals_sys_area";
String tableName = "mortals_sys_area";
//CacheDataUtil.getInstance().getBaseData()
return Rest.ok();
......@@ -336,6 +339,33 @@ public class DemoWebApiController {
}
@GetMapping(value = "genApp")
@UnAuth
public Rest<String> genApp() {
try {
AppDatasetQuery appDatasetQuery = new AppDatasetQuery();
appDatasetQuery.setAppId(304L);
List<AppDatasetEntity> appDatasetEntities = appDatasetService.find(appDatasetQuery);
StringBuilder sb = new StringBuilder();
for (AppDatasetEntity appDatasetEntity : appDatasetEntities) {
sb.append(String.format("INSERT INTO `mortals_sys_app_info_field`(`id`, `datasetId`, `fieldCode`, `fieldName`, `fieldType`, `fieldTypeValue`, `dataType`, `fieldValue`, `defaultValue`, `fieldLen`, `fieldNull`, `isList`, `fieldOrderNo`, `remark`, `createTime`, `createUserId`, `updateTime`, `updateUserId`, `serviceApi`, `serviceApiParams`) VALUES (null, %s, 'name', '政策全称', 'input', '', 'string', '', '', 128, 0, 1, 99, '', '2024-05-29 17:55:38', 1, '2024-05-29 17:55:38', 1, '', '');", appDatasetEntity.getId()));
sb.append("\n");
}
log.info("sql:{}",sb.toString());
//INSERT INTO `mortals_sys_app_info_field`(`id`, `datasetId`, `fieldCode`, `fieldName`, `fieldType`, `fieldTypeValue`, `dataType`, `fieldValue`, `defaultValue`, `fieldLen`, `fieldNull`, `isList`, `fieldOrderNo`, `remark`, `createTime`, `createUserId`, `updateTime`, `updateUserId`, `serviceApi`, `serviceApiParams`) VALUES (null, 755, 'name', '政策全称', 'input', '', 'string', '', '', 128, 0, 1, 99, '', '2024-05-29 17:55:38', 1, '2024-05-29 17:55:38', 1, '', '');
return Rest.ok();
} catch (Exception e) {
log.error("异常:", e.getMessage());
return Rest.fail(e.getMessage());
}
}
public static void main(String[] args) {
System.out.println(1001 / 500);
......
......@@ -19,7 +19,7 @@
</plugin>
<plugin interceptor="com.mortals.framework.thirty.mybatis.LogInterceptor">
<property name="enableExecutorTime" value="false" />
<property name="showSql" value="true" />
<property name="showSql" value="false" />
</plugin>
</plugins>
</configuration>
\ No newline at end of file
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