title: ππͺβοΈ3μ°¨ ν νλ‘μ νΈ WORLD κΈ°μ μ
keywords:
- IT
- ννλ‘μ νΈ
- JAVA
- νμ€ν
'WORLD' λ κ²μ μ리μΌλλ²(μ μμ½λ) νλ§€ μΌνλͺ° μ¬μ΄νΈμ λλ€.
κ²μ ꡬ맀 , 리뷰 , λ¬Έμ , μ΅μ κ²μ μΆμμ 보νμΈ λ± μ»¨ν μΈ μ΄μ©μ΄ κ°λ₯ν©λλ€
μ§ν κΈ°κ°: 2023.08.01 ~ 2023.08.30
![]() μ€νμ£Ό(νμ₯) |
![]() μ€κΈΈν |
![]() μ‘μ±μ |
![]() μλΉ |
ν μ΄λ¦ | GitHub Repository |
---|---|
World | GitHub Url |
μμ
λͺ
/μμ
μμ΄λμ
adminorder/otj
origin:main
μ mergeπ¦world
βββ πμ€νμΌ.css
βββ πtemplate.html
βββ πtest.java
βββ πtest.java
βββ πadmin
βββ πcalenbar
βββ πemail
βββ πfile
βββ πmypage
βββ πnotice
βββ πorder
βββ πproduct
βββ πqna
βββ πqnaAnswer
βββ πreview
βββ πuser
- SpringBoot
- JAVA
- MariaDB
- HTML
- CSS
- JS
- Ajax
- Bootstrap
-Tailwind css
- CentOS
- jQuery
- NAVER Cloud
- IntelliJ IDEA
- DBeaver
- Termius
- GitHub-Action CI/CD
νμκ°μ |
---|
![]() |
μνμμΈ |
---|
![]() |
μνꡬ맀 |
---|
![]() |
μνλͺ©λ‘ |
---|
![]() |
κ΄λ¦¬μνμ΄μ§ |
---|
![]() |
λ§μ΄νμ΄μ§* |
---|
![]() |
λ΄μ©
1) μ€λͺ
@GetMapping("/mailCheck")
@ResponseBody
public int processMailCheck(@RequestParam("email") String email) throws Exception {
int mailKey = (int) ((Math.random() * (99999 - 10000 + 1)) + 10000);
String to = email;
String title = "νμν©λλ€! WORLD μ
λλ€. νμκ°μ
μ νμν μΈμ¦λ²νΈ μ
λλ€.";
String content = "[μΈμ¦λ²νΈ] " + mailKey + " μ
λλ€. <br/> μΈμ¦λ²νΈ νμΈλμ κΈ°μ
ν΄μ£ΌμΈμ.";
try {
MimeMessage mail = mailSender.createMimeMessage();
MimeMessageHelper mailHelper = new MimeMessageHelper(mail, true, "UTF-8");
mailHelper.setTo(to);
mailHelper.setSubject(title);
mailHelper.setText(content, true);
mailSender.send(mail);
} catch (Exception e) {
throw new DataNotFoundException("error");
}
return mailKey;
}
λ΄μ©
1) μ€λͺ
```js
$.ajax({
url: '/user/checkDuplicate',
type: 'GET',
dataType: 'JSON',
data: {
nickname: nickname
},
success: function(response) {
if (!response) {
isNicknameDuplicate = false;
}
if (isNicknameDuplicate) {
$('#nicknameCheckResult')
.text('μ΄λ―Έ μ¬μ© μ€μΈ λλ€μμ
λλ€.')
.css('color', 'red')
.css('margin-left', '40px');
} else {
$('#nicknameCheckResult')
.text('μ¬μ© κ°λ₯ν λλ€μμ
λλ€.')
.css('margin-left', '70px')
.css('color', 'white');
}
},
error: function(xhr, status, error) {
console.error('μ μ μμ μ€λ₯:', error);
}
});
}
```
@PostMapping("/")
public String adminMainSearsh(Model model, @Valid AdminSearchForm adminSearchForm, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return "redirect:/ad/order";
}
LocalDateTime start = adminSearchForm.getStart();
LocalDateTime end = adminSearchForm.getEnd();
List<ProductOrder> list = this.orderService.getOrdersBetweenDates(start,end);
int num=list.size();
int totalPrice=1;
for (ProductOrder order : list) {
Product product = order.getProduct();
if (product != null) {
totalPrice += product.getPrice();
}
}
DecimalFormat decimalFormat = new DecimalFormat("#,###");
String formattedAllPrice = decimalFormat.format(totalPrice);
LocalDate todayLocalDate = LocalDate.now();
int priceM1 = this.adminService.requestMonthPrice(YearMonth.now());
int priceM2 = this.adminService.requestMonthPrice(this.adminService.MonthMinus(1));
int priceM3 = this.adminService.requestMonthPrice(this.adminService.MonthMinus(2));
int priceM4 = this.adminService.requestMonthPrice(this.adminService.MonthMinus(3));
int priceM5 = this.adminService.requestMonthPrice(this.adminService.MonthMinus(4));
String month1 = YearMonth.now().toString();
String month2 = this.adminService.MonthMinus(1).toString();
String month3 = this.adminService.MonthMinus(2).toString();
String month4 = this.adminService.MonthMinus(3).toString();
String month5 = this.adminService.MonthMinus(4).toString();
model.addAttribute("month1",month1);
model.addAttribute("month2",month2);
model.addAttribute("month3",month3);
model.addAttribute("month4",month4);
model.addAttribute("month5",month5);
model.addAttribute("priceM1",priceM1);
model.addAttribute("priceM2",priceM2);
model.addAttribute("priceM3",priceM3);
model.addAttribute("priceM4",priceM4);
model.addAttribute("priceM5",priceM5);
model.addAttribute("listSize",num);
model.addAttribute("allPrice",formattedAllPrice);
return "admin/admin_main";
}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/172203/font-awesome.min.css">
<link rel="stylesheet" href="/layout/admin.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.1.0/chart.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default no-margin">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header fixed-brand">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" id="menu-toggle">
<span class="glyphicon glyphicon-th-large" aria-hidden="true"></span>
</button>
<a class="navbar-brand" th:href="@{/}"><img class="rogoimg" src="https://i.postimg.cc/qRMyWWkr/image.png"/></a>
</div>
<!-- navbar-header-->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
</ul>
</div>
<!-- bs-example-navbar-collapse-1 -->
</nav>
<div id="wrapper">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul class="sidebar-nav nav-pills nav-stacked" id="menu">
<li>
<a th:href="@{/admin/}"><span class="fa-stack fa-lg pull-left"><i class="fa fa-cloud-download fa-stack-1x "></i></span>λ§€μΆ</a>
</li>
<li>
<a th:href="@{/admin/order}"><span class="fa-stack fa-lg pull-left"><i class="fa fa-cart-plus fa-stack-1x "></i></span>μ£Όλ¬Έ κ΄λ¦¬</a>
</li>
<li>
<a th:href="@{/admin/product}"><span class="fa-stack fa-lg pull-left"><i class="fa fa-cart-plus fa-stack-1x "></i></span>μν κ΄λ¦¬</a>
</li>
<li>
<a th:href="@{/admin/user}"><span class="fa-stack fa-lg pull-left"><i class="fa fa-wrench fa-stack-1x "></i></span>νμ κ΄λ¦¬</a>
</li>
<li>
<a th:href="@{/admin/review}"><span class="fa-stack fa-lg pull-left"><i class="fa fa-server fa-stack-1x "></i></span>리뷰 κ΄λ¦¬</a>
</li>
<li>
<a th:href="@{/admin/qna}"><span class="fa-stack fa-lg pull-left"><i class="fa fa-server fa-stack-1x "></i></span>λ¬Έμμ¬ν κ΄λ¦¬</a>
</li>
<li>
<a th:href="@{/admin/notice}"><span class="fa-stack fa-lg pull-left"><i class="fa fa-server fa-stack-1x "></i></span>곡μ§μ¬ν κ΄λ¦¬</a>
</li>
</ul>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<div class="container-fluid xyz">
<div class="row">
<div class="col-lg-12">
<h1>λ§€μΆ</h1>
<div class="date_content">
<div class="date_title"><p>κΈ°κ°λ³ μ‘°ν. </p></div>
<form th:action="@{/ad}" th:object="${adminSearchForm}" method="POST" class="date_form">
<div class="birthday">
<p>μ‘°νκΈ°κ° :</p>
<input type="datetime-local" th:field="*{start}">
<p>~</p>
<input type="datetime-local" th:field="*{end}">
<button type="submit" class="date_btn"> μ‘°ννκΈ° </button>
</div>
</form>
<div class="date_data"><div>
<p >κΈ°κ° λ΄ νλ§€ 건 μ :</p>
<p th:text="${listSize}">10(νμ리ν)</p>
<p> 건</p>
</div>
<div>
<p>κΈ°κ° λ΄ μ΄ λ§€μΆ :</p>
<p th:text="${allPrice}"></p>
<p>won</p>
</div>
</div>
</div>
<div class="date_content">
<div class="date_title"><p>λ§€μΆ λν₯ </p></div>
<canvas id="myChart"></canvas>
</div>
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script>
var ctx = document.getElementById('myChart').getContext('2d');
var priceM1 = [[${priceM1}]];
var priceM2 = [[${priceM2}]];
var priceM3 = [[${priceM3}]];
var priceM4 = [[${priceM4}]];
var priceM5 = [[${priceM5}]];
var month1 = '[[${month1}]]';
var month2 = '[[${month2}]]';
var month3 = '[[${month3}]]';
var month4 = '[[${month4}]]';
var month5 = '[[${month5}]]';
console.log(month4.toString())
var chart = new Chart(ctx, {
type: 'bar',
data: {
labels: [month5, month4, month3, month2, month1],
datasets: [{
label: 'λ§€μΆ (λ¨μ : μ)',
backgroundColor: 'rgb(255, 99, 132)',
borderColor: 'rgb(255, 99, 132)',
data: [priceM5, priceM4, priceM3, priceM2, priceM1]
}]
},
});
</script>
</body>
</html>
## νλ‘ νΈμλ λ©μΈ
##λ°±μλ
##μ 체 νμ΄μ§ λλ²κΉ
λ° λ°±μλ,νλ‘ νΈμλ λ―ΈλΉ μμ &μΆκ°
##UI/UX (μΉ΄μΉ΄μ€μ€λΈ) , μꡬμ¬ν μ μμ κΈ°ν
##νλ‘μ νΈ κΈ°μ μ μμ±
##λ¬Έμμμ±
##νλ‘ νΈμλ μλΈ
##λ°±μλ
##νλ‘μ νΈ λ°°ν¬(GitHub-Action)
##μ μ₯μ (GitHub)κ΄λ¦¬
##νλ‘ νΈμλ μλΈ
##λ°±μλ
##λ°νμλ£ (PPT) μμ±
##νλ‘ νΈμλ μλΈ
##λ°±μλ
##λ°ν