package com.czg.service;

import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @author tankaikai
 * @since 2025-02-10 11:35
 */
//@SpringBootTest
public class DemoTest {
    //@Resource
    private PasswordEncoder passwordEncoder;

    //@Test
    public void encode() {
        String password = "123456";
        password = passwordEncoder.encode(password);

        System.out.println(password);
    }

    public static void main(String[] args) {
        //System.out.println(StrUtil.sub("下架商品：情人节固",0,20));
        /*Map<String, Object> data = new HashMap<String, Object>() {{
            put("thing19", new HashMap<String, Object>() {{
                put("value", "张三");
            }});
            put("thing8", new HashMap<String, Object>() {{
                put("value", "财务票据");
            }});
            put("time21", new HashMap<String, Object>() {{
                put("value", DateUtil.format(DateUtil.date(), "yyyy-MM-dd HH:mm:ss"));
            }});
        }};

        JSONObject req = new JSONObject();
        req.put("template_id", "wFdoUG-dUT7bDRHq8bMJD9CF5TjyH9x_uJQgQByZqHg");
        req.put("touser", "ojC-S6iKBL7sHUb-E0UYq-Q1J4AA");
        req.put("data", data);
        String accessToken = "90_zBsyBkkK9cYx3GpbydWV97yPr-2WkRYqc2ESQKLGbr_IxqWgb3t9MZO-9jFNUlJoQCYyKyR1-tHOh_e5GKYPWdSY9wGSzEvC_uNM_MaHHbG1IiI0A0nzDrJmDNgEXBbAJAVOS";
        String post = HttpUtil.post("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=".concat(accessToken), req.toString());
        System.out.println(post);*/
    }
}
