Răsfoiți Sursa

孟加拉地址

yangyb 2 săptămâni în urmă
părinte
comite
7e1939a8f2
38 a modificat fișierele cu 2000 adăugiri și 107 ștergeri
  1. 142 0
      operating-api/src/main/java/com/txz/operating/dto/DistrictsDTO.java
  2. 88 0
      operating-api/src/main/java/com/txz/operating/dto/DivisionsDTO.java
  3. 106 0
      operating-api/src/main/java/com/txz/operating/dto/UnionsDTO.java
  4. 106 0
      operating-api/src/main/java/com/txz/operating/dto/UpazilasDTO.java
  5. 27 0
      operating-interface/src/main/java/com/txz/operating/service/DistrictsServiceClient.java
  6. 27 0
      operating-interface/src/main/java/com/txz/operating/service/DivisionsServiceClient.java
  7. 27 0
      operating-interface/src/main/java/com/txz/operating/service/UnionsServiceClient.java
  8. 27 0
      operating-interface/src/main/java/com/txz/operating/service/UpazilasServiceClient.java
  9. 5 5
      operating-service/src/main/java/com/txz/operating/controller/ConfigController.java
  10. 126 0
      operating-service/src/main/java/com/txz/operating/controller/DistrictsController.java
  11. 247 0
      operating-service/src/main/java/com/txz/operating/controller/DiverseMacaronAvatarGenerator.java
  12. 123 0
      operating-service/src/main/java/com/txz/operating/controller/DivisionsController.java
  13. 126 0
      operating-service/src/main/java/com/txz/operating/controller/UnionsController.java
  14. 126 0
      operating-service/src/main/java/com/txz/operating/controller/UpazilasController.java
  15. 10 2
      operating-service/src/main/java/com/txz/operating/controller/UploadController.java
  16. 1 1
      operating-service/src/main/java/com/txz/operating/core/ProjectConstant.java
  17. 7 0
      operating-service/src/main/java/com/txz/operating/dao/DistrictsMapper.java
  18. 7 0
      operating-service/src/main/java/com/txz/operating/dao/DivisionsMapper.java
  19. 7 0
      operating-service/src/main/java/com/txz/operating/dao/UnionsMapper.java
  20. 7 0
      operating-service/src/main/java/com/txz/operating/dao/UpazilasMapper.java
  21. 122 0
      operating-service/src/main/java/com/txz/operating/model/Districts.java
  22. 73 0
      operating-service/src/main/java/com/txz/operating/model/Divisions.java
  23. 90 0
      operating-service/src/main/java/com/txz/operating/model/Unions.java
  24. 90 0
      operating-service/src/main/java/com/txz/operating/model/Upazilas.java
  25. 12 0
      operating-service/src/main/java/com/txz/operating/service/DistrictsService.java
  26. 12 0
      operating-service/src/main/java/com/txz/operating/service/DivisionsService.java
  27. 12 0
      operating-service/src/main/java/com/txz/operating/service/UnionsService.java
  28. 12 0
      operating-service/src/main/java/com/txz/operating/service/UpazilasService.java
  29. 22 0
      operating-service/src/main/java/com/txz/operating/service/impl/DistrictsServiceImpl.java
  30. 22 0
      operating-service/src/main/java/com/txz/operating/service/impl/DivisionsServiceImpl.java
  31. 22 0
      operating-service/src/main/java/com/txz/operating/service/impl/UnionsServiceImpl.java
  32. 22 0
      operating-service/src/main/java/com/txz/operating/service/impl/UpazilasServiceImpl.java
  33. 16 0
      operating-service/src/main/resources/mapper/DistrictsMapper.xml
  34. 13 0
      operating-service/src/main/resources/mapper/DivisionsMapper.xml
  35. 14 0
      operating-service/src/main/resources/mapper/UnionsMapper.xml
  36. 14 0
      operating-service/src/main/resources/mapper/UpazilasMapper.xml
  37. 13 9
      operating-service/src/test/java/CodeGenerator.java
  38. 77 90
      operating-service/src/test/resources/generator/template/controller.ftl

+ 142 - 0
operating-api/src/main/java/com/txz/operating/dto/DistrictsDTO.java

@@ -0,0 +1,142 @@
+/*
+ *
+ * DistrictsDTO.java
+ * Copyright(C) 2017-2020 fendo公司
+ * @date 2025-08-01
+ */
+package com.txz.operating.dto;
+
+import java.io.Serializable;
+
+public class DistrictsDTO implements Serializable {
+    /**
+     * o_districts
+     */
+    private static final long serialVersionUID = 1L;
+    /**
+     *
+     */
+    private Integer id;
+    /**
+     *
+     */
+    private Integer divisionId;
+    /**
+     *
+     */
+    private String name;
+    /**
+     *
+     */
+    private String bnName;
+    /**
+     *
+     */
+    private String lat;
+    /**
+     *
+     */
+    private String lon;
+    /**
+     *
+     */
+    private String url;
+
+    /**
+     * @return id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * @return division_id
+     */
+    public Integer getDivisionId() {
+        return divisionId;
+    }
+
+    /**
+     * @param divisionId
+     */
+    public void setDivisionId(Integer divisionId) {
+        this.divisionId = divisionId;
+    }
+
+    /**
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return bn_name
+     */
+    public String getBnName() {
+        return bnName;
+    }
+
+    /**
+     * @param bnName
+     */
+    public void setBnName(String bnName) {
+        this.bnName = bnName;
+    }
+
+    /**
+     * @return lat
+     */
+    public String getLat() {
+        return lat;
+    }
+
+    /**
+     * @param lat
+     */
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
+
+    /**
+     * @return lon
+     */
+    public String getLon() {
+        return lon;
+    }
+
+    /**
+     * @param lon
+     */
+    public void setLon(String lon) {
+        this.lon = lon;
+    }
+
+    /**
+     * @return url
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * @param url
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}

+ 88 - 0
operating-api/src/main/java/com/txz/operating/dto/DivisionsDTO.java

@@ -0,0 +1,88 @@
+/*
+ *
+ * DivisionsDTO.java
+ * Copyright(C) 2017-2020 fendo公司
+ * @date 2025-08-01
+ */
+package com.txz.operating.dto;
+
+import java.io.Serializable;
+
+public class DivisionsDTO implements Serializable {
+    /**
+     * o_divisions
+     */
+    private static final long serialVersionUID = 1L;
+    /**
+     *
+     */
+    private Integer id;
+    /**
+     *
+     */
+    private String name;
+    /**
+     *
+     */
+    private String bnName;
+    /**
+     *
+     */
+    private String url;
+
+    /**
+     * @return id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return bn_name
+     */
+    public String getBnName() {
+        return bnName;
+    }
+
+    /**
+     * @param bnName
+     */
+    public void setBnName(String bnName) {
+        this.bnName = bnName;
+    }
+
+    /**
+     * @return url
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * @param url
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}

+ 106 - 0
operating-api/src/main/java/com/txz/operating/dto/UnionsDTO.java

@@ -0,0 +1,106 @@
+/*
+ *
+ * UnionsDTO.java
+ * Copyright(C) 2017-2020 fendo公司
+ * @date 2025-08-01
+ */
+package com.txz.operating.dto;
+
+import java.io.Serializable;
+
+public class UnionsDTO implements Serializable {
+    /**
+     * o_unions
+     */
+    private static final long serialVersionUID = 1L;
+    /**
+     *
+     */
+    private Integer id;
+    /**
+     *
+     */
+    private Integer upazillaId;
+    /**
+     *
+     */
+    private String name;
+    /**
+     *
+     */
+    private String bnName;
+    /**
+     *
+     */
+    private String url;
+
+    /**
+     * @return id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * @return upazilla_id
+     */
+    public Integer getUpazillaId() {
+        return upazillaId;
+    }
+
+    /**
+     * @param upazillaId
+     */
+    public void setUpazillaId(Integer upazillaId) {
+        this.upazillaId = upazillaId;
+    }
+
+    /**
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return bn_name
+     */
+    public String getBnName() {
+        return bnName;
+    }
+
+    /**
+     * @param bnName
+     */
+    public void setBnName(String bnName) {
+        this.bnName = bnName;
+    }
+
+    /**
+     * @return url
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * @param url
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}

+ 106 - 0
operating-api/src/main/java/com/txz/operating/dto/UpazilasDTO.java

@@ -0,0 +1,106 @@
+/*
+ *
+ * UpazilasDTO.java
+ * Copyright(C) 2017-2020 fendo公司
+ * @date 2025-08-01
+ */
+package com.txz.operating.dto;
+
+import java.io.Serializable;
+
+public class UpazilasDTO implements Serializable {
+    /**
+     * o_upazilas
+     */
+    private static final long serialVersionUID = 1L;
+    /**
+     *
+     */
+    private Integer id;
+    /**
+     *
+     */
+    private Integer districtId;
+    /**
+     *
+     */
+    private String name;
+    /**
+     *
+     */
+    private String bnName;
+    /**
+     *
+     */
+    private String url;
+
+    /**
+     * @return id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * @return district_id
+     */
+    public Integer getDistrictId() {
+        return districtId;
+    }
+
+    /**
+     * @param districtId
+     */
+    public void setDistrictId(Integer districtId) {
+        this.districtId = districtId;
+    }
+
+    /**
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return bn_name
+     */
+    public String getBnName() {
+        return bnName;
+    }
+
+    /**
+     * @param bnName
+     */
+    public void setBnName(String bnName) {
+        this.bnName = bnName;
+    }
+
+    /**
+     * @return url
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * @param url
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}

+ 27 - 0
operating-interface/src/main/java/com/txz/operating/service/DistrictsServiceClient.java

@@ -0,0 +1,27 @@
+package com.txz.operating.service;
+
+
+import com.txz.operating.dto.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+import java.util.List;
+
+
+@FeignClient("operating")
+public interface DistrictsServiceClient {
+
+	@RequestMapping( value = {"/districts/add"}, method = {RequestMethod.POST} )
+    public Result add(@RequestBody DistrictsDPO districts,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/districts/delete"}, method = {RequestMethod.POST} )
+	public Result delete(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/districts/update"}, method = {RequestMethod.POST} )
+	public Result update(@RequestBody DistrictsDPO districts,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/districts/detail"}, method = {RequestMethod.POST} )
+	public Result<DistrictsDPO> detail(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/districts/list"}, method = {RequestMethod.POST} )
+	public Result<List<DistrictsDPO>> list(@RequestBody DistrictsDPO districts, @RequestParam("page") Integer page, @RequestParam("size") Integer size,@RequestParam("userId") String userId);
+}

+ 27 - 0
operating-interface/src/main/java/com/txz/operating/service/DivisionsServiceClient.java

@@ -0,0 +1,27 @@
+package com.txz.operating.service;
+
+
+import com.txz.operating.dto.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+import java.util.List;
+
+
+@FeignClient("operating")
+public interface DivisionsServiceClient {
+
+	@RequestMapping( value = {"/divisions/add"}, method = {RequestMethod.POST} )
+    public Result add(@RequestBody DivisionsDPO divisions,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/divisions/delete"}, method = {RequestMethod.POST} )
+	public Result delete(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/divisions/update"}, method = {RequestMethod.POST} )
+	public Result update(@RequestBody DivisionsDPO divisions,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/divisions/detail"}, method = {RequestMethod.POST} )
+	public Result<DivisionsDPO> detail(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/divisions/list"}, method = {RequestMethod.POST} )
+	public Result<List<DivisionsDPO>> list(@RequestBody DivisionsDPO divisions, @RequestParam("page") Integer page, @RequestParam("size") Integer size,@RequestParam("userId") String userId);
+}

+ 27 - 0
operating-interface/src/main/java/com/txz/operating/service/UnionsServiceClient.java

@@ -0,0 +1,27 @@
+package com.txz.operating.service;
+
+
+import com.txz.operating.dto.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+import java.util.List;
+
+
+@FeignClient("operating")
+public interface UnionsServiceClient {
+
+	@RequestMapping( value = {"/unions/add"}, method = {RequestMethod.POST} )
+    public Result add(@RequestBody UnionsDPO unions,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/unions/delete"}, method = {RequestMethod.POST} )
+	public Result delete(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/unions/update"}, method = {RequestMethod.POST} )
+	public Result update(@RequestBody UnionsDPO unions,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/unions/detail"}, method = {RequestMethod.POST} )
+	public Result<UnionsDPO> detail(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/unions/list"}, method = {RequestMethod.POST} )
+	public Result<List<UnionsDPO>> list(@RequestBody UnionsDPO unions, @RequestParam("page") Integer page, @RequestParam("size") Integer size,@RequestParam("userId") String userId);
+}

+ 27 - 0
operating-interface/src/main/java/com/txz/operating/service/UpazilasServiceClient.java

@@ -0,0 +1,27 @@
+package com.txz.operating.service;
+
+
+import com.txz.operating.dto.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+import java.util.List;
+
+
+@FeignClient("operating")
+public interface UpazilasServiceClient {
+
+	@RequestMapping( value = {"/upazilas/add"}, method = {RequestMethod.POST} )
+    public Result add(@RequestBody UpazilasDPO upazilas,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/upazilas/delete"}, method = {RequestMethod.POST} )
+	public Result delete(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/upazilas/update"}, method = {RequestMethod.POST} )
+	public Result update(@RequestBody UpazilasDPO upazilas,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/upazilas/detail"}, method = {RequestMethod.POST} )
+	public Result<UpazilasDPO> detail(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/upazilas/list"}, method = {RequestMethod.POST} )
+	public Result<List<UpazilasDPO>> list(@RequestBody UpazilasDPO upazilas, @RequestParam("page") Integer page, @RequestParam("size") Integer size,@RequestParam("userId") String userId);
+}

+ 5 - 5
operating-service/src/main/java/com/txz/operating/controller/ConfigController.java

@@ -34,7 +34,7 @@ public class ConfigController {
     }
 
     @PostMapping("/add")
-    @ApiOperation(value = "config新增")
+    @ApiOperation(value = "配置新增")
     public Result add(@RequestBody Config config) {
         if (config == null) {
             return Result.fail(ResultCode.OBJECT_IS_NULL);
@@ -51,7 +51,7 @@ public class ConfigController {
     }
 
     @PostMapping("/delete")
-    @ApiOperation(value = "config删除")
+    @ApiOperation(value = "配置删除")
     public Result delete(@RequestParam Integer id) {
         if (id == null) {
             return Result.fail(ResultCode.ID_IS_NULL);
@@ -69,7 +69,7 @@ public class ConfigController {
     }
 
     @PostMapping("/update")
-    @ApiOperation(value = "config更新")
+    @ApiOperation(value = "配置更新")
     public Result update(@RequestBody Config config) {
         if (config == null) {
             return Result.fail(ResultCode.OBJECT_IS_NULL);
@@ -89,7 +89,7 @@ public class ConfigController {
     }
 
     @PostMapping("/detail")
-    @ApiOperation(value = "config获取详情")
+    @ApiOperation(value = "配置获取详情")
     public Result<Config> detail(@RequestParam Long id) {
         if (id == null) {
             return Result.fail(ResultCode.ID_IS_NULL);
@@ -105,7 +105,7 @@ public class ConfigController {
     }
 
     @PostMapping("/list")
-    @ApiOperation(value = "config获取列表")
+    @ApiOperation(value = "配置获取列表")
     public Result<List<Config>> list(@RequestBody Config config, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
         PageHelper.startPage(page, size);
 

+ 126 - 0
operating-service/src/main/java/com/txz/operating/controller/DistrictsController.java

@@ -0,0 +1,126 @@
+package com.txz.operating.controller;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.txz.operating.core.ResultCode;
+import com.txz.operating.model.Districts;
+import com.txz.operating.result.Result;
+import com.txz.operating.service.DistrictsService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.*;
+import tk.mybatis.mapper.entity.Condition;
+import tk.mybatis.mapper.entity.Example.Criteria;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+@Api(tags = "[后台]区(二级市)管理")
+@RestController
+@RequestMapping("/districts")
+public class DistrictsController {
+
+    private static Logger log = LoggerFactory.getLogger(DistrictsController.class);
+
+    @Resource
+    private DistrictsService districtsService;
+
+    @PostMapping("/add")
+    @ApiOperation(value = "区(二级市)新增")
+    public Result add(@RequestBody Districts districts) {
+        if (districts == null) {
+            return Result.fail(ResultCode.OBJECT_IS_NULL);
+        }
+        try {
+//        districts.setCreateTime(new Date());
+            //            districts.setCreateUserId(userId);
+            districtsService.save(districts);
+        } catch (Exception e) {
+            log.error("新增对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "区(二级市)删除")
+    public Result delete(@RequestParam Integer id) {
+        if (id == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        try {
+            Districts districts = new Districts();
+            districts.setId(id);
+//        districts.setIsDelete(1);
+            districtsService.update(districts);
+        } catch (Exception e) {
+            log.error("删除对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/update")
+    @ApiOperation(value = "区(二级市)更新")
+    public Result update(@RequestBody Districts districts) {
+        if (districts == null) {
+            return Result.fail(ResultCode.OBJECT_IS_NULL);
+        }
+        if (districts.getId() == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        try {
+//        districts.setUpdateTime(new Date());
+            //            districts.setUpdateUserId(userId);
+            districtsService.update(districts);
+        } catch (Exception e) {
+            log.error("更新对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/detail")
+    @ApiOperation(value = "区(二级市)获取详情")
+    public Result<Districts> detail(@RequestParam Integer id) {
+        if (id == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        Districts districts = null;
+        try {
+            districts = districtsService.findById(id);
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success(districts);
+    }
+
+    @PostMapping("/list")
+    @ApiOperation(value = "区(二级市)获取列表")
+    public Result<List<Districts>> list(@RequestBody Districts districts, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
+        PageHelper.startPage(page, size);
+
+        Condition condition = new Condition(districts.getClass());
+        Criteria criteria = condition.createCriteria();
+        if (districts.getDivisionId() != null) {
+            criteria.andEqualTo("divisionId", districts.getDivisionId());
+        }
+//        criteria.andEqualTo("isDelete", 0);
+//        condition.setOrderByClause("create_time DESC");
+        PageInfo pageInfo = null;
+        try {
+            List<Districts> list = districtsService.findByCondition(condition);
+            pageInfo = new PageInfo(list);
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success(pageInfo);
+    }
+}

+ 247 - 0
operating-service/src/main/java/com/txz/operating/controller/DiverseMacaronAvatarGenerator.java

@@ -0,0 +1,247 @@
+//package com.txz.operating.controller;
+//
+//import javax.imageio.ImageIO;
+//import java.awt.*;
+//import java.awt.image.BufferedImage;
+//import java.io.File;
+//import java.io.IOException;
+//import java.util.Random;
+//import java.util.ArrayList;
+//import java.util.List;
+//import java.util.Collections;
+//
+//public class DiverseMacaronAvatarGenerator {
+//
+//    // 输出目录
+//    private static final String OUTPUT_DIR = "diverse_macaron_avatars";
+//    // 头像尺寸
+//    private static final int AVATAR_SIZE = 200;
+//    // 每个字母生成的头像数量
+//    private static final int AVATARS_PER_LETTER = 10;
+//    // 每次运行使用的颜色数量
+//    private static final int COLORS_TO_USE = 10;
+//
+//    // 差异更大的马卡龙色系颜色池 (RGB值) - 50种颜色
+//    private static final Color[] MACARON_COLOR_POOL = {
+//        // 粉色系(不同深浅)
+//        new Color(255, 220, 230), // 浅粉红
+//        new Color(250, 190, 210), // 中粉红
+//        new Color(245, 170, 195), // 深粉红
+//        new Color(250, 210, 225), // 淡粉
+//
+//        // 紫色系
+//        new Color(230, 210, 250), // 浅紫
+//        new Color(210, 180, 240), // 中紫
+//        new Color(190, 150, 230), // 深紫
+//        new Color(240, 220, 255), // 淡紫
+//
+//        // 蓝色系
+//        new Color(200, 220, 250), // 浅蓝
+//        new Color(170, 200, 240), // 中蓝
+//        new Color(140, 180, 230), // 深蓝
+//        new Color(220, 235, 255), // 淡蓝
+//
+//        // 绿色系
+//        new Color(200, 240, 220), // 浅绿
+//        new Color(160, 230, 190), // 中绿
+//        new Color(120, 210, 160), // 深绿
+//        new Color(220, 250, 230), // 淡绿
+//
+//        // 黄色系
+//        new Color(250, 240, 200), // 浅黄
+//        new Color(240, 220, 150), // 中黄
+//        new Color(230, 200, 100), // 深黄
+//        new Color(255, 250, 220), // 淡黄
+//
+//        // 橙色系
+//        new Color(250, 220, 180), // 浅橙
+//        new Color(245, 200, 140), // 中橙
+//        new Color(240, 180, 100), // 深橙
+//        new Color(255, 230, 200), // 淡橙
+//
+//        // 红色系(马卡龙风格)
+//        new Color(250, 200, 200), // 浅红
+//        new Color(240, 170, 170), // 中红
+//        new Color(230, 140, 140), // 深红
+//
+//        // 青蓝色系
+//        new Color(200, 240, 240), // 浅青
+//        new Color(160, 230, 230), // 中青
+//        new Color(120, 210, 210), // 深青
+//
+//        // 棕色系(马卡龙风格)
+//        new Color(240, 210, 180), // 浅棕
+//        new Color(230, 190, 150), // 中棕
+//
+//        // 薄荷色系
+//        new Color(200, 250, 230), // 浅薄荷
+//        new Color(160, 240, 210), // 中薄荷
+//
+//        // 珊瑚色系
+//        new Color(250, 210, 190), // 浅珊瑚
+//        new Color(245, 190, 160), // 中珊瑚
+//
+//        // 薰衣草色系
+//        new Color(220, 200, 240), // 浅薰衣草
+//        new Color(200, 170, 230), // 中薰衣草
+//
+//        // 橄榄色系(浅)
+//        new Color(220, 230, 200), // 浅橄榄
+//        new Color(200, 220, 170), // 中橄榄
+//
+//        // 莓红色系
+//        new Color(240, 190, 220), // 浅莓红
+//        new Color(230, 160, 200), // 中莓红
+//
+//        // 天蓝色系
+//        new Color(190, 220, 240), // 浅天蓝
+//        new Color(150, 200, 230), // 中天蓝
+//
+//        // 石灰色系(浅)
+//        new Color(230, 230, 235), // 浅灰
+//        new Color(210, 210, 220), // 中灰
+//
+//        // 香槟色系
+//        new Color(250, 240, 225), // 浅香槟
+//        new Color(240, 225, 200), // 中香槟
+//
+//        // 木瓜色系
+//        new Color(250, 225, 200), // 浅木瓜
+//        new Color(245, 210, 170)  // 中木瓜
+//    };
+//
+//    // 本次运行实际使用的10种颜色
+//    private static Color[] selectedColors;
+//
+//    public static void main(String[] args) {
+//        // 从50种颜色中随机选择10种颜色
+//        selectRandomColors();
+//
+//        // 创建输出目录
+//        createOutputDirectory();
+//
+//        // 为每个字母生成指定数量的头像
+//        for (char c = 'A'; c <= 'Z'; c++) {
+//            generateAvatarsForLetter(c);
+//        }
+//
+//        System.out.println("所有头像生成完成!保存路径:" + new File(OUTPUT_DIR).getAbsolutePath());
+//    }
+//
+//    // 从颜色池中随机选择指定数量的颜色
+//    private static void selectRandomColors() {
+//        List<Color> colorList = new ArrayList<>();
+//        for (Color color : MACARON_COLOR_POOL) {
+//            colorList.add(color);
+//        }
+//
+//        // 打乱颜色顺序
+//        Collections.shuffle(colorList);
+//
+//        // 选择前10种颜色
+//        selectedColors = new Color[COLORS_TO_USE];
+//        for (int i = 0; i < COLORS_TO_USE; i++) {
+//            selectedColors[i] = colorList.get(i);
+//        }
+//    }
+//
+//    // 为单个字母生成指定数量的头像
+//    private static void generateAvatarsForLetter(char letter) {
+//        // 为每个字母创建单独的子目录
+//        String letterDir = OUTPUT_DIR + File.separator + letter;
+//        File dir = new File(letterDir);
+//        if (!dir.exists()) {
+//            dir.mkdirs();
+//        }
+//
+//        // 生成指定数量的头像
+//        for (int i = 1; i <= AVATARS_PER_LETTER; i++) {
+//            try {
+//                // 生成头像
+//                BufferedImage avatar = generateAvatar(letter, AVATAR_SIZE);
+//
+//                // 保存头像
+//                String fileName = letter + "_" + i + ".png";
+//                String filePath = letterDir + File.separator + fileName;
+//                ImageIO.write(avatar, "png", new File(filePath));
+//
+//                System.out.printf("生成头像: %s%n", filePath);
+//            } catch (IOException e) {
+//                System.err.printf("生成字母 %c 的第 %d 个头像时出错: %s%n", letter, i, e.getMessage());
+//            }
+//        }
+//    }
+//
+//    // 生成单个字母头像
+//    private static BufferedImage generateAvatar(char letter, int size) {
+//        // 创建图像
+//        BufferedImage image = new BufferedImage(size, size, BufferedImage.TYPE_INT_RGB);
+//        Graphics2D g = image.createGraphics();
+//
+//        try {
+//            // 设置抗锯齿,使图像更平滑
+//            g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+//            g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+//
+//            // 从选中的10种颜色中随机选择背景颜色
+//            Color bgColor = getRandomSelectedColor();
+//            g.setColor(bgColor);
+//
+//            // 绘制完整的圆角矩形背景
+//            int radius = size / 8;
+//            g.fillRoundRect(0, 0, size, size, radius, radius);
+//
+//            // 根据背景色亮度动态选择文字颜色,确保更好的对比度
+//            Color textColor = getContrastColor(bgColor);
+//            g.setColor(textColor);
+//
+//            // 设置字体,增加多样性
+//            String[] fonts = {"Arial", "Helvetica", "Verdana", "Georgia", "Times New Roman"};
+//            String fontName = fonts[new Random().nextInt(fonts.length)];
+//            Font font = new Font(fontName, Font.BOLD, size / 2);
+//            g.setFont(font);
+//
+//            // 计算文本位置,使其居中显示
+//            FontMetrics metrics = g.getFontMetrics(font);
+//            int textWidth = metrics.charWidth(letter);
+//            int textAscent = metrics.getAscent();
+//            int x = (size - textWidth) / 2;
+//            int y = (size - metrics.getHeight()) / 2 + textAscent;
+//
+//            // 绘制字母
+//            g.drawString(String.valueOf(letter), x, y);
+//
+//            return image;
+//        } finally {
+//            g.dispose();
+//        }
+//    }
+//
+//    // 从选中的10种颜色中随机选择一种
+//    private static Color getRandomSelectedColor() {
+//        Random random = new Random();
+//        int index = random.nextInt(selectedColors.length);
+//        return selectedColors[index];
+//    }
+//
+//    // 根据背景色计算对比度最高的文字颜色
+//    private static Color getContrastColor(Color bgColor) {
+//        // 计算颜色亮度
+//        double luminance = (0.299 * bgColor.getRed() + 0.587 * bgColor.getGreen() + 0.114 * bgColor.getBlue()) / 255;
+//
+//        // 对于较暗的背景使用白色文字,较亮的背景使用深灰色文字
+//        return luminance < 0.6 ? Color.WHITE : new Color(50, 50, 50);
+//    }
+//
+//    // 创建输出目录
+//    private static void createOutputDirectory() {
+//        File dir = new File(OUTPUT_DIR);
+//        if (!dir.exists()) {
+//            if (dir.mkdirs()) {
+//                System.out.println("创建输出目录: " + dir.getAbsolutePath());
+//            } else {
+//                throw new RuntimeException("无法创建输出目录: " + dir.getAbsolutePath());
+//            }
+//        }
+//    }
+//}

+ 123 - 0
operating-service/src/main/java/com/txz/operating/controller/DivisionsController.java

@@ -0,0 +1,123 @@
+package com.txz.operating.controller;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.txz.operating.core.ResultCode;
+import com.txz.operating.model.Divisions;
+import com.txz.operating.result.Result;
+import com.txz.operating.service.DivisionsService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.*;
+import tk.mybatis.mapper.entity.Condition;
+import tk.mybatis.mapper.entity.Example.Criteria;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+@Api(tags = "[后台]省(一级省)管理")
+@RestController
+@RequestMapping("/divisions")
+public class DivisionsController {
+
+    private static Logger log = LoggerFactory.getLogger(DivisionsController.class);
+
+    @Resource
+    private DivisionsService divisionsService;
+
+    @PostMapping("/add")
+    @ApiOperation(value = "省(一级省)新增")
+    public Result add(@RequestBody Divisions divisions) {
+        if (divisions == null) {
+            return Result.fail(ResultCode.OBJECT_IS_NULL);
+        }
+        try {
+//        divisions.setCreateTime(new Date());
+            //            divisions.setCreateUserId(userId);
+            divisionsService.save(divisions);
+        } catch (Exception e) {
+            log.error("新增对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "省(一级省)删除")
+    public Result delete(@RequestParam Integer id) {
+        if (id == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        try {
+            Divisions divisions = new Divisions();
+            divisions.setId(id);
+//        divisions.setIsDelete(1);
+            divisionsService.update(divisions);
+        } catch (Exception e) {
+            log.error("删除对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/update")
+    @ApiOperation(value = "省(一级省)更新")
+    public Result update(@RequestBody Divisions divisions) {
+        if (divisions == null) {
+            return Result.fail(ResultCode.OBJECT_IS_NULL);
+        }
+        if (divisions.getId() == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        try {
+//        divisions.setUpdateTime(new Date());
+            //            divisions.setUpdateUserId(userId);
+            divisionsService.update(divisions);
+        } catch (Exception e) {
+            log.error("更新对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/detail")
+    @ApiOperation(value = "省(一级省)获取详情")
+    public Result<Divisions> detail(@RequestParam Integer id) {
+        if (id == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        Divisions divisions = null;
+        try {
+            divisions = divisionsService.findById(id);
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success(divisions);
+    }
+
+    @PostMapping("/list")
+    @ApiOperation(value = "省(一级省)获取列表")
+    public Result<List<Divisions>> list(@RequestBody Divisions divisions, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
+        PageHelper.startPage(page, size);
+
+        Condition condition = new Condition(divisions.getClass());
+        Criteria criteria = condition.createCriteria();
+//        criteria.andEqualTo("isDelete", 0);
+//        condition.setOrderByClause("create_time DESC");
+        PageInfo pageInfo = null;
+        try {
+            List<Divisions> list = divisionsService.findByCondition(condition);
+            pageInfo = new PageInfo(list);
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success(pageInfo);
+    }
+}

+ 126 - 0
operating-service/src/main/java/com/txz/operating/controller/UnionsController.java

@@ -0,0 +1,126 @@
+package com.txz.operating.controller;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.txz.operating.core.ResultCode;
+import com.txz.operating.model.Unions;
+import com.txz.operating.result.Result;
+import com.txz.operating.service.UnionsService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.*;
+import tk.mybatis.mapper.entity.Condition;
+import tk.mybatis.mapper.entity.Example.Criteria;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+@Api(tags = "[后台]联合(四级街道)管理")
+@RestController
+@RequestMapping("/unions")
+public class UnionsController {
+
+    private static Logger log = LoggerFactory.getLogger(UnionsController.class);
+
+    @Resource
+    private UnionsService unionsService;
+
+    @PostMapping("/add")
+    @ApiOperation(value = "联合(四级街道)新增")
+    public Result add(@RequestBody Unions unions) {
+        if (unions == null) {
+            return Result.fail(ResultCode.OBJECT_IS_NULL);
+        }
+        try {
+//        unions.setCreateTime(new Date());
+            //            unions.setCreateUserId(userId);
+            unionsService.save(unions);
+        } catch (Exception e) {
+            log.error("新增对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "联合(四级街道)删除")
+    public Result delete(@RequestParam Integer id) {
+        if (id == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        try {
+            Unions unions = new Unions();
+            unions.setId(id);
+//        unions.setIsDelete(1);
+            unionsService.update(unions);
+        } catch (Exception e) {
+            log.error("删除对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/update")
+    @ApiOperation(value = "联合(四级街道)更新")
+    public Result update(@RequestBody Unions unions) {
+        if (unions == null) {
+            return Result.fail(ResultCode.OBJECT_IS_NULL);
+        }
+        if (unions.getId() == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        try {
+//        unions.setUpdateTime(new Date());
+            //            unions.setUpdateUserId(userId);
+            unionsService.update(unions);
+        } catch (Exception e) {
+            log.error("更新对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/detail")
+    @ApiOperation(value = "联合(四级街道)获取详情")
+    public Result<Unions> detail(@RequestParam Integer id) {
+        if (id == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        Unions unions = null;
+        try {
+            unions = unionsService.findById(id);
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success(unions);
+    }
+
+    @PostMapping("/list")
+    @ApiOperation(value = "联合(四级街道)获取列表")
+    public Result<List<Unions>> list(@RequestBody Unions unions, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
+        PageHelper.startPage(page, size);
+
+        Condition condition = new Condition(unions.getClass());
+        Criteria criteria = condition.createCriteria();
+        if (unions.getUpazillaId() != null) {
+            criteria.andEqualTo("upazillaId", unions.getUpazillaId());
+        }
+//        criteria.andEqualTo("isDelete", 0);
+//        condition.setOrderByClause("create_time DESC");
+        PageInfo pageInfo = null;
+        try {
+            List<Unions> list = unionsService.findByCondition(condition);
+            pageInfo = new PageInfo(list);
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success(pageInfo);
+    }
+}

+ 126 - 0
operating-service/src/main/java/com/txz/operating/controller/UpazilasController.java

@@ -0,0 +1,126 @@
+package com.txz.operating.controller;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.txz.operating.core.ResultCode;
+import com.txz.operating.model.Upazilas;
+import com.txz.operating.result.Result;
+import com.txz.operating.service.UpazilasService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.*;
+import tk.mybatis.mapper.entity.Condition;
+import tk.mybatis.mapper.entity.Example.Criteria;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+@Api(tags = "[后台]副区(三级区)管理")
+@RestController
+@RequestMapping("/upazilas")
+public class UpazilasController {
+
+    private static Logger log = LoggerFactory.getLogger(UpazilasController.class);
+
+    @Resource
+    private UpazilasService upazilasService;
+
+    @PostMapping("/add")
+    @ApiOperation(value = "副区(三级区)新增")
+    public Result add(@RequestBody Upazilas upazilas) {
+        if (upazilas == null) {
+            return Result.fail(ResultCode.OBJECT_IS_NULL);
+        }
+        try {
+//        upazilas.setCreateTime(new Date());
+            //            upazilas.setCreateUserId(userId);
+            upazilasService.save(upazilas);
+        } catch (Exception e) {
+            log.error("新增对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation(value = "副区(三级区)删除")
+    public Result delete(@RequestParam Integer id) {
+        if (id == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        try {
+            Upazilas upazilas = new Upazilas();
+            upazilas.setId(id);
+//        upazilas.setIsDelete(1);
+            upazilasService.update(upazilas);
+        } catch (Exception e) {
+            log.error("删除对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/update")
+    @ApiOperation(value = "副区(三级区)更新")
+    public Result update(@RequestBody Upazilas upazilas) {
+        if (upazilas == null) {
+            return Result.fail(ResultCode.OBJECT_IS_NULL);
+        }
+        if (upazilas.getId() == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        try {
+//        upazilas.setUpdateTime(new Date());
+            //            upazilas.setUpdateUserId(userId);
+            upazilasService.update(upazilas);
+        } catch (Exception e) {
+            log.error("更新对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success();
+    }
+
+    @PostMapping("/detail")
+    @ApiOperation(value = "副区(三级区)获取详情")
+    public Result<Upazilas> detail(@RequestParam Integer id) {
+        if (id == null) {
+            return Result.fail(ResultCode.ID_IS_NULL);
+        }
+        Upazilas upazilas = null;
+        try {
+            upazilas = upazilasService.findById(id);
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success(upazilas);
+    }
+
+    @PostMapping("/list")
+    @ApiOperation(value = "副区(三级区)获取列表")
+    public Result<List<Upazilas>> list(@RequestBody Upazilas upazilas, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
+        PageHelper.startPage(page, size);
+
+        Condition condition = new Condition(upazilas.getClass());
+        Criteria criteria = condition.createCriteria();
+        if (upazilas.getDistrictId() != null) {
+            criteria.andEqualTo("districtId", upazilas.getDistrictId());
+        }
+//        criteria.andEqualTo("isDelete", 0);
+//        condition.setOrderByClause("create_time DESC");
+        PageInfo pageInfo = null;
+        try {
+            List<Upazilas> list = upazilasService.findByCondition(condition);
+            pageInfo = new PageInfo(list);
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return Result.success(pageInfo);
+    }
+}

+ 10 - 2
operating-service/src/main/java/com/txz/operating/controller/UploadController.java

@@ -51,10 +51,12 @@ public class UploadController {
 
         // 暂时都放在img里边
         String bucket;
-        if (fileExtension.equalsIgnoreCase(".mp4")) {
+        if (fileExtension.matches("(?i)\\.(mp4|avi|mov|wmv|flv|mkv|webm)")) {
             bucket = "video";
-        } else if (fileExtension.matches("(?i)\\.(jpg|png|gif)")) {
+        } else if (fileExtension.matches("(?i)\\.(jpg|jpeg|png|gif|bmp|webp|svg)")) {
             bucket = "img";
+        } else if (fileExtension.matches("(?i)\\.(mp3|wav|flac|aac|ogg|m4a)")) {
+            bucket = "audio";
         } else {
             bucket = "docs";
         }
@@ -108,6 +110,12 @@ public class UploadController {
         return Result.success();
     }
 
+    @ApiOperation("创建一个桶")
+    @GetMapping(value = "/createBucket")
+    public Result createBucket(@RequestParam String bucket) throws Exception {
+        minioUtil.createBucket(bucket);
+        return Result.success();
+    }
 
     @ApiOperation("复制一个文件")
     @GetMapping("/copyObject")

+ 1 - 1
operating-service/src/main/java/com/txz/operating/core/ProjectConstant.java

@@ -11,7 +11,7 @@ public final class ProjectConstant {
     public static final String SERVICE_PACKAGE = BASE_PACKAGE + ".service";//Service所在包
     public static final String SERVICE_IMPL_PACKAGE = SERVICE_PACKAGE + ".impl";//ServiceImpl所在包
     public static final String SERVICE_DTO_PACKAGE = BASE_PACKAGE + ".dto";//dto所在包
-    public static final String CONTROLLER_PACKAGE = BASE_PACKAGE + ".web.mng";//Controller所在包
+    public static final String CONTROLLER_PACKAGE = BASE_PACKAGE + ".controller";//Controller所在包
 
     public static final String MAPPER_INTERFACE_REFERENCE = BASE_PACKAGE + ".core.Mapper";//Mapper插件基础接口的完全限定名
     //项目名称

+ 7 - 0
operating-service/src/main/java/com/txz/operating/dao/DistrictsMapper.java

@@ -0,0 +1,7 @@
+package com.txz.operating.dao;
+
+import com.txz.operating.core.Mapper;
+import com.txz.operating.model.Districts;
+
+public interface DistrictsMapper extends Mapper<Districts> {
+}

+ 7 - 0
operating-service/src/main/java/com/txz/operating/dao/DivisionsMapper.java

@@ -0,0 +1,7 @@
+package com.txz.operating.dao;
+
+import com.txz.operating.core.Mapper;
+import com.txz.operating.model.Divisions;
+
+public interface DivisionsMapper extends Mapper<Divisions> {
+}

+ 7 - 0
operating-service/src/main/java/com/txz/operating/dao/UnionsMapper.java

@@ -0,0 +1,7 @@
+package com.txz.operating.dao;
+
+import com.txz.operating.core.Mapper;
+import com.txz.operating.model.Unions;
+
+public interface UnionsMapper extends Mapper<Unions> {
+}

+ 7 - 0
operating-service/src/main/java/com/txz/operating/dao/UpazilasMapper.java

@@ -0,0 +1,7 @@
+package com.txz.operating.dao;
+
+import com.txz.operating.core.Mapper;
+import com.txz.operating.model.Upazilas;
+
+public interface UpazilasMapper extends Mapper<Upazilas> {
+}

+ 122 - 0
operating-service/src/main/java/com/txz/operating/model/Districts.java

@@ -0,0 +1,122 @@
+package com.txz.operating.model;
+
+import javax.persistence.*;
+
+@Table(name = "o_districts")
+public class Districts {
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Integer id;
+
+    @Column(name = "division_id")
+    private Integer divisionId;
+
+    private String name;
+
+    @Column(name = "bn_name")
+    private String bnName;
+
+    private String lat;
+
+    private String lon;
+
+    private String url;
+
+    /**
+     * @return id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * @return division_id
+     */
+    public Integer getDivisionId() {
+        return divisionId;
+    }
+
+    /**
+     * @param divisionId
+     */
+    public void setDivisionId(Integer divisionId) {
+        this.divisionId = divisionId;
+    }
+
+    /**
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return bn_name
+     */
+    public String getBnName() {
+        return bnName;
+    }
+
+    /**
+     * @param bnName
+     */
+    public void setBnName(String bnName) {
+        this.bnName = bnName;
+    }
+
+    /**
+     * @return lat
+     */
+    public String getLat() {
+        return lat;
+    }
+
+    /**
+     * @param lat
+     */
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
+
+    /**
+     * @return lon
+     */
+    public String getLon() {
+        return lon;
+    }
+
+    /**
+     * @param lon
+     */
+    public void setLon(String lon) {
+        this.lon = lon;
+    }
+
+    /**
+     * @return url
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * @param url
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}

+ 73 - 0
operating-service/src/main/java/com/txz/operating/model/Divisions.java

@@ -0,0 +1,73 @@
+package com.txz.operating.model;
+
+import javax.persistence.*;
+
+@Table(name = "o_divisions")
+public class Divisions {
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Integer id;
+
+    private String name;
+
+    @Column(name = "bn_name")
+    private String bnName;
+
+    private String url;
+
+    /**
+     * @return id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return bn_name
+     */
+    public String getBnName() {
+        return bnName;
+    }
+
+    /**
+     * @param bnName
+     */
+    public void setBnName(String bnName) {
+        this.bnName = bnName;
+    }
+
+    /**
+     * @return url
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * @param url
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}

+ 90 - 0
operating-service/src/main/java/com/txz/operating/model/Unions.java

@@ -0,0 +1,90 @@
+package com.txz.operating.model;
+
+import javax.persistence.*;
+
+@Table(name = "o_unions")
+public class Unions {
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Integer id;
+
+    @Column(name = "upazilla_id")
+    private Integer upazillaId;
+
+    private String name;
+
+    @Column(name = "bn_name")
+    private String bnName;
+
+    private String url;
+
+    /**
+     * @return id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * @return upazilla_id
+     */
+    public Integer getUpazillaId() {
+        return upazillaId;
+    }
+
+    /**
+     * @param upazillaId
+     */
+    public void setUpazillaId(Integer upazillaId) {
+        this.upazillaId = upazillaId;
+    }
+
+    /**
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return bn_name
+     */
+    public String getBnName() {
+        return bnName;
+    }
+
+    /**
+     * @param bnName
+     */
+    public void setBnName(String bnName) {
+        this.bnName = bnName;
+    }
+
+    /**
+     * @return url
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * @param url
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}

+ 90 - 0
operating-service/src/main/java/com/txz/operating/model/Upazilas.java

@@ -0,0 +1,90 @@
+package com.txz.operating.model;
+
+import javax.persistence.*;
+
+@Table(name = "o_upazilas")
+public class Upazilas {
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Integer id;
+
+    @Column(name = "district_id")
+    private Integer districtId;
+
+    private String name;
+
+    @Column(name = "bn_name")
+    private String bnName;
+
+    private String url;
+
+    /**
+     * @return id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * @return district_id
+     */
+    public Integer getDistrictId() {
+        return districtId;
+    }
+
+    /**
+     * @param districtId
+     */
+    public void setDistrictId(Integer districtId) {
+        this.districtId = districtId;
+    }
+
+    /**
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return bn_name
+     */
+    public String getBnName() {
+        return bnName;
+    }
+
+    /**
+     * @param bnName
+     */
+    public void setBnName(String bnName) {
+        this.bnName = bnName;
+    }
+
+    /**
+     * @return url
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * @param url
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}

+ 12 - 0
operating-service/src/main/java/com/txz/operating/service/DistrictsService.java

@@ -0,0 +1,12 @@
+package com.txz.operating.service;
+
+import com.txz.operating.core.Service;
+import com.txz.operating.model.Districts;
+
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+public interface DistrictsService extends Service<Districts> {
+
+}

+ 12 - 0
operating-service/src/main/java/com/txz/operating/service/DivisionsService.java

@@ -0,0 +1,12 @@
+package com.txz.operating.service;
+
+import com.txz.operating.core.Service;
+import com.txz.operating.model.Divisions;
+
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+public interface DivisionsService extends Service<Divisions> {
+
+}

+ 12 - 0
operating-service/src/main/java/com/txz/operating/service/UnionsService.java

@@ -0,0 +1,12 @@
+package com.txz.operating.service;
+
+import com.txz.operating.core.Service;
+import com.txz.operating.model.Unions;
+
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+public interface UnionsService extends Service<Unions> {
+
+}

+ 12 - 0
operating-service/src/main/java/com/txz/operating/service/UpazilasService.java

@@ -0,0 +1,12 @@
+package com.txz.operating.service;
+
+import com.txz.operating.core.Service;
+import com.txz.operating.model.Upazilas;
+
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+public interface UpazilasService extends Service<Upazilas> {
+
+}

+ 22 - 0
operating-service/src/main/java/com/txz/operating/service/impl/DistrictsServiceImpl.java

@@ -0,0 +1,22 @@
+package com.txz.operating.service.impl;
+
+import com.txz.operating.core.AbstractService;
+import com.txz.operating.dao.DistrictsMapper;
+import com.txz.operating.model.Districts;
+import com.txz.operating.service.DistrictsService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+@Service
+@Transactional
+public class DistrictsServiceImpl extends AbstractService<Districts> implements DistrictsService {
+    @Resource
+    private DistrictsMapper oDistrictsMapper;
+
+}

+ 22 - 0
operating-service/src/main/java/com/txz/operating/service/impl/DivisionsServiceImpl.java

@@ -0,0 +1,22 @@
+package com.txz.operating.service.impl;
+
+import com.txz.operating.core.AbstractService;
+import com.txz.operating.dao.DivisionsMapper;
+import com.txz.operating.model.Divisions;
+import com.txz.operating.service.DivisionsService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+@Service
+@Transactional
+public class DivisionsServiceImpl extends AbstractService<Divisions> implements DivisionsService {
+    @Resource
+    private DivisionsMapper oDivisionsMapper;
+
+}

+ 22 - 0
operating-service/src/main/java/com/txz/operating/service/impl/UnionsServiceImpl.java

@@ -0,0 +1,22 @@
+package com.txz.operating.service.impl;
+
+import com.txz.operating.core.AbstractService;
+import com.txz.operating.dao.UnionsMapper;
+import com.txz.operating.model.Unions;
+import com.txz.operating.service.UnionsService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+@Service
+@Transactional
+public class UnionsServiceImpl extends AbstractService<Unions> implements UnionsService {
+    @Resource
+    private UnionsMapper oUnionsMapper;
+
+}

+ 22 - 0
operating-service/src/main/java/com/txz/operating/service/impl/UpazilasServiceImpl.java

@@ -0,0 +1,22 @@
+package com.txz.operating.service.impl;
+
+import com.txz.operating.core.AbstractService;
+import com.txz.operating.dao.UpazilasMapper;
+import com.txz.operating.model.Upazilas;
+import com.txz.operating.service.UpazilasService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+
+
+/**
+ * Created by CodeGenerator on 2025/08/01.
+ */
+@Service
+@Transactional
+public class UpazilasServiceImpl extends AbstractService<Upazilas> implements UpazilasService {
+    @Resource
+    private UpazilasMapper oUpazilasMapper;
+
+}

+ 16 - 0
operating-service/src/main/resources/mapper/DistrictsMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.txz.operating.dao.DistrictsMapper">
+    <resultMap id="BaseResultMap" type="com.txz.operating.model.Districts">
+        <!--
+          WARNING - @mbg.generated
+        -->
+        <id column="id" jdbcType="INTEGER" property="id"/>
+        <result column="division_id" jdbcType="INTEGER" property="divisionId"/>
+        <result column="name" jdbcType="VARCHAR" property="name"/>
+        <result column="bn_name" jdbcType="VARCHAR" property="bnName"/>
+        <result column="lat" jdbcType="VARCHAR" property="lat"/>
+        <result column="lon" jdbcType="VARCHAR" property="lon"/>
+        <result column="url" jdbcType="VARCHAR" property="url"/>
+    </resultMap>
+</mapper>

+ 13 - 0
operating-service/src/main/resources/mapper/DivisionsMapper.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.txz.operating.dao.DivisionsMapper">
+    <resultMap id="BaseResultMap" type="com.txz.operating.model.Divisions">
+        <!--
+          WARNING - @mbg.generated
+        -->
+        <result column="id" jdbcType="INTEGER" property="id"/>
+        <result column="name" jdbcType="VARCHAR" property="name"/>
+        <result column="bn_name" jdbcType="VARCHAR" property="bnName"/>
+        <result column="url" jdbcType="VARCHAR" property="url"/>
+    </resultMap>
+</mapper>

+ 14 - 0
operating-service/src/main/resources/mapper/UnionsMapper.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.txz.operating.dao.UnionsMapper">
+    <resultMap id="BaseResultMap" type="com.txz.operating.model.Unions">
+        <!--
+          WARNING - @mbg.generated
+        -->
+        <id column="id" jdbcType="INTEGER" property="id"/>
+        <result column="upazilla_id" jdbcType="INTEGER" property="upazillaId"/>
+        <result column="name" jdbcType="VARCHAR" property="name"/>
+        <result column="bn_name" jdbcType="VARCHAR" property="bnName"/>
+        <result column="url" jdbcType="VARCHAR" property="url"/>
+    </resultMap>
+</mapper>

+ 14 - 0
operating-service/src/main/resources/mapper/UpazilasMapper.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.txz.operating.dao.UpazilasMapper">
+    <resultMap id="BaseResultMap" type="com.txz.operating.model.Upazilas">
+        <!--
+          WARNING - @mbg.generated
+        -->
+        <id column="id" jdbcType="INTEGER" property="id"/>
+        <result column="district_id" jdbcType="INTEGER" property="districtId"/>
+        <result column="name" jdbcType="VARCHAR" property="name"/>
+        <result column="bn_name" jdbcType="VARCHAR" property="bnName"/>
+        <result column="url" jdbcType="VARCHAR" property="url"/>
+    </resultMap>
+</mapper>

+ 13 - 9
operating-service/src/test/java/CodeGenerator.java

@@ -18,17 +18,16 @@ import static com.txz.operating.core.ProjectConstant.*;
  */
 public class CodeGenerator {
 	// JDBC配置,请修改为你项目的实际配置
-	private static final String JDBC_URL = "jdbc:mysql://106.54.153.203:3306/operating";
-	private static final String JDBC_USERNAME = "htds";
-	private static final String JDBC_PASSWORD = "yw1234";
+	private static final String JDBC_URL = "jdbc:mysql://124.222.152.234:3306/operating?useSSL=false";
+	private static final String JDBC_USERNAME = "root";
+	private static final String JDBC_PASSWORD = "hy123456";
 	private static final String JDBC_DIVER_CLASS_NAME = "com.mysql.jdbc.Driver";
 
 	private static final String APPLICATION = "operating";
 
-	private static final String PROJECT_PATH = System.getProperty("user.dir")+"\\"+APPLICATION+"-service";// 项目在硬盘上的基础路径
-	private static final String PROJECT_INTERFACE_PATH = System.getProperty("user.dir")+"\\"+APPLICATION+"-interface";// 项目在硬盘上的基础路径
-	private static final String PROJECT_API_PATH = System.getProperty("user.dir")+"\\"+APPLICATION+"-api";// 项目在硬盘上的基础路径
-
+	private static final String PROJECT_PATH = System.getProperty("user.dir") + "/" + APPLICATION + "-service";// 项目在硬盘上的基础路径
+	private static final String PROJECT_INTERFACE_PATH = System.getProperty("user.dir") + "/" + APPLICATION + "-interface";// 项目在硬盘上的基础路径
+	private static final String PROJECT_API_PATH = System.getProperty("user.dir") + "/" + APPLICATION + "-api";// 项目在硬盘上的基础路径
 
 	private static final String TEMPLATE_FILE_PATH = PROJECT_PATH + "/src/test/resources/generator/template";// 模板位置
 
@@ -218,6 +217,12 @@ public class CodeGenerator {
 		tableConfiguration.setTableName(tableName);
 		tableConfiguration.setDomainObjectName(modelName+"DTO");
 		tableConfiguration.setGeneratedKey(new GeneratedKey("id", "Mysql", true, null));
+		JavaTypeResolverConfiguration javaTypeResolverConfiguration = new JavaTypeResolverConfiguration();
+		javaTypeResolverConfiguration.setConfigurationType("org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl");
+		javaTypeResolverConfiguration.addProperty("forceBigDecimals", "false");
+		javaTypeResolverConfiguration.addProperty("useJSR310Types", "true");
+		context.setJavaTypeResolverConfiguration(javaTypeResolverConfiguration);
+
 		context.addTableConfiguration(tableConfiguration);
 
 
@@ -379,8 +384,7 @@ public class CodeGenerator {
 			if (!file.getParentFile().exists()) {
 				file.getParentFile().mkdirs();
 			}
-			// cfg.getTemplate("controller-restful.ftl").process(data, new
-			// FileWriter(file));
+			// cfg.getTemplate("controller-restful.ftl").process(data, newFileWriter(file));
 			cfg.getTemplate("controller.ftl").process(data, new FileWriter(file));
 
 			System.out.println(modelNameUpperCamel + "Controller.java 生成成功");

+ 77 - 90
operating-service/src/test/resources/generator/template/controller.ftl

@@ -1,6 +1,5 @@
-package ${basePackage}.web.mng;
-import com.yiweikeji.project.core.Result;
-import ${basePackage}.core.ResultGenerator;
+package ${basePackage}.controller;
+import com.txz.operating.result.Result;
 import ${basePackage}.model.${modelNameUpperCamel};
 import ${basePackage}.service.${modelNameUpperCamel}Service;
 
@@ -23,7 +22,7 @@ import tk.mybatis.mapper.entity.Example.Criteria;
 
 import javax.annotation.Resource;
 import java.util.List;
-import org.apache.commons.lang.StringUtils;
+import java.util.Date;
 
 /**
 * Created by ${author} on ${date}.
@@ -33,112 +32,100 @@ import org.apache.commons.lang.StringUtils;
 @RequestMapping("${baseRequestMapping}")
 public class ${modelNameUpperCamel}Controller {
 
-	private static Logger log = LoggerFactory.getLogger(${modelNameUpperCamel}Controller.class);
+private static Logger log = LoggerFactory.getLogger(${modelNameUpperCamel}Controller.class);
 
     @Resource
     private ${modelNameUpperCamel}Service ${modelNameLowerCamel}Service;
 
     @PostMapping("/add")
-	@ApiOperation(value = "${modelNameLowerCamel}新增",httpMethod = "POST")
-    public Result add(@RequestBody ${modelNameUpperCamel} ${modelNameLowerCamel},String userId) {
-    	if(${modelNameLowerCamel} == null){
-    		return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
-    	}
-    	if(StringUtils.isBlank(userId)){
-    		return ResultGenerator.genFailResult(ResultCode.USERID_IS_NULL);
-    	}
-    	try {
-    //		${modelNameLowerCamel}.setCreateTime(new Date());
-    //		${modelNameLowerCamel}.setCreateUserId(userId);
-    		${modelNameLowerCamel}Service.save(${modelNameLowerCamel});
-		} catch (Exception e) {
-			log.error("新增对象操作异常e:{}",e);
-			return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
-		}
-
-        return ResultGenerator.genSuccessResult();
+@ApiOperation(value = "${modelNameLowerCamel}新增")
+public Result add(@RequestBody ${modelNameUpperCamel} ${modelNameLowerCamel}) {
+if(${modelNameLowerCamel} == null){
+return Result.fail(ResultCode.OBJECT_IS_NULL);
+}
+try {
+${modelNameLowerCamel}.setCreateTime(new Date());
+//            ${modelNameLowerCamel}.setCreateUserId(userId);
+${modelNameLowerCamel}Service.save(${modelNameLowerCamel});
+} catch (Exception e) {
+log.error("新增对象操作异常e:{}",e);
+return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+}
+return Result.success();
     }
 
     @PostMapping("/delete")
-	@ApiOperation(value = "${modelNameLowerCamel}删除",httpMethod = "POST")
-    public Result delete(@RequestParam Integer id,String userId) {
-    	if(id == null){
-    		return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
-    	}
-    	if(StringUtils.isBlank(userId)){
-    		return ResultGenerator.genFailResult(ResultCode.USERID_IS_NULL);
-    	}
-    	try {
-    		${modelNameLowerCamel}Service.deleteById(id);
-		} catch (Exception e) {
-			log.error("删除对象操作异常e:{}",e);
-			return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
-		}
-        return ResultGenerator.genSuccessResult();
+@ApiOperation(value = "${modelNameLowerCamel}删除")
+public Result delete(@RequestParam Long id) {
+if(id == null){
+return Result.fail(ResultCode.ID_IS_NULL);
+}
+try {
+${modelNameUpperCamel} ${modelNameLowerCamel} = new ${modelNameUpperCamel}();
+${modelNameLowerCamel}.setId(id);
+${modelNameLowerCamel}.setIsDelete(1);
+${modelNameLowerCamel}Service.update(${modelNameLowerCamel});
+} catch (Exception e) {
+log.error("删除对象操作异常e:{}",e);
+return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+}
+return Result.success();
     }
 
     @PostMapping("/update")
-	@ApiOperation(value = "${modelNameLowerCamel}更新",httpMethod = "POST")
-    public Result update(@RequestBody ${modelNameUpperCamel} ${modelNameLowerCamel},String userId) {
-    	if(${modelNameLowerCamel} == null){
-    		return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
-    	}
-    	if(${modelNameLowerCamel}.getId() == null){
-    		return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
-    	}
-    	if(StringUtils.isBlank(userId)){
-    		return ResultGenerator.genFailResult(ResultCode.USERID_IS_NULL);
-    	}
-    	try {
-    //		${modelNameLowerCamel}.setUpdateTime(new Date());
-    //		${modelNameLowerCamel}.setUpdateUserId(userId);
-    		${modelNameLowerCamel}Service.update(${modelNameLowerCamel});
-		} catch (Exception e) {
-			log.error("更新对象操作异常e:{}",e);
-			return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
-		}
-        return ResultGenerator.genSuccessResult();
+@ApiOperation(value = "${modelNameLowerCamel}更新")
+public Result update(@RequestBody ${modelNameUpperCamel} ${modelNameLowerCamel}) {
+if(${modelNameLowerCamel} == null){
+return Result.fail(ResultCode.OBJECT_IS_NULL);
+}
+if(${modelNameLowerCamel}.getId() == null){
+return Result.fail(ResultCode.ID_IS_NULL);
+}
+try {
+${modelNameLowerCamel}.setUpdateTime(new Date());
+//            ${modelNameLowerCamel}.setUpdateUserId(userId);
+${modelNameLowerCamel}Service.update(${modelNameLowerCamel});
+} catch (Exception e) {
+log.error("更新对象操作异常e:{}",e);
+return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+}
+return Result.success();
     }
 
     @PostMapping("/detail")
-	@ApiOperation(value = "${modelNameLowerCamel}获取详情",httpMethod = "POST")
-    public Result<${modelNameUpperCamel}> detail(@RequestParam Integer id,String userId) {
-    	if(id == null){
-    		return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
-    	}
-    	if(StringUtils.isBlank(userId)){
-    		return ResultGenerator.genFailResult(ResultCode.USERID_IS_NULL);
-    	}
-    	${modelNameUpperCamel} ${modelNameLowerCamel} = null;
-    	try {
-    		${modelNameLowerCamel} = ${modelNameLowerCamel}Service.findById(id);
-		} catch (Exception e) {
-			log.error("查询对象操作异常e:{}",e);
-			return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
-		}
-
-        return ResultGenerator.genSuccessResult(${modelNameLowerCamel});
+@ApiOperation(value = "${modelNameLowerCamel}获取详情")
+public Result<${modelNameUpperCamel}> detail(@RequestParam Long id) {
+if(id == null){
+return Result.fail(ResultCode.ID_IS_NULL);
+}
+${modelNameUpperCamel} ${modelNameLowerCamel} = null;
+try {
+${modelNameLowerCamel} = ${modelNameLowerCamel}Service.findById(id);
+} catch (Exception e) {
+log.error("查询对象操作异常e:{}",e);
+return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+}
+return Result.success(${modelNameLowerCamel});
     }
 
     @PostMapping("/list")
-	@ApiOperation(value = "${modelNameLowerCamel}获取列表",httpMethod = "POST")
-    public Result<List<${modelNameUpperCamel}>> list(@RequestBody ${modelNameUpperCamel} ${modelNameLowerCamel}, @RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size,String userId) {
-        if(StringUtils.isBlank(userId)){
-    		return ResultGenerator.genFailResult(ResultCode.USERID_IS_NULL);
-    	}
+@ApiOperation(value = "${modelNameLowerCamel}获取列表")
+public Result
+<List<${modelNameUpperCamel}>> list(@RequestBody ${modelNameUpperCamel} ${modelNameLowerCamel}, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
         PageHelper.startPage(page, size);
 
         Condition condition = new Condition(${modelNameLowerCamel}.getClass());
         Criteria criteria = condition.createCriteria();
-//        criteria.andEqualTo("name", city.getName());
-		PageInfo pageInfo = null;
-		try {
-    		 List<${modelNameUpperCamel}> list = ${modelNameLowerCamel}Service.findByCondition(condition);
-    		 pageInfo = new PageInfo(list);
-		} catch (Exception e) {
-			log.error("查询对象操作异常e:{}",e);
-			return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
-		}
-        return ResultGenerator.genSuccessResult(pageInfo);
+criteria.andEqualTo("isDelete", 0);
+condition.setOrderByClause("create_time DESC");
+PageInfo pageInfo = null;
+try {
+List<${modelNameUpperCamel}> list = ${modelNameLowerCamel}Service.findByCondition(condition);
+pageInfo = new PageInfo(list);
+} catch (Exception e) {
+log.error("查询对象操作异常e:{}",e);
+return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
+}
+return Result.success(pageInfo);
     }
 }